Completed with no bugs...

This commit is contained in:
coolnsx
2023-01-11 00:40:59 +05:30
parent 6911ed7350
commit 156118a04d
4 changed files with 18 additions and 10 deletions

View File

@@ -44,7 +44,7 @@
:monitor 0
:geometry (geometry :x "50"
:y "50"
:width "20%"
:width "30%"
:height "40px"
:anchor "bottom left")
:stacking "bg"

View File

@@ -36,10 +36,10 @@ case $1 in
echo cycle pause | socat - "/tmp/mpvsocket"
;;
next)
/home/tanveer/repos_scripts/yt-music play_next
pgrep -f mpvsocket >/dev/null 2>&1 && /home/tanveer/repos_scripts/yt-music play_next
;;
prev)
pgrep -f mpvsocket >/dev/null 2>&1 && $HOME/repos_scripts/yt-music play "$(sed 's| >|\t|g' $HOME/.cache/yt-music/prev | cut -d':' -f2)"
pgrep -f mpvsocket >/dev/null 2>&1 && ($HOME/repos_scripts/yt-music play "$(sed 's| >|\t|g' $HOME/.cache/yt-music/prev | cut -d':' -f2)")
;;
time)
out=$(echo '{"command" :["get_property" , "percent-pos"]}' | socat - /tmp/mpvsocket 2>/dev/null | sed -nE 's_.*data":([^,]*).*_\1_p')