From 81dcef14c48c37e9be41114730e65b2b00cbb00a Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Tue, 21 Feb 2023 14:13:55 -0800 Subject: [PATCH] Update blocks.def.h --- blocks.def.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/blocks.def.h b/blocks.def.h index 9c22d68..80ea283 100644 --- a/blocks.def.h +++ b/blocks.def.h @@ -1,11 +1,15 @@ -//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*/ - {"Mem:", "free -h | awk '/^Mem/ { print $3\"/\"$2 }' | sed s/i//g", 30, 0}, +// utility macros +#define SECONDS(n) (n * 1000) - {"", "date '+%b %d (%a) %I:%M%p'", 5, 0}, +static const Block blocks[] = { + /*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/ + {"", "dwmblocks-battery", SECONDS(10), 0}, + {"", "dwmblocks-volume", 125, 0}, + {" ", "date +'%a %b %d'", SECONDS(30), 0}, + {" ", "date +'%R'", SECONDS(2), 0}, + {"", "dwmblocks-network", SECONDS(5), 0}, }; -//sets delimeter between status commands. NULL character ('\0') means no delimeter. -static char delim[] = " | "; +// sets delimeter between status commands. NULL character ('\0') means no delimeter. +static char delim[] = " "; static unsigned int delimLen = 5;