I made a little program that can output the currently played song to a file. It's inspired by this thread.
Here the link: https://github.com/yursan9/gompris-current
Okay so what the difference between this and the script I made before?
- It's leverage dbus signal.
- There is no loop-sleep pattern here!
- It's compiled! Because it's made using Go!
Installation
This is the install instruction:
- Install
golang
from repository. sudo eopkg it golang
- Then run these command:
go get -u github.com/yursan9/gompris-current
- Add the
$GOPATH/bin
to your $PATH
. (Alternative, copy the $GOPATH/bin/gompris-current
to directory in your $PATH
variable.
Running The Program
Run gompris-current
in terminal:
gompris-current spotify
It will output the currently played song to $HOME/.cache/mpris-current
.
Tagging
@Justin @Boldyplays
P.S: I should make my undergrad thesis, but this is more exciting than my undergrad thesis. So, thank you for this procrastination opportunity.