oh-my-posh/website/docs/segments/spotify.mdx

60 lines
1.4 KiB
Plaintext
Raw Normal View History

2020-10-05 02:33:12 -07:00
---
id: spotify
title: Spotify
sidebar_label: Spotify
---
## What
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).
On _Windows/WSL_, **only the playing state is supported** (no information when paused/stopped).
:::
2020-10-05 02:33:12 -07:00
## Sample Configuration
```json
{
"type": "spotify",
"style": "powerline",
2020-10-15 23:37:43 -07:00
"powerline_symbol": "\uE0B0",
2020-10-05 02:33:12 -07:00
"foreground": "#ffffff",
"background": "#1BD760",
"properties": {
"playing_icon": "\uE602 ",
"paused_icon": "\uF8E3 ",
2022-01-22 10:46:56 -08:00
"stopped_icon": "\uF04D "
2020-10-05 02:33:12 -07:00
}
}
```
## Properties
2020-10-16 11:07:38 -07:00
- playing_icon: `string` - text/icon to show when playing - defaults to `\uE602 `
- paused_icon: `string` - text/icon to show when paused - defaults to `\uF8E3 `
2020-11-28 01:19:14 -08:00
- stopped_icon: `string` - text/icon to show when stopped - defaults to `\uF04D `
2022-01-22 10:46:56 -08:00
2022-02-01 03:10:46 -08:00
## Template ([info][templates])
:::note default template
``` template
{{ .Icon }}{{ if ne .Status \"stopped\" }}{{ .Artist }} - {{ .Track }}{{ end }}
```
:::
### Properties
2022-01-22 10:46:56 -08:00
- `.Status`: `string` - player status (`playing`, `paused`, `stopped`)
- `.Artist`: `string` - current artist
- `.Track`: `string` - current track
- `.Icon`: `string` - icon (based on `.Status`)
2022-04-20 09:43:59 -07:00
[templates]: /docs/configuration/templates
[spotify]: https://www.spotify.com