diff options
author | Tim Keller <tjkeller.xyz> | 2024-11-17 23:39:40 -0600 |
---|---|---|
committer | Tim Keller <tjkeller.xyz> | 2024-11-17 23:39:40 -0600 |
commit | 08f22ad82edbe30606a8145a01ab18f2f6d71b4b (patch) | |
tree | cce5c45c996d81d131ada2f409a3c6d041b5416e /.old/sinkswitch | |
parent | 09ada24d4ec23cf24ab136141b354953d1bbc2fa (diff) | |
download | scripts-08f22ad82edbe30606a8145a01ab18f2f6d71b4b.tar.xz scripts-08f22ad82edbe30606a8145a01ab18f2f6d71b4b.zip |
delete .old dir since all is still stored in version control
Diffstat (limited to '.old/sinkswitch')
-rwxr-xr-x | .old/sinkswitch | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/.old/sinkswitch b/.old/sinkswitch deleted file mode 100755 index 3046498..0000000 --- a/.old/sinkswitch +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -[ $(hostname) != 'T495' ] && echo "Not T495. Exiting" && exit 1 - -status="$(wpctl status)" - -headphones_sink=$(echo "$status" | grep -m1 'ThinkPad USB-C Dock Gen2 USB Audio Analog Stereo \[vol:' | grep -m1 -o '[0-9]*') -speakers_sink=$( echo "$status" | grep -m1 'Raven/Raven2/Fenghuang HDMI/DP Audio Controller Digital Stereo (HDMI 2) \[vol:' | grep -m1 -o '[0-9]*') - -selected_sink=$(echo "$status" | grep -m1 '\*\s*[0-9]*' | grep -o '[0-9]*') - -case $selected_sink in - $headphones_sink) wpctl set-default $speakers_sink && echo "Switched to speakers" ;; - $speakers_sink) wpctl set-default $headphones_sink && echo "Switched to headphones" ;; - *) echo "Cannot find correct sink. Exiting" && exit 1 ;; -esac |