diff --git a/config.h b/config.h index eb1baef..bbe2139 100644 --- a/config.h +++ b/config.h @@ -1,13 +1,15 @@ //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[] = { /*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/ - {"music", 3600, 11}, + {"music", 10, 11}, {"cat /tmp/mucc_time 2> /dev/null", 100, 3}, {"getpomminutesft", 100, 3}, {"getpomminutes", 100, 3}, /* {"weather", 3600, 5},*/ {"pacpackages", 100, 0}, - {"cpu", 5, 0}, + {"cpu", 2, 0}, // {"nettraf", 10, 0}, {"torrent", 6, 0}, {"getmail", 20, 13}, diff --git a/dwmblocks.c b/dwmblocks.c index 5421074..1d075f7 100644 --- a/dwmblocks.c +++ b/dwmblocks.c @@ -67,8 +67,9 @@ void getcmds(int time) for(int i = 0; i < LENGTH(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]); + } } }