dunst-project / dunst

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

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

Closed sakarimov closed 2 weeks ago

sakarimov commented 7 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 6 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 6 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 6 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.

bynect commented 3 weeks ago

Sorry for late reply. It seems like I have misinterpreted your problem. Actually I think that opening urls when no actions are available is the right thing to do, so I made a pr

bynect commented 3 weeks ago

Also note that adding default to the command does nothing