Inline styling of growl notifications

对着背影说爱祢 提交于 2019-12-24 10:15:03

问题


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).

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.

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?

Thank you in advance!


回答1:


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.



来源:https://stackoverflow.com/questions/5050676/inline-styling-of-growl-notifications

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!