特殊:Badtitle/NS100:AdeskletsHowto/zh:修订间差异

来自Ubuntu中文
跳到导航跳到搜索
Ekeng留言 | 贡献
Ekeng留言 | 贡献
第87行: 第87行:
配置完后您可以重启desklet用测试模式来试用一下.如果没有config.txt或类似的文件(如果有README就查看一下配置文件名)就在测试模式下运行desklet,再结束它(ctrl-C) ,看看是否有文件创建.
配置完后您可以重启desklet用测试模式来试用一下.如果没有config.txt或类似的文件(如果有README就查看一下配置文件名)就在测试模式下运行desklet,再结束它(ctrl-C) ,看看是否有文件创建.


==== Registering Them ====
==== 注册 ====


When you are happy with a desklet running in test mode you can tell adesklets to run it for you by registering it. This is usually done by running the desklet script, but instead of choosing test you should choose register. Once the desklet has been registered it will be started when you run the <code><nowiki>adesklets</nowiki></code> command. You can register many desklets which will all be run when you run <code><nowiki>adesklets</nowiki></code>, and it is a good idea to put that command in the session startup (in GNOME this is System->Preferences->Sessions and go on the Startup Programs tab and add it).
如果desklet在测试模式下令您满意时,您可以让desklet真正工作,这只要注册.通常这由desklet脚本完成,不是选择测试模式而是选注册模式.desklet一旦注册了,就可以用命令<code><nowiki>adesklets</nowiki></code>,来运行.您可以注册许多个desklet,这样在您运行<code><nowiki>adesklets</nowiki></code>命令时都会运行,在会话添加启动命令也很不错(GNOME下 系统->首选项->会话,选择 启动程序 标签来添加).[[链接标题]]
[[链接标题]]


== Some Final Notes ==
== Some Final Notes ==

2007年8月14日 (二) 20:11的版本

{{#ifexist: :AdeskletsHowto/zh/zh | | {{#ifexist: AdeskletsHowto/zh/zh | | {{#ifeq: {{#titleparts:AdeskletsHowto/zh|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:AdeskletsHowto/zh|1|-1|}} | zh | | }}


Adesklets 是一个可以让许多小监控器和实用程序放置在桌面的软件.您可能也会提及 Karamba, SuperKaramba, Gkrellm 和 GDesklets. 这些工具安装过程都太简单了, 而Adesklets 需要一点小小的设置, 因此就有了本文.

简介

桌面是个非常无聊的地方,特别是Ubuntu使用了更少的图标.即使加了一些图标,一些常用的任务诸如阅读新闻,查看新邮件,监控系统资源也需要点几下鼠标或按几下键盘,程序然后才运行,等等这些问题.

Desklets 致力于解决这些问题,它们把图形化的迷你程序(通常叫"实用程序")放置在桌面上,也可以不时从新源提供一些信息,如系统监控器,邮件帐户等更多.正是其时不时更新(但相对不明显),获得信息的速度显然快多了.

Adesklets 提供了供应许多信息相对应的desklets的途径 (X session 在使用中,就是root window[背景]),允许每个desklets 可以单独工作.

安装

Adesklets

Adesklets 可容易安装.它在 Universe 库里, 您要做的就是安装 adesklets 包.

The Desklets Themselves

获取

自从adesklets与desklets区分之后,您需要搜索一些您喜欢的desklets.这里收集了一些desklets.

获取到后您应该把它们放在您认为固定的位置(至少存到您卸载adesklets),然后解压缩,选中按右键选择解压缩到这里.

设置

Desklets 起初要手动运行.因为它们通常是python脚本(通常文件名以".py"结尾),可以在终端 运行使用命令 "python filename.py" ( 这里的 filename.py 是desklet的脚本,通常跟文档名相近).运行每个desklet都有两种方法,一种是"测试"模式,另一种是"注册",当您运行desklet时.它会提示您选择哪种模式(按相应的键,回车).刚开始您最好选择测试模式,这样您可以看看它长什么样,是否把它放到桌面上.按ctrl-C 可以结束测试模式(这是结束在终端运行程序的标准方法).

Desklets 是由文本设置的,通常名为config.txt, 可以用任何文本编辑器打开(当desklet在运行时不要打开,因为您做的更改可能会被覆盖).由于每个desklet都不同,不可能都解释设置方法,但文本文件一般都很简单.比如,以下是我使用的一个"modubar" desklet的配置文件,和MacOSX's dock 很相似,就是顶部没有注释.页面布局和以前一样,您就知道配置有多简单了(这个desklet在它的目录下搜索一个名为icon的文件夹,因此我把图标存放在这个文件夹内):

id0 = {'bar_background_1': '202020',
'bar_background_2': None,
'bar_foreground': '000000',
'bar_gradient_angle': 0,
'bar_height': 48,
'bar_opacity_1': 100,
'bar_opacity_2': None,
'caption_above': True,
'caption_color': 'FFFFFF',
'caption_delay': 0.10000000000000001,
'caption_fade_in': True,
'caption_fade_in_duration': 0.29999999999999999,
'caption_fade_in_steps': 10,
'caption_font': 'Vera',
'caption_size': 20,
'click_effect': 'tint(alpha=75,red=75,green=75,blue=125);',
'click_effect_duration': 0.10000000000000001,
'icon_max_height': 148,
'icon_max_width': 148,
'icon_maximize_threshold': 1.0,
'icon_min_height': 96,
'icon_min_width': 96,
'icon_spacing': 5,
'icons': [('terminal.png',
'Terminal', 'gnome-terminal --working-directory /home/chris'),
('home.png', 'Files', 'nautilus /home/chris/Files'),
('evolution.png', 'EMail', 'evolution --component=mail'),
('amarok.png', 'Amarok', 'amarok'),
('listen.png', 'Listen', 'listen'),
('xmms.png', 'XMMS', 'xmms'),
('gimp.png', 'The GIMP', 'gimp'),
('inkscape.png', 'Inkscape', 'inkscape'),
('moho.png', 'Moho', 'moho'),
('abiword.png', 'Abiword', 'abiword'),
('sancho.png', 'Sancho', 'sancho'),
('gtk-gnutella.png', 'Gnutella', 'gtk-gnutella')],
'mod_background_1': 'AAAAAA',
'mod_background_2': None,
'mod_clock_font': 'Vera',
'mod_clock_size': 16,
'mod_font_color': '000000',
'mod_font_opacity': 'FF',
'mod_foreground_1': '000000',
'mod_foreground_2': None,
'mod_gradient_angle': 0,
'mod_opacity_1': 100,
'mod_opacity_2': None,
'module_height': 32,
'modules': [('clock', 1)],
'modules_on': False}

配置完后您可以重启desklet用测试模式来试用一下.如果没有config.txt或类似的文件(如果有README就查看一下配置文件名)就在测试模式下运行desklet,再结束它(ctrl-C) ,看看是否有文件创建.

注册

如果desklet在测试模式下令您满意时,您可以让desklet真正工作,这只要注册.通常这由desklet脚本完成,不是选择测试模式而是选注册模式.desklet一旦注册了,就可以用命令adesklets,来运行.您可以注册许多个desklet,这样在您运行adesklets命令时都会运行,在会话添加启动命令也很不错(GNOME下 系统->首选项->会话,选择 启动程序 标签来添加).链接标题

Some Final Notes

To kill running desklets (which are registered) you can use:

adesklets -k

To remove desklets which you have registered, but which have been deleted, you can "clean up" the configuration file with:

adesklets -c

Desklets will usually appear in the top left corner of the screen. You can move them by right clicking on them and selecting Move, then left clicking when you are happy with the placement. Adesklets will remember the position of the desklet, so it will start in that location next time it is run.

Many desklets use "fake transparency", which means they take a screenshot of the desktop background and use this as the desklet's background, hence pretending that desktop is visible through the desklet (as opposed to "true transparency", often referred to as translucency, which is achieved by compositing programs like xcompmgr and the Compiz window manager). This means that any changing desktop (for example, if you run xscreensaver as your background "image") will not display correctly in the desklets. I personally use ChBg to cycle through different wallpapers, and I have found that my desklets briefy flash above any other windows whilst they are taking their new screenshots. This is annoying, especially when watching video files.