naughty
跳转到导航
跳转到搜索
不支持 low
优先级。支持通过 <span>
指定前景色 color
、背景色 bgcolor
、字体 font_desc
(如 Sans 7
),与gnome-osd-client类似。可通过notify-send或者 awesome-client
调用。
用法
naughty.notify
函数返回一个notification对象。此对象可传给 naughty.destroy
函数来销毁这个通知。
naughty.notify
的参数是一个表,其常用键为:
title
text
bg
fg
- HTML式的颜色值或名称
timeout
- 超时时间,0 为不超时,单位为秒,可使用小数
icon
- 图标文件路径。注意不会自动缩放
icon_size
- 图标大小,单位像素
run
- 左键点击时执行的函数
replaces_id
- 通知id
preset
- 预置的选项
指定优先级的方法为指定 preset
参数为 naughty.config.presets
中的某个,如 critical
。