拈花 . 微笑

Leo Tzao's Blog

Very酷的桌面监控工具 Conky

今天也尝试了一下conky这个小工具,以前一直是用gkrellm的,它非常优秀,不过时间久了不由得想尝尝新。我的最近在桌面配置方面追求简洁,想gdesklet那种大家伙我是不用的,呵呵。

conky虽小巧简洁,但也可以配置得很酷,只是因为没有图形化配置工具,写配置文件是要花些时间了,还好官方网站有不少优秀的配置,可以从中借鉴修改:)

conky刚刚发布了新版本,我照例是追新,没有用ubuntu源里面的,而是自己编译了新的1.4.2版。

我自己是用了英文的,不过试验了一下,只要指定中文字体,conky的中文支持没有问题,这也是个好消息:)

conky的配置文件在家目录,~/.conkyrc ,不多说了,下面就贴上我的配置来吧:

background yes

use_xft yes
xftfont DeJaVu Sans Mono:size=7
xftalpha 0.8

out_to_console no

update_interval 2
total_run_times 0

own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

double_buffer yes

minimum_size 260 10
maximum_width 260

draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

stippled_borders 2
border_margin 4
border_width 1

default_color grey
default_shade_color black
default_outline_color black

alignment top_left
gap_x 5
gap_y 5

no_buffers yes
uppercase no

cpu_avg_samples 2
net_avg_samples 2

override_utf8_locale yes

use_spacer no

TEXT
${color #5b6dad}$nodename linux-$kernel (Ubuntu Dapper)${alignr}${time %T}

${color #5b6dad}System:
${color #5b6dad} Uptime:${color #7f8ed3} $uptime ${color #5b6dad}- Load:${color #7f8ed3} $loadavg
${color #5b6dad} CPU Frequency:${color #7f8ed3} $freq_dyn_g ${color #5b6dad} Maximum:${color #7f8ed3} $freq_g
${color #5b6dad} CPU Usage:${color #7f8ed3} $cpu% ${cpubar}
${color #000000}${cpugraph cpu0 32,260 000000 7f8ed3}
${color #5b6dad} RAM Usage:${color #7f8ed3} $mem/$memmax - $memperc% ${membar}
${color #5b6dad} Swap Usage:${color #7f8ed3} $swap/$swapmax - $swapperc% ${swapbar}
${color #5b6dad} Processes:${color #7f8ed3} $processes ${color #5b6dad}Running:${color #7f8ed3} $running_processes

${color #5b6dad}Networking:
${color #5b6dad}Address: ${color #7f8ed3}${addr eth0}${alignr}${color #5b6dad}TCP Connections: ${color #7f8ed3}${tcp_portmon 1 65535 count}
${color #5b6dad}Down:${color #7f8ed3} ${downspeed eth0} k/s${color #5b6dad}${offset 78}Up:${color #7f8ed3} ${upspeed eth0} k/s
${color #000000}${downspeedgraph eth0 32,125 000000 7f8ed3} ${color #000000}${upspeedgraph eth0 32,125 000000 7f8ed3}

${color #5b6dad}File Systems:
${color #5b6dad}/ ${color #7f8ed3}${fs_used /}/${fs_size /} ${color #7f8ed3}${fs_bar /}
${color #5b6dad}home ${color #7f8ed3}${fs_used /home/}/${fs_size /home/} ${color #7f8ed3}${fs_bar /home/}
${color #5b6dad}boot ${color #7f8ed3}${fs_used /boot/}/${fs_size /boot/} ${color #7f8ed3}${fs_bar /boot/}
${color #5b6dad}USBDISK ${color #7f8ed3}${fs_used /media/USBDISK/}/${fs_size /media/USBDISK/} ${color #7f8ed3}${fs_bar /media/USBDISK/}

${color #5b6dad}Top Processes:
${color #5b6dad}Name PID CPU% MEM%
${color #7f8ed3} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color #7f8ed3} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color #7f8ed3} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}

${color #5b6dad}Mem usage
${color #5b6dad}Name PID CPU% MEM%
${color #7f8ed3} ${top_mem name 1} ${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
${color #7f8ed3} ${top_mem name 2} ${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
${color #7f8ed3} ${top_mem name 3} ${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}

${color #5b6dad}Weather:
${color #7f8ed3}${execi 1800 /home/leo/scripts/weather/weather.sh}

里面的显示天气的脚本是从官方一位高人的脚本处得到的,只需要改一下城市的ID就可以工作。

我修改的天气脚本在 这里,显示北京天气的,下载后把mp3扩展名改为bz2,解压就可以了。

下面是一张我在fluxbox里面启动conky和gdeskcal(一个日历程序)的桌面效果图:


conky的官方地址 http://conky.sourceforge.net/ 里面有许多好的配置文件和脚本可以参考:)

在ubuntu-dapper上安装fluxbox──我的安装历程从BMP转到audacious

Comments

Anonymous Tuesday, November 28, 2006 6:54:18 AM

Comment marked as spam--awaiting moderation

Anonymous Thursday, December 7, 2006 4:32:44 AM

Jon writes: Hi,请给出你从那位高人那里得到的weather.sh脚本,谢谢! 6788789@163.com 很多人都想要这个!

天一先生 (Leo Tzao)leo_tzao Thursday, December 7, 2006 9:12:06 AM

楼上的您倒不客气:)

以前也有人和我问过这个问题,我重装系统以后就没用那个天气脚本了,也没备份它,不信看看我新发的桌面截图便知

至于脚本来源,conky官方的snapshot和配置文件样本里便有,我当初也是从那弄的,自己改一下城市代码便可工作,我建议您还是自己动手去官方弄一下吧^_^

Anonymous Sunday, June 12, 2011 1:37:13 PM

Анонімний writes: All people deserve good life and loan or small business loan will make it much better. Because people's freedom depends on money state.

Anonymous Saturday, July 16, 2011 3:30:33 AM

Анонимно writes: I had got a desire to begin my own organization, however I didn't earn enough of cash to do it. Thank heaven my mate suggested to use the personal loans. Therefore I used the car loan and realized my old dream.

Anonymous Thursday, September 22, 2011 5:04:36 AM

Анонімний writes: I will recommend not to hold off until you earn enough money to order all you need! You should take the home loans or commercial loan and feel yourself fine

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies

February 2012
S M T W T F S
January 2012March 2012
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29