aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe <bousset.rudy@gmail.com>2022-08-16 13:16:50 +0200
committerJoe <bousset.rudy@gmail.com>2022-08-16 13:16:50 +0200
commit23b73dba045b314d549bf5916c85225d79dc6906 (patch)
tree42f99a1964522168f58bb19e471793f5d922dbe6
parentupdate (diff)
downloaddwmblocks-23b73dba045b314d549bf5916c85225d79dc6906.tar.gz
dwmblocks-23b73dba045b314d549bf5916c85225d79dc6906.tar.bz2
dwmblocks-23b73dba045b314d549bf5916c85225d79dc6906.tar.xz
dwmblocks-23b73dba045b314d549bf5916c85225d79dc6906.tar.zst
dwmblocks-23b73dba045b314d549bf5916c85225d79dc6906.zip
wip
-rw-r--r--config.h8
-rw-r--r--dwmblocks.c2
2 files changed, 7 insertions, 3 deletions
diff --git a/config.h b/config.h
index 4fa03ac..f45b867 100644
--- a/config.h
+++ b/config.h
@@ -1,9 +1,13 @@
//Modify this file to change what commands output to your statusbar, and recompile using the make command.
static const Block blocks[] = {
/*Icon Command Update interval Update signal*/
+ { "", "sb-cpu", 1, 12 },
+ { "", "sb-memory", 1, 12 },
+ { "", "sb-temp", 5, 12 },
{ "", "sb-mailbox", 180, 12 },
{ "", "sb-mpd", 5, 11 },
{ "", "sb-clock", 1, 1 },
+ { "", "sb-os", 0, 1 },
/* { "", "sb-music", 0, 11 }, */
/* {"⌨", "sb-kbselect", 0, 30}, */
/* {"", "cat /tmp/recordingicon 2>/dev/null", 0, 9}, */
@@ -28,8 +32,8 @@ static const Block blocks[] = {
};
//Sets delimiter between status commands. NULL character ('\0') means no delimiter.
-static char *predelim = "[";
-static char *postdelim = "]";
+static char *predelim = "";
+static char *postdelim = " | ";
// Have dwmblocks automatically recompile and run when you edit this file in
// vim with the following line in your vimrc/init.vim:
diff --git a/dwmblocks.c b/dwmblocks.c
index 773e36f..5d7f6cd 100644
--- a/dwmblocks.c
+++ b/dwmblocks.c
@@ -115,7 +115,7 @@ void getcmd(const Block *block, char *output)
strlcpy(output + i, tmpstr, CMDLENGTH);
remove_all(output, '\n');
i = strlen(output);
- if (i > 0){
+ if (i > 0 && block != &blocks[LENGTH(blocks) - 1]){
strcat(output, postdelim);
}
i += strlen(postdelim);