diff options
author | clarkzjw <[email protected]> | 2023-02-28 14:12:30 -0800 |
---|---|---|
committer | clarkzjw <[email protected]> | 2023-02-28 14:12:30 -0800 |
commit | 88b0c2ed6199471d5f3bd601a6e257475606d772 (patch) | |
tree | a3fadbb12822afb1a5264dd5ae0bc62f5f3a03b3 /dot_config/i3 | |
parent | 58525fb905dafd2632c28b6c0e8ca19c16e4c9fb (diff) | |
download | dotfiles-88b0c2ed6199471d5f3bd601a6e257475606d772.tar.gz |
i3: re-organize config file
Diffstat (limited to 'dot_config/i3')
-rw-r--r-- | dot_config/i3/config | 127 |
1 files changed, 57 insertions, 70 deletions
diff --git a/dot_config/i3/config b/dot_config/i3/config index 341cd04..d5f9328 100644 --- a/dot_config/i3/config +++ b/dot_config/i3/config | |||
@@ -148,6 +148,9 @@ mode "resize" { | |||
148 | bindsym $mod+r mode "resize" | 148 | bindsym $mod+r mode "resize" |
149 | bindsym $mod+space [floating] resize set 1280 800 | 149 | bindsym $mod+space [floating] resize set 1280 800 |
150 | 150 | ||
151 | # change focus between tiling / floating windows | ||
152 | #bindsym $mod+space focus mode_toggle | ||
153 | |||
151 | ###################################### | 154 | ###################################### |
152 | # keybindings for different actions: # | 155 | # keybindings for different actions: # |
153 | ###################################### | 156 | ###################################### |
@@ -177,6 +180,12 @@ bindsym $mod+Shift+c reload | |||
177 | # restart i3 inplace (preserves your layout/session, can be used to update i3) | 180 | # restart i3 inplace (preserves your layout/session, can be used to update i3) |
178 | bindsym $mod+Shift+r restart | 181 | bindsym $mod+Shift+r restart |
179 | 182 | ||
183 | # Make the currently focused window a scratchpad | ||
184 | bindsym $mod+Shift+m move scratchpad | ||
185 | |||
186 | # Show the first scratchpad window | ||
187 | bindsym $mod+m scratchpad show | ||
188 | |||
180 | # list keybinding in fancy rofi (automated): | 189 | # list keybinding in fancy rofi (automated): |
181 | # bindsym F1 exec ~/.config/i3/scripts/keyhint-2 | 190 | # bindsym F1 exec ~/.config/i3/scripts/keyhint-2 |
182 | # alternative | 191 | # alternative |
@@ -225,60 +234,46 @@ bindsym $mod+e layout toggle split | |||
225 | # toggle tiling / floating | 234 | # toggle tiling / floating |
226 | bindsym $mod+Shift+space floating toggle | 235 | bindsym $mod+Shift+space floating toggle |
227 | 236 | ||
228 | # change focus between tiling / floating windows | ||
229 | #bindsym $mod+space focus mode_toggle | ||
230 | |||
231 | # focus the parent container | 237 | # focus the parent container |
232 | bindsym $mod+a focus parent | 238 | bindsym $mod+a focus parent |
233 | 239 | ||
234 | # open new empty workspace | 240 | # open new empty workspace |
235 | #bindsym $mod+Shift+n exec --no-startup-id ~/.config/i3/scripts/empty_workspace | 241 | #bindsym $mod+Shift+n exec --no-startup-id ~/.config/i3/scripts/empty_workspace |
236 | 242 | ||
237 | # Multimedia Keys | 243 | # App shortcuts |
244 | bindsym $mod+w exec /usr/bin/firefox | ||
245 | bindsym $mod+n exec env GDK_SCALE=2 /usr/bin/thunar | ||
246 | |||
247 | # Screenshot | ||
248 | bindsym Print exec --no-startup-id flameshot gui | ||
249 | bindsym $mod+Print exec --no-startup-id flameshot full | ||
250 | |||
251 | # Power Profiles menu switcher (rofi) | ||
252 | bindsym $mod+Shift+p exec --no-startup-id ~/.config/i3/scripts/power-profiles | ||
238 | 253 | ||
239 | # volume | 254 | # Multimedia Keys |
255 | ## volume | ||
240 | bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 5%+ && pkill -RTMIN+1 i3blocks | 256 | bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 5%+ && pkill -RTMIN+1 i3blocks |
241 | bindsym XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 5%- && pkill -RTMIN+1 i3blocks | 257 | bindsym XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 5%- && pkill -RTMIN+1 i3blocks |
242 | 258 | ## gradular volume control | |
243 | # gradular volume control | ||
244 | bindsym $mod+XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 1%+ && pkill -RTMIN+1 i3blocks | 259 | bindsym $mod+XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 1%+ && pkill -RTMIN+1 i3blocks |
245 | bindsym $mod+XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 1%- && pkill -RTMIN+1 i3blocks | 260 | bindsym $mod+XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 1%- && pkill -RTMIN+1 i3blocks |
246 | 261 | ## mute | |
247 | # mute | ||
248 | bindsym XF86AudioMute exec --no-startup-id amixer sset Master toggle && killall -USR1 i3blocks | 262 | bindsym XF86AudioMute exec --no-startup-id amixer sset Master toggle && killall -USR1 i3blocks |
249 | 263 | ## audio control | |
250 | # audio control | ||
251 | bindsym XF86AudioPlay exec --no-startup-id playerctl play | 264 | bindsym XF86AudioPlay exec --no-startup-id playerctl play |
252 | bindsym XF86AudioPause exec --no-startup-id playerctl pause | 265 | bindsym XF86AudioPause exec --no-startup-id playerctl pause |
253 | bindsym XF86AudioNext exec --no-startup-id playerctl next | 266 | bindsym XF86AudioNext exec --no-startup-id playerctl next |
254 | bindsym XF86AudioPrev exec --no-startup-id playerctl previous | 267 | bindsym XF86AudioPrev exec --no-startup-id playerctl previous |
255 | 268 | ## Redirect sound to headphones | |
256 | # Redirect sound to headphones | ||
257 | #bindsym $mod+p exec /usr/local/bin/switch-audio-port | 269 | #bindsym $mod+p exec /usr/local/bin/switch-audio-port |
258 | 270 | ||
259 | # App shortcuts | ||
260 | bindsym $mod+w exec /usr/bin/firefox | ||
261 | bindsym $mod+n exec env GDK_SCALE=2 /usr/bin/thunar | ||
262 | |||
263 | # Screenshot | ||
264 | bindsym Print exec --no-startup-id flameshot gui | ||
265 | bindsym $mod+Print exec --no-startup-id flameshot full | ||
266 | |||
267 | # Power Profiles menu switcher (rofi) | ||
268 | bindsym $mod+Shift+p exec --no-startup-id ~/.config/i3/scripts/power-profiles | ||
269 | |||
270 | ########################################## | 271 | ########################################## |
271 | # configuration for workspace behaviour: # | 272 | # configuration for workspace behaviour: # |
272 | ########################################## | 273 | ########################################## |
273 | 274 | ||
274 | # Define names for default workspaces for which we configure key bindings later on. | 275 | # Define names for default workspaces for which we configure key bindings later on. |
275 | # We use variables to avoid repeating the names in multiple places. | 276 | # We use variables to avoid repeating the names in multiple places. |
276 | #set $ws1 "1:" | ||
277 | #set $ws2 "2:" | ||
278 | #set $ws3 "3:" | ||
279 | #set $ws4 "4:" | ||
280 | #set $ws5 "5:" | ||
281 | |||
282 | set $ws1 "1" | 277 | set $ws1 "1" |
283 | set $ws2 "2" | 278 | set $ws2 "2" |
284 | set $ws3 "3" | 279 | set $ws3 "3" |
@@ -310,6 +305,36 @@ for_window [class="Microsoft Teams - Preview"] focus | |||
310 | #for_window [class="^.*"] border pixel 1 | 305 | #for_window [class="^.*"] border pixel 1 |
311 | for_window [class="Xfce4-terminal"] border pixel 1 | 306 | for_window [class="Xfce4-terminal"] border pixel 1 |
312 | for_window [class="firefox"] border pixel 1 | 307 | for_window [class="firefox"] border pixel 1 |
308 | for_window [class="urxvt"] border pixel 1 | ||
309 | |||
310 | # set position of floating window | ||
311 | for_window [class=".*"] move position center | ||
312 | |||
313 | ################## | ||
314 | # floating rules # | ||
315 | ################## | ||
316 | |||
317 | # set floating (nontiling) for apps needing it | ||
318 | for_window [class="Yad" instance="yad"] floating enable | ||
319 | for_window [class="Galculator" instance="galculator"] floating enable | ||
320 | for_window [class="Blueberry.py" instance="blueberry.py"] floating enable | ||
321 | |||
322 | # set floating (nontiling) for special apps | ||
323 | for_window [class="Xsane" instance="xsane"] floating enable | ||
324 | for_window [class="Pavucontrol" instance="pavucontrol"] floating enable | ||
325 | for_window [class="qt5ct" instance="qt5ct"] floating enable | ||
326 | for_window [class="Blueberry.py" instance="blueberry.py"] floating enable | ||
327 | for_window [class="Bluetooth-sendto" instance="bluetooth-sendto"] floating enable | ||
328 | for_window [class="Pamac-manager"] floating enable | ||
329 | for_window [class="copyq"] floating enable resize set 800 800 | ||
330 | for_window [class="Nm-connection-editor"] floating enable | ||
331 | for_window [class="flameshot"] floating enable | ||
332 | for_window [class="FLTK"] floating enable resize 700 700 | ||
333 | for_window [class="1Password"] floating enable resize 800 800 | ||
334 | for_window [class="TelegramDesktop"] floating enable resize set 1300 1200 | ||
335 | for_window [class="eudic"] floating enable resize set 800 800 | ||
336 | for_window [class="Nitrogen"] floating enable resize set 800 800 | ||
337 | for_window [window_role="About"] floating enable | ||
313 | 338 | ||
314 | ############## | 339 | ############## |
315 | # compositor # | 340 | # compositor # |
@@ -392,48 +417,8 @@ exec --no-startup-id dunst --config ~/.config/dunst/dunstrc | |||
392 | 417 | ||
393 | exec --no-startup-id xmodmap ~/.Xmodmap | 418 | exec --no-startup-id xmodmap ~/.Xmodmap |
394 | 419 | ||
395 | |||
396 | #exec --no-startup-id /opt/1Password/1password | 420 | #exec --no-startup-id /opt/1Password/1password |
397 | 421 | ||
398 | ################## | ||
399 | # floating rules # | ||
400 | ################## | ||
401 | |||
402 | # set floating (nontiling) for apps needing it | ||
403 | for_window [class="Yad" instance="yad"] floating enable | ||
404 | for_window [class="Galculator" instance="galculator"] floating enable | ||
405 | for_window [class="Blueberry.py" instance="blueberry.py"] floating enable | ||
406 | |||
407 | # set floating (nontiling) for special apps | ||
408 | for_window [class="Xsane" instance="xsane"] floating enable | ||
409 | for_window [class="Pavucontrol" instance="pavucontrol"] floating enable | ||
410 | for_window [class="qt5ct" instance="qt5ct"] floating enable | ||
411 | for_window [class="Blueberry.py" instance="blueberry.py"] floating enable | ||
412 | for_window [class="Bluetooth-sendto" instance="bluetooth-sendto"] floating enable | ||
413 | for_window [class="Pamac-manager"] floating enable | ||
414 | for_window [window_role="About"] floating enable | ||
415 | for_window [class="copyq"] floating enable resize set 800 800 | ||
416 | for_window [class="Nm-connection-editor"] floating enable | ||
417 | for_window [class="flameshot"] floating enable | ||
418 | for_window [class="FLTK"] floating enable resize 700 700 | ||
419 | for_window [class="1Password"] floating enable resize 800 800 | ||
420 | for_window [class="TelegramDesktop"] floating enable resize set 1300 1200 | ||
421 | for_window [class="eudic"] floating enable resize set 800 800 | ||
422 | for_window [class="Nitrogen"] floating enable resize set 800 800 | ||
423 | |||
424 | |||
425 | # Make the currently focused window a scratchpad | ||
426 | bindsym $mod+Shift+m move scratchpad | ||
427 | |||
428 | # Show the first scratchpad window | ||
429 | bindsym $mod+m scratchpad show | ||
430 | |||
431 | # set border of floating window | ||
432 | for_window [class="urxvt"] border pixel 1 | ||
433 | |||
434 | # set position of floating window | ||
435 | for_window [class=".*"] move position center | ||
436 | |||
437 | ###################################### | 422 | ###################################### |
438 | # color settings for bar and windows # | 423 | # color settings for bar and windows # |
439 | ###################################### | 424 | ###################################### |
@@ -471,10 +456,12 @@ bar { | |||
471 | position top | 456 | position top |
472 | 457 | ||
473 | output eDP-1 | 458 | output eDP-1 |
459 | output DP-1 | ||
474 | output DP-3 | 460 | output DP-3 |
475 | output DP-4 | 461 | output DP-4 |
476 | 462 | ||
477 | tray_output eDP-1 | 463 | tray_output eDP-1 |
464 | tray_output DP-1 | ||
478 | tray_output DP-3 | 465 | tray_output DP-3 |
479 | tray_output DP-4 | 466 | tray_output DP-4 |
480 | tray_padding 2 | 467 | tray_padding 2 |