mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 08:41:34 +02:00
Clean dotfiles
This commit is contained in:
parent
5c2b55f13c
commit
197750ffa3
32 changed files with 123 additions and 579 deletions
29
config/rofi/script/powermenu.sh
Executable file
29
config/rofi/script/powermenu.sh
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh
|
||||
declare options=("ShutDown
|
||||
Lock
|
||||
Logout
|
||||
Reboot")
|
||||
|
||||
menucmd="rofi -dmenu"
|
||||
choice=$(echo -e "${options[@]}"|${menucmd} -p "Power" $@)
|
||||
case "$choice" in
|
||||
"ShutDown")
|
||||
case "$(echo -e "Yes\nNo"|${menucmd} -p "ShutDown" $@)" in
|
||||
"Yes") exec systemctl poweroff ;;
|
||||
"No") exec exit 0 ;;
|
||||
esac
|
||||
;;
|
||||
"Lock") exec betterlockscreen --off 300 -t "Computer is lockerd" -l ;;
|
||||
"Logout")
|
||||
case "$(echo -e "Yes\nNo"|${menucmd} -p "ShutDown" $@)" in
|
||||
"Yes") exec loginctl terminate-session $XDG_SESSION_ID ;;
|
||||
"No") exec exit 0 ;;
|
||||
esac
|
||||
;;
|
||||
"Reboot")
|
||||
case "$(echo -e "Yes\nNo"|${menucmd} -p "Reboot" $@)" in
|
||||
"Yes") exec systemctl reboot ;;
|
||||
"No") exec exit 0 ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
Loading…
Add table
Add a link
Reference in a new issue