diff options
author | Harvey Tindall <hrfee@protonmail.ch> | 2021-05-16 23:28:23 +0100 |
---|---|---|
committer | Harvey Tindall <hrfee@protonmail.ch> | 2021-05-16 23:28:23 +0100 |
commit | 51c7a983a0cce4ee55a44fd607d71d60313a90ca (patch) | |
tree | 96528e8491c44ecc51ae79ee6775b7ca468703f4 /main.go | |
parent | 3aec82c40c7699ef0f2930ae9793a48b7251b73f (diff) | |
download | waybar-mpris-51c7a983a0cce4ee55a44fd607d71d60313a90ca.tar.gz waybar-mpris-51c7a983a0cce4ee55a44fd607d71d60313a90ca.zip |
add PLAYER to --order, remove binary from repo
also added more prominent download links to the readme.
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -79,6 +79,10 @@ func playerJSON(p *mpris2.Player) string { if pos != "" && SHOW_POS { items = append(items, pos) } + case "PLAYER": + if p.Name != "" { + items = append(items, p.Name) + } } } if len(items) == 0 { @@ -318,7 +322,7 @@ func main() { flag.StringVar(&PLAY, "play", PLAY, "Play symbol/text to use.") flag.StringVar(&PAUSE, "pause", PAUSE, "Pause symbol/text to use.") flag.StringVar(&SEP, "separator", SEP, "Separator string to use between artist, album, and title.") - flag.StringVar(&ORDER, "order", ORDER, "Element order.") + flag.StringVar(&ORDER, "order", ORDER, "Element order. An extra \"PLAYER\" element is also available.") flag.BoolVar(&AUTOFOCUS, "autofocus", AUTOFOCUS, "Auto switch to currently playing music players.") flag.BoolVar(&SHOW_POS, "position", SHOW_POS, "Show current position between brackets, e.g (04:50/05:00)") flag.BoolVar(&INTERPOLATE, "interpolate", INTERPOLATE, "Interpolate track position (helpful for players that don't update regularly, e.g mpDris2)") |