Tint2 example:
Last active
April 11, 2023 05:09
-
-
Save rawsh/82bbe36bd61b659513cfc3e84ded658a to your computer and use it in GitHub Desktop.
Print out the currently playing spotify song. Great with tint2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ echo "$(spotify-now -i " <b>%title" -e "" -p " paused" | awk -v len=40 '{ if (length($0) > len) print substr($0, 1, len-3) "..."; else print; }' | tr -d '&' | awk '{print $0 "</b>"}')"; echo "$(spotify-now -i '%artist' -p ' ' -e ' ')"; } | tr "\n" " " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ echo "$(playerctl metadata title | awk -v len=40 '{ if (length($0) > len) print substr($0, 1, len-3) "..."; else print; }' | tr -d '&' | awk '{print " <b>" $0 "</b>"}')"; echo "$(playerctl metadata artist)"; } | tr "\n" " " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment