Pat*_*aba 11 kde bash notifications osd
如何从 bash 脚本写入 KDE 的 OSD 或通知区域?我使用的是 KDE 4.5,基本上我想要的是我的脚本在运行时报告一些东西。由于我通过快捷方式运行脚本,我没有控制台输出,但我想在通知区域写入 OSD。
我知道并使用“osd_cat”,但这只会在屏幕上显示一些难看的文字。
谢谢。
dax*_*xim 15
notify-send 'why hello there'
Run Code Online (Sandbox Code Playgroud)
notify-send
是包的一部分libnotify-tools
。
perl -MDesktop::Notify -e'Desktop::Notify->new->create(body => q{why hello there})->show'
Run Code Online (Sandbox Code Playgroud)
Desktop::Notify
在 CPAN 上可用。
Mal*_*rba 15
作为备选:
kdialog --passivepopup 'why hello there' 5
Run Code Online (Sandbox Code Playgroud)
5 是它将持续的秒数。
运行kdialog --help
其他选项,例如title
.
归档时间: |
|
查看次数: |
7184 次 |
最近记录: |