summaryrefslogtreecommitdiff
path: root/.local/bin/barpos
diff options
context:
space:
mode:
authorAdam Stück <adam@adast.xyz>2023-05-04 15:52:13 +0200
committerAdam Stück <adam@adast.xyz>2023-05-04 15:52:13 +0200
commitac0422a9eb7ca9faae96566ca92a7e579d9a6437 (patch)
tree455ffac76f3cfdde083473b4ff60f334a16e8b04 /.local/bin/barpos
parentaa3f5d6aabf002582bf77652aa0b5177a18a3bec (diff)
Drop unused scripts
Diffstat (limited to '.local/bin/barpos')
-rwxr-xr-x.local/bin/barpos36
1 files changed, 0 insertions, 36 deletions
diff --git a/.local/bin/barpos b/.local/bin/barpos
deleted file mode 100755
index 66f29de..0000000
--- a/.local/bin/barpos
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-
-BAR_CFG="$XDG_CONFIG_HOME/polybar/config.ini"
-
-main () {
- if [ -z "$1" ]; then
- toggle ; exit 0
- fi
-
- case "$1" in
- t|top)
- top ;;
- b|bottom)
- bottom ;;
- *)
- echo "usage: barpos [top|bottom]" ;;
- esac
-}
-
-toggle () {
- if grep -Eq "^bottom = true$" "$BAR_CFG"; then
- top
- else
- bottom
- fi
-}
-
-bottom () {
- sed -Ei "s|^bottom = .*$|bottom = true|" "$BAR_CFG"
-}
-
-top () {
- sed -Ei "s|^bottom = .*$|bottom = false|" "$BAR_CFG"
-}
-
-main "$@"