From ac0422a9eb7ca9faae96566ca92a7e579d9a6437 Mon Sep 17 00:00:00 2001 From: Adam Stück Date: Thu, 4 May 2023 15:52:13 +0200 Subject: Drop unused scripts --- .local/bin/barpos | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100755 .local/bin/barpos (limited to '.local/bin/barpos') 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 "$@" -- cgit v1.2.3-70-g09d2