1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-10-10 03:21:16 +02:00

tools: restructured

This commit is contained in:
2023-11-10 13:55:20 +01:00
parent 4cf03f336e
commit 1547250832
38 changed files with 0 additions and 0 deletions

30
.local/bin/etc/sxhkd/audio/lmc Executable file
View File

@@ -0,0 +1,30 @@
#!/bin/sh
# A general audio interface for LARBS.
# Based on a script by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
[ -z "$2" ] && num="5" || num="$2"
case "$1" in
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 (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

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,10 @@
#!/bin/sh
if amixer get Capture | tail -2 | grep -q '\[on\]'; then
paplay ~/.local/bin/tools/audio/mic_muted.wav
lmc mute
lmc undeaf
else
lmc unmute
lmc undeaf
paplay ~/.local/bin/tools/audio/mic_activated.wav
fi

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,10 @@
#!/bin/sh
if amixer get Master | tail -2 | grep -q '\[on\]'; then
notify-send -u low 'sxhkd' 'Sound muted\nMicrophone muted'
lmc mute
lmc deaf
else
lmc mute
lmc undeaf
paplay ~/.local/bin/tools/audio/sound_resumed.wav
fi