咆哮通知的内联样式 [英] Inline styling of growl notifications

查看:88
本文介绍了咆哮通知的内联样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用脚本调用growlnotify来显示一些时间跟踪数据:当前项目名称,经过的时间,可用项目列表(以及当天花费的时间以及在项目之间切换的键盘快捷键)

I'm using a script to call growlnotify to display some time tracking data: current project name, time elapsed, a list of available projects (together with time spent on them on the current day and keyboards shortcuts to switch between projects).

我想对文本进行一些样式设置:一些文本为粗体,一些文本为斜体,另一些颜色为其他.我知道可以通过CSS为咆哮通知的容器创建自定义样式,但这可以自定义布局,而不是内容.

I would like to do some styling of the text: some text bold, some text italic, some in a different colour. I understand it's possible to create custom styles for the container of the growl notification via CSS, but that customizes the layout not the content.

我也可以仅对一些基本内容进行样式设置吗?能够使用内联HTML是完美的,但这听起来实在是太好了.也许有可能在我的自定义Growl样式中添加一些占位符,所以代替%title%和%text%我也将拥有%projectname%和%elapsed%之类的东西.

Can I also style the text, just some basic stuff? It would be perfect to be able to use inline HTML, but that sounds too good to be true. Maybe it's possible to add some placeholders to my custom Growl style so in stead of just %title% and %text% I would also have %projectname% and %elapsed% or something.. maybe pass those arguments to growlnotify?

先谢谢您!

推荐答案

无法使用growlnotify和现有样式执行此操作.您可以编写自己的Growl样式来处理消息,或者在WebKit样式中使用JavaScript或在Objective-C中使用.

There's no way to do this with growlnotify and existing styles. You could write your own Growl style which processes your message, either with JavaScript in the case of a WebKit style or with Objective-C.

这篇关于咆哮通知的内联样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆