Fru*_*uit 7 notifications gnome-shell libnotify notify-send
假设我使用notify-send这些长消息:
notify-send 'd: title, up/down: zoom, w: win_to_img, </>: rotate, *: orig, Enter/0: blah blah blah'
Run Code Online (Sandbox Code Playgroud)
但它会截断消息,只显示其中的一部分,而没有查看完整消息的选项:
使用 Fedora 21,我能够查看完整消息(在底部弹出滚动条),但使用 Fedora 24 则无法查看。
版本notify-send是 libnotify-0.7.6-8.fc24.i686。
无论如何要在 Fedora 24 中显示完整消息吗?
notify-send 像这样工作:
notify-send [OPTION...] <SUMMARY> [BODY]
Run Code Online (Sandbox Code Playgroud)
现在,由于您只有一个(带引号的)字符串,因此该字符串用于 theSUMMARY并且 theBODY为空。只要使用空白或任何的SUMMARY和BODY将显示整个消息(但只有当你将鼠标悬停在弹出用鼠标)1:
notify-send ' ' 'd: title,up/down: zoom,w: win_to_img,</>: rotate,*: orig,Enter/0: blah blah blah'
Run Code Online (Sandbox Code Playgroud)
或者如果你喜欢gdbus:
gdbus call --session --dest org.freedesktop.Notifications --object-path \
/org/freedesktop/Notifications --method org.freedesktop.Notifications.Notify \
my_app_name 42 '' "" 'd: title, up/down: zoom, w: win_to_img, </>: rotate, \
*: orig, Enter/0: your very long message should now span over multiple lines \
and stuf blah blah blah blah whatever...' '[]' '{}' 20
Run Code Online (Sandbox Code Playgroud)
1:这是在 gnome 3 上,其他 DE 实际上可能会显示整个消息,而无需将鼠标悬停在它上面
| 归档时间: |
|
| 查看次数: |
4650 次 |
| 最近记录: |