summaryrefslogtreecommitdiff
path: root/.local
diff options
context:
space:
mode:
authorsinanmohd <sinan@firemail.cc>2023-11-26 22:10:10 +0530
committersinanmohd <sinan@firemail.cc>2023-11-26 22:10:10 +0530
commitc430a3a53aa7b303d5170afda61fe7814948edd2 (patch)
tree5dcc611b384466672190868193e73bd81ceb7ba7 /.local
parent211cdf0a99991bad94ae6a5fde6731a38448fa39 (diff)
bin: rm wobload and audio_mutemic
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/audio_mutemic13
-rwxr-xr-x.local/bin/wobload67
2 files changed, 0 insertions, 80 deletions
diff --git a/.local/bin/audio_mutemic b/.local/bin/audio_mutemic
deleted file mode 100755
index b622b62..0000000
--- a/.local/bin/audio_mutemic
+++ /dev/null
@@ -1,13 +0,0 @@
-#! /bin/sh
-
-wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
-
-command -v notify-send > /dev/null || exit
-case "$(wpctl get-volume @DEFAULT_AUDIO_SOURCE@)" in
-*\[MUTED\])
- notify-send " muted" "microphone is muted"
- ;;
-*)
- notify-send " unmuted" "microphone is active"
- ;;
-esac
diff --git a/.local/bin/wobload b/.local/bin/wobload
deleted file mode 100755
index 599024c..0000000
--- a/.local/bin/wobload
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/sh
-
-wobpipe="${XDG_RUNTIME_DIR:-${TMPDIR:-/tmp}}/wobpipe"
-
-usage()
-{
- cat <<- EOF
- Usage: ${0##*/} [cmd]
- A helper script for wob the wayland overlay bar
-
- Example:
- ${0##*/} wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
-
- EOF
-}
-
-err()
-{
- : "${1:?}"
-
- printf "\033[31;1merr: %b\033[0m\n" "$1" 1>&2
- command -v notify-send > /dev/null &&
- notify-send " wob loader" "$1"
-}
-
-render()
-{
- : "${1:?}"
-
- echo "${1%%.*}" > "$wobpipe"
-}
-
-########
-# MAIN #
-########
-
-exe="$1"
-shift
-
-if [ -z "$exe" ]; then
- usage
- exit
-elif [ ! -p "$wobpipe" ]; then
- err "$wobpipe: named pipe does not exist"
- exit 1
-elif ! command -v "$exe" > /dev/null; then
- err "${exe}: command not found"
- exit 127
-fi
-
-case "$exe" in
-"wpctl")
- wpctl "$@"
-
- data="$(wpctl get-volume "@DEFAULT_AUDIO_SINK@")"
- render "$(echo "${data##* } * 100" | bc)"
- ;;
-"brightnessctl")
- brightnessctl "$@"
-
- data="$(brightnessctl info | grep -o '[0-9]*%')"
- render "${data%\%}"
- ;;
-*)
- err "${exe}: not implemented"
- "$exe" "$@"
-esac