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
Bash
Executable File

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