This commit is contained in:
2026-03-27 23:14:29 +02:00
parent 08fd0ea72c
commit 15bc9617a4
46 changed files with 868 additions and 587 deletions

View File

@@ -1,16 +1,16 @@
#!/bin/bash
function _sanitize {
sed -r "s/(^[ ]*)|([ ]*$)//g" | sed -r 's/\&/\&/g' | sed -r 's/\"/\"/g' | sed -r "s/'/\'/g"
sed -r "s/(^[ ]*)|([ ]*$)//g" | sed -r 's/\&/\&/g' | sed -r 's/\"/\"/g' | sed -r "s/'/\'/g"
}
# {{artist}} — {{title}}
SONGNAME="$( playerctl -s -p cider,chromium,OCbwoy3_s_iPhone metadata -f "{{artist}} — {{title}}" | _sanitize )"
ALBUMNAME="$( playerctl -s -p cider,chromium,OCbwoy3_s_iPhone metadata album | _sanitize )"
SONGNAME="$( playerctl -s -p cider,chromium,Kris___s_iPhone metadata -f "{{artist}} — {{title}}" | _sanitize )"
ALBUMNAME="$( playerctl -s -p cider,chromium,Kris___s_iPhone metadata album | _sanitize )"
if [ ${#SONGNAME} -gt 0 ] ; then
printf "{\"text\": \" $SONGNAME\", \"tooltip\": \"$ALBUMNAME\", \"class\":\"music\" }"
printf "{\"text\": \" $SONGNAME\", \"tooltip\": \"$ALBUMNAME\", \"class\":\"music\" }"
else
printf "{\"text\": \"\", \"tooltip\": \" \", \"class\":\"invisible\" }"
printf "{\"text\": \"\", \"tooltip\": \" \", \"class\":\"invisible\" }"
fi