Linux:设置自定义警报/toast/不确定名称
抱歉用词不当,我指的是当某些事件发生时出现在屏幕右上角的 toast(Android 就是这样称呼它们的)。
示例:种子已完成(传输)或正在播放一首新歌曲(Banshee)
有谁知道如何在脚本或程序中定义一个?
谢谢
Sorry for the wording, I'm referring to the toast (that's how Android calls them) that appears on the top right of the screen when certain events happens.
Examples: a torrent is done (Transmission) or a new song is playing (Banshee)
Does anyone know how to define one inside a script or a program?
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您正在寻找的是
libnotify
它还有一个名为notify-send
的命令行客户端,可以像这样使用:What you're looking for is
libnotify
which also has a command line client callednotify-send
that can be used like this:zenity
怎么样 - 默认安装在 gnome 中。一如既往,man zenity
了解更多信息Howabout
zenity
- installed in gnome by default. as always,man zenity
for more information如果您使用的是 Gnome,您可能需要: http://developer.gnome.org/libnotify/
我相信大多数其他桌面都会尊重使用 libnotify 发送的通知,但必须承认没有尝试过。
If you're using Gnome, you probably want: http://developer.gnome.org/libnotify/
I believe that most of the other desktops will respect notifications sent using libnotify, but have to admit to not having tried it.