2007-11-29

Some thoughts on AWN’s launcher/task-switcher

Today I tried to put some of my thoughts together about Avant Window Navigator’s launcher/task-switcher, I ended up with these text, which is also posted in awn’s forum. They are mainly usability related consideration, no technical issue involved.

In the text, “iconify” = “minimize/close to system tray”.

Current Situation

In the launcher section, if an icon is clicked and the application is started, the icon functions as a task-switcher and has the possibility to be denoted with an arrow underneath. If the running application can be iconified (e.g. pidgin, xchat), as it is doing so, the arrow will disappear and the icon’s function will change from a task-switcher back to a launcher.

Now, if we want to restore the application from the system tray, we can not click on the correspondent icon in the launcher section on the dock, cause it will (in most cases) launch another instance of this application (which will also have its own icon and occupy a place in the task-switcher section). What we can do is to click the icon on the system tray, then the application will get restored and its icon in the launcher section will again function as a task-switcher.

Problems

  1. If an launched application can be iconified, its correspondent icon in the launcher section will function differently (as a launcher or a switcher) depending on whether it is iconified. And its icon can not consistently provide the user with the running status of it.

  2. If an launched application is not or can not be iconified, its correspondent icon in the launcher section will no longer provide a way to launch any other instance of this application.

Suggestions

  1. The task-switcher section’s behaviours stays the same, functioning as the task-list/task-bar of gnome-panel. When an application (which does not have a correspondent icon in the launcher section) iconified, its icon should disappear to “spare some place”, which, might be one of the reasons to design the “iconify” feature.

    Moreover, as the icons in this section always denote running applications, there is no need for the arrows underneath.

  2. For any icon in the launcher section, even if the started application is iconified, no place will be spared as the icon is always there. Therefore in my opinion, it should not lose the function as a task-switcher, showing the running status with the arrow and being able to restore the application (after all, it is an UI element much larger and easier to click than the icon on the tray).

  3. The launcher icon should still have the ability to launch (another instance of) the application after one instance of which has been started. Maybe by middle click or right click menu, this feature could be implemented. If more than one instance of the application exists, they should, or at least has the possibility to, be grouped together (e.g. in a pop-up menu of the launcher icon)

2007-11-20

Monitor network traffic with netspeed applet

Before I used netmon-applet on my gnome panel to monitor my network traffic, but after upgrading to Gutsy, I noticed that the upload/download speeds it was showing are somehow not correct, always less than half of the real speeds. It’s quite annoying, not to mention the lack of feature to change monitored devices adaptively.

Today I came across this nifty applet: netspeed at Gnomefiles. I’m very happy with it and meanwhile very regretful of overlooking such a handy stuff. It shows the real-time network up/down speed separately or as a sum, along with some beautiful icons. The most powerful feature is, it will automatically change to monitor different devices if you switch from one type of network to another (e.g. from wired to wireless), and the icon will also change accordingly. If you insist, of course, it can keep monitoring any certain device all the time. Besides, it has a Device Details window, decently showing some information about your network device and traffic.

Screenshot of netspeed applet

To install it in Ubuntu/Debian, just find it in synaptic or, using command line, type in the terminal:

sudo apt-get install netspeed

So, it’s time to say farewell to netmon-applet. :)

2007-11-12

用XeTeX处理中文LaTeX笔记

好久没写中文的Post了,今天记点关于中文LaTeX的东西。

要说也没想着“研究”这个。前两天LinuxToy上贴了一个从几个连载小说的 网站上往下抓书的脚本,正好LP以前曾经跟我说过郭敬明的《梦里花落知 多少》挺有意思的,说新浪读书有连载,由于不喜欢在新浪那儿一直翻一直翻 的,加上对郭这个人没什么好印象,就放着没动。今天想起来了,于是下载 了试了一下,结果发现至少新浪那个脚本,是相当的不好使──下回来的东西完全 就是一空白文件。

看了一下那脚本,发现有些Bug,而且缺少保留原来文章内容中的换行的功能,生 成的文件的字符编码也还是和网页一样的GB2312而非UTF-8。于是改了改,现在 像点样子了。文章内容以外的零七八碎的一概不留,格式也工整了不少, 也是UTF8的了。

有了整洁文本,一想,干脆上LaTeX转PDF吧。结果发现自己对中文LaTeX的认识还 停留在一年前的水平,就记着源文件得是GB编码的,用CJK包,字体也得用脚本一 个一个转,一句话,太麻烦了。上网一搜才发现,原来TeXLive2007带的XeTeX已 经可以很好的支持UTF-8编码的中文源文件而且字体也可以用系统中的中文字体了。 于是赶紧sudo apt-get install texlive-xetex了一把,写了个测试文件如下:

\documentclass[a4paper,10pt]{article}

\usepackage{fullpage}
\usepackage{fontspec}
\setromanfont{STSong}
\setsansfont{STKaiti}
\XeTeXlinebreaklocale "zh"
\XeTeXlinebreakskip = 0pt plus 1pt

\setlength\parindent{20pt}
\setlength\parskip{10pt}

\usepackage{setspace}
\onehalfspacing

\title{\sf 梦里花落知多少}
\author{\sf 郭敬明}
\date{}

\begin{document}

\maketitle

闻婧打电话过来的时候我正在床上睡得格外欢畅,左翻右跳地穷伸懒腰,觉
得我的床就是全世界。其实我的床也的确很大。我只有两个爱好,看电影和
睡觉,如果有人在我累得要死的时候还不让我睡觉那还不如一刀砍死我,那
样我一定心存感激。所以我理所当然地把床弄得往死里舒服,我曾经告诉我
妈我哪天嫁人了我也得把这床给背过去。

\ldots

\end{document}

xelatex一编译,出错了,说找不到lmodern,一搜apt-cache,发现原 来还有个包叫lmodern得装一下,这之后就基本一切太平了。

其实据说现在XeTeX在处理中英文混排时的间距和断行还没有当初CJK+CKJpunkt完 美。当然,我今天也没用得上那么复杂的源文件,等以后有机会了,而且估计那 时ubuntu里也会有0.997版的xetex(就不用自己编译了,否则现在的 0.996使不了zhspacing),就可以试试用XeTeX+zhspacing来完美的 处理中文LaTeX了。

感谢Ubuntu中文论坛里那个置顶贴,刚开始看时还觉得挺晕的看不懂写什 么呢,后来发现还是有点儿用的。最后郭小四及其Fans不用担心我会散布这个 Pdf版本的书(不过估计国内现在已经有不少盗版了吧),我这完全是在新浪逼迫 下的自娱自乐。

2007-11-03

Install Ubuntu using a minimal CD

If you have a very fast network connection, or you luckily have a mirror of the Ubuntu repositories in your local network, you may want to consider using this damn small installation CD. It’s less than 10 MB but works quite nicely. Not only the time spent on downloading a 700MB CD image but also the time burning such a image (it could be quite slow if you’re using a CD-RW) is saved. And more importantly, there is almost no need to update the system after installation, since all the packages are fetched directly from the server, which are already up-to-date.

The installation uses the same system as the alternative CD, but it will let you select a mirror from the official mirror list or assign a server address as you wish. After installing the basic system, it will also ask you before proceeding, which high-level system you want on your computer, e.g. an Ubuntu desktop, a Kubuntu desktop or a LAMP server etc.

BTW, I got the Gutsy CDs I booked online, while my system is already 7.10 for several weeks though.

Gutsy CDs