>>7004484>the music player in your task bar etc.I use lemonbar, so its just a script that calls [code:lit]mpv --no-video[/code:lit] and [code:lit]youtube-dl --get-title[/code:lit] on the given url (or a default if none is given).
the power and play buttons are clickable, and pipe commands into an mpv input file.
the script:
[code:lit]
#!/bin/sh
. $HOME/.cache/wal/
colors.shif [ ! $1 ]; then
url="
https://www.youtube.com/watch?v=h8W73zB4VMM"
else
url=$1
fi
title=`youtube-dl --skip-download --get-title $url`
if [ -z "$(pgrep -l mpv | grep -v mpvy)" ]; then
mpv $url --no-video --input-file /home/ethan/mpv-fifo >/dev/null 2>&1 &
fi
touch /home/ethan/.mpv_playing
BAR_STRING="M%{F$color4}[mpv] %{F-}$title %{A1:pkill mpv && rm ~/.mpvy && mpc random > /dev/null && mpc random > /dev/null:} %{F$color4}\ue00d %{A} "
echo -e -n "$BAR_STRING" > $HOME/.mpvy
mpc random > /dev/null && mpc random > /dev/null
[/code:lit]
a seperate python script handles the actual bar input, from $HOME/.mpvy and $HOME/.mpv_playing.