diff options
| author | bakkeby <[email protected]> | 2021-04-14 11:23:18 +0200 |
|---|---|---|
| committer | bakkeby <[email protected]> | 2021-04-14 11:23:18 +0200 |
| commit | 6e80cb5f366b297c124da5139abf3b2199887e04 (patch) | |
| tree | c2be8a1ac9c0c095058aaa0185ffc4202b1263e6 /patch | |
| parent | 7efb64d68539666e8da8f7311e706954e6018fdb (diff) | |
| download | dwm-flexipatch-6e80cb5f366b297c124da5139abf3b2199887e04.tar.gz dwm-flexipatch-6e80cb5f366b297c124da5139abf3b2199887e04.zip | |
Upgrading statuscmd patch.
The original statuscmd patch has been renamed to statuscmd-nosignal
to separate the logic from the dwmblocks integration that involves
signals. I assume as the latter has become more popular it has replaced
the statuscmd in name.
Diffstat (limited to 'patch')
| -rw-r--r-- | patch/bar_statuscmd.c | 4 | ||||
| -rw-r--r-- | patch/bar_statuscmd.h | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/patch/bar_statuscmd.c b/patch/bar_statuscmd.c index ae1e2bb..c0ea860 100644 --- a/patch/bar_statuscmd.c +++ b/patch/bar_statuscmd.c @@ -1,7 +1,7 @@ #if !BAR_DWMBLOCKS_PATCH static const char statusexport[] = "export BUTTON=-;"; static int statuscmdn; -static int lastbutton; +static char lastbutton[] = "-"; #endif // BAR_DWMBLOCKS_PATCH int @@ -49,7 +49,7 @@ click_statuscmd_text(Arg *arg, int rel_x, char *text) if (x >= rel_x) break; if (ch <= LENGTH(statuscmds)) - statuscmdn = ch - 1; + statuscmdn = ch; #endif // BAR_DWMBLOCKS_PATCH } } diff --git a/patch/bar_statuscmd.h b/patch/bar_statuscmd.h index e2e75b1..cd92deb 100644 --- a/patch/bar_statuscmd.h +++ b/patch/bar_statuscmd.h @@ -3,4 +3,9 @@ static int click_statuscmd(Bar *bar, Arg *arg, BarArg *a); static int click_statuscmd_es(Bar *bar, Arg *arg, BarArg *a); #endif // BAR_EXTRASTATUS_PATCH static int click_statuscmd_text(Arg *arg, int rel_x, char *text); -static void copyvalidchars(char *text, char *rawtext);
\ No newline at end of file +static void copyvalidchars(char *text, char *rawtext); + +typedef struct { + const char *cmd; + int id; +} StatusCmd;
\ No newline at end of file |
