#! /bin/sh
-CARD="`cat $HOME/misc/alsa-card`"
+CARD="`cat \"$HOME\"/.config/alsa-card`"
echo "
set Master,0 mute
#! /bin/sh
-CARD="`cat $HOME/misc/alsa-card`"
+CARD="`cat \"$HOME\"/.config/alsa-card`"
echo "
set Master,0 mute
#! /bin/sh
-if amixer -c"`cat $HOME/misc/alsa-card`" cget name="Headphone Playback Switch" |
+if amixer -c"`cat \"$HOME\"/.config/alsa-card`" cget name="Headphone Playback Switch" |
grep -Fq ": values=on"
then
echo "
set Master,0 mute
set Headphone,0 mute
- set PCM,0 mute" | exec amixer -c"`cat $HOME/misc/alsa-card`" -s
+ set PCM,0 mute" | exec amixer -c"`cat \"$HOME\"/.config/alsa-card`" -s
else
echo "
set Master,0 unmute
set Headphone,0 unmute
- set PCM,0 unmute" | exec amixer -c"`cat $HOME/misc/alsa-card`" -s
+ set PCM,0 unmute" | exec amixer -c"`cat \"$HOME\"/.config/alsa-card`" -s
fi
cd "$HOME" || exit 1
if [ -f .alsa.save ]; then
- alsactl restore -f .alsa.save "`cat $HOME/misc/alsa-card`" &&
+ alsactl restore -f .alsa.save "`cat \"$HOME\"/.config/alsa-card`" &&
exec rm .alsa.save
else
- alsactl store -f .alsa.save "`cat $HOME/misc/alsa-card`" &&
+ alsactl store -f .alsa.save "`cat \"$HOME\"/.config/alsa-card`" &&
echo "
set Master,0 0
set Headphone,0 0
- set PCM,0 0" | exec amixer -c"`cat $HOME/misc/alsa-card`" -s
+ set PCM,0 0" | exec amixer -c"`cat \"$HOME\"/.config/alsa-card`" -s
fi
exit 1
fi
-exec amixer -c`cat $HOME/misc/alsa-card` set PCM,0 "$vol"
+exec amixer -c"`cat \"$HOME\"/.config/alsa-card`" set PCM,0 "$vol"