Created
September 6, 2019 09:42
-
-
Save Davidblkx/92b71914a0730080e284f54075ca6ce7 to your computer and use it in GitHub Desktop.
grabs and print the current playing song
This file contains hidden or 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
#!/bin/bash | |
pacmd list-sink-inputs |\ | |
grep media.name |\ | |
sed -n -e 's/^.*media\.name = //p' |\ | |
sed 's/"//g' |\ | |
sed "s/'//g" |\ | |
sed 's/playback stream//ig' |\ | |
sed 's/playback//ig' |\ | |
sed 's/AudioCallbackDriver//ig' |\ | |
sed 's/AudioStream//ig' |\ | |
sed '/^\s*$/d' |\ | |
sed -n '1p' |\ | |
cut -c 1-75 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment