-
Notifications
You must be signed in to change notification settings - Fork 351
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 mouse action to show context menu #848
Add mouse action to show context menu #848
Conversation
Thank you for the clear PR, it makes it easy to review. I will note however that there is already |
In my experience and as stated in the docs, |
Okay that makes sense. |
This sounds like a good way to solve the problem, but let me make sure I understood it correctly: I could imagine implementing this, but I would have to take a closer look at the code first, since I'm still a beginner. |
Correct. I actually thought of a better way to do it. We can scrap
Oh I didn't know it did that. I think the way you did it makes way more sense.
That would be great! I can of course guide you through. One hint I will give already is that you should take a look at |
55dab7e
to
586c466
Compare
Thank! Let me know if you want to implement |
I made me familiar with the code and I think that I can do this. |
@fwsmit I have some questions concerning the new feature. What way may I contact you to not bloat this PR with more off-topic messages? |
You can just go ahead and ask them here. It's not off topic since you can just add it to this PR. Only if it's private (which I don't expect) you can contact me by mail. |
I thought it might be a useful addition to split |
It's true that there is are possibilities missing when you don't implement
I'm not sure if that would work though, because rules are currently only evaluated upon notification creation. I'd say, keep it to a simple |
I've implemented the feature and can push the commits if you want, but while testing I've noticed some case where I'm not sure how to handle: First, if no action named The second problem is trickier: So far, I've only changed the string Lines 653 to 654 in 3acffdb
action_name is set to "default" or some other string. In case of "default" this might be intended, but in other cases not. I first thought about defining action_name = "url" to always open the url, but this might break notifications of applications using "url" as action name.Do you have some suggestions how to solve this or should we leave it as it is, since this problem will only occur when there are wrong action names in the config file and not regularly? |
Yes you're right, just open the context menu. That seems like the most user friendly way.
Hmm right. Those are handled a bit weirdly atm. I'd say we should have a separate Good that you're making progress, and it sounds like you're testing it pretty well. You can go ahead and push your commits, I won't merge it before it's reviewed :) |
dab5d2d
to
ca3e239
Compare
Codecov Report
@@ Coverage Diff @@
## master #848 +/- ##
==========================================
- Coverage 58.54% 58.35% -0.19%
==========================================
Files 37 37
Lines 5987 6011 +24
==========================================
+ Hits 3505 3508 +3
- Misses 2482 2503 +21
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Edit: I found some issue that might lead to null pointers or memory leaks, I'll fix it within the next days. |
ca3e239
to
7eac5e9
Compare
The issue is fixed now. I also re-added the code to invoke the only available action if |
Can you squash those last two commits into the right one? After that it LGTM. Thank you! |
Document new mouse actions in dunstrc and docs/dunst.5.pod.
Document new mouse action open_url and rule action_name in dunstrc and docs/dunst.5.pod.
a5ab5ec
to
efac6e7
Compare
Sorry for how long it took to get to this @lukasrad02. I'll now hopefully have a bit more time to actually take care of maintainer duties. Thanks for the PR and the clean code :) |
This PR adds the mouse actions
context
andcontext all
, which open the context menu for either the notification clicked on or all notifications visible, as suggested in #234 instead of clickable action buttons.