Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/s5bug/spotifyi3
Displays current song in i3bar
https://github.com/s5bug/spotifyi3
Last synced: 1 day ago
JSON representation
Displays current song in i3bar
- Host: GitHub
- URL: https://github.com/s5bug/spotifyi3
- Owner: s5bug
- Created: 2018-04-29T00:30:09.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-04-29T02:08:36.000Z (over 6 years ago)
- Last Synced: 2024-11-10T16:12:38.563Z (about 2 months ago)
- Language: Scala
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# spotifyi3
Spotify CLI for Linux required: `(sudo) pip install spotify-cli-linux`
## Building
`git clone https://github.com/TsundereBug/spotifyi3 && cd spotifyi3`
`sbt assemble`
There will now be a `spotifyi3-assembly-0.1.jar` under `target/scala-2.12/`.
## Enabling
Create a new directory anywhere you want. I will be calling this directory
`$cdir`.Find your i3 config (most likely under `~/.config/i3/config`). Set the part
with `bar` like this:
```
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
status_command $cdir/spotbar.sh
}
```
Now copy the `spotifyi3-assembly-0.1.jar` to `$cdir` with the name
`spotifyi3.jar`.
[Create a config file
named `$conf.conf` in `$cidr`.](https://i3wm.org/i3status/manpage.html)
Make sure this configuration sets i3status to `i3bar` mode or
else JSON parsing will fail and you will get errors!
Then, create `$cdir/spotbar.sh` with the following content:
```sh
#!/bin/sh
# shell script to prepend i3status with spotify song and artist
i3status --config $cdir/$conf.conf | java -jar $cdir/spotifyi3.jar
```
Remember to replace `$cdir` and `$conf.conf` with the actual locations
in these files.Restart i3 to restart the bar using `meta+shift+R`.