lmc (1111B)
1 #!/usr/bin/env sh 2 # A general audio interface for LARBS. 3 4 [ -z "$2" ] && num="2" || num="$2" 5 6 case "$1" in 7 u*) pulsemixer --change-volume +"$num" ;; 8 d*) pulsemixer --change-volume -"$num" ;; 9 m*) pulsemixer --toggle-mute ;; 10 truemute) pulsemixer --mute ;; 11 play) mpc play ;; 12 n*) mpc next ;; 13 prev) mpc prev ;; 14 t*) mpc toggle ;; 15 p*) mpc pause ; pauseallmpv ;; 16 f*) mpc seek +"$num" ;; 17 b*) mpc seek -"$num" ;; 18 r*) mpc seek 0% ;; 19 *) cat << EOF 20 lmc: cli music interface for mpd and pulse for those with divine intellect too 21 grand to remember the mpc/pamixer commands. 22 23 Allowed options: 24 up NUM Increase volume (2 secs default) 25 down NUM Decrease volume (2 secs default) 26 mute Toggle mute 27 truemute Mute 28 next Next track 29 prev Previous track 30 toggle Toggle pause 31 truepause Pause 32 foward NUM Seek foward in song (2 secs default) 33 back NUM Seek back in song (2 secs default) 34 restart Restart current song 35 all else Print this message 36 37 All of these commands, except for \`truemute\`, \`prev\` and \`play\` can be truncated, 38 i.e. \`lmc r\` for \`lmc restart\`. 39 EOF 40 esac 41 42 pkill -RTMIN+10 i3blocks