mirror of
https://github.com/CoolnsX/hyprdots.git
synced 2025-12-20 07:15:23 +05:30
Feat: New Scripts, new functions
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
:y "25"
|
||||
:width "30%"
|
||||
:height "40px"
|
||||
:anchor "top left")
|
||||
:anchor "bottom left")
|
||||
:stacking "bg"
|
||||
:reserve (struts :distance "10px" :side "bottom")
|
||||
:windowtype "dock"
|
||||
@@ -66,7 +66,7 @@
|
||||
(defpoll song :interval "1s" "./script songdata")
|
||||
(defpoll STATUS :interval "0.3s" "./script status")
|
||||
(defpoll CURRENT :interval "0.3s" "./script time")
|
||||
(defpoll LYRICS :interval "0.4s" "./script lyrics")
|
||||
(defpoll LYRICS :interval "0.3s" "./script lyrics")
|
||||
|
||||
(defwidget music []
|
||||
(box :class "genwin" :orientation "h" :spacing 40 :space-evenly "false" :vexpand "false" :hexpand "false"
|
||||
|
||||
@@ -36,10 +36,10 @@ case $1 in
|
||||
echo cycle pause | socat - "$datadir/yt-music-mpvsocket"
|
||||
;;
|
||||
next)
|
||||
pgrep -f mpvsocket >/dev/null 2>&1 && "$HOME/repos_scripts/yt-music" play_next
|
||||
pgrep -f mpvsocket >/dev/null 2>&1 && flock -n /tmp/yt-music/play_next.lock "$HOME/repos_scripts/yt-music" play_next
|
||||
;;
|
||||
prev)
|
||||
pgrep -f mpvsocket >/dev/null 2>&1 && counter=$(cat "$datadir/counter") && [ "$counter" -gt 0 ] && "$HOME/repos_scripts/yt-music" play "$(sed -n "${counter}p" "$datadir/next")" && printf "%s" "$((counter-1))" > "$datadir/counter" &
|
||||
pgrep -f mpvsocket >/dev/null 2>&1 && counter=$(cat "$datadir/counter") && [ "$counter" -gt 0 ] && flock -n /tmp/yt-music/play_prev.lock "$HOME/repos_scripts/yt-music" play "$(sed -n "${counter}p" "$datadir/next")" && printf "%s" "$((counter-1))" > "$datadir/counter" &
|
||||
;;
|
||||
seek)
|
||||
echo '{"command" :["seek" ,"'"$2"'","relative-percent"]}' | socat - "$datadir/yt-music-mpvsocket"
|
||||
|
||||
Reference in New Issue
Block a user