added explanation for cmds with no output

This commit is contained in:
Alexander Bocken 2020-08-23 22:02:24 +02:00
parent bf7d745a73
commit 26c5f5a91d
2 changed files with 6 additions and 3 deletions

View File

@ -1,13 +1,15 @@
//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.
//IMPORTANT: If a command is optionally empty, it should output \n in that case.
//Otherwise the last nonzero value will be used instead. This is intended behaviour as it prevents flickering
static const Block blocks[] = { static const Block blocks[] = {
/*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/ /*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/
{"music", 3600, 11}, {"music", 10, 11},
{"cat /tmp/mucc_time 2> /dev/null", 100, 3}, {"cat /tmp/mucc_time 2> /dev/null", 100, 3},
{"getpomminutesft", 100, 3}, {"getpomminutesft", 100, 3},
{"getpomminutes", 100, 3}, {"getpomminutes", 100, 3},
/* {"weather", 3600, 5},*/ /* {"weather", 3600, 5},*/
{"pacpackages", 100, 0}, {"pacpackages", 100, 0},
{"cpu", 5, 0}, {"cpu", 2, 0},
// {"nettraf", 10, 0}, // {"nettraf", 10, 0},
{"torrent", 6, 0}, {"torrent", 6, 0},
{"getmail", 20, 13}, {"getmail", 20, 13},

View File

@ -67,10 +67,11 @@ void getcmds(int time)
for(int i = 0; i < LENGTH(blocks); i++) for(int i = 0; i < LENGTH(blocks); i++)
{ {
current = blocks + i; current = blocks + i;
if ((current->interval != 0 && time % current->interval == 0) || time == -1) if ((current->interval != 0 && time % current->interval == 0) || time == -1){
getcmd(current,statusbar[i]); getcmd(current,statusbar[i]);
} }
} }
}
#ifndef __OpenBSD__ #ifndef __OpenBSD__
void getsigcmds(int signal) void getsigcmds(int signal)