Revert "no longer (unused) icon slot" for bugfix
This reverts commit 29485b43b0
.
This commit is contained in:
parent
93b951f715
commit
01e9f1a568
2 changed files with 23 additions and 19 deletions
34
config.h
34
config.h
|
@ -1,22 +1,22 @@
|
|||
//Modify this file to change what commands output to your statusbar, and recompile using the make command.
|
||||
static const Block blocks[] = {
|
||||
/*Command*/ /*Update Interval*/ /*Update Signal*/
|
||||
{"cat /tmp/recordingicon 2>/dev/null", 0, 9},
|
||||
{"music", 0, 11},
|
||||
{"pacpackages", 0, 8},
|
||||
/* {"crypto", 0, 13}, */
|
||||
/* {"torrent", 20, 7}, */
|
||||
{"news", 0, 6},
|
||||
/* {"memory", 10, 14}, */
|
||||
/* {"cpu", 10, 13}, */
|
||||
/* {"moonphase", 18000, 5}, */
|
||||
{"weather", 18000, 5},
|
||||
{"mailbox", 180, 12},
|
||||
{"volume", 0, 10},
|
||||
{"battery", 5, 3},
|
||||
{"clock", 60, 1},
|
||||
{"internet", 5, 4},
|
||||
{"help-icon", 0, 15},
|
||||
/*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/
|
||||
{"", "cat /tmp/recordingicon 2>/dev/null", 0, 9},
|
||||
{"", "music", 0, 11},
|
||||
{"", "pacpackages", 0, 8},
|
||||
/* {"", "crypto", 0, 13}, */
|
||||
{"", "torrent", 20, 7},
|
||||
{"", "news", 0, 6},
|
||||
/* {"", "memory", 10, 14}, */
|
||||
/* {"", "cpu", 10, 13}, */
|
||||
/* {"", "moonphase", 18000, 5}, */
|
||||
{"", "weather", 18000, 5},
|
||||
{"", "mailbox", 180, 12},
|
||||
{"", "volume", 1, 10},
|
||||
{"", "battery | tr \'\n\' \' \'", 5, 3},
|
||||
{"", "clock", 60, 1},
|
||||
{"", "internet", 5, 4},
|
||||
{"", "help", 0, 15},
|
||||
};
|
||||
|
||||
//sets delimeter between status commands. NULL character ('\0') means no delimeter.
|
||||
|
|
|
@ -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';
|
||||
|
|
Loading…
Reference in a new issue