Raida
Raida

Reputation: 1506

Floating dunst notification in i3

My problem

I'm under Ubuntu 22.04 with i3 as windows manager and dunst to display the notifications.

I would like the notifications to be floating but they are at the top of the screen and take the whole width.

You will find bellow parts of my config for dunst and i3, and the output of xprop on a notification.

xprop shows that the notification is a window with class "Dunst" but i3 doesn't show it as a floating window even if it is configured to do so with windows for which the class is "Dunst". How can I fix this?

My config files

~/.config/dunst/dunstrc:

[global]
width = 300
height = 300
origin = top-right
offset = 10x50
scale = 0
title = Dunst
class = Dunst

~/.config/i3/config:

for_window [window_role="pop-up"] floating enable
for_window [window_role="task_dialog"] floating enable
for_window [class="Dunst"] floating enable

Additional information

xprop command on a notification gives me:

_NET_WM_WINDOW_OPACITY(CARDINAL) = 3650722120
_NET_WM_STATE(ATOM) = _NET_WM_STATE_ABOVE
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NOTIFICATION, _NET_WM_WINDOW_TYPE_UTILITY
WM_CLASS(STRING) = "Dunst", "Dunst"
_NET_WM_NAME(UTF8_STRING) = "Dunst"
WM_NAME(STRING) = "Dunst"

Upvotes: 1

Views: 1229

Answers (1)

Raida
Raida

Reputation: 1506

I finally found the solution here.

I changed my ~/.config/dunst/dunstrc with (use geometry):

[global]
geometry = "300x5-10+50"
title = Dunst
class = Dunst

Upvotes: 1

Related Questions