From 94d4f22a692a68162a360d030ccf60e5227d94a3 Mon Sep 17 00:00:00 2001 From: Marco Thomas Date: Fri, 26 Mar 2021 00:55:08 +0100 Subject: [PATCH] Add blocks --- .gitignore | 2 -- blocks.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 blocks.h diff --git a/.gitignore b/.gitignore index b6605b4..3e2a98c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ -# Custom blocks file -blocks.h # Prerequisites *.d diff --git a/blocks.h b/blocks.h new file mode 100644 index 0000000..df7e3b5 --- /dev/null +++ b/blocks.h @@ -0,0 +1,12 @@ +//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*/ + {" 󰓇 ", "~/scripts/dwm_bar/song.sh || echo 'Not running'", 5, 0}, + {"󰤨 ", "nmcli | grep 'connected' | awk '{ print $4 }'", 10, 0}, + {" ", "echo $(cat /sys/class/power_supply/BAT0/capacity)%", 10, 0}, + {"󰃭 ", "date '+%b %d, %Y - %R'", 5, 0}, +}; + +//sets delimeter between status commands. NULL character ('\0') means no delimeter. +static char delim[] = " | "; +static unsigned int delimLen = 5;