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

63 lines
2.1 KiB
Plaintext
Raw Normal View History

---
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
2023-03-31 11:55:36 -07:00
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 ",
2022-01-22 10:46:56 -08:00
"stopped_icon": "\uF04D "
}
2023-03-31 11:55:36 -07:00
}}/>
## Properties
| Name | Type | Description |
| -------------- | -------- | --------------------------------------------------------------------- |
| `playing_icon` | `string` | text/icon to show when playing - defaults to `\uE602 ` |
| `paused_icon` | `string` | text/icon to show when paused - defaults to `\uF8E3 ` |
| `stopped_icon` | `string` | text/icon to show when paused - defaults to `\uF04D ` |
| `api_url` | `string` | the YTMDA Remote Control API URL- defaults to `http://127.0.0.1:9863` |
2022-01-22 10:46:56 -08:00
2022-02-01 03:10:46 -08:00
## Template ([info][templates])
:::note default template
```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
| 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
[templates]: /docs/configuration/templates