22 lines
359 B
Fish
22 lines
359 B
Fish
|
|
#!/usr/bin/env fish
|
||
|
|
|
||
|
|
set input (echo -e 'Suspend\nShutdown\nRestart' | fuzzel --dmenu -l 3 || exit 0)
|
||
|
|
|
||
|
|
set check (echo -e 'Cancel\nProceed' | fuzzel --dmenu -l 2 || exit 0)
|
||
|
|
|
||
|
|
if test $check = "Cancel"
|
||
|
|
exit 0
|
||
|
|
end
|
||
|
|
|
||
|
|
switch $input
|
||
|
|
case Suspend
|
||
|
|
systemctl suspend
|
||
|
|
|
||
|
|
case Shutdown
|
||
|
|
systemctl poweroff
|
||
|
|
|
||
|
|
case Restart
|
||
|
|
systemctl restart
|
||
|
|
|
||
|
|
end
|