Add system exit dialog.
This commit is contained in:
parent
2a917d93e3
commit
33ef5a333f
2 changed files with 43 additions and 0 deletions
|
@ -179,6 +179,21 @@ mode "resize" {
|
|||
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown
|
||||
mode "$mode_system" {
|
||||
bindsym l exec --no-startup-id ~/.config/i3/i3exit lock, mode "default"
|
||||
bindsym e exec --no-startup-id ~/.config/i3/i3exit logout, mode "default"
|
||||
bindsym s exec --no-startup-id ~/.config/i3/i3exit suspend, mode "default"
|
||||
bindsym h exec --no-startup-id ~/.config/i3/i3exit hibernate, mode "default"
|
||||
bindsym r exec --no-startup-id ~/.config/i3/i3exit reboot, mode "default"
|
||||
bindsym Shift+s exec --no-startup-id ~/.config/i3/i3exit shutdown, mode "default"
|
||||
|
||||
# back to normal: Enter or Escape
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
bindsym $mod+Escape mode "$mode_system"
|
||||
|
||||
exec xinput set-prop "DELL07E6:00 06CB:76AF Touchpad" "libinput Tapping Enabled" 1
|
||||
exec xmodmap ~/.Xmodmap
|
||||
|
||||
|
|
28
.config/i3/i3exit
Executable file
28
.config/i3/i3exit
Executable file
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
case "$1" in
|
||||
lock)
|
||||
i3lock
|
||||
;;
|
||||
logout)
|
||||
i3-msg exit
|
||||
;;
|
||||
suspend)
|
||||
i3lock && systemctl suspend
|
||||
;;
|
||||
hibernate)
|
||||
i3lock && systemctl hibernate
|
||||
;;
|
||||
reboot)
|
||||
systemctl reboot
|
||||
;;
|
||||
shutdown)
|
||||
systemctl poweroff
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 [lock|logout|suspend|hibernate|reboot|shutdown]"
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
Loading…
Add table
Add a link
Reference in a new issue