From 89386d62d8c0d6a724d84b7f247b8031f8eebb13 Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Fri, 26 Jan 2024 17:03:10 -0500 Subject: Implement statuscmd for dwmblocks --- config.def.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'config.def.h') diff --git a/config.def.h b/config.def.h index 8b3789a..5bacfcd 100644 --- a/config.def.h +++ b/config.def.h @@ -62,6 +62,8 @@ static const Layout layouts[] = { /* helper for spawning shell commands in the pre dwm-5.0 fashion */ #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } +#define STATUSBAR "dwmblocks" + /* commands */ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; @@ -111,7 +113,9 @@ static const Button buttons[] = { { ClkLtSymbol, 0, Button1, setlayout, {0} }, { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, { ClkWinTitle, 0, Button2, zoom, {0} }, - { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, + { ClkStatusText, 0, Button1, sigstatusbar, {.i = 1} }, + { ClkStatusText, 0, Button2, sigstatusbar, {.i = 2} }, + { ClkStatusText, 0, Button3, sigstatusbar, {.i = 3} }, { ClkClientWin, MODKEY, Button1, movemouse, {0} }, { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, -- cgit v1.2.3