update
This commit is contained in:
+5
-3
@@ -4,13 +4,15 @@ entries="⇠ Logout\n⏾ Suspend\n⭮ Reboot\n⏻ Shutdown"
|
||||
|
||||
selected=$(echo -e $entries|wofi --width 350 --height 250 --dmenu --cache-file /dev/null | awk '{print tolower($2)}')
|
||||
|
||||
cmd="{{- if .settings.systemd }}systemctl{{ else }}loginctl{{ end }}"
|
||||
|
||||
case $selected in
|
||||
logout)
|
||||
swaymsg exit;;
|
||||
suspend)
|
||||
exec loginctl suspend;;
|
||||
exec ${cmd} suspend;;
|
||||
reboot)
|
||||
exec loginctl reboot;;
|
||||
exec ${cmd} reboot;;
|
||||
shutdown)
|
||||
exec loginctl poweroff -i;;
|
||||
exec ${cmd} poweroff -i;;
|
||||
esac
|
||||
Reference in New Issue
Block a user