This repository has been archived on 2023-10-17. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/scripts/menu-apagar

23 lines
745 B
Text
Raw Normal View History

2022-11-01 19:12:15 +01:00
#!/bin/sh
2023-04-21 19:33:06 +02:00
RET=$(printf "Apagar\nReiniciar\nBloquear\nSuspender\nHibernar\nCancelar" | dmenu)
2022-11-01 19:12:15 +01:00
case $RET in
2023-04-21 19:33:06 +02:00
"Apagar")
urxvtc -pe '-tabbedalt' -T 'warning' -geometry '50x1-1-710' -imfont 'hacknerdfont:pixelsize=8' -e su - root -c 'shutdown -h now'
2022-11-01 19:12:15 +01:00
;;
2023-04-21 19:33:06 +02:00
"Reiniciar")
urxvtc -pe '-tabbedalt' -T 'warning' -geometry '50x1-1-710' -imfont 'hacknerdfont:pixelsize=8' -e su - root -c 'shutdown -r now'
2022-11-01 19:12:15 +01:00
;;
2023-04-21 19:33:06 +02:00
"Bloquear")
2022-11-01 19:12:15 +01:00
slock
;;
2023-04-21 19:33:06 +02:00
"Suspender")
urxvtc -pe '-tabbedalt' -T 'warning' -geometry '50x1-1-710' -imfont 'hacknerdfontd:pixelsize=8' -e su - root -c 'zzz && slock'
2022-11-01 19:12:15 +01:00
;;
2023-04-21 19:33:06 +02:00
"Hibernar")
urxvtc -pe '-tabbedalt' -T 'warning' -geometry '50x1-1-710' -imfont 'hacknerdfont:pixelsize=8' -e su - root -c 'ZZZ && slock'
;;
2022-11-01 19:12:15 +01:00
*) ;;
esac