30 lines
519 B
Bash
Executable File
30 lines
519 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
#source ~/.dotfiles/nfrc.sh
|
|
|
|
cmd="fuzzel --minimal-lines --dmenu --hide-prompt "
|
|
|
|
action=$(printf "Sleep\0icon\x1fsystem-suspend\nReboot\0icon\x1fsystem-reboot\nShutdown\0icon\x1fsystem-shutdown\nExit Niri\0icon\x1fsystem-log-out\nCancel" | $cmd --index)
|
|
|
|
command=""
|
|
|
|
case "$action" in
|
|
0)
|
|
command="systemctl suspend"
|
|
;;
|
|
1)
|
|
command="systemctl reboot"
|
|
;;
|
|
2)
|
|
command="systemctl poweroff"
|
|
;;
|
|
3)
|
|
command="niri msg action quit --skip-confirmation"
|
|
;;
|
|
4)
|
|
exit
|
|
;;
|
|
esac
|
|
|
|
$command
|