diff options
| author | Mitsuo Tokumori <[email protected]> | 2023-11-25 16:02:59 -0500 |
|---|---|---|
| committer | Mitsuo Tokumori <[email protected]> | 2023-11-25 16:02:59 -0500 |
| commit | 7358a29007fe0ad18a8733e6c0b729941ae06f03 (patch) | |
| tree | b6ffafab5a39cdf954b8dbb9524b980759c77b3f | |
| parent | c285ddd9d16f0038da0c036882eef7be75e2aae0 (diff) | |
| download | dotfiles-7358a29007fe0ad18a8733e6c0b729941ae06f03.tar.gz dotfiles-7358a29007fe0ad18a8733e6c0b729941ae06f03.tar.bz2 dotfiles-7358a29007fe0ad18a8733e6c0b729941ae06f03.zip | |
Add dwmblocks config
| -rw-r--r-- | code/dwmblocks/config.h | 20 | ||||
| -rwxr-xr-x | local/bin/sb-audio | 4 |
2 files changed, 24 insertions, 0 deletions
diff --git a/code/dwmblocks/config.h b/code/dwmblocks/config.h new file mode 100644 index 0000000..baad3c0 --- /dev/null +++ b/code/dwmblocks/config.h @@ -0,0 +1,20 @@ +//Modify this file to change what commands output to your statusbar, and recompile using the make command. + +// Other people's configs: +// https://github.com/LukeSmithxyz/dwmblocks/blob/master/config.h +// https://git.denshi.org/dwmblocks/tree/blocks.h + +static const Block blocks[] = { + /*Icon*/ /*Command*/ /*Update Interval*/ /*Update Signal*/ + + {"", "sb-input", 0, 20}, + {"", "sb-audio", 0, 10}, + {"", "sb-battery", 5, 0}, + {"🧠", "sensors | grep 'Tctl' | awk '{print $2}'", 5, 0}, + {"🐏", "free | awk '/^Mem/ { printf \"%.0f%\", $3/$2*100 }'", 5, 0}, + {"", "date '+Q%qW%V%a %H:%M'", 10, 0}, +}; + +//sets delimeter between status commands. NULL character ('\0') means no delimeter. +static char delim[] = " "; +static unsigned int delimLen = 5; diff --git a/local/bin/sb-audio b/local/bin/sb-audio index 6258869..ef4f745 100755 --- a/local/bin/sb-audio +++ b/local/bin/sb-audio @@ -27,4 +27,8 @@ if pactl get-sink-mute @DEFAULT_SINK@ | grep -q yes; then icon="🔇" fi +if pactl get-source-mute @DEFAULT_SOURCE@ | grep -q no; then + icon="🎤"$icon +fi + echo "$icon$vol%" |
