aboutsummaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-02-03 22:01:08 +0800
committerGuangxiong Lin <[email protected]>2022-02-03 22:01:08 +0800
commit43983b7240f4b64b6e8415beb296507a77c52587 (patch)
tree4b5510da89eee8577422916d37004b9a66232a0d /.config
parent600a44fbbf742f4158f47b660ad34daf31c2c889 (diff)
downloaddotfiles-43983b7240f4b64b6e8415beb296507a77c52587.tar.gz
dotfiles-43983b7240f4b64b6e8415beb296507a77c52587.tar.bz2
dotfiles-43983b7240f4b64b6e8415beb296507a77c52587.zip
Add systemctl related keybind for i3wm
Diffstat (limited to '.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