globbale args and custom vol/seek ammounts
This commit is contained in:
parent
91622af84c
commit
9eaf107462
1 changed files with 35 additions and 12 deletions
47
.scripts/lmc
47
.scripts/lmc
|
@ -3,18 +3,41 @@
|
||||||
# A general audio interface for LARBS.
|
# A general audio interface for LARBS.
|
||||||
|
|
||||||
newvol="pkill -RTMIN+10 i3blocks"
|
newvol="pkill -RTMIN+10 i3blocks"
|
||||||
# Uncomment if i3mpdupdate isn't running:
|
|
||||||
|
[ -z "$2" ] && num="2" || num="$2"
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
"up") pulsemixer --change-volume +"$2" ; $newvol ;;
|
u*) pulsemixer --change-volume +"$num" ; $newvol ;;
|
||||||
"down") pulsemixer --change-volume -"$2" ; $newvol ;;
|
d*) pulsemixer --change-volume -"$num" ; $newvol ;;
|
||||||
"mute") pulsemixer --toggle-mute ; $newvol ;;
|
m*) pulsemixer --toggle-mute ; $newvol ;;
|
||||||
"truemute") pulsemixer --mute ; $newvol ;;
|
truemute) pulsemixer --mute ; $newvol ;;
|
||||||
"toggle") mpc toggle ;;
|
play) mpc play ;;
|
||||||
"pause") mpc pause ; pauseallmpv ;;
|
n*) mpc next ;;
|
||||||
"forward") mpc seek +"$2" ;;
|
prev) mpc prev ;;
|
||||||
"back") mpc seek -"$2" ;;
|
t*) mpc toggle ;;
|
||||||
"next") mpc next ;;
|
p*) mpc pause ; pauseallmpv ;;
|
||||||
"prev") mpc prev ;;
|
f*) mpc seek +"$num" ;;
|
||||||
"replay") mpc seek 0% ;;
|
b*) mpc seek -"$num" ;;
|
||||||
|
r*) mpc seek 0\% ;;
|
||||||
|
*) cat << EOF
|
||||||
|
lmc: cli music interface for mpd and pulse for those with divine intellect too
|
||||||
|
grand to remember the mpc/pamixer commands.
|
||||||
|
|
||||||
|
Allowed options:
|
||||||
|
up NUM Increase volume (2 secs default)
|
||||||
|
down NUM Decrease volume (2 secs default)
|
||||||
|
mute Toggle mute
|
||||||
|
truemute Mute
|
||||||
|
next Next track
|
||||||
|
prev Previous track
|
||||||
|
toggle Toggle pause
|
||||||
|
truepause Pause
|
||||||
|
foward NUM Seek foward in song (2 secs default)
|
||||||
|
back NUM Seek back in song (2 secs default)
|
||||||
|
restart Restart current song
|
||||||
|
all else Print this message
|
||||||
|
|
||||||
|
All of these commands, except for \`truemute\`, \`prev\` and \`play\` can be truncated,
|
||||||
|
i.e. \`lmc r\` for \`lmc restart\`.
|
||||||
|
EOF
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue