跳转到主内容

Spotify

非官方测试版翻译

本页面由 PageTurner AI 翻译(测试版)。未经项目官方认可。 发现错误? 报告问题 →

功能

显示 Spotify 客户端中当前正在播放的歌曲。

注意

请注意,这可能会让提示符显示稍慢一些,因为它需要从 Spotify 播放器获取响应。

macOS 和 Linux 系统上,支持所有播放状态(播放中/暂停/停止)。

Windows/WSL 系统上,仅支持播放状态(暂停/停止时无法获取信息)。该功能支持从原生 Spotify 应用和 Edge PWA 获取信息。

示例配置

{
"type": "spotify",
"style": "powerline",
"powerline_symbol": "",
"foreground": "#ffffff",
"background": "#1BD760",
"options": {
"playing_icon": " ",
"paused_icon": " ",
"stopped_icon": " "
}
}

选项

NameTypeDefaultDescription
playing_iconstring\ue602 text/icon to show when playing
paused_iconstring\uf04c text/icon to show when paused
stopped_iconstring\uf04d text/icon to show when stopped

模板 (信息)

默认模板
{{ .Icon }}{{ if ne .Status \"stopped\" }}{{ .Artist }} - {{ .Track }}{{ end }}

属性

NameTypeDescription
.Statusstringplayer status (playing, paused, stopped)
.Artiststringcurrent artist
.Trackstringcurrent track
.Iconstringicon (based on .Status)