From f734b5a441a15ef55c7d28f0007f0cca36a57191 Mon Sep 17 00:00:00 2001 From: adam <56338480+adastx@users.noreply.github.com> Date: Tue, 8 Nov 2022 16:29:27 +0100 Subject: scripts: minor cleanup --- .local/bin/barpos | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '.local/bin/barpos') diff --git a/.local/bin/barpos b/.local/bin/barpos index d84709d..66f29de 100755 --- a/.local/bin/barpos +++ b/.local/bin/barpos @@ -3,7 +3,7 @@ BAR_CFG="$XDG_CONFIG_HOME/polybar/config.ini" main () { - if [ ! -n "$1" ]; then + if [ -z "$1" ]; then toggle ; exit 0 fi @@ -18,7 +18,7 @@ main () { } toggle () { - if grep -Eq "^bottom = true$" $BAR_CFG; then + if grep -Eq "^bottom = true$" "$BAR_CFG"; then top else bottom @@ -26,11 +26,11 @@ toggle () { } bottom () { - sed -Ei "s|^bottom = .*$|bottom = true|" $BAR_CFG + sed -Ei "s|^bottom = .*$|bottom = true|" "$BAR_CFG" } top () { - sed -Ei "s|^bottom = .*$|bottom = false|" $BAR_CFG + sed -Ei "s|^bottom = .*$|bottom = false|" "$BAR_CFG" } main "$@" -- cgit v1.2.3-70-g09d2