refactor: improve readability of ignored_sources array in update_cache.sh
This commit is contained in:
@@ -10,6 +10,7 @@ ignored_players=(
|
|||||||
"kdeconnect"
|
"kdeconnect"
|
||||||
"haruna"
|
"haruna"
|
||||||
"plasma-browser-integration"
|
"plasma-browser-integration"
|
||||||
|
"plasma-browser-integration-76042"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Convert array to a comma-separated string with no spaces
|
# Convert array to a comma-separated string with no spaces
|
||||||
@@ -38,7 +39,7 @@ trap cleanup EXIT
|
|||||||
|
|
||||||
# Update the music cache file every second
|
# Update the music cache file every second
|
||||||
while true; do
|
while true; do
|
||||||
playerctl --ignore-player ${ignored_sources} metadata --format "{{ artist }}${separator}{{ title }}${separator}{{ album }}${separator}{{ status }}${separator}{{ volume }}${separator}{{ loop }}${separator}{{ shuffle }}" >~/.cache/music_cache.txt
|
playerctl --ignore-player "${ignored_sources}" metadata --format "{{ artist }}${separator}{{ title }}${separator}{{ album }}${separator}{{ status }}${separator}{{ volume }}${separator}{{ loop }}${separator}{{ shuffle }}" >~/.cache/music_cache.txt
|
||||||
sleep 1
|
sleep 1
|
||||||
done & # Run this loop in the background
|
done & # Run this loop in the background
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user