当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 10 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : gnome-osd
帖子发表于 : 2008-04-07 18:56 
头像

注册: 2005-08-14 21:55
帖子: 58428
地址: 长沙
送出感谢: 4
接收感谢: 272
蛮好的。带dbus监视事件。动画,声音等。
gnome-osd-properties 设置特性
代码:
☎  cat osd
#!/bin/bash

gnome-osd-client -f "<message id='myplugin' osd_fake_translucent_bg='on'>"$*"</message>"


代码:
☎  cat osd-volumn
#!/bin/bash

t="主音量_`amixer get Master|grep -o -m 1 [0-9]*%`.PCM_`amixer get PCM|grep -o -m 1 [0-9]*%`"
osd $t


代码:
f.action:Mouse 4 4 A Exec exec bash -c "amixer set PCM 5%+ && osd-volumn"
f.action:Mouse 5 4 A Exec exec bash -c "amixer set PCM 5%+ && osd-volumn"
f.action:Mouse 4 0 A Exec exec bash -c "amixer set Master 5%+ && osd-volumn"
f.action:Mouse 5 0 A Exec exec bash -c "amixer set Master 5%- && osd-volumn"
f.action:Mouse 4 6 A Exec exec bash -c "amixer set PCM 5%- && osd-volumn"
f.action:Mouse 5 6 A Exec exec bash -c "amixer set PCM 5%- && osd-volumn"


附件:
文件注释: 就是pango语法。
screenshot-2008-04-07-20-46-37.png
screenshot-2008-04-07-20-46-37.png [ 21.91 KiB | 被浏览 2495 次 ]

screenshot-2008-04-07-19-39-56.png
screenshot-2008-04-07-19-39-56.png [ 40.93 KiB | 被浏览 2499 次 ]

screenshot-2008-04-07-18-53-34.png
screenshot-2008-04-07-18-53-34.png [ 56.16 KiB | 被浏览 1221 次 ]



_________________
● 鸣学


最后由 eexpress 编辑于 2008-04-07 20:47,总共编辑了 2 次
页首
 用户资料  
 
2 楼 
 文章标题 :
帖子发表于 : 2008-04-07 19:12 
头像

注册: 2007-10-19 14:51
帖子: 4953
地址: 深圳
送出感谢: 0 次
接收感谢: 2
这两个脚本为什么不合成一个??


_________________
Nothing 有事请发邮件到 yms541 AT gmail.com
alias 爱慕颇雷尔='mplayer'


页首
 用户资料  
 
3 楼 
 文章标题 :
帖子发表于 : 2008-04-07 19:22 
头像

注册: 2007-10-19 14:51
帖子: 4953
地址: 深圳
送出感谢: 0 次
接收感谢: 2
知道了。。你这个只是用法之一。。。


_________________
Nothing 有事请发邮件到 yms541 AT gmail.com
alias 爱慕颇雷尔='mplayer'


页首
 用户资料  
 
4 楼 
 文章标题 :
帖子发表于 : 2008-04-07 19:24 
头像

注册: 2007-10-19 14:51
帖子: 4953
地址: 深圳
送出感谢: 0 次
接收感谢: 2
还可以显示 xchat事件。


_________________
Nothing 有事请发邮件到 yms541 AT gmail.com
alias 爱慕颇雷尔='mplayer'


页首
 用户资料  
 
5 楼 
 文章标题 :
帖子发表于 : 2008-04-07 20:33 
头像

注册: 2007-10-19 14:51
帖子: 4953
地址: 深圳
送出感谢: 0 次
接收感谢: 2
配色丑死。。。。

代码:
t="<span background='green'><span foreground='red'>主音量:</span> <span foreground='blue'>`amixer get Master|grep -o -m 1 [0-9]*%`.PCM `amixer get PCM|grep -o -m 1 [0-9]*%`</span></span>"


附件:
Screenshot.png
Screenshot.png [ 6.69 KiB | 被浏览 1807 次 ]


_________________
Nothing 有事请发邮件到 yms541 AT gmail.com
alias 爱慕颇雷尔='mplayer'
页首
 用户资料  
 
6 楼 
 文章标题 :
帖子发表于 : 2008-04-07 20:35 
头像

注册: 2007-10-19 14:51
帖子: 4953
地址: 深圳
送出感谢: 0 次
接收感谢: 2
引用:
* Home
* News
* Projects
* Art
* Support
* Development
* Community

GNOME Documentation Library

* Home
* Users
* Administrators
* Developers
* About

Prev Up Home Pango Reference Manual Next
Text Attribute Markup

Text Attribute Markup — Simple markup language to encode text with attributes

Pango Text Attribute Markup Language

Frequently, you want to display some text to the user with attributes applied to part of the text (for example, you might want bold or italicized words). With the base Pango interfaces, you could create a PangoAttrList and apply it to the text; the problem is that you'd need to apply attributes to some numeric range of characters, for example "characters 12-17." This is broken from an internationalization standpoint; once the text is translated, the word you wanted to italicize could be in a different position.

The solution is to include the text attributes in the string to be translated. Pango provides this feature with a small markup language. You can parse a marked-up string into the string text plus a PangoAttrList using the function pango_parse_markup().

A simple example of a marked-up string might be: "<span foreground="blue" size="x-large">Blue text</span> is <i>cool</i>!"

The root tag of a marked-up document is <markup>, but pango_parse_markup() allows you to omit this tag, so you will most likely never need to use it. The most general markup tag is <span>, then there are some convenience tags. <span> has the following attributes:

<span> attributes

font_desc


A font description string, such as "Sans Italic 12". See pango_font_description_from_string() for a description of the format of the string representation . Note that any other span attributes will override this description. So if you have "Sans Italic" and also a style="normal" attribute, you will get Sans normal, not italic.

font_family


A font family name

face


Synonym for font_family

size


Font size in 1024ths of a point, or one of the absolute sizes 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', or one of the relative sizes 'smaller' or 'larger'. If you want to specify a absolute size, it's usually easier to take advantage of the ability to specify a partial font description using 'font_desc'; you can use font_desc='12.5' rather than size='12800'.

style


One of 'normal', 'oblique', 'italic'

weight


One of 'ultralight', 'light', 'normal', 'bold', 'ultrabold', 'heavy', or a numeric weight

variant


'normal' or 'smallcaps'

stretch


One of 'ultracondensed', 'extracondensed', 'condensed', 'semicondensed', 'normal', 'semiexpanded', 'expanded', 'extraexpanded', 'ultraexpanded'

foreground


An RGB color specification such as '#00FF00' or a color name such as 'red'

background


An RGB color specification such as '#00FF00' or a color name such as 'red'

underline


One of 'none', 'single', 'double', 'low', 'error'

underline_color


The color of underlines; an RGB color specification such as '#00FF00' or a color name such as 'red'

rise


Vertical displacement, in 10000ths of an em. Can be negative for subscript, positive for superscript.

strikethrough


'true' or 'false' whether to strike through the text

strikethrough_color


The color of strikethrough lines; an RGB color specification such as '#00FF00' or a color name such as 'red'

fallback


'true' or 'false' whether to enable fallback. If disabled, then characters will only be used from the closest matching font on the system. No fallback will be done to other fonts on the system that might contain the characters in the text. Fallback is enabled by default. Most applications should not disable fallback.

lang


A language code, indicating the text language

letter_spacing


Inter-letter spacing in 1024ths of a point.

gravity


One of 'south', 'east', 'north', 'west', 'auto'.

gravity_hint


One of 'natural', 'strong', 'line'.

The following convenience tags are provided:

Convenience tags

b


Bold

big


Makes font relatively larger, equivalent to <span size="larger">

i


Italic

s


Strikethrough

sub


Subscript

sup


Superscript

small


Makes font relatively smaller, equivalent to <span size="smaller">

tt


Monospace font

u


Underline

Generated by GTK-Doc V1.10


_________________
Nothing 有事请发邮件到 yms541 AT gmail.com
alias 爱慕颇雷尔='mplayer'


页首
 用户资料  
 
7 楼 
 文章标题 :
帖子发表于 : 2008-04-07 20:39 
头像

注册: 2005-11-17 15:45
帖子: 2996
地址: 湖北
送出感谢: 0 次
接收感谢: 1
类似tpb?


_________________
代码:
枪杆子里面出政权


页首
 用户资料  
 
8 楼 
 文章标题 :
帖子发表于 : 2008-04-07 20:40 
头像

注册: 2007-10-19 14:51
帖子: 4953
地址: 深圳
送出感谢: 0 次
接收感谢: 2
代码:
gnome-osd-client -f "<message id='myplugin' osd_fake_translucent_bg='on'>$*</message>"
这样就不怕空格了阿


_________________
Nothing 有事请发邮件到 yms541 AT gmail.com
alias 爱慕颇雷尔='mplayer'


页首
 用户资料  
 
9 楼 
 文章标题 :
帖子发表于 : 2008-04-07 23:56 
头像

注册: 2005-08-14 21:55
帖子: 58428
地址: 长沙
送出感谢: 4
接收感谢: 272
配合我的 EdgeCommand Bottom Exec exec osd-volumn 和窗口按钮,很爽的。因为我总是opera占用一个页面的全屏。

下次,试试也显示些sysinfo。放到左边墙壁去。


_________________
● 鸣学


页首
 用户资料  
 
10 楼 
 文章标题 :
帖子发表于 : 2008-04-08 21:04 

注册: 2006-07-09 12:22
帖子: 1331
地址: 南京
送出感谢: 0 次
接收感谢: 1
纯模仿Flux,用osdsh控制键盘操作结果显示。哈哈~~~


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 10 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 1 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译