Custom mpd client thingy
This commit is contained in:
parent
f2c6eebc1c
commit
4611f6d90d
|
@ -0,0 +1,29 @@
|
|||
function music
|
||||
argparse h/help c/client -- $argv
|
||||
or return
|
||||
|
||||
if set -ql _flag_help
|
||||
echo "music [-h|--help] [-c/--client]"
|
||||
return 0
|
||||
end
|
||||
if set -ql _flag_client
|
||||
ncmpcpp
|
||||
end
|
||||
|
||||
set -f path (mpc -f %file% | sed -E '1 s:^(.+)\\/([^\\/]+)$:\1:' | head -n 1 | tr -d "\n")
|
||||
set cover (fd -e png -e jpg . "$HOME/Music/$path/")
|
||||
chafa --size=100x100 $cover
|
||||
mpc -f "%artist%@%album%@%title%" | head -n 1 | read -d @ -l artist album song
|
||||
|
||||
echo ""
|
||||
set_color red
|
||||
echo -n $artist
|
||||
set_color white
|
||||
echo -n " - "
|
||||
set_color cyan
|
||||
echo -n $album
|
||||
set_color white
|
||||
echo -n " - "
|
||||
set_color green
|
||||
echo $song
|
||||
end
|
Loading…
Reference in New Issue