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

Proposal: event rule #879

Open
fwsmit opened this issue Jun 19, 2021 · 0 comments
Open

Proposal: event rule #879

fwsmit opened this issue Jun 19, 2021 · 0 comments
Milestone

Comments

@fwsmit
Copy link
Member

fwsmit commented Jun 19, 2021

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

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

No branches or pull requests

1 participant