Skip to content

Instantly share code, notes, and snippets.

@akinozgen
Last active January 27, 2020 13:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akinozgen/537d5c3f5f6f3910747207314485c8a3 to your computer and use it in GitHub Desktop.
Save akinozgen/537d5c3f5f6f3910747207314485c8a3 to your computer and use it in GitHub Desktop.
get title and artist from playerctl an join
#!/usr/bin/env bash
echo "$(playerctl -p spotify metadata | grep xesam: | awk '{ if ($2 == "xesam:title") { print $3; } }') by $(playerctl -p spotify metadata | grep xesam: | awk '{ if ($2 == "xesam:artist") { print $3; } }')"
@akinozgen
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment