|
| 1 | +# This file has been auto-generated by i3-config-wizard(1). |
| 2 | +# It will not be overwritten, so edit it as you like. |
| 3 | +# |
| 4 | +# Should you change your keyboard layout some time, delete |
| 5 | +# this file and re-run i3-config-wizard(1). |
| 6 | +# |
| 7 | + |
| 8 | +# i3 config file (v4) |
| 9 | +# |
| 10 | +# Please see https://i3wm.org/docs/userguide.html for a complete reference! |
| 11 | + |
| 12 | +set $mod Mod4 |
| 13 | + |
| 14 | +# Font for window titles. Will also be used by the bar unless a different font |
| 15 | +# is used in the bar {} block below. |
| 16 | +font pango:monospace 8 |
| 17 | + |
| 18 | +# This font is widely installed, provides lots of unicode glyphs, right-to-left |
| 19 | +# text rendering and scalability on retina/hidpi displays (thanks to pango). |
| 20 | +#font pango:DejaVu Sans Mono 8 |
| 21 | + |
| 22 | +# Start XDG autostart .desktop files using dex. See also |
| 23 | +# https://wiki.archlinux.org/index.php/XDG_Autostart |
| 24 | +exec --no-startup-id dex-autostart --autostart --environment i3 |
| 25 | + |
| 26 | +# The combination of xss-lock, nm-applet and pactl is a popular choice, so |
| 27 | +# they are included here as an example. Modify as you see fit. |
| 28 | + |
| 29 | +# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the |
| 30 | +# screen before suspend. Use loginctl lock-session to lock your screen. |
| 31 | +# exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork |
| 32 | + |
| 33 | +# NetworkManager is the most popular way to manage wireless networks on Linux, |
| 34 | +# and nm-applet is a desktop environment-independent system tray GUI for it. |
| 35 | +exec --no-startup-id nm-applet |
| 36 | + |
| 37 | +# Use pactl to adjust volume in PulseAudio. |
| 38 | +set $refresh_i3status killall -SIGUSR1 i3status |
| 39 | +bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status |
| 40 | +bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status |
| 41 | +bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status |
| 42 | +bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status |
| 43 | + |
| 44 | +# Use Mouse+$mod to drag floating windows to their wanted position |
| 45 | +floating_modifier $mod |
| 46 | + |
| 47 | +# start a terminal |
| 48 | +#bindsym $mod+Return exec i3-sensible-terminal |
| 49 | +bindsym $mod+Return exec st -t "Simple Terminal" -f "Source Code Pro:style=Semibold:size=10" |
| 50 | + |
| 51 | +# kill focused window |
| 52 | +bindsym $mod+Shift+q kill |
| 53 | + |
| 54 | +# start dmenu (a program launcher) |
| 55 | +#bindsym $mod+d exec --no-startup-id "dmenu_run -nf '#BBBBBB' -nb '#222222' -sb '#005577' -sf '#EEEEEE' -fn 'monospace-10'" |
| 56 | +# A more modern dmenu replacement is rofi: |
| 57 | +# bindcode $mod+40 exec "rofi -modi drun,run -show drun" |
| 58 | +# There also is i3-dmenu-desktop which only displays applications shipping a |
| 59 | +# .desktop file. It is a wrapper around dmenu, so you need that installed. |
| 60 | +# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop |
| 61 | +# bindsym $mod+l exec rofi -modi window -no-lazy-grab -show window -sort -auto-select -sorting-method fzf -show-icons -matching regex |
| 62 | +bindsym $mod+d exec rofi -show drun |
| 63 | + |
| 64 | +# change focus |
| 65 | +bindsym $mod+j focus left |
| 66 | +bindsym $mod+k focus down |
| 67 | +bindsym $mod+l focus up |
| 68 | +bindsym $mod+semicolon focus right |
| 69 | + |
| 70 | +# alternatively, you can use the cursor keys: |
| 71 | +bindsym $mod+Left focus left |
| 72 | +bindsym $mod+Down focus down |
| 73 | +bindsym $mod+Up focus up |
| 74 | +bindsym $mod+Right focus right |
| 75 | + |
| 76 | +# move focused window |
| 77 | +bindsym $mod+Shift+j move left |
| 78 | +bindsym $mod+Shift+k move down |
| 79 | +bindsym $mod+Shift+l move up |
| 80 | +bindsym $mod+Shift+semicolon move right |
| 81 | + |
| 82 | +# alternatively, you can use the cursor keys: |
| 83 | +bindsym $mod+Shift+Left move left |
| 84 | +bindsym $mod+Shift+Down move down |
| 85 | +bindsym $mod+Shift+Up move up |
| 86 | +bindsym $mod+Shift+Right move right |
| 87 | + |
| 88 | +# split in horizontal orientation |
| 89 | +bindsym $mod+h split h |
| 90 | + |
| 91 | +# split in vertical orientation |
| 92 | +bindsym $mod+v split v |
| 93 | + |
| 94 | +# enter fullscreen mode for the focused container |
| 95 | +bindsym $mod+f fullscreen toggle |
| 96 | + |
| 97 | +# change container layout (stacked, tabbed, toggle split) |
| 98 | +bindsym $mod+s layout stacking |
| 99 | +bindsym $mod+w layout tabbed |
| 100 | +bindsym $mod+e layout toggle split |
| 101 | + |
| 102 | +# toggle tiling / floating |
| 103 | +bindsym $mod+Shift+space floating toggle |
| 104 | + |
| 105 | +# change focus between tiling / floating windows |
| 106 | +bindsym $mod+space focus mode_toggle |
| 107 | + |
| 108 | +# focus the parent container |
| 109 | +bindsym $mod+a focus parent |
| 110 | + |
| 111 | +# focus the child container |
| 112 | +#bindsym $mod+d focus child |
| 113 | + |
| 114 | +# scratchpad |
| 115 | +bindsym Shift+$mod+backslash move scratchpad |
| 116 | +bindsym $mod+backslash scratchpad show |
| 117 | + |
| 118 | +# workspace management |
| 119 | +bindsym Shift+Control+$mod+Left move container to output left |
| 120 | +bindsym Shift+Control+$mod+Right move container to output right |
| 121 | +bindsym Shift+Control+$mod+Down move container to output down |
| 122 | +bindsym Shift+Control+$mod+Up move container to output up |
| 123 | + |
| 124 | +bindsym Control+$mod+Left move workspace to output left |
| 125 | +bindsym Control+$mod+Right move workspace to output right |
| 126 | +bindsym Control+$mod+Down workspace prev |
| 127 | +bindsym Control+$mod+Up workspace next |
| 128 | + |
| 129 | +# layout |
| 130 | +bindsym $mod+Escape exec "i3-instant-layout --list | rofi -dmenu -i | i3-isntant-layout -" |
| 131 | + |
| 132 | +# Define names for default workspaces for which we configure key bindings later on. |
| 133 | +# We use variables to avoid repeating the names in multiple places. |
| 134 | +set $ws1 "1" |
| 135 | +set $ws2 "2" |
| 136 | +set $ws3 "3" |
| 137 | +set $ws4 "4" |
| 138 | +set $ws5 "5" |
| 139 | +set $ws6 "6" |
| 140 | +set $ws7 "7" |
| 141 | +set $ws8 "8" |
| 142 | +set $ws9 "9" |
| 143 | +set $ws10 "10" |
| 144 | + |
| 145 | +# switch to workspace |
| 146 | +bindsym $mod+1 workspace number $ws1 |
| 147 | +bindsym $mod+2 workspace number $ws2 |
| 148 | +bindsym $mod+3 workspace number $ws3 |
| 149 | +bindsym $mod+4 workspace number $ws4 |
| 150 | +bindsym $mod+5 workspace number $ws5 |
| 151 | +bindsym $mod+6 workspace number $ws6 |
| 152 | +bindsym $mod+7 workspace number $ws7 |
| 153 | +bindsym $mod+8 workspace number $ws8 |
| 154 | +bindsym $mod+9 workspace number $ws9 |
| 155 | +bindsym $mod+0 workspace number $ws10 |
| 156 | + |
| 157 | +# move focused container to workspace |
| 158 | +bindsym $mod+Shift+1 move container to workspace number $ws1 |
| 159 | +bindsym $mod+Shift+2 move container to workspace number $ws2 |
| 160 | +bindsym $mod+Shift+3 move container to workspace number $ws3 |
| 161 | +bindsym $mod+Shift+4 move container to workspace number $ws4 |
| 162 | +bindsym $mod+Shift+5 move container to workspace number $ws5 |
| 163 | +bindsym $mod+Shift+6 move container to workspace number $ws6 |
| 164 | +bindsym $mod+Shift+7 move container to workspace number $ws7 |
| 165 | +bindsym $mod+Shift+8 move container to workspace number $ws8 |
| 166 | +bindsym $mod+Shift+9 move container to workspace number $ws9 |
| 167 | +bindsym $mod+Shift+0 move container to workspace number $ws10 |
| 168 | + |
| 169 | +# reload the configuration file |
| 170 | +bindsym $mod+Shift+c reload |
| 171 | +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) |
| 172 | +bindsym $mod+Shift+r restart |
| 173 | +# exit i3 (logs you out of your X session) |
| 174 | +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'" |
| 175 | + |
| 176 | +# resize window (you can also use the mouse for that) |
| 177 | +mode "resize" { |
| 178 | + # These bindings trigger as soon as you enter the resize mode |
| 179 | + |
| 180 | + # Pressing left will shrink the window’s width. |
| 181 | + # Pressing right will grow the window’s width. |
| 182 | + # Pressing up will shrink the window’s height. |
| 183 | + # Pressing down will grow the window’s height. |
| 184 | + bindsym j resize shrink width 10 px or 10 ppt |
| 185 | + bindsym k resize grow height 10 px or 10 ppt |
| 186 | + bindsym l resize shrink height 10 px or 10 ppt |
| 187 | + bindsym semicolon resize grow width 10 px or 10 ppt |
| 188 | + |
| 189 | + # same bindings, but for the arrow keys |
| 190 | + bindsym Left resize shrink width 10 px or 10 ppt |
| 191 | + bindsym Down resize grow height 10 px or 10 ppt |
| 192 | + bindsym Up resize shrink height 10 px or 10 ppt |
| 193 | + bindsym Right resize grow width 10 px or 10 ppt |
| 194 | + |
| 195 | + # back to normal: Enter or Escape or $mod+r |
| 196 | + bindsym Return mode "default" |
| 197 | + bindsym Escape mode "default" |
| 198 | + bindsym $mod+r mode "default" |
| 199 | +} |
| 200 | + |
| 201 | +bindsym $mod+r mode "resize" |
| 202 | + |
| 203 | +# class border bground text indicator child_border |
| 204 | +client.focused #83CAFA #51A2DA #FFFFFF #83CAFA #51A2DA |
| 205 | +client.focused_inactive #8C8C8C #4C4C4C #FFFFFF #4C4C4C #8C8C8C |
| 206 | +client.unfocused #4C4C4C #222222 #888888 #292D2E #222222 |
| 207 | +client.urgent #EC69A0 #DB3279 #FFFFFF #DB3279 #DB3279 |
| 208 | +client.placeholder #000000 #0C0C0C #FFFFFF #000000 #0C0C0C |
| 209 | + |
| 210 | +client.background #FFFFFF |
| 211 | + |
| 212 | +# Start i3bar to display a workspace bar (plus the system information i3status |
| 213 | +# finds out, if available) |
| 214 | +bar { |
| 215 | + colors { |
| 216 | + background #000000 |
| 217 | + statusline #FFFFFF |
| 218 | + separator #666666 |
| 219 | + |
| 220 | + focused_workspace #83CAFA #51A2DA #FFFFFF |
| 221 | + active_workspace #3C6EB4 #294172 #FFFFFF |
| 222 | + inactive_workspace #8C8C8C #4C4C4C #888888 |
| 223 | + urgent_workspace #EC69A0 #DB3279 #FFFFFF |
| 224 | + binding_mode #b691d3 #A07CBC #FFFFFF |
| 225 | + } |
| 226 | + font pango:DejaVu Sans Mono Bold 14 |
| 227 | + status_command i3status |
| 228 | +} |
| 229 | + |
| 230 | +# Moving workspaces between screens |
| 231 | +#bindsym $mod+p move worksace to output right |
| 232 | + |
| 233 | +exec --no-startup-id lxpolkit |
| 234 | +exec picom |
| 235 | + |
| 236 | +# lock screen |
| 237 | +# https://michaelabrahamsen.com/posts/custom-lockscreen-i3lock/ |
| 238 | +exec xautolock -detectsleep -time 5 -locker "/usr/local/bin/lock_and_blur.sh" -notify 30 -notifier "notify-send -u critical -t 10000 -- 'locking screen in 30 seconds'" |
| 239 | + |
| 240 | +# stream deck |
| 241 | +exec ~/bin/run_streamdeck.sh |
| 242 | + |
| 243 | +# rescuetime |
| 244 | +exec /usr/bin/rescuetime |
| 245 | + |
| 246 | +# shutdown / restart / suspend... |
| 247 | +set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (CTRL+s) shutdown |
| 248 | + |
| 249 | +mode "$mode_system" { |
| 250 | + bindsym l exec --no-startup-id /usr/local/bin/lock_and_blur.sh, mode "default" |
| 251 | + bindsym e exec --no-startup-id i3-msg exit, mode "default" |
| 252 | + bindsym s exec --no-startup-id $i3lockwall && systemctl suspend, mode "default" |
| 253 | + bindsym h exec --no-startup-id $i3lockwall && systemctl hibernate, mode "default" |
| 254 | + bindsym r exec --no-startup-id systemctl reboot, mode "default" |
| 255 | + bindsym Ctrl+s exec --no-startup-id systemctl poweroff -i, mode "default" |
| 256 | + |
| 257 | + # back to normal: Enter or Escape |
| 258 | + bindsym Return mode "default" |
| 259 | + bindsym Escape mode "default" |
| 260 | +} |
| 261 | + |
| 262 | +bindsym $mod+BackSpace mode "$mode_system" |
| 263 | + |
| 264 | +# move focused workspace between monitors |
| 265 | +#bindsym $mod+Ctrl+greater move workspace to output right |
| 266 | +#bindsym $mod+Ctrl+less move workspace to output left |
| 267 | +bindsym $mod+Ctrl+greater move workspace to output next |
| 268 | + |
| 269 | +exec --no-startup-id /usr/libexec/gsd-xsettings |
| 270 | +exec --no-startup-id /usr/libexec/polkit-gnome-authentication-agent-1 |
0 commit comments