From 95a142be5215939fc6b5be643e4fa44650415e2c Mon Sep 17 00:00:00 2001 From: Philip Wittamore Date: Mon, 2 Jun 2025 20:53:45 +0200 Subject: update --- sb-theme | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 sb-theme (limited to 'sb-theme') 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 +} -- cgit v1.2.3