Write a script for shutdown options
This commit is contained in:
parent
3d97448fee
commit
c0465ec22d
2 changed files with 20 additions and 2 deletions
|
|
@ -102,8 +102,8 @@ input type:touchpad {
|
||||||
bindsym $wm_mod+semicolon exec swaylock -f -c $(dd if=/dev/urandom bs=1 count=3 2>/dev/null | hexdump -e '"%02x"')
|
bindsym $wm_mod+semicolon exec swaylock -f -c $(dd if=/dev/urandom bs=1 count=3 2>/dev/null | hexdump -e '"%02x"')
|
||||||
|
|
||||||
# Exit sway (logs you out of your Wayland session)
|
# Exit sway (logs you out of your Wayland session)
|
||||||
bindsym $wm_mod+Delete exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
|
bindsym $wm_mod+Delete exec leave
|
||||||
bindsym Alt+Ctrl+Delete exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
|
bindsym Alt+Ctrl+Delete exec leave
|
||||||
bindsym Alt+Ctrl+Shift+Delete exec systemctl poweroff
|
bindsym Alt+Ctrl+Shift+Delete exec systemctl poweroff
|
||||||
bindsym Alt+Ctrl+Backspace exec swaymsg exit
|
bindsym Alt+Ctrl+Backspace exec swaymsg exit
|
||||||
#
|
#
|
||||||
|
|
|
||||||
18
.local/bin/leave
Executable file
18
.local/bin/leave
Executable file
|
|
@ -0,0 +1,18 @@
|
||||||
|
#! /usr/bin/sh
|
||||||
|
|
||||||
|
listopts() {
|
||||||
|
echo "⏼ Shut down"
|
||||||
|
echo "⟲ Reboot"
|
||||||
|
echo "🚪 Log out"
|
||||||
|
}
|
||||||
|
|
||||||
|
option=$(listopts | fuzzel --dmenu)
|
||||||
|
|
||||||
|
case "${option}" in
|
||||||
|
"⏼ Shut down")
|
||||||
|
systemctl poweroff;;
|
||||||
|
"⟲ Reboot")
|
||||||
|
systemctl reboot;;
|
||||||
|
"🚪 Log out")
|
||||||
|
swaymsg exit;;
|
||||||
|
esac
|
||||||
Loading…
Add table
Add a link
Reference in a new issue