dunst
dunst copied to clipboard
feat: add mouse scroll action scripting to notificaiton
Adds mouse scroll action scripting to the notification,
how to use it
- add mouse action
mouse_scroll_forward = forward_scriptas andmouse_scroll_backward = back_script[optional as it's by default] - now add your costume rule to trigger for notification in your
dunstrc;
# a example
[volume]
sumamry = "changevolume"
script_mouse_forward = change_vup
script_mouse_back = change_vdown
[note:- script_mouse_forward/back takes single word script to run, you cannot put long script their, make a file of the script you want to execute, and give it a simple single word name and add that to path, do not forget to add executable flag chmod +x my_script ]
- now you can do something like
dunstify "changevolume" "volume=10%" - now if you hover to that notification and scroll with mouse wheel, your script should be triggred
why we need this
- this allows us to control linear actions, through our mouse wheel, instead of just clicking on mouse.
- this opens ups the possibility of triggering actions, when needed, for example if you have a setup which warns if volume it to high. You can just use mouse wheel to change the volume.
TODOS:
- if this concept is liked my many, we can also add feature like script_mouse_click1/2/3
- so that we can execute different set of scripts for different mouse action
Closes #1490
demo video
https://github.com/user-attachments/assets/ed40c696-0056-45da-8dca-0523741c5e04
hello. thank you for the contribution. I like the idea however there are some things we might improve. I am busy right now so I will just leave some initial review. also please fix the errors
hello. thank you for the contribution. I like the idea however there are some things we might improve. I am busy right now so I will just leave some initial review. also please fix the errors
about the error, their seems to be memory leak issue in my code, will fix those issues to, thank you
hello. thank you for the contribution. I like the idea however there are some things we might improve. I am busy right now so I will just leave some initial review. also please fix the errors
about the error, their seems to be memory leak issue in my code, will fix those issues to, thank you
i am working on, it will update when I am done, rn now busy with other stuffs
dont worry. let me know when its ready for review
@bynect could you rerun the workflow, I think the leak was due the mouse_script_scroll not being freed, I think the last commits solves the issue. Could you verify that and let me know if that fixes
:warning: Please install the to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
Attention: Patch coverage is 16.25000% with 67 lines in your changes missing coverage. Please review.
Project coverage is 64.49%. Comparing base (
fb59a30) to head (15bef64).
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/notification.c | 17.50% | 33 Missing :warning: |
| src/rules.c | 18.18% | 18 Missing :warning: |
| src/input.c | 0.00% | 12 Missing :warning: |
| src/x11/x.c | 0.00% | 4 Missing :warning: |
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@ Coverage Diff @@
## master #1489 +/- ##
==========================================
- Coverage 64.90% 64.49% -0.42%
==========================================
Files 51 51
Lines 9024 9100 +76
Branches 1048 1065 +17
==========================================
+ Hits 5857 5869 +12
- Misses 3167 3231 +64
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 64.49% <16.25%> (-0.42%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
@bynect Do i need to make 100% code coverage too ? or the task here is done for me. Please do let me know on changes required.
Sorry right now I can't review
I left a review. mostly it is formatting. but there are some architecture changes I suggest. let me know what do you think
I left a review. mostly it is formatting. but there are some architecture changes I suggest. let me know what do you think
okay I will make those changes and let you know, thank you for the time to review the code