mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-15 23:44:03 -08:00
f891a26fe9
resolves #5171
63 lines
2 KiB
Plaintext
63 lines
2 KiB
Plaintext
---
|
|
id: ytm
|
|
title: YouTube Music
|
|
sidebar_label: YouTube Music
|
|
---
|
|
|
|
## What
|
|
|
|
Shows the currently playing song in the [YouTube Music Desktop App](https://github.com/ytmdesktop/ytmdesktop).
|
|
|
|
**NOTE**: You **must** enable Remote Control in YTMDA for this segment to work: `Settings > Integrations > Remote Control`
|
|
|
|
It is fine if `Protect remote control with password` is automatically enabled. This segment does not require the
|
|
Remote Control password.
|
|
|
|
## Sample Configuration
|
|
|
|
import Config from '@site/src/components/Config.js';
|
|
|
|
<Config data={{
|
|
"type": "ytm",
|
|
"style": "powerline",
|
|
"powerline_symbol": "\uE0B0",
|
|
"foreground": "#ffffff",
|
|
"background": "#FF0000",
|
|
"properties": {
|
|
"playing_icon": "\uE602 ",
|
|
"paused_icon": "\uF8E3 ",
|
|
"stopped_icon": "\uF04D "
|
|
}
|
|
}}/>
|
|
|
|
## Properties
|
|
|
|
| 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 |
|
|
| `api_url` | `string` | `http://127.0.0.1:13091` | the YTMDA Remote Control API URL |
|
|
|
|
## Template ([info][templates])
|
|
|
|
:::note default template
|
|
|
|
```template
|
|
{{ .Icon }}{{ if ne .Status \"stopped\" }}{{ .Artist }} - {{ .Track }}{{ end }}
|
|
```
|
|
|
|
:::
|
|
|
|
### Properties
|
|
|
|
| Name | Type | Description |
|
|
| --------- | -------- | ---------------------------------------------- |
|
|
| `.Status` | `string` | player status (`playing`, `paused`, `stopped`) |
|
|
| `.Artist` | `string` | current artist |
|
|
| `.Track` | `string` | current track |
|
|
| `.Icon` | `string` | icon (based on `.Status`) |
|
|
|
|
[templates]: /docs/configuration/templates
|
|
[templates]: /docs/configuration/templates
|