Merge branch 'module_mpris' of https://codeberg.org/haruInDisguise/yambar into module_mpris

This commit is contained in:
haruInDisguise 2024-11-18 15:28:43 +01:00
commit c79d8da397
2 changed files with 24 additions and 11 deletions

View file

@ -51,14 +51,10 @@ mpris - This module provides MPRIS status such as currently playing artist/album
:[ *Type* :[ *Type*
:[ *Req* :[ *Req*
:< *Description* :< *Description*
| identity | identities
: string : list of string
: yes : yes
: Identity if the target MPRIS client : A list of MPRIS client identities
| query-timeout
: int
: no
: Timeout for MPRIS clients to respond to queries. Defaults to 500
# EXAMPLES # EXAMPLES
@ -66,7 +62,9 @@ mpris - This module provides MPRIS status such as currently playing artist/album
bar: bar:
center: center:
- mpris: - mpris:
identity: "spotify" identities:
- "spotify"
- "firefox"
content: content:
- map: - map:
conditions: conditions:
@ -76,10 +74,25 @@ bar:
- string: {text: "{artist}", max: 30 } - string: {text: "{artist}", max: 30 }
- string: {text: "-" } - string: {text: "-" }
- string: {text: "{title}", max: 30 } - string: {text: "{title}", max: 30 }
- string: {text: "|" }
- string: {text: "{pos} / {end}", max: 30 }
``` ```
# NOTE
The 'identity' refers a part of your clients DBus bus name.
You can obtain a list of available bus names using:
```
Systemd: > busctl --user --list
Playerctl: > playerctl --list-all
Libdbus: > dbus-send --session --print-reply --type=method_call --dest='org.freedesktop.DBus' /org org.freedesktop.DBus.ListNames
... | grep 'org.mpris.MediaPlayer2'
```
The identity refers to the part after 'org.mpris.MediaPlayer2'.
For example, firefox may use the bus name
'org.mpris.MediaPlayer2.firefox.instance_1_7' and its identity would be
'firefox'
# SEE ALSO # SEE ALSO
*yambar-modules*(5), *yambar-particles*(5), *yambar-tags*(5), *yambar-decorations*(5) *yambar-modules*(5), *yambar-particles*(5), *yambar-tags*(5), *yambar-decorations*(5)

View file

@ -1125,5 +1125,5 @@ const struct module_iface module_mpris_iface = {
}; };
#if defined(CORE_PLUGINS_AS_SHARED_LIBRARIES) #if defined(CORE_PLUGINS_AS_SHARED_LIBRARIES)
extern const struct module_mpris_iface iface __attribute__((weak, alias("module_iface"))); extern const struct module_iface iface __attribute__((weak, alias("module_mpris_iface")));
#endif #endif