SpotCurrent BETA
This is a little script I wrote to get the current song played by Spotify on Linux. It works with the native desktop client and is tested on the following distros:
Please check out the GitHub-Page, where the development will continue.
Tutorial-Video
I've made a little tutorial video on installing and using the software. You can check it out here.
Running the script
Download the script and give it the appropriate rights to run (you don't need sudo or anything like that).
Installing the script
You also can install the application by using the install script located in the source folder.
This will copy the spotcurrent file to the /usr/bin directory, so you can run it anytime.
Usage
Running the application
By running the spotcurrent command, you'll see this output:
As the script writes, enter your desired delay between the song-checks. Or just press ENTER for using the default 5 seconds. Every five seconds the script will look for the windowtitle of Spotify and print the information to a file.
The script runs now and gives you the information about the current song.
Reading out the current song
The current song is listed in a file: /tmp/currentsong.txt You can adjust your OBS for listening a text object on that file. Of course, you can use it with other programs, too.
Stop spamming the terminal
I recommend you to run this application in a seperate screen. (sudo apt-get install screen) Or just open another terminal, if you want to do something else.
Important notice
This is just a very basic script. I'm not really fluent in Bash and that's my first "real" script. So please be kind if it's not working... :D
This is a little script I wrote to get the current song played by Spotify on Linux. It works with the native desktop client and is tested on the following distros:
- Ubuntu GNOME
- Kubuntu (KDE)
- Debian 8 (LXDE)
Please check out the GitHub-Page, where the development will continue.
Tutorial-Video
I've made a little tutorial video on installing and using the software. You can check it out here.
Running the script
Download the script and give it the appropriate rights to run (you don't need sudo or anything like that).
git clone https://github.com/flymia/Linux-Spotify-Current-Song-for-OBS.git
chmod +x spotcurrent
./spotcurrent
chmod +x spotcurrent
./spotcurrent
Installing the script
You also can install the application by using the install script located in the source folder.
chmod a+x install-spotcurrent
sudo ./install-spotcurrent
sudo ./install-spotcurrent
This will copy the spotcurrent file to the /usr/bin directory, so you can run it anytime.
Usage
Running the application
By running the spotcurrent command, you'll see this output:
SpotCurrent v1.0 by flymia
Enter your preferred check-interval (Press ENTER for default 5 seconds):
Enter your preferred check-interval (Press ENTER for default 5 seconds):
As the script writes, enter your desired delay between the song-checks. Or just press ENTER for using the default 5 seconds. Every five seconds the script will look for the windowtitle of Spotify and print the information to a file.
To abort press CTRL+C
Sarting songcheck...
Current song: MØ - Final Song
Sarting songcheck...
Current song: MØ - Final Song
The script runs now and gives you the information about the current song.
Reading out the current song
The current song is listed in a file: /tmp/currentsong.txt You can adjust your OBS for listening a text object on that file. Of course, you can use it with other programs, too.
Stop spamming the terminal
I recommend you to run this application in a seperate screen. (sudo apt-get install screen) Or just open another terminal, if you want to do something else.
Important notice
This is just a very basic script. I'm not really fluent in Bash and that's my first "real" script. So please be kind if it's not working... :D