powermenu script

This commit is contained in:
DarthMooMancer
2025-09-10 14:44:05 -04:00
parent 626ea0517c
commit 7dbdc39069
6 changed files with 13 additions and 10 deletions
+1 -1
View File
@@ -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
+10
View File
@@ -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
+1 -1
View File
@@ -1,6 +1,6 @@
PREFIX = /usr/local
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L
CPPFLAGS = -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=700L
CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os -I/usr/X11R6/include -I/usr/include/freetype2 ${CPPFLAGS}
LDFLAGS = -L/usr/X11R6/lib -lX11 -lfontconfig -lXft
+1
View File
@@ -46,6 +46,7 @@ static const Key keys[] = {
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_space, spawn, {.v = dmenucmd } },
{ MODKEY, XK_f, spawn, {.v = browsercmd } },
{ MODKEY|ShiftMask, XK_l, spawn, SHCMD("sh /home/andrew/.config/suckless/dmenu/scripts/powermenu.sh") },
{ MODKEY, XK_h, focusstack, {.i = +1 } },
{ MODKEY, XK_l, focusstack, {.i = -1 } },
{ MODKEY, XK_j, setmfact, {.f = -0.05} },
-6
View File
@@ -1149,12 +1149,6 @@ propertynotify(XEvent *e)
}
}
void
quit(const Arg *arg)
{
running = 0;
}
Monitor *
recttomon(int x, int y, int w, int h)
{
-2
View File
@@ -17,7 +17,6 @@ ORIGINAL_DOTS=(
"${DOTFILES_CONFIG}nvim/"
"${DOTFILES_CONFIG}dunst/"
"${DOTFILES_CONFIG}picom.conf"
"${DOTFILES_LOCAL}bin/"
"${DOTFILES_LOCAL}share/fonts/"
"${DOTFILES_HOME}.xinitrc"
"${DOTFILES_HOME}.bashrc"
@@ -27,7 +26,6 @@ COPY_DOTS=(
"${CONFIG}nvim/"
"${CONFIG}dunst/"
"${CONFIG}picom.conf"
"${LOCAL}bin/"
"${LOCAL}share/fonts/"
"${PERSONAL_HOME}.xinitrc"
"${PERSONAL_HOME}.bashrc"