feat(music-stats): improve stats format and add additional metadata

Improves the shortening function. Adds loop, shuffle, and volume metadata. Uses better seperator characters to improve reliability.
This commit is contained in:
2024-08-06 02:37:57 -04:00
parent 0745c33aec
commit a850e33415
2 changed files with 76 additions and 19 deletions
+4 -1
View File
@@ -1,6 +1,9 @@
#!/bin/bash
# Separator variable
separator="␟"
# Update the cache file every second
while true; do
playerctl --ignore-player firefox,kdeconnect,plasma-browser-integration metadata --format '{{ artist }} - {{ title }} - {{ album }} - {{ status }}' >~/.cache/music_cache.txt
playerctl --ignore-player firefox,kdeconnect,haruna,plasma-browser-integration metadata --format "{{ artist }}${separator}{{ title }}${separator}{{ album }}${separator}{{ status }}${separator}{{ volume }}${separator}{{ loop }}${separator}{{ shuffle }}" >~/.cache/music_cache.txt
sleep 1
done