2021-05-13 12:26:52 +00:00
|
|
|
#!/bin/sh
|
2020-09-23 09:25:17 +00:00
|
|
|
|
2023-12-28 03:15:00 +00:00
|
|
|
actions="backup-shutdown
|
2023-12-14 16:53:28 +00:00
|
|
|
shutdown
|
|
|
|
reboot
|
2023-12-28 03:15:00 +00:00
|
|
|
soft-reboot
|
2023-12-14 16:53:28 +00:00
|
|
|
logout
|
|
|
|
autostart"
|
|
|
|
action=$(echo "$actions" | $DMENU)
|
|
|
|
|
|
|
|
_menu_shutdown_backup() {
|
|
|
|
alacritty -e "host-backup"
|
|
|
|
}
|
|
|
|
|
|
|
|
if [ -z "$action" ]; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2020-09-23 09:25:17 +00:00
|
|
|
case "$action" in
|
2023-12-28 03:15:00 +00:00
|
|
|
backup-shutdown) _menu_shutdown_backup && systemctl poweroff -i ;;
|
|
|
|
shutdown) systemctl poweroff -i ;;
|
|
|
|
reboot) systemctl reboot ;;
|
|
|
|
soft-reboot) systemctl soft-reboot ;;
|
|
|
|
logout) systemctl --user exit ;;
|
|
|
|
autostart) autostart-manage run ;;
|
|
|
|
*) ;; esac
|