diff --git a/i3/config b/i3/config index 96ceb2e..e7ccb61 100644 --- a/i3/config +++ b/i3/config @@ -180,3 +180,22 @@ bar { position top status_command i3status } + +# Shutdown, reboot, lock srceen +exec --no-startup-id xautolock -time 1 -locker "i3lock -i '/home/oliver/Bilder/Wallpapers/the neon demon.png'" +set $Locker i3lock -i '/home/oliver/Bilder/Wallpapers/the neon demon.png' && sleep 1 && xset dpms force off +set $mode_system System (b) blank, (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown +mode "$mode_system" { + bindsym b exec --no-startup-id xset dpms force off, mode "default" + bindsym l exec --no-startup-id $Locker, mode "default" + bindsym e exec --no-startup-id gnome-session-quit --no-prompt --force --logout, mode "default" + bindsym s exec --no-startup-id $Locker && systemctl suspend, mode "default" + bindsym h exec --no-startup-id $Locker && systemctl hibernate, mode "default" + bindsym r exec --no-startup-id systemctl reboot, mode "default" + bindsym Shift+s exec --no-startup-id systemctl poweroff -i, mode "default" + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} +bindsym $mod+Shift+P mode "$mode_system"