powermenu script
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
PREFIX = /usr/local
|
||||
|
||||
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L
|
||||
CPPFLAGS = -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L
|
||||
CFLAGS = -std=c99 -pedantic -Wall -Os -I/usr/X11R6/include -I/usr/include/freetype2 $(CPPFLAGS)
|
||||
LDFLAGS = -L/usr/X11R6/lib -lX11 -lfontconfig -lXft
|
||||
|
||||
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
output=$(echo -e "Poweroff\nReboot\nQuit Dwm" | dmenu -p "Power Actions: " -l 3)
|
||||
if [ $output == "Poweroff" ]; then
|
||||
st -e sh -c "doas poweroff"
|
||||
else if [ $output == "Reboot"]; then
|
||||
st -e sh -c "doas reboot"
|
||||
else if [ $output == "Quit Dwm"]; then
|
||||
st -e sh -c "pkill X"
|
||||
fi
|
||||
Reference in New Issue
Block a user