250 lines
8.1 KiB
Plaintext
250 lines
8.1 KiB
Plaintext
# i3 config
|
|
# @author Antoine Phan @notkaramel
|
|
|
|
# mod key
|
|
set $mod Mod4
|
|
|
|
# transparency
|
|
exec --no-startup-id picom -b
|
|
# --shadow --shadow-radius=60 --shadow-opacity=0.2 --fade-in-step=0.8 &
|
|
# --inactive-opacity=0.9
|
|
# Font for window titles
|
|
font pango:Fira Code 10
|
|
|
|
# Keymap
|
|
exec setxkbmap -layout us -variant altgr-intl
|
|
|
|
# Pipewire: set volume to sink and source
|
|
set $refresh_audio pkill -SIGRTMIN+1 i3blocks
|
|
bindsym XF86AudioRaiseVolume exec --no-startup-id wpctl set-volume @DEFAULT_SINK@ 10%+ && $refresh_audio
|
|
bindsym XF86AudioLowerVolume exec --no-startup-id wpctl set-volume @DEFAULT_SINK@ 10%- && $refresh_audio
|
|
bindsym XF86AudioMute exec --no-startup-id wpctl set-mute @DEFAULT_SINK@ toggle && $refresh_audio
|
|
|
|
# bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
|
|
|
|
# brightness
|
|
set $refresh_brightness pkill -SIGRTMIN+2 i3blocks
|
|
bindsym XF86MonBrightnessUp exec brightnessctl set 5%+ && $refresh_brightness
|
|
bindsym XF86MonBrightnessDown exec brightnessctl set 8%- && $refresh_brightness
|
|
|
|
# media player controls
|
|
bindsym XF86AudioPlay exec playerctl play-pause
|
|
# bindsym XF86AudioPause exec playerctl pause
|
|
bindsym XF86AudioNext exec playerctl next
|
|
bindsym XF86AudioPrev exec playerctl previous
|
|
|
|
# personal media shortcut cuz it's closer to my left hands
|
|
bindsym $mod+z exec playerctl play-pause
|
|
bindsym $mod+x exec playerctl next
|
|
|
|
# mouse+$mod -> drag windows
|
|
floating_modifier $mod
|
|
|
|
# move tiling windows via drag & drop by left-clicking into the title bar, or left-clicking anywhere into the window while holding the floating modifier.
|
|
# tiling_drag modifier titlebar
|
|
|
|
# start a terminal
|
|
bindsym $mod+Return exec alacritty
|
|
|
|
# kill focused window
|
|
bindsym $mod+Shift+q kill
|
|
|
|
# Menu|Program launcher
|
|
# bindsym $mod+d exec --no-startup-id dmenu_run
|
|
bindsym $mod+d exec --no-startup-id rofi -show combi
|
|
bindsym $mod+period exec "rofi -show emoji"
|
|
bindsym $mod+Tab exec rofi -show window
|
|
bindsym $mod+c exec rofi -show calc
|
|
|
|
# -- Lock screen --
|
|
bindsym $mod+Shift+l exec notify-send 'Rendering new lockscreen!' && betterlockscreen -u ~/.wallpaper/ --fx dim && betterlockscreen -l dim
|
|
bindsym $mod+l exec betterlockscreen -l dim
|
|
|
|
# -- Screenshot --
|
|
bindsym $mod+Shift+s exec "maim -s | xclip -selection clipboard -t image/png && notify-send 'Screenshot Captured!'"
|
|
# interactive screenshot by pressing printscreen
|
|
#bindsym Print exec gnome-screenshot -i
|
|
#crop-area screenshot by pressing Mod + printscreen
|
|
bindsym $mod+Print exec gnome-screenshot -a
|
|
|
|
# alternatively, you can use the cursor keys:
|
|
bindsym $mod+Left focus left
|
|
bindsym $mod+Down focus down
|
|
bindsym $mod+Up focus up
|
|
bindsym $mod+Right focus right
|
|
|
|
# alternatively, you can use the cursor keys:
|
|
bindsym $mod+Shift+Left move left
|
|
bindsym $mod+Shift+Down move down
|
|
bindsym $mod+Shift+Up move up
|
|
bindsym $mod+Shift+Right move right
|
|
|
|
# split in horizontal orientation
|
|
# bindsym $mod+h split h
|
|
|
|
# split in vertical orientation
|
|
# bindsym $mod+v split v
|
|
|
|
# enter fullscreen mode for the focused container
|
|
bindsym $mod+f fullscreen toggle
|
|
|
|
# change container layout (stacked, tabbed, toggle split)
|
|
bindsym $mod+s layout stacking
|
|
bindsym $mod+t layout tabbed
|
|
bindsym $mod+e layout toggle split
|
|
|
|
# toggle tiling / floating
|
|
#bindsym $mod+Shift+space floating toggle
|
|
bindsym $mod+v floating toggle
|
|
|
|
# change focus between tiling / floating windows
|
|
bindsym $mod+Shift+v focus mode_toggle
|
|
|
|
# focus the parent container
|
|
# bindsym $mod+a focus parent
|
|
|
|
# focus the child container
|
|
#bindsym $mod+d focus child
|
|
|
|
# --- Coloring ---
|
|
# class border backgr. text indicator child_border
|
|
client.focused #4c7899 #067A67 #ffffff #2e9ef4 #285577
|
|
client.focused_inactive #333333 #161C1A #ffffff #484e50 #5f676a
|
|
client.unfocused #333333 #222222 #888888 #292d2e #222222
|
|
client.urgent #2f343a #900000 #ffffff #900000 #900000
|
|
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
|
|
|
|
client.background #ffffff
|
|
|
|
# --- Gaps ---
|
|
# `inner` is like padding in CSS
|
|
# gaps inner <gap_size>[px]
|
|
gaps inner 10
|
|
|
|
# `outer` is like margin in CSS
|
|
# gaps outer|horizontal|vertical|top|left|bottom|right <gap_size>[px]
|
|
|
|
# smart_gaps on|off|inverse_outer
|
|
smart_gaps inverse_outer
|
|
|
|
# borders
|
|
default_border pixel 0
|
|
default_floating_border pixel 0
|
|
smart_borders on
|
|
# for_window [class="^.*"] border pixel 0
|
|
|
|
# --- ZOOM ---
|
|
# for_window [class="zoom"] floating enable
|
|
for_window [class="(.*join\?action\=join.*|.*zoom.*)"] floating enable
|
|
for_window [class="(.*join\?action\=join.*|.*zoom.*)" title="Zoom - Licensed Account"] floating disable
|
|
for_window [class="(.*join\?action\=join.*|.*zoom.*)" title="Zoom Meeting"] floating disable
|
|
|
|
# --- Display settings ---
|
|
exec --no-startup-id autorandr --change
|
|
exec --no-startup-id feh --bg-fill --randomize $HOME/.wallpaper/*
|
|
|
|
# Caps Lock & Num Lock modes
|
|
# Define names for default workspaces for which we configure key bindings later on.
|
|
bindsym --release Caps_Lock exec pkill -SIGRTMIN+10 i3blocks
|
|
bindsym --release Num_Lock exec pkill -SIGRTMIN+10 i3blocks
|
|
|
|
# We use variables to avoid repeating the names in multiple places.
|
|
set $ws1 "1"
|
|
set $ws2 "2"
|
|
set $ws3 "3"
|
|
set $ws4 "4"
|
|
set $ws5 "5"
|
|
set $ws6 "6"
|
|
set $ws7 "7"
|
|
set $ws8 "8"
|
|
set $ws9 "9"
|
|
set $ws10 "10"
|
|
|
|
# switch to workspace
|
|
bindsym $mod+1 workspace number $ws1
|
|
bindsym $mod+2 workspace number $ws2
|
|
bindsym $mod+3 workspace number $ws3
|
|
bindsym $mod+4 workspace number $ws4
|
|
bindsym $mod+5 workspace number $ws5
|
|
bindsym $mod+6 workspace number $ws6
|
|
bindsym $mod+7 workspace number $ws7
|
|
bindsym $mod+8 workspace number $ws8
|
|
bindsym $mod+9 workspace number $ws9
|
|
bindsym $mod+0 workspace number $ws10
|
|
|
|
# move focused container to workspace
|
|
bindsym $mod+Shift+1 move container to workspace number $ws1
|
|
bindsym $mod+Shift+2 move container to workspace number $ws2
|
|
bindsym $mod+Shift+3 move container to workspace number $ws3
|
|
bindsym $mod+Shift+4 move container to workspace number $ws4
|
|
bindsym $mod+Shift+5 move container to workspace number $ws5
|
|
bindsym $mod+Shift+6 move container to workspace number $ws6
|
|
bindsym $mod+Shift+7 move container to workspace number $ws7
|
|
bindsym $mod+Shift+8 move container to workspace number $ws8
|
|
bindsym $mod+Shift+9 move container to workspace number $ws9
|
|
bindsym $mod+Shift+0 move container to workspace number $ws10
|
|
|
|
for_window [title="Blueberry"] floating enable
|
|
for_window [title="Yoshimi"] floating enable
|
|
# assign [title="Spotify"] → $ws10
|
|
|
|
# reload the configuration file
|
|
bindsym $mod+Shift+c reload
|
|
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
|
bindsym $mod+Shift+r restart
|
|
# exit i3 (logs you out of your X session)
|
|
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit' -B 'SHUTDOWN' 'shutdown now' -B 'Reboot' 'reboot'"
|
|
|
|
# resize window (you can also use the mouse for that)
|
|
mode "resize" {
|
|
# same bindings, but for the arrow keys
|
|
bindsym Left resize shrink width 10 px or 10 ppt
|
|
bindsym Down resize grow height 10 px or 10 ppt
|
|
bindsym Up resize shrink height 10 px or 10 ppt
|
|
bindsym Right resize grow width 10 px or 10 ppt
|
|
|
|
# back to normal: Enter or Escape or $mod+r
|
|
bindsym Return mode "default"
|
|
bindsym Escape mode "default"
|
|
bindsym $mod+r mode "default"
|
|
}
|
|
|
|
bindsym $mod+r mode "resize"
|
|
|
|
# toggle showing bar
|
|
bindsym $mod+b bar mode toggle
|
|
# colors for the bars
|
|
set $white #ffffff
|
|
set $black #242424
|
|
set $red #FFADAD
|
|
set $orange #F7D9C4
|
|
set $yellow #FAFF81
|
|
set $blue #C6DEF1
|
|
set $mint #A0C49A
|
|
set $none ##00000000
|
|
|
|
bar {
|
|
status_command i3blocks
|
|
i3bar_command i3bar --transparency
|
|
# output primary
|
|
position top
|
|
tray_output primary
|
|
font pango:FiraCode Nerd Font Semibold 11
|
|
separator_symbol "│"
|
|
padding 6 6 0 0
|
|
workspace_min_width 32
|
|
|
|
colors {
|
|
focused_background $blackbb
|
|
background $blackee
|
|
separator $blue33
|
|
|
|
# colorclass <border> <background> <text>
|
|
focused_workspace $yellow $yellow $blackaa
|
|
active_workspace $blue $blue $black
|
|
inactive_workspace $mint $mintbb $black
|
|
urgent_workspace $orange $orange $black
|
|
binding_mode $orange $orange $black
|
|
}
|
|
}
|