add PLAYER to --order, remove binary from repo
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
also added more prominent download links to the readme.
This commit is contained in:
parent
3aec82c40c
commit
51c7a983a0
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
./main
|
./main
|
||||||
|
./waybar-mpris
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
<img src="images/cropped.gif" style="width: 100%;" alt="bar gif"></img>
|
<img src="images/cropped.gif" style="width: 100%;" alt="bar gif"></img>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
##### Downloads:
|
||||||
|
##### [binary](https://builds2.hrfee.pw/view/hrfee/waybar-mpris) | [aur](https://aur.archlinux.org/packages/waybar-mpris-git/)
|
||||||
|
|
||||||
a waybar component/utility for displaying and controlling MPRIS2 compliant media players individually, inspired by [waybar-media](https://github.com/yurihs/waybar-media).
|
a waybar component/utility for displaying and controlling MPRIS2 compliant media players individually, inspired by [waybar-media](https://github.com/yurihs/waybar-media).
|
||||||
|
|
||||||
MPRIS2 is widely supported, so this component should work with:
|
MPRIS2 is widely supported, so this component should work with:
|
||||||
|
6
main.go
6
main.go
@ -79,6 +79,10 @@ func playerJSON(p *mpris2.Player) string {
|
|||||||
if pos != "" && SHOW_POS {
|
if pos != "" && SHOW_POS {
|
||||||
items = append(items, pos)
|
items = append(items, pos)
|
||||||
}
|
}
|
||||||
|
case "PLAYER":
|
||||||
|
if p.Name != "" {
|
||||||
|
items = append(items, p.Name)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if len(items) == 0 {
|
if len(items) == 0 {
|
||||||
@ -318,7 +322,7 @@ func main() {
|
|||||||
flag.StringVar(&PLAY, "play", PLAY, "Play symbol/text to use.")
|
flag.StringVar(&PLAY, "play", PLAY, "Play symbol/text to use.")
|
||||||
flag.StringVar(&PAUSE, "pause", PAUSE, "Pause 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(&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(&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(&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)")
|
flag.BoolVar(&INTERPOLATE, "interpolate", INTERPOLATE, "Interpolate track position (helpful for players that don't update regularly, e.g mpDris2)")
|
||||||
|
BIN
waybar-mpris
BIN
waybar-mpris
Binary file not shown.
Loading…
Reference in New Issue
Block a user