Proposal: event rule
There have been discussions before about adding something like an on_left_click script for running a script when the user left clicks on a notification. If you would do it this way, you'll have to add a script action for each type of event. Instead I would like to propose adding an event rule that allows you to do that and much more. This is what the same on_left_click would look like in the dunstrc:
[run_script]
event= on_left_click
script= ~/left_click_script # maybe rename this option to run_script
That's one way to use it, but it's much more flexible than that. In #878 there was a request to add a scroll bar for long notifications. That's not really an option, but you could make it so that when you right click a notification you make it bigger to be able to read more text from it.
[big_notification]
event = on_right_click
width = 400
height = 800
[small_notification]
event = on_right_click_release
width = 200
height = 200
Possible events include
- on_left_click[_release]
- on_middle_click[_release]
- on_right_click[_release]
- on_mouse_enter
- on_mouse_leave
- on_start
- on_close
- on_activate
- on_notification_pre
- on_notification_post
- on_notification
This will replace the mouse_*_click setting.
Related: #753