-
-
Notifications
You must be signed in to change notification settings - Fork 728
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add MPD support #268
Add MPD support #268
Conversation
Nice work! |
No problem for tagging, thank you very much @minijackson for mpd support, I'm very eager to try it, because I currently have some nasty shell script displaying song and elapsed time of song in waybar. |
I'm exactly the same! Unfortunately, I'm not really sure how to handle the elapsed time, since the current implementation is event based, and we have to have periodic updates to get the elapsed time. Maybe we should do this in a separated thread, and synchronize the elapsed time only when playing using a mutex? Seems a bit much for that :-/ |
4a86aa7
to
af62ba7
Compare
Okay, I think it's pretty much good to merge, now! 🎉 I just need to rebase it on master, which currently have a small conflict on the .clang-format file So @Alexays should I keep yours or mine ? ^^ |
Nice work! 🎉 |
Rebase done! You can merge it, I'll update the wiki in the meantime |
This adds a basic MPD module, somewhat based on Polybar's implementation.
Also adds a minimal EditorConfig so editors picks up the codebase's style.
(Maybe a.clang_format
would be nice too but I don't think I should be the one choosing the style. See here if you're interested)Clang format configuration added!
Don't merge now I'm currently trying to also add support for options (shuffle, repeat, etc.). I'm putting it here now so I pick up on recommendations/reviews as soon as possible ^^
Features:
Implementation details:
Deleter
feature ofunique_ptr
s to avoid the rule of 5Todo:
resources/config
(the current implementation can throw an exception in a thread which won't be handled, and can make Waybar crash)Thanks for the great work on Waybar ^^