Chama a
This commit is contained in:
40
scripts/power
Executable file
40
scripts/power
Executable 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
|
||||
Reference in New Issue
Block a user