1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-03-19 02:17:44 +01:00

40 lines
1.3 KiB
Plaintext
Raw Normal View History

2019-09-13 10:51:43 +02:00
#!/bin/sh
2020-04-02 00:06:34 +02:00
2019-09-13 10:51:43 +02:00
# A general audio interface for LARBS.
# Based on a script by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
2019-09-13 10:51:43 +02:00
[ -z "$2" ] && num="5" || num="$2"
2019-09-13 10:51:43 +02:00
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;;
previous) playerctl previous;;
playpause) playerctl play-pause;;
next) playerctl next;;
shuffle) playerctl shuffle toggle;;
loop) playerctl loop none;;
2019-09-13 10:51:43 +02:00
*) cat << EOF
2019-10-04 01:15:05 +02:00
lmc: cli music interface for pulse for those with divine intellect too
grand to remember the pamixer commands.
2019-09-13 10:51:43 +02:00
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
previous play previous song in player
playpause toggle play or pause in player
next play next song in player
2019-09-13 10:51:43 +02:00
all else Print this message
EOF
esac
pkill -RTMIN+4 $STATUSBAR
sleep 1 && pkill -RTMIN+9 $STATUSBAR