mirror of https://github.com/tiyn/dotfiles
parent
910422efec
commit
b87ad024b5
@ -1,23 +1,30 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# A general audio interface for LARBS.
|
# A general audio interface for LARBS.
|
||||||
# by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
|
# Based on a script by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
|
||||||
|
|
||||||
[ -z "$2" ] && num="2" || num="$2"
|
[ -z "$2" ] && num="5" || num="$2"
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
u*) pulsemixer --change-volume +"$num" ;;
|
up) wpctl set-volume @DEFAULT_AUDIO_SINK@ "$num"%+ ;;
|
||||||
d*) pulsemixer --change-volume -"$num" ;;
|
down) wpctl set-volume @DEFAULT_AUDIO_SINK@ "$num"%- ;;
|
||||||
m*) pulsemixer --toggle-mute ;;
|
deaf) wpctl set-mute @DEFAULT_SINK@ 1;;
|
||||||
|
undeaf) wpctl set-mute @DEFAULT_SINK@ 0;;
|
||||||
|
mute) wpctl set-mute @DEFAULT_AUDIO_SOURCE@ 1;;
|
||||||
|
unmute) wpctl set-mute @DEFAULT_AUDIO_SOURCE@ 0;;
|
||||||
*) cat << EOF
|
*) cat << EOF
|
||||||
lmc: cli music interface for pulse for those with divine intellect too
|
lmc: cli music interface for pulse for those with divine intellect too
|
||||||
grand to remember the pamixer commands.
|
grand to remember the pamixer commands.
|
||||||
|
|
||||||
Allowed options:
|
Allowed options:
|
||||||
up NUM Increase volume (2 secs default)
|
up NUM Increase volume (5% default)
|
||||||
down NUM Decrease volume (2 secs default)
|
down NUM Decrease volume (5% default)
|
||||||
mute Toggle mute
|
mute mute microphone
|
||||||
|
unmute unmute microphone
|
||||||
|
deaf deaf sound
|
||||||
|
undeaf undeaf sound
|
||||||
all else Print this message
|
all else Print this message
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
esac
|
esac
|
||||||
|
pkill -RTMIN+4 $STATUSBAR
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
if amixer get Capture | tail -2 | grep -q '\[on\]'; then
|
if amixer get Capture | tail -2 | grep -q '\[on\]'; then
|
||||||
paplay ~/.local/bin/tools/audio/mic_muted.wav
|
paplay ~/.local/bin/tools/audio/mic_muted.wav
|
||||||
amixer set Master unmute >/dev/null 2>&1
|
lmc mute
|
||||||
amixer set Capture nocap >/dev/null 2>&1
|
lmc undeaf
|
||||||
else
|
else
|
||||||
amixer set Master unmute >/dev/null 2>&1
|
lmc unmute
|
||||||
amixer set Capture cap >/dev/null 2>&1
|
lmc undeaf
|
||||||
paplay ~/.local/bin/tools/audio/mic_activated.wav
|
paplay ~/.local/bin/tools/audio/mic_activated.wav
|
||||||
fi
|
fi
|
||||||
|
pkill -RTMIN+4 $STATUSBAR
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
if amixer get Master | tail -2 | grep -q '\[on\]'; then
|
if amixer get Master | tail -2 | grep -q '\[on\]'; then
|
||||||
notify-send -u low 'sxhkd' 'Sound muted\nMicrophone muted'
|
notify-send -u low 'sxhkd' 'Sound muted\nMicrophone muted'
|
||||||
amixer set Master mute >/dev/null 2>&1
|
lmc mute
|
||||||
amixer set Capture nocap >/dev/null 2>&1
|
lmc deaf
|
||||||
else
|
else
|
||||||
amixer set Capture nocap >/dev/null 2>&1
|
lmc mute
|
||||||
amixer set Master unmute >/dev/null 2>&1
|
lmc undeaf
|
||||||
paplay ~/.local/bin/tools/audio/sound_resumed.wav
|
paplay ~/.local/bin/tools/audio/sound_resumed.wav
|
||||||
fi
|
fi
|
||||||
|
pkill -RTMIN+4 $STATUSBAR
|
||||||
|
Loading…
Reference in new issue