[英]Floating dunst notification in i3
I'm under Ubuntu 22.04 with i3 as windows manager and dunst to display the notifications.我在 Ubuntu 22.04 下使用i3作为 Windows 管理器和dunst来显示通知。
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.你会发现我的 dunst 和 i3 配置的以下部分,以及
xprop
在通知上的输出。
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"
. xprop
显示通知是一个带有类"Dunst"
的窗口,但 i3 不会将其显示为浮动窗口,即使它被配置为使用类为"Dunst"
的窗口显示。 How can I fix this?我怎样才能解决这个问题?
~/.config/dunst/dunstrc
: ~/.config/dunst/dunstrc
:
[global]
width = 300
height = 300
origin = top-right
offset = 10x50
scale = 0
title = Dunst
class = Dunst
~/.config/i3/config
: ~/.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
xprop
command on a notification gives me:通知上的
xprop
命令给我:
_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"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.