From 8f4a530917d1fc20d72cf7364ebd0da8ea42f75b Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Mon, 2 Nov 2020 21:46:53 +0800 Subject: [PATCH 1/2] [feature] add dryrun option --- suckless/config/dwm/statusbar | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/suckless/config/dwm/statusbar b/suckless/config/dwm/statusbar index cb18ffa..35587a4 100755 --- a/suckless/config/dwm/statusbar +++ b/suckless/config/dwm/statusbar @@ -120,9 +120,15 @@ restart() { $FP loop & } -if [ "$1" = "loop" ]; then - start -else - restart -fi +case "$1" in + loop) + start + ;; + dryrun) + statusbar + ;; + *) + restart + ;; +esac From 4e8eb61c290f74bfe037d6e87f9b37501027b7ef Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Mon, 2 Nov 2020 21:48:10 +0800 Subject: [PATCH 2/2] [bugfix] test condition reporting error --- suckless/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/suckless/install.sh b/suckless/install.sh index 583ea1f..348fe78 100755 --- a/suckless/install.sh +++ b/suckless/install.sh @@ -81,7 +81,7 @@ cat <<'EOT' > ~/.profile export PATH=$HOME/.local/bin # auto startx -[ -z "$DISPLAY" -a -n "$XDG_VTNR" -a "$XDG_VTNR" -eq "1" ] && exec startx +[ -z "$DISPLAY" -a -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq "1" ] && exec startx EOT