summaryrefslogtreecommitdiffstats
path: root/.config
diff options
context:
space:
mode:
authorJokler <jokler.contact@gmail.com>2019-07-29 16:55:26 +0200
committerJokler <jokler.contact@gmail.com>2019-07-29 16:55:26 +0200
commit7da7eca33d0c77db71e91767dd44588791242202 (patch)
treeacc41e9a8804917a229682b468d8ce16f2ae86a9 /.config
parentd241781cc45e419a4299ffb167912fdb32c7e287 (diff)
downloaddotfiles-7da7eca33d0c77db71e91767dd44588791242202.tar.gz
dotfiles-7da7eca33d0c77db71e91767dd44588791242202.zip
i3: Close GUI programs before shutdown etc.
Diffstat (limited to '.config')
-rw-r--r--.config/i3/config17
1 files changed, 14 insertions, 3 deletions
diff --git a/.config/i3/config b/.config/i3/config
index ec9e935..86e0449 100644
--- a/.config/i3/config
+++ b/.config/i3/config
@@ -143,12 +143,23 @@ bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
-set $system_mode "[s]hutdown, [r]eboot, s[u]spend, [l]ogout, l[o]ck"
-mode $system_mode {
+set $confirm_system "Confirm [s]hutdown, [r]eboot, [l]ogout"
+mode $confirm_system {
bindsym s exec systemctl poweroff
bindsym r exec systemctl reboot
- bindsym u exec systemctl suspend
bindsym l exec i3-msg exit
+
+ bindsym Return mode "default"
+ bindsym Escape mode "default"
+ bindsym $mod+Shift+e mode "default"
+}
+
+set $system_mode "Close programs[srl], l[o]ck"
+mode $system_mode {
+ bindsym s [class=".*"] kill; mode $confirm_system
+ bindsym r [class=".*"] kill; mode $confirm_system
+ bindsym l [class=".*"] kill; mode $confirm_system
+ bindsym u exec systemctl suspend
bindsym o exec betterlockscreen -l; mode "default"
bindsym Return mode "default"