initial commit

This commit is contained in:
wt committed 2024-04-27 19:49:08 +07:00
commit 9b154e1ba6
43 files changed
+4809

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
#!/bin/bash
while true
do
player_status=$(playerctl -p spotify status 2> /dev/null)
if [ "$player_status" = "Playing" ]; then
artist=$(playerctl -p spotify metadata artist)
title=$(playerctl -p spotify metadata title)
echo '{"text": "'"$artist - $title"'", "class": "custom-spotify", "alt": "Spotify"}'
elif [ "$player_status" = "Paused" ]; then
artist=$(playerctl -p spotify metadata artist)
title=$(playerctl -p spotify metadata title)
echo '{"text": "'"Paused"'", "class": "custom-spotify", "alt": "Spotify (Paused)"}'
fi
sleep 1
done