eww: better lyrics

This commit is contained in:
2025-06-26 03:37:36 +02:00
parent 5517c99370
commit e2e150c95c
18 changed files with 134 additions and 56 deletions

View File

@@ -27,7 +27,7 @@
.lyrics-box-single {
margin: 5px 0px 5px 10px;
min-width: 634px;
min-width: 740px;
}
.lyrics-text {

View File

@@ -3,7 +3,8 @@
(defpoll position :interval "1s" "~/.local/bin/spotify-lyrics position")
(defpoll length :interval "1s" "~/.local/bin/spotify-lyrics length")
(defpoll offset :interval "1s" "cat $HOME/.local/state/eww/lyrics/offset")
(defpoll play-button :interval "1s" "if ~/.local/bin/spotify-lyrics status; then echo \"󰏤\"; else echo \"󰐊\"; fi")(defvar hover false)
(defpoll play-button :interval "1s" "if ~/.local/bin/spotify-lyrics status; then echo \"󰏤\"; else echo \"󰐊\"; fi")
(defvar hover false)
(defwidget lyrics []
(box :class "lyrics-window" :space-evenly "false" :orientation "v"
@@ -22,7 +23,7 @@
)
(box :class "control-row-1" :space-evenly "false" :orientation "h"
(button :class "offset-reset" :onclick "Lyrics/scripts/lyric-offset.py" "󰾅")
(button :class "offset-clear" :onclick "Lyrics/scripts/lyric-clear.sh" "󰑙")
(button :class "offset-clear" :onclick "Lyrics/scripts/lyric-clear.sh $(~/.local/bin/spotify-lyrics trackid)" "󰑙")
)
)
)

View File

@@ -1,6 +1,9 @@
#!/bin/sh
killall spotify-lyrics
sleep 0.1
"$HOME/.local/bin/spotify-lyrics" clear
notify-send -a "spotify-lyrics" "Cache Cleared" "The lyrics cache have been cleared."
if [ -z $1 ]; then
"$HOME/.local/bin/spotify-lyrics" clear
notify-send -a "spotify-lyrics" "Cache Cleared" "Lyrics cache have been cleared."
else
"$HOME/.local/bin/spotify-lyrics" clear "$1"
notify-send -a "spotify-lyrics" "Cache Cleared" "Lyrics cache for track $1 have been cleared."
fi