.dotfiles/.bin/menu-shutdown
Tobias Reisinger 923bd6c08d
Migrate alacritty config from yaml to toml
Remove cursor hiding in hyprland
Add soft-reboot to shutdown menu
2023-12-28 04:16:16 +01:00

29 lines
525 B
Bash
Executable file

#!/bin/sh
actions="backup-shutdown
shutdown
reboot
soft-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)"
case "$action" in
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