power menu, redshift, polybar
This commit is contained in:
19
.config/polybar/scripts/popup-powermenu/README.md
Normal file
19
.config/polybar/scripts/popup-powermenu/README.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Script: popup-powermenu
|
||||
|
||||
A popup menu made with Yad that provides a window giving options to shutdown, reboot, logout.
|
||||
|
||||
|
||||
## Dependencies
|
||||
|
||||
* [`yad`](https://sourceforge.net/projects/yad-dialog/)
|
||||
|
||||
|
||||
## Module
|
||||
|
||||
```ini
|
||||
[module/popup-powermenu]
|
||||
type = custom/script
|
||||
exec = ~/polybar-scripts/popup-powermenu.sh
|
||||
interval = 5
|
||||
click-left = ~/polybar-scripts/popup-powermenu.sh --popup &
|
||||
```
|
||||
25
.config/polybar/scripts/popup-powermenu/popup-powermenu.sh
Normal file
25
.config/polybar/scripts/popup-powermenu/popup-powermenu.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
--popup)
|
||||
yad=$(yad --width 300 --entry --undecorated --title "System Logout" --image=gnome-shutdown --text "Choose action:" --entry-text "Shutdown" "Reboot" "Logout" "Suspend")
|
||||
|
||||
case "$yad" in
|
||||
Shutdown)
|
||||
poweroff
|
||||
;;
|
||||
Reboot)
|
||||
reboot
|
||||
;;
|
||||
Suspend)
|
||||
hibernate
|
||||
;;
|
||||
Logout)
|
||||
bspc quit
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "#1"
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user