diff --git a/i3_config b/i3_config index 55f806d..22e9200 100644 --- a/i3_config +++ b/i3_config @@ -92,9 +92,9 @@ bindsym $mod+v split v bindsym $mod+f fullscreen toggle # change container layout (stacked, tabbed, toggle split) -bindsym $mod+s layout stacking -bindsym $mod+w layout tabbed -bindsym $mod+e layout toggle split +#bindsym $mod+s layout stacking +#bindsym $mod+w layout tabbed +#bindsym $mod+e layout toggle split # toggle tiling / floating bindsym $mod+Shift+space floating toggle @@ -157,8 +157,6 @@ bindsym $mod+Ctrl+Shift+Left move container to workspace prev 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'" # resize window (you can also use the mouse for that) mode "resize" { @@ -187,6 +185,25 @@ mode "resize" { bindsym $mod+r mode "resize" +# 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'" + +# create a "system" mode +set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown +mode "$mode_system" { + bindsym l exec --no-startup-id i3lock, mode "default" + bindsym e exec --no-startup-id i3exit logout, mode "default" + bindsym s exec --no-startup-id i3exit suspend, mode "default" + bindsym h exec --no-startup-id i3exit hibernate, mode "default" + bindsym r exec --no-startup-id i3exit reboot, mode "default" + bindsym Shift+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+Delete mode "$mode_system" + # Start i3bar to display a workspace bar (plus the system information i3status # finds out, if available) bar {