Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/0nse/now_playing
:musical_note: Output the currently scrobbling song
https://github.com/0nse/now_playing
i3bar i3blocks last-fm lastfm lemonbar polybar
Last synced: about 1 month ago
JSON representation
:musical_note: Output the currently scrobbling song
- Host: GitHub
- URL: https://github.com/0nse/now_playing
- Owner: 0nse
- License: gpl-3.0
- Created: 2017-02-04T23:23:40.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-04T23:28:52.000Z (almost 8 years ago)
- Last Synced: 2024-08-04T03:02:14.077Z (5 months ago)
- Topics: i3bar, i3blocks, last-fm, lastfm, lemonbar, polybar
- Language: Python
- Homepage:
- Size: 169 KB
- Stars: 34
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- Awesome-Polybar - Now Playing
README
# Now Playing
Now Playing is a Python 3 script that queries Last.FM for the song you are
currently scrobbling. Its output can be used to determine what you are currently
listening disregarding of your used service or device.You will have to set your [API key](www.last.fm/api/account/create) and user
name in the `data/data.json` file. After that, simply execute the script.## Usage with polybar
You can use this script to display your playing music in a status bar such as
[polybar](https://github.com/jaagr/polybar).
[![polybar using the Now Playing script](polybar.png)](polybar.png)The following code shows an example for integrating this script with polybar as
shown in the screenshot above.
```ini
[module/now_playing]
type = custom/scriptexec = "python $HOME/.scripts/now_playing.py"
tail = true
format =
format-prefix = " "
format-prefix-foreground = ${colors.foreground}label = %output:0:50%
```