diff options
author | Luke Smith <luke@lukesmith.xyz> | 2020-04-22 20:09:51 -0400 |
---|---|---|
committer | Luke Smith <luke@lukesmith.xyz> | 2020-04-22 20:09:51 -0400 |
commit | 01e9f1a5686c780e387398ceb330f1ee7dfdf2d0 (patch) | |
tree | 971bb485a2c16d51620ecc39e0c52150dc62fa1d /dwmblocks.c | |
parent | music module renabled for dwm (diff) | |
download | dwmblocks-01e9f1a5686c780e387398ceb330f1ee7dfdf2d0.tar.gz dwmblocks-01e9f1a5686c780e387398ceb330f1ee7dfdf2d0.tar.bz2 dwmblocks-01e9f1a5686c780e387398ceb330f1ee7dfdf2d0.tar.xz dwmblocks-01e9f1a5686c780e387398ceb330f1ee7dfdf2d0.tar.zst dwmblocks-01e9f1a5686c780e387398ceb330f1ee7dfdf2d0.zip |
Revert "no longer (unused) icon slot" for bugfix
This reverts commit 29485b43b0712062a0ccb99a1301ef071252a95e.
Diffstat (limited to 'dwmblocks.c')
-rw-r--r-- | dwmblocks.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/dwmblocks.c b/dwmblocks.c index 7d7a564..0cd0b54 100644 --- a/dwmblocks.c +++ b/dwmblocks.c @@ -8,6 +8,7 @@ #define CMDLENGTH 50 typedef struct { + char* icon; char* command; unsigned int interval; unsigned int signal; @@ -55,6 +56,7 @@ void getcmd(const Block *block, char *output) output[0] = block->signal; output++; } + strcpy(output, block->icon); char* cmd; FILE *cmdf; if (button) @@ -72,8 +74,10 @@ void getcmd(const Block *block, char *output) } if (!cmdf) return; - fgets(output, CMDLENGTH, cmdf); - int i = strlen(output); + char c; + int i = strlen(block->icon); + fgets(output+i, CMDLENGTH-i, cmdf); + i = strlen(output); if (delim != '\0' && i) output[i++] = delim; output[i++] = '\0'; |