new menus

This commit is contained in:
Never Gude 2025-12-30 22:04:10 +01:00
parent 93dc9e6ea5
commit fac4425ace
7 changed files with 41 additions and 15 deletions

View file

@ -1,23 +1,25 @@
#!/usr/bin/env fish
set input_options "󰤄 Suspend" "󰐥 Poweroff" "󰜉 Reboot"
set input (echo -e '󰤄 Suspend\n󰐥 Poweroff\n󰜉 Reboot' | fuzzel --dmenu -l 3 || exit 0)
set input (menu $input_options)
set check (echo -e 'Cancel\nProceed' | fuzzel --dmenu -l 2 || exit 0)
set check_options "Cancel" "Proceed"
if test $check = "Cancel"
set check (menu $check_options)
if test $check = $check_options[1]
exit 0
end
set option (string sub --start=3 $input)
switch $option
case Suspend
switch $input
case $input_options[1]
swaylock -f
systemctl suspend
case Poweroff
case $input_options[2]
systemctl poweroff
case Reboot
case $input_options[2]
systemctl reboot
end