From 89212c8220cc407a7f2223ed1291d6a575e52913 Mon Sep 17 00:00:00 2001 From: coderkun Date: Tue, 16 Oct 2018 23:40:30 +0200 Subject: [PATCH] =?UTF-8?q?i3:=20add=20=E2=80=9Csystem=E2=80=9D=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- i3/config | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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"