Spotify
非官方测试版翻译
本页面由 PageTurner AI 翻译(测试版)。未经项目官方认可。 发现错误? 报告问题 →
功能
显示 Spotify 客户端中当前正在播放的歌曲。
注意
请注意,这可能会让提示符显示稍慢一些,因为它需要从 Spotify 播放器获取响应。
在 macOS 和 Linux 系统上,支持所有播放状态(播放中/暂停/停止)。
在 Windows/WSL 系统上,仅支持播放状态(暂停/停止时无法获取信息)。该功能支持从原生 Spotify 应用和 Edge PWA 获取信息。
示例配置
- json
- yaml
- toml
{
"type": "spotify",
"style": "powerline",
"powerline_symbol": "",
"foreground": "#ffffff",
"background": "#1BD760",
"options": {
"playing_icon": " ",
"paused_icon": " ",
"stopped_icon": " "
}
}
type: spotify
style: powerline
powerline_symbol:
foreground: "#ffffff"
background: "#1BD760"
options:
playing_icon: " "
paused_icon: " "
stopped_icon: " "
type = "spotify"
style = "powerline"
powerline_symbol = ""
foreground = "#ffffff"
background = "#1BD760"
[options]
playing_icon = " "
paused_icon = " "
stopped_icon = " "
选项
| Name | Type | Default | Description |
|---|---|---|---|
playing_icon | string | \ue602 | text/icon to show when playing |
paused_icon | string | \uf04c | text/icon to show when paused |
stopped_icon | string | \uf04d | text/icon to show when stopped |
模板 (信息)
默认模板
{{ .Icon }}{{ if ne .Status \"stopped\" }}{{ .Artist }} - {{ .Track }}{{ end }}
属性
| Name | Type | Description |
|---|---|---|
.Status | string | player status (playing, paused, stopped) |
.Artist | string | current artist |
.Track | string | current track |
.Icon | string | icon (based on .Status) |