Skip to content

Commit 63f602a

Browse files
committed
popup-powermenu: simplify script
1 parent 987cac4 commit 63f602a

File tree

4 files changed

+44
-63
lines changed

4 files changed

+44
-63
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Script: popup-powermenu
2+
3+
A popup menu made with Yad that provides a window giving options to shutdown, reboot, logout.
4+
5+
6+
## Dependencies
7+
8+
* [`yad`](https://sourceforge.net/projects/yad-dialog/)
9+
10+
11+
## Module
12+
13+
```ini
14+
[module/popup-powermenu]
15+
type = custom/script
16+
exec = ~/polybar-scripts/popup-powermenu.sh
17+
interval = 5
18+
click-left = ~/polybar-scripts/popup-powermenu.sh --popup &
19+
```

polybar-scripts/popup-powermenu/Readme.md

Lines changed: 0 additions & 41 deletions
This file was deleted.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/sh
2+
3+
case "$1" in
4+
--popup)
5+
yad=$(yad --width 300 --entry --undecorated --title "System Logout" --image=gnome-shutdown --text "Choose action:" --entry-text "Shutdown" "Reboot" "Logout" "Suspend")
6+
7+
case "$yad" in
8+
Shutdown)
9+
poweroff
10+
;;
11+
Reboot)
12+
reboot
13+
;;
14+
Suspend)
15+
hibernate
16+
;;
17+
Logout)
18+
bspc quit
19+
;;
20+
esac
21+
;;
22+
*)
23+
echo "#1"
24+
;;
25+
esac

polybar-scripts/popup-powermenu/powermenu.sh

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)