diff options
author | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2022-11-20 02:42:19 +0300 |
---|---|---|
committer | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2022-11-20 02:50:44 +0300 |
commit | 387fd15bf231e1cf38eaa7ad1543aaf911a4325e (patch) | |
tree | 23a226a534896a4afcf23d779902a5078c740673 /README.md | |
parent | 485ec0ec0af80a0d63c10e94aebfc59b16aab46b (diff) | |
download | waybar-mpris-387fd15bf231e1cf38eaa7ad1543aaf911a4325e.tar.gz waybar-mpris-387fd15bf231e1cf38eaa7ad1543aaf911a4325e.zip |
Make waybar-mpris more flexible customizable
Instead of customizing by indicating just the order and using flags for
other customization options (e.g. separator), read a C-like format
string with tokens/verbs that are replaced with their respective
information (e.g. `%a` for artist).
Also made it possible to customize the tooltip. The principle is the
same as with the module's text.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 32 |
1 files changed, 20 insertions, 12 deletions
@@ -57,21 +57,29 @@ When running, the program will pipe out json in waybar's format. Add something l ``` -Usage of waybar-mpris: - --autofocus Auto switch to currently playing music players. - --interpolate Interpolate track position (helpful for players that don't update regularly, e.g mpDris2) - --order string Element order. (default "SYMBOL:ARTIST:ALBUM:TITLE:POSITION") - --pause string Pause symbol/text to use. (default "\uf8e3") - --play string Play symbol/text to use. (default "▶") - --position Show current position between brackets, e.g (04:50/05:00) - --replace Replace any running instances - --send string send command to already runnning waybar-mpris instance. (options: player-next/player-prev/next/prev/toggle) - --separator string Separator string to use between artist, album, and title. (default " - ") +Usage of ./waybar-mpris: + --autofocus Auto switch to currently playing music players. + --interpolate Interpolate track position (helpful for players that don't update regularly, e.g mpDris2) + --pause string Pause symbol/text to use. (default "\uf8e3") + --play string Play symbol/text to use. (default "▶") + --replace Replace existing waybar-mpris if found. When false, new instance will clone the original instances output. + --send string send command to already runnning waybar-mpris instance. (options: player-next/player-prev/next/prev/toggle/list) + --text-format string Format of the waybar module text. (default "%i %a - %t (%p/%d)") + --tooltip-format string Format of the waybar module tooltip. (default "%t by %a from %A\n(%P)") ``` -* Modify the order of components with `--order`. `SYMBOL` is the play/paused icon or text, `POSITION` is the track position (if enabled), other options are self explanatory. +* `--text-format` specifies in what format to display the module's text in + waybar; the accepted tokens are as follows: + - `%i` play/pause icon + - `%a` track artist + - `%A` album + - `%t` track title + - `%p` current position + - `%l` track length + - `%P` current media player +* `--tooltip-format` same as `text-format` but for the tooltip; same rules + apply. * `--play/--pause` specify the symbols or text to display when music is paused/playing respectively. -* `--separator` specifies a string to separate the artist, album and title text. * `--autofocus` makes waybar-mpris automatically focus on currently playing music players. * `--position` enables the display of the track position. * `--interpolate` increments the track position every second. This is useful for players (e.g mpDris2) that don't regularly update the position. |