aboutsummaryrefslogtreecommitdiff
path: root/.config/i3/config
diff options
context:
space:
mode:
Diffstat (limited to '.config/i3/config')
-rw-r--r--.config/i3/config32
1 files changed, 20 insertions, 12 deletions
diff --git a/.config/i3/config b/.config/i3/config
index 55e6104..007cae0 100644
--- a/.config/i3/config
+++ b/.config/i3/config
@@ -137,8 +137,9 @@ bindsym $mod+Shift+Tab workspace prev
# focus the child container
bindsym $mod+c focus child
-# reload the configuration file
-bindsym $mod+Shift+c reload
+# # reload the configuration file
+# 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)
@@ -186,16 +187,23 @@ mode "move" {
bindsym $mod+m mode "move" focus floating
-# mode "system" {
-# bindsym r exec reboot
-# bindsym s exec shutdown now
-#
-# bindsym Return mode "default"
-# bindsym Escape mode "default"
-# bindsym $mod+s mode "default"
-# }
-#
-# bindsym $mod+s mode "system"
+set $Locker slock && sleep 1
+
+set $mode_system System (l) lock, (e) logout, (s) suspend, (r) reboot, (Shift+s) shutdown
+
+mode "$mode_system" {
+ bindsym --release l exec --no-startup-id $Locker, mode "default"
+ bindsym e exec --no-startup-id i3-msg exit, mode "default"
+ bindsym --release s exec --no-startup-id systemctl suspend && $Locker, mode "default"
+ bindsym r exec --no-startup-id reboot, mode "default"
+ bindsym Shift+s exec --no-startup-id shutdown now, mode "default"
+
+ bindsym Return mode "default"
+ bindsym Escape mode "default"
+ bindsym $mod+Shift+c mode "default"
+}
+
+bindsym $mod+Shift+c mode "$mode_system"
bindsym $mod+e layout toggle split
bindsym $mod+s layout stacking