gnome-osd

仅仅用于软件推荐,不适合发求软件或软件使用问题方面的贴子
回复
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

gnome-osd

#1

帖子 eexpress » 2008-04-07 18:56

蛮好的。带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语法。
就是pango语法。
screenshot-2008-04-07-19-39-56.png
screenshot-2008-04-07-18-53-34.png
上次由 eexpress 在 2008-04-07 20:47,总共编辑 2 次。
● 鸣学
头像
yaoms
帖子: 4952
注册时间: 2007-10-19 14:51
来自: 深圳

#2

帖子 yaoms » 2008-04-07 19:12

这两个脚本为什么不合成一个??
Nothing 有事请发邮件到 yms541 AT gmail.com
alias 爱慕颇雷尔='mplayer'
头像
yaoms
帖子: 4952
注册时间: 2007-10-19 14:51
来自: 深圳

#3

帖子 yaoms » 2008-04-07 19:22

知道了。。你这个只是用法之一。。。
Nothing 有事请发邮件到 yms541 AT gmail.com
alias 爱慕颇雷尔='mplayer'
头像
yaoms
帖子: 4952
注册时间: 2007-10-19 14:51
来自: 深圳

#4

帖子 yaoms » 2008-04-07 19:24

还可以显示 xchat事件。
Nothing 有事请发邮件到 yms541 AT gmail.com
alias 爱慕颇雷尔='mplayer'
头像
yaoms
帖子: 4952
注册时间: 2007-10-19 14:51
来自: 深圳

#5

帖子 yaoms » 2008-04-07 20:33

配色丑死。。。。

代码: 全选

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) 查看 3043 次
Nothing 有事请发邮件到 yms541 AT gmail.com
alias 爱慕颇雷尔='mplayer'
头像
yaoms
帖子: 4952
注册时间: 2007-10-19 14:51
来自: 深圳

#6

帖子 yaoms » 2008-04-07 20:35

* 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'
头像
rhfcaesar
帖子: 2996
注册时间: 2005-11-17 15:45
来自: 湖北

#7

帖子 rhfcaesar » 2008-04-07 20:39

类似tpb?

代码: 全选

枪杆子里面出政权
头像
yaoms
帖子: 4952
注册时间: 2007-10-19 14:51
来自: 深圳

#8

帖子 yaoms » 2008-04-07 20:40

代码: 全选

gnome-osd-client -f "<message id='myplugin' osd_fake_translucent_bg='on'>$*</message>" 
这样就不怕空格了阿
Nothing 有事请发邮件到 yms541 AT gmail.com
alias 爱慕颇雷尔='mplayer'
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#9

帖子 eexpress » 2008-04-07 23:56

配合我的 EdgeCommand Bottom Exec exec osd-volumn 和窗口按钮,很爽的。因为我总是opera占用一个页面的全屏。

下次,试试也显示些sysinfo。放到左边墙壁去。
● 鸣学
aBiNg
帖子: 1331
注册时间: 2006-07-09 12:22
来自: 南京

#10

帖子 aBiNg » 2008-04-08 21:04

纯模仿Flux,用osdsh控制键盘操作结果显示。哈哈~~~
回复