update dwm config and dmenu-powermenu

This commit is contained in:
wt committed 2024-11-06 20:14:51 +07:00
1 parent 89e0fdb80b
commit a68fe93d1f
2 files changed
+5 -3

No files matched your search

+2 -2
View File
@@ -1,8 +1,8 @@
#!/bin/sh #!/bin/sh
case "$(printf "Shutdown\nRestart\nLogout\nSuspend\nLock" | dmenu \ case "$(printf "Shutdown\nRestart\nLogout\nSuspend\nLock" | dmenu \
-i -z 200 -p \ -i -x 550 -y 300 -z 200 -p \
"Power:" -l 5)" in "" -l 5)" in
Shutdown) exec systemctl poweroff;; Shutdown) exec systemctl poweroff;;
Restart) exec systemctl reboot;; Restart) exec systemctl reboot;;
Logout) kill -HUP $XDG_SESSION_PID;; Logout) kill -HUP $XDG_SESSION_PID;;
+3 -1
View File
@@ -60,12 +60,14 @@ static const Layout layouts[] = {
/* commands */ /* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[] = { "dmenu_run", NULL }; static const char *dmenucmd[] = { "dmenu_run", "-l", "10", "-x", "400", "-y", "300", "-z", "500", NULL };
static const char *powermenucmd[] = { "dmenu-powermenu", NULL };
static const char *termcmd[] = { "alacritty", NULL }; static const char *termcmd[] = { "alacritty", NULL };
static const Key keys[] = { static const Key keys[] = {
/* modifier key function argument */ /* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v = dmenucmd } }, { MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY|ShiftMask, XK_p, spawn, {.v = powermenucmd} },
{ MODKEY, XK_Return, spawn, {.v = termcmd } }, { MODKEY, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, togglebar, {0} }, { MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstackvis, {.i = +1 } }, { MODKEY, XK_j, focusstackvis, {.i = +1 } },