个人工具

“UbuntuHelp:AdeskletsHowto/zh”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
Introduction
Set Up
第15行: 第15行:
 
Adesklets 提供了供应许多信息相对应的desklets的途径 (X session 在使用中,就是root window[背景]),允许每个desklets 可以单独工作.
 
Adesklets 提供了供应许多信息相对应的desklets的途径 (X session 在使用中,就是root window[背景]),允许每个desklets 可以单独工作.
  
== Set Up ==
+
== 安装 ==
  
 
=== Adesklets ===
 
=== Adesklets ===
第91行: 第91行:
  
 
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).
 
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).
 
+
[[链接标题]]
  
 
== Some Final Notes ==
 
== Some Final Notes ==

2007年6月29日 (五) 23:00的版本


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

简介

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

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

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

安装

Adesklets

Adesklets itself is easy to install. It is in the Universe repository, so all you need to do is install the adesklets package.

The Desklets Themselves

Getting Them

Since adesklets seperates itself from the desklets themselves, you will need to find some desklets which you like. There is a collection of desklets here.

After getting a desklet you should move it to a location where you would like it to live permanently (at least until you uninstall adesklets), then extract it by right clicking on the archive and choosing Extract Here.

Setting Them Up

Desklets initially need to be run manually. Since they are usually python scripts (usually ending in ".py") they can be run from a terminal in the extracted directory with "python filename.py" (where filename.py is the desklet script, usually named similar to the archive). There are two ways of running each desklet, either in "test" mode or "registering" it, you will be asked which action you want to perform when you run the desklet (press the corresponding key, then Enter). To begin with you should run the desklet in test mode, so you can see what it is like and whether you would want to have it on your desktop. To kill a desklet in test mode press ctrl-C (this is the standard way of killing programs being run in a terminal)

The desklets are controlled with text files, usually called config.txt, which you can open with any text editor (don't open it if the desklet is running, since your changes may be overwritten). Since every desklet is different it would be impossible to explain how to configure them all, but the text files are usually straightforward. For example, here is a configuration file I use for the "modubar" desklet, which is similar to MacOSX's dock (the thing across the bottom of the screen with the icons in it), but without the extensive comments at the top. The layout is the same as the original and you can see how easy it is to tweak the settings (this desklet looks for icons in a folder called "icons" inside it's directory, and this is where I stored my icon images):

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}

After changing the configuration you can restart the desklet in test mode to try it out. If there is no config.txt or similar file (if there is a README then check in there for what the configuration file is called) then try running the desklet in test mode then killing it (ctrl-C) to see if the file has been created.

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 adesklets command. You can register many desklets which will all be run when you run adesklets, 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). 链接标题

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.