dunst-project / dunst

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

`dunstctl action` is not working, but mouse click works #1345

Open sakarimov opened 5 months ago

sakarimov commented 5 months ago
          > It would be nice to be able to trigger an action on a keyboard shortcut using sxhkd, however currently that is impossible due to the fact that it is impossible to trigger a notification action via `dunstctl`.

Triggering notification actions pretty much works exactly as you wrote it e. g. dunstctl action, dunstctl action 0 or dunstctl action 0 default all three trigger the default action of the most recent notification.

So what exactly are you looking for? What did you try and what happened that did not match your expectation?

Originally posted by @maxz in https://github.com/dunst-project/dunst/issues/1236#issuecomment-1845309969

e. g. dunstctl action, dunstctl action 0 or dunstctl action 0 default

it's still not working for me, i have no custom action i just want to use the default action when the the notification has URL it should open the browser, i tried all three method and none of those opening the url to browser, when i try to open it by middle click it works perfectly

Installation info

bynect commented 5 months ago

This has to do with the fact that urls are not treated as actions. Right now it is not possible to trigger an url with dunstctl action. Maybe we can add it

sakarimov commented 5 months ago

thank u for the response, i'm not too familiar with c, but if there's direction about adding this feature, i'll try to help

bynect commented 5 months ago

I have some ideas, but maybe the simplest would be to wait for #1348. Then you could simply list the current notifications and extract the url.