eww: better lyrics

This commit is contained in:
2025-06-24 03:51:59 +02:00
parent 8f6795bc29
commit 54ae84cfaf
12 changed files with 100 additions and 27 deletions

View File

@@ -2,5 +2,5 @@
killall spotify-lyrics
sleep 0.1
spotify-lyrics clear
"$HOME/.local/bin/spotify-lyrics" clear
notify-send -a "spotify-lyrics" "Lyrics Cleared" "The lyrics have been cleared."

View File

@@ -1,13 +0,0 @@
#!/bin/sh
STATE_DIR="$HOME/.local/state/eww/lyrics"
if [ ! -d $STATE_DIR ]; then
mkdir -p $STATE_DIR
fi
OFFSET_FILE="$STATE_DIR/offset"
if [ ! -f "$OFFSET_FILE" ]; then
echo "0" > "$OFFSET_FILE"
fi
spotify-lyrics print -l 3 -O $(cat "$OFFSET_FILE")

View File

@@ -7,7 +7,7 @@ STATE_FILE_NAME = "offset"
def notify_send(title, message):
import subprocess
subprocess.run(["notify-send", "-a", APP_NAME, title, message], check=True)
subprocess.run(["notify-send", "-t", "1000", "-a", APP_NAME, title, message], check=True)
def main():