X-Git-Url: https://git.shemshak.org/~bandali/configs/blobdiff_plain/cd3b4dc16b92cde06cc53d6a22673e906d26b1d3..6a51aabafd14ce7f1aa916826a06cbe1dec6956a:/i3/.i3/config?ds=sidebyside diff --git a/i3/.i3/config b/i3/.i3/config index 707944a..a68880f 100644 --- a/i3/.i3/config +++ b/i3/.i3/config @@ -38,13 +38,13 @@ set $urgentred #B33A3A set $ws1 "1:" set $ws2 "2:" set $ws3 "3:" -set $ws4 "4:" -set $ws5 "5:" -set $ws6 "6:" +set $ws4 "4:" -set $default_gap_size 10 -gap_size $default_gap_size -smart_borders on +# set $default_gaps_inner 10 +# set $default_gaps_outer 0 +# gaps inner $default_gaps_inner +# gaps outer $default_gaps_outer +#smart_borders on # start a terminal #bindsym $mod+Return exec i3-sensible-terminal @@ -54,7 +54,7 @@ bindsym $mod+Return exec urxvt bindsym $mod+q kill # start dmenu (a program launcher) -bindsym $mod+space exec dmenu_run +bindsym $mod+space exec --no-startup-id dmenu_run # There also is the (new) i3-dmenu-desktop which only displays applications # shipping a .desktop file. It is a wrapper around dmenu, so you need that # installed. @@ -115,8 +115,8 @@ bindsym $mod+1 workspace $ws1 bindsym $mod+2 workspace $ws2 bindsym $mod+3 workspace $ws3 bindsym $mod+4 workspace $ws4 -bindsym $mod+5 workspace $ws5 -bindsym $mod+6 workspace $ws6 +bindsym $mod+5 workspace 5 +bindsym $mod+6 workspace 6 bindsym $mod+7 workspace 7 bindsym $mod+8 workspace 8 bindsym $mod+9 workspace 9 @@ -130,8 +130,8 @@ 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+5 move container to workspace 5 +bindsym $mod+Shift+6 move container to workspace 6 bindsym $mod+Shift+7 move container to workspace 7 bindsym $mod+Shift+8 move container to workspace 8 bindsym $mod+Shift+9 move container to workspace 9 @@ -145,7 +145,7 @@ 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'" +# 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'" # resize window (you can also use the mouse for that) mode "resize" { @@ -173,21 +173,42 @@ mode "resize" { bindsym $mod+r mode "resize" -set $mode_gap_size Gap size: (+/-/d/0) locally, (Shift + +/-/d/0) globally -mode "$mode_gap_size" { - bindsym plus gap_size current plus 5 - bindsym minus gap_size current minus 5 - bindsym 0 gap_size current 0 - bindsym d gap_size current $default_gap_size - bindsym Shift+plus gap_size plus 5 - bindsym Shift+minus gap_size minus 5 - bindsym Shift+0 gap_size 0 - bindsym Shift+d gap_size $default_gap_size +set $mode_gaps Gaps: (o) outer, (i) inner +set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global) +set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global) +bindsym $mod+Shift+g mode "$mode_gaps" + +mode "$mode_gaps" { + bindsym o mode "$mode_gaps_outer" + bindsym i mode "$mode_gaps_inner" + bindsym Return mode "default" + bindsym Escape mode "default" +} + +mode "$mode_gaps_inner" { + bindsym plus gaps inner current plus 5 + bindsym minus gaps inner current minus 5 + bindsym 0 gaps inner current set 0 + + bindsym Shift+plus gaps inner all plus 5 + bindsym Shift+minus gaps inner all minus 5 + bindsym Shift+0 gaps inner all set 0 + + bindsym Return mode "default" + bindsym Escape mode "default" +} +mode "$mode_gaps_outer" { + bindsym plus gaps outer current plus 5 + bindsym minus gaps outer current minus 5 + bindsym 0 gaps outer current set 0 + + bindsym Shift+plus gaps outer all plus 5 + bindsym Shift+minus gaps outer all minus 5 + bindsym Shift+0 gaps outer all set 0 bindsym Return mode "default" bindsym Escape mode "default" } -bindsym $mod+Shift+g mode "$mode_gap_size" # fix graphics glitch for_window [class="^.*"] border pixel 0 @@ -208,7 +229,6 @@ for_window [class="(?i)emacs"] border none assign [class="(?i)firefox"] $ws1 assign [class="(?i)urxvt"] $ws2 assign [class="(?i)emacs"] $ws3 -assign [class="(?i)thunderbird"] $ws6 # Start i3bar to display a workspace bar (plus the system information i3status # finds out, if available) @@ -227,6 +247,19 @@ bar { } } +set $mode_system System (l) lock, (e) logout, (r) reboot, (s) shutdown +mode "$mode_system" { + bindsym l exec --no-startup-id i3exit lock, mode "default" + bindsym e exec --no-startup-id i3exit logout, mode "default" + bindsym r exec --no-startup-id i3exit reboot, mode "default" + bindsym s exec --no-startup-id i3exit shutdown, mode "default" + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} +bindsym $mod+Shift+e mode "$mode_system" + exec --no-startup-id nm-applet exec --no-startup-id "pulseaudio --start"