dunst icon indicating copy to clipboard operation
dunst copied to clipboard

Can't force timeout on notifications from web browser.

Open Samueru-sama opened this issue 1 year ago • 4 comments

When using telegram web on the browser (brave) notifications don't timeout at the time I have set in my dunst configuration.

When looking at dunst --print There's an error for the notifications of the web browser:

{
	appname: 'Brave'
	summary: '_message_'
	body: '<a href="https://web.telegram.org/">web.telegram.org</a>

New notification'
	icon: '/tmp/.org.chromium.Chromium.pWzR1I'
	raw_icon set: false
	icon_id: '(null)'
	desktop_entry: 'brave-browser'
	category: 
	timeout: 25000
	urgency: NORMAL
	transient: 0
	formatted: '<b>_message_</b>
web.telegram.org

New notification'
	fg: #ffffff
	bg: #04090e
	highlight: #1745d1
	frame: #F0C674
	fullscreen: show
	format: <b>%s</b>\n%b
	progress: -1
	stack_tag: 
	id: 2
	urls:
	{
		[web.telegram.org] https://web.telegram.org/
	}
	actions: {
		"default": "Activate"
		"settings": "Settings"
	}
	script_count: 0
}
CRITICAL: Source ID 525 was not found when attempting to remove it

Installation info

  • Version: Dunst - A customizable and lightweight notification-daemon 1.9.2 (2023-04-20)
  • Install type: Arch Package
  • Window manager / Desktop environment: i3wm
  • Distro: Archlinux

Dunstrc here

[urgency_low]
    background = "#04090e"
    foreground = "#888888"
    frame_color = "#F0C674"
    timeout = 2

[urgency_normal]
    background = "#04090e"
    foreground = "#ffffff"
    frame_color = "#F0C674"
    timeout = 2

[urgency_critical]
    background = "#900000"
    foreground = "#ffffff"
    frame_color = "#ff0000"
    timeout = 60

Samueru-sama avatar Feb 17 '24 15:02 Samueru-sama

The error you see is solved in master. Not sure if that's the cause, though

fwsmit avatar Feb 18 '24 14:02 fwsmit

The error you see is solved in master. Not sure if that's the cause, though

I built and installed the latest version of dunst and now dunst --print doesn't show info from any notification and only shows the CRITICAL error:

~/ dunst -v     
Dunst - A customizable and lightweight notification-daemon v1.10.0-1-g7775775
~/ dunst --print     
CRITICAL: Source ID 42 was not found when attempting to remove it
CRITICAL: Source ID 52 was not found when attempting to remove it
CRITICAL: Source ID 68 was not found when attempting to remove it
WARNING: Expected image data to be of length 9213 but got a length of 9216
WARNING: Expected image data to be of length 9213 but got a length of 9216

And the issue of the telegram web notification not timing out is still present.

Samueru-sama avatar Feb 24 '24 07:02 Samueru-sama

It seems the timeout set by the browser is overriding the default one you set. Maybe you could try using a rule that sets the timeout to notifications sent by the browser?

bynect avatar Mar 13 '24 10:03 bynect

It seems the timeout set by the browser is overriding the default one you set. Maybe you could try using a rule that sets the timeout to notifications sent by the browser?

I tried this before and didn't work, but now I can't try it again because how do I get the appname now? before dunst --print would show that info so I could add it to my dunstrc but since the last version I built that is broken as well and now dunst --print doesn't show that info as seen in the previous comment, it only shows errors.

Sorry for the late reply, the email was sent to my junk.

UPDATE:

I was able to get the appname again by simply reading the original log I posted here lol, I added this my dunstrc config:

[brave]
    appname = Brave
    background =  "#1ffff0"
    timeout = 1

And it is "working" because the background color for the notifications does change to the one I have set there, however the timeout of 1 second doesn't work still.

Samueru-sama avatar Mar 18 '24 20:03 Samueru-sama

Hi @Samueru-sama, for your use case you should use override_dbus_timeout. Just tested with a chrome-produced notification and it works, when timeout didn't.

ldionmarcil avatar Jul 04 '24 19:07 ldionmarcil

Hi @Samueru-sama, for your use case you should use override_dbus_timeout. Just tested with a chrome-produced notification and it works, when timeout didn't.

Thank you so much! that was the issue indeed.

Samueru-sama avatar Jul 05 '24 18:07 Samueru-sama