LastFM
What
Show the currently playing song from a LastFM user.
caution
Be aware that LastFM updates may be severely delayed when paused and songs may linger in the "now playing" state for a prolonged time.
Additionally, we are using HTTP requests to get the data,
so you may need to adjust the http_timeout to your liking to get better results.
You must request an API key at the LastFM website.
Sample Configuration
- json
- yaml
- toml
{
  "background": "p:sky",
  "foreground": "p:white",
  "powerline_symbol": "",
  "properties": {
    "api_key": "<YOUR_API_KEY>",
    "username": "<LASTFM_USERNAME>",
    "http_timeout": 20000
  },
  "style": "powerline",
  "template": " {{ .Icon }}{{ if ne .Status \"stopped\" }}{{ .Full }}{{ end }} ",
  "type": "lastfm"
}
background: p:sky
foreground: p:white
powerline_symbol: 
properties:
  api_key: <YOUR_API_KEY>
  username: <LASTFM_USERNAME>
  http_timeout: 20000
style: powerline
template: ' {{ .Icon }}{{ if ne .Status "stopped" }}{{ .Full }}{{ end }} '
type: lastfm
background = "p:sky"
foreground = "p:white"
powerline_symbol = ""
style = "powerline"
template = " {{ .Icon }}{{ if ne .Status \"stopped\" }}{{ .Full }}{{ end }} "
type = "lastfm"
[blocks]
[blocks.segments]
[blocks.segments.properties]
api_key = "<YOUR_API_KEY>"
username = "<LASTFM_USERNAME>"
http_timeout = 20000
Properties
| Name | Type | Default | Description | 
|---|---|---|---|
| playing_icon | string | \uE602  | text/icon to show when playing | 
| stopped_icon | string | \uF04D  | text/icon to show when stopped | 
| api_key | string | your LastFM API key | |
| username | string | your LastFM username | 
Template (info)
default template
{{ .Icon }}{{ if ne .Status \"stopped\" }}{{ .Full }}{{ end }}
Properties
| Name | Type | Description | 
|---|---|---|
| .Status | string | player status ( playing,paused,stopped) | 
| .Artist | string | current artist | 
| .Track | string | current track | 
| .Full | string | will output Artist - Track | 
| .Icon | string | icon (based on .Status) |