dunst-project / dunst

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

Trigger notification actions from the command line w/ `dunstctl` #1236

Closed mageowl closed 7 months ago

mageowl commented 8 months ago

Issue description

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.

Could we have a command like: dunstctl action 0 default that would trigger the default action for the first notification, and dunstctl action 0 to list all actions for a notification?

Installation info

maxz 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?

mageowl commented 7 months ago

Oh, whoops! I didn't see this in the man pages. Thanks so much!

sakarimov commented 3 months ago

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