diff --git a/.local/bin/genbar b/.local/bin/genbar deleted file mode 100755 index 547e46f..0000000 --- a/.local/bin/genbar +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh - -LOW_USED_COLOR="#a3be8c" -MEDIUM_USED_COLOR="#ebcb8b" -HIGH_USED_COLOR="#bf616a" -DEFAULT_USED_COLOR="#81a1c1" -UNUSED_COLOR="#5e81ac" - -usage=$1 -width=$2 -usage_color=$3 - -command -v "$1" >/dev/null && usage=$($1) - -low_used=$((width * 30 / 100)) -medium_used=$((width * 60 / 100)) -num_used_chars=$(printf 'scale=0; (%s * %s) / 100\n' "$usage" "$width" | bc -l) - -if [ -n "$usage_color" ]; then - case "$num_used_chars" in - [0-$low_used]) used_color="$LOW_USED_COLOR" ;; - [$low_used-$medium_used]) used_color="$MEDIUM_USED_COLOR" ;; - *) used_color="$HIGH_USED_COLOR" ;; - esac -else - used_color="$DEFAULT_USED_COLOR" -fi - -prev_opened=0 -any_used_width=0 -i=1 -while [ "$i" -le "$width" ]; do - if [ "$i" -le "$num_used_chars" ]; then - if [ "$prev_opened" -eq 0 ]; then - bar="$bar" - prev_opened=1 - any_used_width=1 - fi - bar="$bar#" - else - if [ "$any_used_width" -eq 1 ]; then - bar="$bar" - prev_opened=0 - any_used_width=0 - fi - if [ "$prev_opened" -eq 0 ]; then - bar="$bar" - prev_opened=1 - fi - bar="$bar:" - fi - i=$((i + 1)) -done -bar="$bar" - -printf '%s\n' "$bar" diff --git a/.local/bin/initialize_pipes b/.local/bin/initialize_pipes deleted file mode 100755 index 597e495..0000000 --- a/.local/bin/initialize_pipes +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -PIPES="volume now-playing" - -for pipe in $PIPES; do - echo "" >"/tmp/pipe-$pipe" - pipe_"$pipe" & -done diff --git a/.local/bin/pipe_now-playing b/.local/bin/pipe_now-playing deleted file mode 100755 index 09f95fb..0000000 --- a/.local/bin/pipe_now-playing +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -PIPE_FILE="/tmp/pipe-now-playing" -[ -p "$PIPE_FILE" ] || mkfifo "$PIPE_FILE" - -monitors now_playing >"$PIPE_FILE" diff --git a/.local/bin/pipe_volume b/.local/bin/pipe_volume deleted file mode 100755 index 4aca780..0000000 --- a/.local/bin/pipe_volume +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -PIPE_FILE="/tmp/pipe-volume" -[ -p "$PIPE_FILE" ] || mkfifo "$PIPE_FILE" - -monitors volume >"$PIPE_FILE" diff --git a/.local/bin/run-i3lock b/.local/bin/run-i3lock deleted file mode 100755 index 57420ce..0000000 --- a/.local/bin/run-i3lock +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -die() { - echo "${0##*/}: $1" >&2 - exit 1 -} - -[ -f "$XDG_CACHE_HOME/lock.png" ] || die "file not found" -i3lock -i "$XDG_CACHE_HOME/lock.png" diff --git a/.local/bin/toggle b/.local/bin/toggle deleted file mode 100755 index b008a2b..0000000 --- a/.local/bin/toggle +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -killall "$1" || "$@"