感谢支持
我们一直在努力

Ubuntu 10.04下Conky安装配置笔记

Conky是一个建设在X-window之上的系统监视工具,它占用系统资源非常小而功能却非常强大,如果你懂得shell编程,那么conky的功能可 以说是无所不能了。同时,Conky是在根窗口上绘制界面,因此本身就支持透明,可以和桌面完美地结合在一起,如果你愿意,Conky也可以以窗口的形式运行。


当然,即使你不懂shell,根据下面的教程,你也能一步步学会Ubuntu 10.04下安装配置Conkey。


1、获取conky。


sudo apt-get install conky


Ubuntu 10.04下Conky安装配置笔记

2、配置conky


Conky 安装后不会为当前用户创建配置文件,而是使用系统级默认配置文件,这时候需要使用下列命令手动生成当前用户的配置文件:


zcat /usr/share/doc/conky/examples/conkyrc.sample.gz > ~/.conkyrc


Ubuntu 10.04下Conky安装配置笔记也许你会发现找不到这个文件,这大概是版本不同的原因。不过还好,一般情况下这个路径下只有这一个压缩文件。

.终端输入:


代码:
gedit ~/.conkyrc


把下面的内容复制到刚才打开的文件中。


background yes
use_xft yes
xftfont Zecton:size=8
xftalpha 0.5
update_interval 1.0
total_run_times 0
double_buffer yes
no_buffers no
own_window yes
own_window_transparent yes
own_window_type override
own_window_hints undecorate,sticky,skip_taskbar,skip_pager
minimum_size 500 5
maximum_width 200
draw_shades yes
draw_outline no
draw_borders no
default_color lightgrey
alignment top_right
gap_x 15
gap_y 50
uppercase no
override_utf8_locale yes


TEXT
${color white} ${font PizzaDude Bullets:size=16}V${font :size=10}   Date&Time $hr $font $color
${goto 1000}${time %l:%M}${font}${time %p}
${time %A, %e %B %Y}


${color white}${font OpenLogos:size=18} I${font :size=10}   SYSTEM $hr $font
$color $font$sysname: ${alignr} $kernel ($machine)
$color Battery: ${alignr}$battery_time


${color white} ${font StyleBats:size=16}V${font :size=10}   CPU $hr $font $color
$color ${font}CPU@${freq}MHz: ${cpu cpu1}% ${alignr}${cpubar cpu1 8,60}
$color ${top name 1} $alignr ${top cpu 1}%
$color ${top name 2} $alignr ${top cpu 2}%


${color white}${font StyleBats:size=16}E${font :size=10}   MEMORY $hr $font $color
${color}${font}RAM: $mem/$memmax $alignr $memperc%
$color ${membar}
${color}${font}Swap: $swap/$swapmax $alignr $swapperc%
$color ${swapbar}
$color ${top_mem name 1} $alignr ${top_mem mem 1}%
$color ${top_mem name 2} $alignr ${top_mem mem 2}%


${color white} ${font PizzaDude Bullets:size=16}K${font :size=10}   HDD $hr $font $color
$color root: ${fs_used /}/${fs_size /} $alignr ${fs_free_perc /}%
$color ${fs_bar /}
$color home: ${fs_used /home}/${fs_size /home} $alignr ${fs_free_perc /home}%
$color ${fs_bar /home}
$color windows: ${fs_used /media/sda1}/${fs_size /media/sda1} $alignr ${fs_free_perc /media/sda1}%
$color ${fs_bar /home}
$color stuff: ${fs_used /media/sda5}/${fs_size /media/sda5} $alignr ${fs_free_perc /media/sda5}%
$color ${fs_bar /home}


${color white} ${font PizzaDude Bullets:size=16}@${font :size=10}   NETWORK $hr $font $color
$color Local IP: $alignr${addr wlan0}
$color Public IP: $alignr${execi 1 ~/.conky/ip.sh}
$color Download: ${downspeedf wlan0} KB/s $alignr ${totaldown wlan0}
$color Upload: ${upspeedf wlan0} KB/s $alignr ${totalup wlan0}


${color white} ${font Arial Black:size=16}@${font :size=10}   GMAIL $font $color${alignc}${execi 60 ~/.conky/gmail.sh}


${color white} ${font PizzaDude Bullets:size=16}@${font :size=10}   Weather $hr $font $color
$color Skies are: ${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EFTP cloud_cover}
$color Winds from the: ${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EFTP wind_dir}
$color Winds speed: ${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EFTP wind_speed} km/h
$color Humidity: ${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EFTP humidity}% relative humidity
$color Temperature: ${alignr}${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EFTP temperature}C


启动,在终端中输入


conky


打开看看效果(点击看大图):


Ubuntu 10.04下Conky安装配置笔记

赞(0) 打赏
转载请注明出处:服务器评测 » Ubuntu 10.04下Conky安装配置笔记
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏