diff options
author | Philip Wittamore <philip@wittamore.com> | 2025-06-02 20:53:45 +0200 |
---|---|---|
committer | Philip Wittamore <philip@wittamore.com> | 2025-06-02 20:53:45 +0200 |
commit | 95a142be5215939fc6b5be643e4fa44650415e2c (patch) | |
tree | 3e8db10f82f20214856cac16f09f3f0b2de0427c /sb-theme | |
parent | 1b276b9a2600c902aa865c5b52dc1b791437a516 (diff) | |
download | scripts-95a142be5215939fc6b5be643e4fa44650415e2c.tar.gz scripts-95a142be5215939fc6b5be643e4fa44650415e2c.tar.bz2 scripts-95a142be5215939fc6b5be643e4fa44650415e2c.zip |
update
Diffstat (limited to 'sb-theme')
-rwxr-xr-x | sb-theme | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/sb-theme b/sb-theme new file mode 100755 index 0000000..f04c205 --- /dev/null +++ b/sb-theme @@ -0,0 +1,28 @@ +#!/bin/sh +# Utility functions for theming statusbar scripts. + +display() { + if [ -n "$2" ]; then + color="$2" + else + case "$(basename "$0")" in + sb-mail) color=13 ;; + sb-music) color=14 ;; + sb-disk) color=10 ;; + sb-memory) color=15 ;; + sb-loadavg) color=11 ;; + sb-mic) color=9 ;; + sb-record) color=9 ;; + sb-volume) color=15 ;; + sb-battery) color=14 ;; + sb-date) color=12 ;; + sb-network) color=9 ;; + *) color=15 ;; + esac + fi + + case "$STATUSBAR" in + dwmblocks) echo "^C$color^$1" ;; + *) echo "$1" ;; + esac +} |