Is it possible to send reply in dunst.
Can someone point any good resource where I can use python(or any language) to trigger a reply or option menu in dunst?
dunst has two hotkeys, one for a dmenu with urls and one for actions. If a notification has actions, then the prefix "(A)" is added to the notification, if it has URLs, then "(U)" is added or "(AU)" for both.
dunstify --action "yes,Accept" --action "no,Decline" "Action test" "Open the dmenu with the hotkey set for 'context' in your dunstrc"
As for creating actions with python, you can look into using GNotification or libnotify with gobject introspection
]]>Is it possible to give Dunst notifications unique X classes?
Do you mean like a PID to replace a notification with itself? If so, yes.
dunstify -r <Number>
Is it possible to send reply in dunst.
Can someone point any good resource where I can use python(or any language) to trigger a reply or option menu in dunst?
Kinda, it supports context menus. I couldn't find any documentation about it though.
]]>What is the benefit of using
notify-send -h int:value:42
with dunst? Because the value is displayed as text anyway. Or am i missing anything?
notify-send -h int:value:42 adsf
Seems to show "asdf" as the title, and "42" between brackets with a percentage sign at the end.
]]>notify-send -h int:value:42
with dunst? Because the value is displayed as text anyway. Or am i missing anything?
]]>progandy wrote:knopwob wrote:exactly. an A would indicate an Action btw. and the url detection gets a lot of false positives. But I prefer this to wrongly not detected urls. patches that improve url detection are welcome. see menu.c
I added a commit to my fork, feel free to cherry-pick this and any other commit I made
https://github.com/progandy/dunst/commi … 78ee1a0288I've picked most of your commits (not yet pushed to my github) except for the two icon related commits. I've not yet decided wether I want to merge those, since I'm thinking about adding real icon support. Anyway thank you for your efforts.
Any update on the icon support?
Edit: ignore me please, trigger-happy posting.
]]>If you use dunstify instead of notify-send, you can store and set the notification id in order to replace a message. dunstify is part of the dunst sources, but not included in the arch package.
wget https://raw.githubusercontent.com/knopwob/dunst/master/Makefile wget https://raw.githubusercontent.com/knopwob/dunst/master/dunstify.c touch config.mk make dunstify dunstify -p ... >nid dunstify -r $(<nid) ...
+1, exactly what I needed.
]]>wget https://raw.githubusercontent.com/knopwob/dunst/master/Makefile
wget https://raw.githubusercontent.com/knopwob/dunst/master/dunstify.c
touch config.mk
make dunstify
dunstify -p ... >nid
dunstify -r $(<nid) ...
dejy wrote:Is there a way to make Notifications go to the same box (Override the previous notify box), as opposed to spawning it's own new Notify event?
For example running a bash-script for notifying on Caps-lock state the following problem occurs (if one changes Capslock several times before the time out intervals)
#*press capslock < Capslock ON> #*press capslock < Capslock OFF> #*press capslock <(1) Capslock ON> #*press capslock <(1) Capslock OFF> So generally it will like this: <(1) Capslock ON> <(1) Capslock OFF>
Which is not priority sorted and completely ambiguous. (And there are a number of notification events for which this would not make sense).
One alternative is to use a Python script and Notification.close(), but it also seems awkward to run a .py script and import subprocess / evdev libraries just for two lines of bash script.Anyways if there is a way to notify-send into a single-box, or other effective work arounds, that would be great to know.
Rather than a mere script, I'd have a tiny daemon that updates the same notification, and signal that daemon.
So what you mean (correct me if i'm wrong) is something like having a little python daemon receiving socketIO events on keypress - and updating the notifications from there?
And I take it that's a no, on updating a new message to the same notification window (maybe forking dunst, to enable something like this would be preferable?)
]]>Is there a way to make Notifications go to the same box (Override the previous notify box), as opposed to spawning it's own new Notify event?
For example running a bash-script for notifying on Caps-lock state the following problem occurs (if one changes Capslock several times before the time out intervals)
#*press capslock < Capslock ON> #*press capslock < Capslock OFF> #*press capslock <(1) Capslock ON> #*press capslock <(1) Capslock OFF> So generally it will like this: <(1) Capslock ON> <(1) Capslock OFF>
Which is not priority sorted and completely ambiguous. (And there are a number of notification events for which this would not make sense).
One alternative is to use a Python script and Notification.close(), but it also seems awkward to run a .py script and import subprocess / evdev libraries just for two lines of bash script.Anyways if there is a way to notify-send into a single-box, or other effective work arounds, that would be great to know.
Rather than a mere script, I'd have a tiny daemon that updates the same notification, and signal that daemon.
]]>For example running a bash-script for notifying on Caps-lock state the following problem occurs (if one changes Capslock several times before the time out intervals)
#*press capslock
< Capslock ON>
#*press capslock
< Capslock ON>
< Capslock OFF>
#*press capslock
<(1) Capslock ON>
< Capslock OFF>
#*press capslock
<(1) Capslock ON>
<(1) Capslock OFF>
So generally it will like this:
<(1) Capslock ON>
<(1) Capslock OFF>
Which is not priority sorted and completely ambiguous. (And there are a number of notification events for which this would not make sense).
One alternative is to use a Python script and Notification.close(), but it also seems awkward to run a .py script and import subprocess / evdev libraries just for two lines of bash script.
Anyways if there is a way to notify-send into a single-box, or other effective work arounds, that would be great to know.
]]>Thanks!
]]>On my laptop, alt+space dismisses the notifications, on the desktop, it does not (nothing happens). stdour/stderr show nothing, and I've no idea what to try. What can be causing this issue? What should I look at? My configuration is available here
]]>