2020-10-05 02:33:12 -07:00
|
|
|
---
|
|
|
|
id: spotify
|
|
|
|
title: Spotify
|
|
|
|
sidebar_label: Spotify
|
|
|
|
---
|
|
|
|
|
|
|
|
## What
|
|
|
|
|
2022-05-04 16:46:07 -07:00
|
|
|
Show the currently playing song in the [Spotify][spotify] macOS/Windows clients.
|
|
|
|
|
|
|
|
:::caution
|
|
|
|
Be aware this can make the prompt a tad bit slower as it needs to get a response from the Spotify player.
|
|
|
|
|
|
|
|
On _macOS_, all states are supported (playing/paused/stopped).
|
2023-01-09 06:34:00 -08:00
|
|
|
|
|
|
|
On _Windows/WSL_, **only the playing state is supported** (no information when paused/stopped). It supports
|
|
|
|
fetching information from the native Spotify application and Edge PWA.
|
2022-05-04 16:46:07 -07:00
|
|
|
:::
|
2020-10-05 02:33:12 -07:00
|
|
|
|
|
|
|
## Sample Configuration
|
|
|
|
|
2024-07-25 07:01:50 -07:00
|
|
|
import Config from "@site/src/components/Config.js";
|
|
|
|
|
|
|
|
<Config
|
|
|
|
data={{
|
|
|
|
type: "spotify",
|
|
|
|
style: "powerline",
|
|
|
|
powerline_symbol: "\uE0B0",
|
|
|
|
foreground: "#ffffff",
|
|
|
|
background: "#1BD760",
|
|
|
|
properties: {
|
|
|
|
playing_icon: "\uE602 ",
|
|
|
|
paused_icon: "\uF8E3 ",
|
|
|
|
stopped_icon: "\uF04D ",
|
|
|
|
},
|
|
|
|
}}
|
|
|
|
/>
|
2020-10-05 02:33:12 -07:00
|
|
|
|
|
|
|
## Properties
|
|
|
|
|
2024-07-25 07:01:50 -07:00
|
|
|
| Name | Type | Default | Description |
|
|
|
|
| --------------- | :------: | :-------: | ---------------------------------------------------------------------------- |
|
|
|
|
| `playing_icon` | `string` | `\uE602 ` | text/icon to show when playing |
|
|
|
|
| `paused_icon` | `string` | `\uF8E3 ` | text/icon to show when paused |
|
|
|
|
| `stopped_icon` | `string` | `\uF04D` | text/icon to show when stopped |
|
|
|
|
| `cache_timeout` | `int` | `0` | **macOS only** in minutes - How long to wait before fetching new information |
|
2022-01-22 10:46:56 -08:00
|
|
|
|
2022-02-01 03:10:46 -08:00
|
|
|
## Template ([info][templates])
|
|
|
|
|
|
|
|
:::note default template
|
|
|
|
|
2022-09-16 07:32:48 -07:00
|
|
|
```template
|
2022-02-01 03:10:46 -08:00
|
|
|
{{ .Icon }}{{ if ne .Status \"stopped\" }}{{ .Artist }} - {{ .Track }}{{ end }}
|
|
|
|
```
|
|
|
|
|
|
|
|
:::
|
|
|
|
|
|
|
|
### Properties
|
2022-01-22 10:46:56 -08:00
|
|
|
|
2022-09-16 07:32:48 -07:00
|
|
|
| Name | Type | Description |
|
|
|
|
| --------- | -------- | ---------------------------------------------- |
|
|
|
|
| `.Status` | `string` | player status (`playing`, `paused`, `stopped`) |
|
|
|
|
| `.Artist` | `string` | current artist |
|
|
|
|
| `.Track` | `string` | current track |
|
|
|
|
| `.Icon` | `string` | icon (based on `.Status`) |
|
2022-01-22 10:46:56 -08:00
|
|
|
|
2022-04-20 09:43:59 -07:00
|
|
|
[templates]: /docs/configuration/templates
|
2022-05-04 16:46:07 -07:00
|
|
|
[spotify]: https://www.spotify.com
|