.dotfiles/.bin/menu-shutdown

27 lines
471 B
Text
Raw Normal View History

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