dotfiles

Configuration for the software I use.
git clone https://git.sr.ht/~jbauer/dotfiles
Log | Files | Refs | README | LICENSE

commit 40e290f8db60cda41873b9413922bc171170ac5c
parent c891c034340548aa11e1df78166deaf0b2d5d9b9
Author: Jake Bauer <jbauer@paritybit.ca>
Date:   Sat, 20 Jun 2020 02:35:41 -0400

Fix issues with getting audio device online status

Diffstat:
Mdocs/scripts/sh/change-volume.sh | 2+-
Mdocs/scripts/sh/mute-microphone.sh | 4++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/docs/scripts/sh/change-volume.sh b/docs/scripts/sh/change-volume.sh @@ -9,7 +9,7 @@ amixer set Master "$@" > /dev/null # Query amixer for the current volume and whether or not the speaker is muted volume="$(amixer get Master | tail -1 | awk '{print $5}' | sed 's/[^0-9]*//g')" -online="$(amixer get Master | tail -1 | awk '{print $6}' | sed 's/[^a-z]*//g')" +online="$(amixer get Master | tail -1 | awk '{print $NF}' | sed 's/[^a-z]*//g')" if [ "$volume" -eq 0 ] || [ "$online" = "off" ]; then # Show the sound muted notification diff --git a/docs/scripts/sh/mute-microphone.sh b/docs/scripts/sh/mute-microphone.sh @@ -5,10 +5,10 @@ msgId="557843" # Set the volume based on args given -amixer sset Capture toggle +amixer sset Capture toggle > /dev/null # Query amixer for the current volume and whether or not the speaker is muted -online="$(amixer get Capture | tail -1 | awk '{print $6}' | sed 's/[^a-z]*//g')" +online="$(amixer get Capture | tail -1 | awk '{print $NF}' | sed 's/[^a-z]*//g')" if [ "$online" = "off" ]; then # Show the sound muted notification