diff options
Diffstat (limited to '.local/bin/barpos')
-rwxr-xr-x | .local/bin/barpos | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/.local/bin/barpos b/.local/bin/barpos new file mode 100755 index 0000000..deb3840 --- /dev/null +++ b/.local/bin/barpos @@ -0,0 +1,14 @@ +#!/bin/bash + +polybar_cfg=$XDG_CONFIG_HOME/polybar/config.ini + +bottom_str="bottom = true" +top_str="bottom = false" + +if grep -q "$bottom_str" $polybar_cfg; then + sed -i "s/$bottom_str/$top_str/" $polybar_cfg +else + sed -i "s/$top_str/$bottom_str/" $polybar_cfg +fi + +polybar-launch |