bash 堆叠多个 libnotify 弹出窗口
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3304831/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Stack multiple libnotify popups
提问by Question Mark
Does anybody know how i can get multiple popups sent via notify-send to appear on screen at once.
有谁知道我如何让通过通知发送发送的多个弹出窗口一次出现在屏幕上。
With:
和:
$ notify-send 'Message One' 'Body One' & notify-send 'Message Two' 'Body Two' & notify-send 'Message Three' 'Body Three'
Each one waits for the previous popup in the queue to expire before being shown, i'm trying to get all three to cascade down the screen asap.
每个都等待队列中的前一个弹出窗口在显示之前到期,我试图让所有三个都尽快在屏幕上层叠。
Man says:
男人说:
OPTIONS
-u, --urgency=LEVEL Specifies the urgency level (low, normal, critical).
-t, --expire-time=TIME
Specifies the timeout in milliseconds at which to expire the notification.
-i, --icon=ICON[,ICON...]
Specifies an icon filename or stock icon to display.
-c, --category=TYPE[,TYPE...]
Specifies the notification category.
Help options:
-?, --help
Show this help message
-h, --hint=TYPE:NAME:VALUE
Specifies basic extra data to pass. Valid types are int, double, string and byte.
Setting the urgency to critical makes no difference.
将紧迫性设置为关键没有任何区别。
TIA
TIA
回答by Vítor E. Silva Souza
I know it's an old question, but I ran into it while searching for related stuff in Google, so I will post an answer anyways.
我知道这是一个老问题,但我在谷歌搜索相关内容时遇到了它,所以无论如何我都会发布一个答案。
Like tlvince said, it's your notification daemon's fault and you're probably running Canonical's notify-osd. Replace it with Gnome's notification-daemon and you will get the behavior your want.
就像 tlvance 所说的,这是你的通知守护进程的错,你可能正在运行 Canonical 的 notify-osd。将其替换为 Gnome 的通知守护程序,您将获得您想要的行为。
These pages might help:
这些页面可能会有所帮助:
http://www.webupd8.org/2011/05/how-to-use-standard-gnome-notification.html
http://www.webupd8.org/2011/05/how-to-use-standard-gnome-notification.html
回答by tlvince
I believe it's the responsibility of the notification-daemon you are running as to what the behaviour should be. For example, in xfce4-notifyd, all three notifications are displayed at once, overlapping each other (since it doesn't support stacking).
我相信您正在运行的通知守护程序有责任决定行为应该是什么。例如,在 中xfce4-notifyd,所有三个通知同时显示,相互重叠(因为它不支持堆叠)。
Since your running Ubuntu 9.04, your notification-daemon is most likely notifyOSD. Try taking a look through its documentation.
由于您运行的是 Ubuntu 9.04,因此您的通知守护程序很可能是notifyOSD。尝试查看其文档。

