mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-03-26 04:57:45 +01:00
audio: changed all audio references to pw
This commit is contained in:
parent
910422efec
commit
b87ad024b5
@ -25,9 +25,9 @@ super + m
|
||||
thunderbird
|
||||
|
||||
super + bracketright
|
||||
mic_toggle && pkill -RTMIN+4 $STATUSBAR
|
||||
mic_toggle
|
||||
super + backslash
|
||||
sound_toggle && pkill -RTMIN+4 $STATUSBAR
|
||||
sound_toggle
|
||||
|
||||
super + shift + l
|
||||
setxkbmap -query | grep -q 'nodeadkeys' && $(setxkbmap de ru ; notify-send -u low 'SXHKD' 'Set keymap to russian') || $(setxkbmap de nodeadkeys ; notify-send -u low 'SXHKD' 'Set keymap to german')
|
||||
@ -62,13 +62,13 @@ super + F12
|
||||
prompt "Reboot computer?" "sudo -A reboot now"
|
||||
|
||||
XF86AudioMute
|
||||
sound_toggle && pkill -RTMIN+4 $STATUSBAR
|
||||
sound_toggle
|
||||
XF86AudioMicMute
|
||||
mic_toggle && pkill -RTMIN+4 $STATUSBAR
|
||||
mic_toggle
|
||||
XF86AudioLowerVolume
|
||||
lmc down 5 && pkill -RTMIN+4 $STATUSBAR
|
||||
lmc down
|
||||
XF86AudioRaiseVolume
|
||||
lmc up 5 && pkill -RTMIN+4 $STATUSBAR
|
||||
lmc up
|
||||
XF86MonBrightnessDown
|
||||
light -U 15
|
||||
XF86MonBrightnessUp
|
||||
|
@ -1,23 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 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
|
||||
u*) pulsemixer --change-volume +"$num" ;;
|
||||
d*) pulsemixer --change-volume -"$num" ;;
|
||||
m*) pulsemixer --toggle-mute ;;
|
||||
up) wpctl set-volume @DEFAULT_AUDIO_SINK@ "$num"%+ ;;
|
||||
down) wpctl set-volume @DEFAULT_AUDIO_SINK@ "$num"%- ;;
|
||||
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
|
||||
lmc: cli music interface for pulse for those with divine intellect too
|
||||
grand to remember the pamixer commands.
|
||||
|
||||
Allowed options:
|
||||
up NUM Increase volume (2 secs default)
|
||||
down NUM Decrease volume (2 secs default)
|
||||
mute Toggle mute
|
||||
up NUM Increase volume (5% default)
|
||||
down NUM Decrease volume (5% default)
|
||||
mute mute microphone
|
||||
unmute unmute microphone
|
||||
deaf deaf sound
|
||||
undeaf undeaf sound
|
||||
all else Print this message
|
||||
|
||||
EOF
|
||||
esac
|
||||
pkill -RTMIN+4 $STATUSBAR
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
if amixer get Capture | tail -2 | grep -q '\[on\]'; then
|
||||
paplay ~/.local/bin/tools/audio/mic_muted.wav
|
||||
amixer set Master unmute >/dev/null 2>&1
|
||||
amixer set Capture nocap >/dev/null 2>&1
|
||||
lmc mute
|
||||
lmc undeaf
|
||||
else
|
||||
amixer set Master unmute >/dev/null 2>&1
|
||||
amixer set Capture cap >/dev/null 2>&1
|
||||
lmc unmute
|
||||
lmc undeaf
|
||||
paplay ~/.local/bin/tools/audio/mic_activated.wav
|
||||
fi
|
||||
pkill -RTMIN+4 $STATUSBAR
|
||||
|
@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
if amixer get Master | tail -2 | grep -q '\[on\]'; then
|
||||
notify-send -u low 'sxhkd' 'Sound muted\nMicrophone muted'
|
||||
amixer set Master mute >/dev/null 2>&1
|
||||
amixer set Capture nocap >/dev/null 2>&1
|
||||
lmc mute
|
||||
lmc deaf
|
||||
else
|
||||
amixer set Capture nocap >/dev/null 2>&1
|
||||
amixer set Master unmute >/dev/null 2>&1
|
||||
lmc mute
|
||||
lmc undeaf
|
||||
paplay ~/.local/bin/tools/audio/sound_resumed.wav
|
||||
fi
|
||||
pkill -RTMIN+4 $STATUSBAR
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
vol="$(pulsemixer --get-volume | awk '{print $1}')"
|
||||
vol="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | awk '{print $2}' | sed -e 's/\.//g' | sed 's/^0*//')"
|
||||
|
||||
if [ "$vol" -eq "0" ]; then
|
||||
vol_info="^c#dfdfdf^ ^d^"
|
||||
@ -10,12 +10,12 @@ else
|
||||
vol_info="^c#dfdfdf^ ^d^"
|
||||
fi
|
||||
|
||||
[ "$(pulsemixer --get-mute)" = "1" ] && vol_info="^c#ff0000^ ^d^"
|
||||
$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | grep -q '\[MUTED\]') && vol_info="^c#ff0000^ ^d^"
|
||||
|
||||
if amixer get Capture | tail -2 | grep -q '\[on\]'; then
|
||||
mic="^b#282828^^c#dfdfdf^ "
|
||||
else
|
||||
if wpctl get-volume @DEFAULT_SOURCE@ | grep -q '\[MUTED\]'; then
|
||||
mic="^b#282828^^c#ff0000^ "
|
||||
else
|
||||
mic="^b#282828^^c#dfdfdf^ "
|
||||
fi
|
||||
|
||||
vol=$(printf %3s $vol | tr ' ' ' ')
|
||||
|
Loading…
x
Reference in New Issue
Block a user