no longer (unused) icon slot
This commit is contained in:
parent
730022acdf
commit
29485b43b0
2 changed files with 19 additions and 23 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.
|
//Modify this file to change what commands output to your statusbar, and recompile using the make command.
|
||||||
static const Block blocks[] = {
|
static const Block blocks[] = {
|
||||||
/*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/
|
/*Command*/ /*Update Interval*/ /*Update Signal*/
|
||||||
{"", "cat /tmp/recordingicon 2>/dev/null", 0, 9},
|
{"cat /tmp/recordingicon 2>/dev/null", 0, 9},
|
||||||
/* {"", "music", 0, 11}, */
|
/* {"music", 0, 11}, */
|
||||||
{"", "pacpackages", 0, 8},
|
{"pacpackages", 0, 8},
|
||||||
/* {"", "crypto", 0, 13}, */
|
/* {"crypto", 0, 13}, */
|
||||||
{"", "torrent", 20, 7},
|
{"torrent", 20, 7},
|
||||||
{"", "news", 0, 6},
|
{"news", 0, 6},
|
||||||
/* {"", "memory", 10, 14}, */
|
/* {"memory", 10, 14}, */
|
||||||
/* {"", "cpu", 10, 13}, */
|
/* {"cpu", 10, 13}, */
|
||||||
/* {"", "moonphase", 18000, 5}, */
|
/* {"moonphase", 18000, 5}, */
|
||||||
{"", "weather", 18000, 5},
|
{"weather", 18000, 5},
|
||||||
{"", "mailbox", 180, 12},
|
{"mailbox", 180, 12},
|
||||||
{"", "volume", 1, 10},
|
{"volume", 1, 10},
|
||||||
{"", "battery | tr \'\n\' \' \'", 5, 3},
|
{"battery | tr \'\n\' \' \'", 5, 3},
|
||||||
{"", "clock", 60, 1},
|
{"clock", 60, 1},
|
||||||
{"", "internet", 5, 4},
|
{"internet", 5, 4},
|
||||||
{"", "help", 0, 15},
|
{"help", 0, 15},
|
||||||
};
|
};
|
||||||
|
|
||||||
//sets delimeter between status commands. NULL character ('\0') means no delimeter.
|
//sets delimeter between status commands. NULL character ('\0') means no delimeter.
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
#define CMDLENGTH 50
|
#define CMDLENGTH 50
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char* icon;
|
|
||||||
char* command;
|
char* command;
|
||||||
unsigned int interval;
|
unsigned int interval;
|
||||||
unsigned int signal;
|
unsigned int signal;
|
||||||
|
@ -56,7 +55,6 @@ void getcmd(const Block *block, char *output)
|
||||||
output[0] = block->signal;
|
output[0] = block->signal;
|
||||||
output++;
|
output++;
|
||||||
}
|
}
|
||||||
strcpy(output, block->icon);
|
|
||||||
char* cmd;
|
char* cmd;
|
||||||
FILE *cmdf;
|
FILE *cmdf;
|
||||||
if (button)
|
if (button)
|
||||||
|
@ -74,10 +72,8 @@ void getcmd(const Block *block, char *output)
|
||||||
}
|
}
|
||||||
if (!cmdf)
|
if (!cmdf)
|
||||||
return;
|
return;
|
||||||
char c;
|
fgets(output, CMDLENGTH, cmdf);
|
||||||
int i = strlen(block->icon);
|
int i = strlen(output);
|
||||||
fgets(output+i, CMDLENGTH-i, cmdf);
|
|
||||||
i = strlen(output);
|
|
||||||
if (delim != '\0' && i)
|
if (delim != '\0' && i)
|
||||||
output[i++] = delim;
|
output[i++] = delim;
|
||||||
output[i++] = '\0';
|
output[i++] = '\0';
|
||||||
|
|
Loading…
Reference in a new issue