summaryrefslogtreecommitdiff
path: root/spotify-widget
diff options
context:
space:
mode:
authorPavel Makhov <pavel.makhov@savoirfairelinux.com>2017-06-17 12:49:15 -0400
committerPavel Makhov <pavel.makhov@savoirfairelinux.com>2017-06-17 12:49:15 -0400
commit4444a7581364833474fbad05dbb80406abdecd54 (patch)
tree40c92f9a7d76285595e9cbdb3ca2d56a9037ff0c /spotify-widget
parentc93d1e6f48adaad7f0ebc93da34f5909cc007c30 (diff)
Add script to check if spotify is playing music
Diffstat (limited to 'spotify-widget')
-rwxr-xr-xspotify-widget/spotify_stat2
1 files changed, 2 insertions, 0 deletions
diff --git a/spotify-widget/spotify_stat b/spotify-widget/spotify_stat
new file mode 100755
index 0000000..175ca2d
--- /dev/null
+++ b/spotify-widget/spotify_stat
@@ -0,0 +1,2 @@
+#!/bin/sh
+pacmd list-sink-inputs | grep -e 'state:' -e 'application.name' | grep -B 1 spotify | grep -P -o '(?<=: )[A-Za-z]*'