This commit is contained in:
Dakedres
2023-11-11 03:20:01 -05:00
parent 015d8f2d20
commit 5c1270830c
47 changed files with 131 additions and 2515 deletions

40
scripts/power Executable file
View File

@@ -0,0 +1,40 @@
#!/bin/sh
lang_pc_shutdown="Shutdown"
lang_pc_reboot="Reboot"
lang_pc_logout="Log out"
lang_pc_lock="Lock"
lang_notification_name="Power manager"
lang_notificaton_shutdown="A power off request has been sent. The computer should shut down in a moment."
# Icons
lang_pc_shutdown="🚪 $lang_pc_shutdown"
lang_pc_reboot="🔃 $lang_pc_reboot"
lang_pc_logout="👥 $lang_pc_logout"
lang_pc_lock="🔒 $lang_pc_lock"
selected=$(
printf "%s\n%s\n%s\n%s\n" \
"$lang_pc_shutdown" "$lang_pc_reboot" "$lang_pc_logout" |
rofi -dmenu -p "powermenu" -lines 4
)
case $selected in
"$lang_pc_shutdown")
notify-send "$lang_notification_name" "$lang_notificaton_shutdown"
shutdown -h now
;;
"$lang_pc_reboot")
notify-send "$lang_notification_name" "$lang_notificaton_shutdown"
reboot
;;
"$lang_pc_logout")
bspc quit
;;
"$lang_pc_lock")
light-locker-command --lock
;;
esac