Fixed music icon bug

lightmode
E. Almqvist 2 years ago
parent af44a04f7d
commit 5a769eb97e
  1. 2524
      eww/.config/eww/debug
  2. 4
      eww/.config/eww/eww.yuck
  3. 12
      eww/.config/eww/scripts/musicstatus

File diff suppressed because it is too large Load Diff

@ -205,7 +205,7 @@
;; Music widget ;; Music widget
(defwidget music [] (defwidget music []
(revealer :reveal {music-status == "Playing" || music-status == "Paused"} (revealer :reveal {music-status == "true"}
(eventbox :onhover "${EWW_CMD} update music=true" (eventbox :onhover "${EWW_CMD} update music=true"
:onhoverlost "${EWW_CMD} update music=false" :onhoverlost "${EWW_CMD} update music=false"
;; :onclick "wget ${artUrl} -O /tmp/cover.jpg; sleep 1; notify-send -i /tmp/cover.jpg '${title} - ${artist}' '${songtime}'" ;; :onclick "wget ${artUrl} -O /tmp/cover.jpg; sleep 1; notify-send -i /tmp/cover.jpg '${title} - ${artist}' '${songtime}'"
@ -246,7 +246,7 @@
) )
))) )))
(defpoll music-status :interval "200ms" "playerctl status") (defpoll music-status :interval "200ms" "scripts/musicstatus")
(defpoll artUrl :interval "200ms" "playerctl metadata artUrl") (defpoll artUrl :interval "200ms" "playerctl metadata artUrl")
(defpoll title :interval "200ms" "playerctl metadata title") (defpoll title :interval "200ms" "playerctl metadata title")
(defpoll artist :interval "200ms" "playerctl metadata artist") (defpoll artist :interval "200ms" "playerctl metadata artist")

@ -0,0 +1,12 @@
#!/usr/bin/bash
status=$(playerctl status &>/dev/stdout)
if [[ "$status" == "No players found" ]]
then
echo "false"
else
echo "true"
fi
Loading…
Cancel
Save