diff options
author | awy <awy@awy.one> | 2025-10-02 18:35:48 +0300 |
---|---|---|
committer | awy <awy@awy.one> | 2025-10-02 18:35:48 +0300 |
commit | 8e7fb84444e8123b4218046e7626130adfeb1189 (patch) | |
tree | a8e167f8632a10951a634f6c82559b45d0ac002b /.local | |
parent | efa4b6d27d3fa543508bc20af6997f953f2b5c25 (diff) | |
download | hyprdots-8e7fb84444e8123b4218046e7626130adfeb1189.tar.gz |
rm
Diffstat (limited to '.local')
-rwxr-xr-x | .local/bin/dmenuaudioswitch | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/.local/bin/dmenuaudioswitch b/.local/bin/dmenuaudioswitch deleted file mode 100755 index 8c2b367..0000000 --- a/.local/bin/dmenuaudioswitch +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -select_output() -{ - listofdevices=$(wpctl status | awk '/Sinks:/{flag=1; next} /^ ├─/{flag=0} flag { - line=$0 - gsub(/^ *[│├─]* */,"",line) # nuke leading garbage - print line - }' | sed 's/ \[vol: [^]]*\]//g' | rg -v '^$' | sed 's/[[:space:]]\+$//') - device=$( printf "%s" "$listofdevices" | mew -l 10 | awk '{match($0,/[0-9]+/); print substr($0,RSTART,RLENGTH)}') - wpctl set-default $device && notify-send "$(printf "%s" "$listofdevices" | rg $device) is now default output device" && exit 0 - notify-send "Something went wrong" -} - -select_input() -{ - listofdevices=$(wpctl status | awk '/Sources:/{flag=1; next} /^ ├─/{flag=0} flag { - line=$0 - gsub(/^ *[│├─]* */,"",line) # nuke leading garbage - print line - }' | sed 's/ \[vol: [^]]*\]//g' | rg -v '^$' | sed 's/[[:space:]]\+$//') - device=$( printf "%s" "$listofdevices" | mew -l 10 | awk '{match($0,/[0-9]+/); print substr($0,RSTART,RLENGTH)}') - wpctl set-default $device && notify-send "$(printf "%s" "$listofdevices" | rg $device) is now default input device" && exit 0 - notify-send "Something went wrong" -} - -choice=$1 -# choice=$(printf "input\noutput" | mew -l 2 -p "Output or input devices?") - -case "$choice" in - "input") - select_input - ;; - "output") - select_output - ;; - *) - exit 1 - ;; -esac |