Skip to content

Instantly share code, notes, and snippets.

@pantuts
Created March 29, 2016 12:38
Show Gist options
  • Save pantuts/13623a7ba5e7e1c4ce44 to your computer and use it in GitHub Desktop.
Save pantuts/13623a7ba5e7e1c4ce44 to your computer and use it in GitHub Desktop.
i3 wm shutdown/reboot/logout mode
# Create Log out, Reboot, Poweroff bindings
mode "Exit (L)ogout, (R)eboot, (P)oweroff" {
bindsym $mod+r exec systemctl reboot
bindsym $mod+l exit
bindsym $mod+p exec systemctl poweroff
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+Shift+e mode "Exit (L)ogout, (R)eboot, (P)oweroff"
@Mathiasb17
Copy link

Very useful thanks !

@hasanaygun
Copy link

Simple and useful. A similar application on the following link
https://sourceforge.net/projects/logout-for-i3-window-manager/

@jepotter1-archive
Copy link

This is my version, with a few improvements:

# Create Log out, Reboot, Poweroff bindings
mode "(S)uspend, (L)ogout, (R)eboot, (P)oweroff" {
        bindsym r exec --no-startup-id systemctl reboot
        bindsym s exec --no-startup-id systemctl suspend; mode "default"
        bindsym l exit
        bindsym p exec --no-startup-id systemctl poweroff

        # back to normal: Enter or Escape
        bindsym Return mode "default"
        bindsym Escape mode "default"
}

bindsym $mod+Shift+e mode "(S)uspend, (L)ogout, (R)eboot, (P)oweroff"

@nushankodikara
Copy link

Thank you So much, Very Useful!

@talhagdp
Copy link

talhagdp commented Dec 8, 2022

awesome.

@ricmonmol
Copy link

Nice, thanks for sharing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment