Skip to content
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 user defined commands to config #7

Merged
merged 1 commit into from
Nov 26, 2023

Conversation

an-prata
Copy link
Contributor

Allows for users to add commands that can be called by mpris-notifier in order to control other parts of their system. These commands are called for all signals, not just track changes.

This is especially useful for programs like waybar, where you can update a module based on a signal, and if you do so without an update rate it is much more recourse efficient.

@l1na-forever l1na-forever self-assigned this Nov 20, 2023
@l1na-forever l1na-forever merged commit fb4f529 into l1na-forever:mainline Nov 26, 2023
@l1na-forever
Copy link
Owner

Hey Evan, looks great! Thanks so much for sending this :) 🎉💖

@l1na-forever
Copy link
Owner

Hey, I noticed that this ends up triggering pretty often from being in handle_signal ; I think this'd be more appropriately fired at the same time as a pending notification would be, in handle_pending. What do you think?

@an-prata
Copy link
Contributor Author

I thought I did this before, but obviously not (probably placed it at the end of the function or something); just tested that and yeah, that should be better, I was under the impression that a signal would not be sent when a player becomes innactive, which is important in my case.

@an-prata
Copy link
Contributor Author

Went ahead and did that in #8 for convinience.

@an-prata
Copy link
Contributor Author

Oh, I completely missunderstood your suggestion, but that does make more sense. I will work on that soon.

@an-prata
Copy link
Contributor Author

commands are called from within SignalHandler::handle_pending in #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants