neil in gemini space

mpv bash alias - 2022-03-01

i, we, all of us, have many things to remember. this bash alias reminds me of the mpv controls when i run mpv.

to save me time agonizing over what music i listen to next i usually shuffle.

more horrible bash follows:

a bash alias echos basic mpv controls in the terminal, or a cat file does the same thing, before launching mpv with my desired options. the controls reminder will scroll off the screen but i'll have had my reminder.

alias mpv--shuffle="echo $'-----------\n- mpv controls\n-----------\n stop:start=SPACE:p\n forward:back 5 secs=RIGHT:LEFT\n forward:back 1 min=UP:DOWN\n playlist forward:back=>ENTER:<\n volume +:-=*0:/9\n mute=m quit=q\n------------'; mpv --display-tags-set=Artist,Album,Title --vo=null --volume=80 --shuffle /media/neilt/Encore2DataDisk/media/HiDefMusic/"

or

alias mpv--shuffle-file='cat mpvcontrols.txt; mpv --vo=null --volume=80 --shuffle /media/neilt/Encore2DataDisk/media/HiDefMusic/'

file for cat:

-----------------------------------------
mpv controls
-----------------------------------------
stop or start = SPACE or p
forward or back 5 secs = RIGHT or LEFT arrow
forward or back 1 min = UP or DOWN arrow
playlist forward or back = > or ENTER, <
volume + or - = * or 0, / or 9
mute = m
quit = q
-----------------------------------------

the echo version is more portable but the alias is harder to read and therefore maintain.

after any changes to our ~/.bash_alias file:

source ~/.bash_aliases

to use:

mpv--shuffle

or:

mpv--shuffle-file

i prefer the echo version: close to what i wanted to achieve, as usual a work in progress:-)


=> return to gemini.mingmengtou.org index page.


neil.gemini@mingmengtou.org

content licensed CC-BY-SA 4.0 unless stated.

=> creative commons licence.

Proxy Information
Original URL
gemini://gemini.mingmengtou.org/2022-03-01-mpv-bash-alias.gmi
Status Code
Success (20)
Meta
text/gemini;lang=en-GB
Capsule Response Time
291.463625 milliseconds
Gemini-to-HTML Time
0.461762 milliseconds

This content has been proxied by September (ba2dc).