dunst-project / dunst

Lightweight and customizable notification daemon
https://dunst-project.org
Other
4.52k stars 338 forks source link

Is it possible to run a script when clicking on a notification ? How? #1149

Closed rainer2208 closed 1 year ago

rainer2208 commented 1 year ago

Hi all, I am on Arch Linux.

For some time I am reading all I can find about configuring dunst to run a script when clicking on a notification, but all my efforts have been, so far, unfruitful.

From my readings, is seems that running scripts from clicking on notifications should definitely be working in dunst.

Consulting the Arch Wiki site , one can configure the mouse click to do some sort of close action.

There is also a possibility do define a mouse_middle_click=do_action , but I couldn't find any explanation on how to use this, and if can be used to run a script.

So my question is actually : IS IT POSSIBLE TO CONFIGURE THE MOUSE CLICK ACTION TO RUN A USER SCRIPT?

What I have so far in my dunstrc is :

  mouse_middle_click=do_action

   [desktop_entry]
     summary= myupdate
     script=/home/.../.config/dunst/update.sh                                  

But this is not triggering the script.

fwsmit commented 1 year ago

It's not yet possible to run a script when the notification is clicked. It has been proposed in #879. It just needs to be implemented

fwsmit commented 1 year ago

I'm closing this as a duplicate of #879