sb

simple bar for dwm
git clone git://git.ckyln.com/sb.git
Log | Files | Refs | README | LICENSE

commit 20999773151748e345c97497999e3be365e2df5b
parent 3f69d861b59c9e6f529d589634fde7463a5f9b79
Author: Cem Keylan <cem@ckyln.com>
Date:   Wed, 12 Feb 2020 15:28:50 +0300

make multiple options parsable

Diffstat:
Msb | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sb b/sb @@ -21,16 +21,16 @@ EOF exit 0 } -[ "$1" ] && case "$1" in - d) noconfig=1 ;; - v) printf '%s\n' "${0##*/}-$VERSION"; exit 0 ;; - n) nobar=1 ;; - x) ! [ -e "/tmp/sb-$USER.pid" ] && \ +while [ "$1" ] ; do case "$1" in + -d|d) noconfig=1 ; shift ;; + -v|v) printf '%s\n' "${0##*/}-$VERSION"; exit 0 ;; + -n|n) nobar=1 ; shift ;; + -x|x) ! [ -e "/tmp/sb-$USER.pid" ] && \ printf "There is no running instance of sb\\n" && exit 1 kill "$(cat "/tmp/sb-$USER.pid")"; rm "/tmp/sb-$USER.pid"; exit 0 ;; *) usage ;; -esac +esac ; done [ "$noconfig" ] || { [ -e "$HOME/.config/sbrc" ] && . "$HOME/.config/sbrc" ;}