Add host-backup script
This commit is contained in:
parent
80a7334f59
commit
3bb298526b
4 changed files with 48 additions and 1 deletions
.bin
|
@ -1,8 +1,24 @@
|
|||
#!/bin/sh
|
||||
|
||||
action=$(printf "shutdown\nreboot\nlogout\nautostart" | $DMENU)
|
||||
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)"
|
||||
|
||||
case "$action" in
|
||||
backup-shutwdown) _menu_shutdown_backup && systemctl poweroff -i ;;
|
||||
shutdown) systemctl poweroff -i ;;
|
||||
reboot) systemctl reboot ;;
|
||||
logout) systemctl --user exit ;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue