up
This commit is contained in:
parent
49b7494fab
commit
93dc9e6ea5
1 changed files with 10 additions and 8 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
set input (echo -e 'Suspend\nShutdown\nRestart' | fuzzel --dmenu -l 3 || exit 0)
|
||||
set input (echo -e ' Suspend\n Poweroff\n Reboot' | fuzzel --dmenu -l 3 || exit 0)
|
||||
|
||||
set check (echo -e 'Cancel\nProceed' | fuzzel --dmenu -l 2 || exit 0)
|
||||
|
||||
|
|
@ -8,14 +8,16 @@ if test $check = "Cancel"
|
|||
exit 0
|
||||
end
|
||||
|
||||
switch $input
|
||||
set option (string sub --start=3 $input)
|
||||
|
||||
switch $option
|
||||
case Suspend
|
||||
systemctl suspend
|
||||
|
||||
case Shutdown
|
||||
case Poweroff
|
||||
systemctl poweroff
|
||||
|
||||
case Restart
|
||||
case Reboot
|
||||
systemctl reboot
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue