注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

SanTT's Box

Working notes and some private diary

 
 
 

日志

 
 
关于我

有点懒....有点呆.....兴趣丰富.....三分热度....

网易考拉推荐

conky配置与安装  

2011-10-27 21:54:47|  分类: Linux System |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
装conky也是装了好久。一直都是用的默认的那个gnome-human
当中有很多出现了乱码,但有懒的折腾一直到了今天,上班无事把他给(完善)conky配置与安装 - SanT_Ta - 走走 停停 走走
写一篇日志文档记录下
以后搞不好还会换掉,漂亮的conky实在太多了

先秀一下conky吧
conky配置与安装 - SanT_Ta - 走走 停停 走走
 

安装开始

conky和conky-all两个必装程序。
系统 -> 系统管理 -> 新立德软件包管理器 -> 快速搜索 -> 输入conky
——选中conky和conky-all -> 用鼠标右键“标记”以便安装 -> 点击“应用“按钮开始安装。

命令行安装
sudo apt-get install aptitude python-statgrab ttf-droid hddtemp curl lm-sensors conky-all
sudo chmod u+s /usr/sbin/hddtemp
sudo sensors-detect

安装conky-color
下个conky_colors-5.1.2.tar.gz     tar -zxvf conky_colors-5.1.2.tar.gz;  cd conky_colors ;make;sodu make install

部份conky-colors命令参数选项介绍:
--lang 语言,5.1.2 版没有cn 中文选项,只能用默认的en 英语。
--theme 面板主题,有17项可选,gnome开头的是透明面板,shiki开头的是颜色面板
gnome-brave,gnome-carbonite, gnome-human(默认),gnome-noble,gnome-tribute,
gnome-wine,gnome-wise,shiki-brave,shiki-human, shiki-noble,shiki-wine,
shiki-wise,shiki-dust,dust, radiance,ambiance,elementary
--side 面板在桌面的位置 left 左, right 右(默认)
--ubuntu 显示LOGO,有9个LOGO可选,还可以在配置文件里自定义更多的LOGO
--fedora,--opensuse,--debian,--arch,--gentoo,--pardus,--xfce,--gnome
--cpu 显示CPU信息,双核CPU用2,四核用4,单核用1
--cputemp 显示CPU温度
--swap 显示swap缓存分区的信息
--updates 显示系统需要升级的软件包信息
--proc 显示资源占用情况排在前列的进程,3 显示3个进程(最多为10)
--clock 显示时钟和日期,有7种形式可选default,classic,slim,modern,lucky,digital,off
--calendar 显示月历
--nvidia 显示Nidia显卡信息,抱歉没有ATI 的选项
--hd 显示硬盘信息,有4中形式可选default,meerkat,mix,simple
--hdtemp1 显示第一个硬盘的温度,第2个sata硬盘为 --hdtemp2=sdb
--photord 随机显示幻灯片相册,默认使用的是系统桌面背景图片文件夹,可以在脚本 ~/.conkycolors/bin/conkyPhotoRandom 中把 source="/usr/share/backgrounds/" 修改为自定义的图片目录
--photo 仅固定显示一张图片,放在 /usr/share/backgrounds/ 内
--network 显示网络信息,可以指定使用 --eth 网卡设备,--wlan 无线设备,--ppp 拨号设备 (默认都是0)
--battery 显示电池信息
--unit 温度单位 C 摄氏 或 F 华氏
--bbcweather 显示BBC网站的天气信息
到 http://~news.~bbc.~co.~uk/weather/ (郁闷,因论坛屏蔽,请把网址中的~号去掉)输入你的城市拼音查询,
在打开的页面地址栏可看到4位数字,类似1586即是你的城市代码。(如下方桌面截图所示)
--yahooweather 显示YaHoo网站的天气信息
http://weather.yahoo.com/ 输入你的城市拼音查询,在打开的页面右边有个桔黄色的 RSS 按钮,点击它
在新打开的页面地址栏可看到一串英文和数字,类似CHXX0100即是你的城市代码。
--weather 显示weather网站的天气信息
http://www.weather.com/ 输入你的城市拼音查询,可查询到和YaHoo一样的类似CHXX0100的城市代码.
--rhythmbox 在多媒体栏显示Ubuntu自带的rhythmbox播放器的曲目信息。
有7中形式可选:default,cd,case,glassy,vinyl,oldvinyl,simple
还支持其他播放器:--covergloobus,--banshee,--exaile
--pidgin 可显示pidgin在线的聊天好友
--gmail --user=<username> --passwd=<password> 显示Gmail的新邮件信息

终端输入类似
conky-colors --lang=en --theme=gnome-human --side=right --ubuntu --cpu=2 --cputemp --swap --updates --proc=3 --clock=lucky --calendar --nvidia --hd=meerkat --hdtemp1=sda --photord --network --bbcweather=1586 --unit=C --weatherplus --rhythmbox=vinyl --pidgin --gmail --user=your_name --passwd=your_password
按照个人需要选项

在终端输入
conky -c ~/.conkycolors/conkyrc    已经可以看到成果咯

之后设置开机启动后就可以,每次开机就能启动咯
网上教程太多我也又开始犯懒了,而且很简单

安装大致就这样吧。
想要conky弄的漂亮,还是修改配置文件
下面是我的conkyrc

######################
# - Conky settings - #
######################
update_interval 1
total_run_times 0
net_avg_samples 1
cpu_avg_samples 1

imlib_cache_size 0
double_buffer yes
no_buffers yes

format_human_readable

#####################
# - Text settings - #
#####################
use_xft yes
xftfont Ubuntu:size=8
override_utf8_locale yes
text_buffer_size 2048

#############################
# - Window specifications - #
#############################
own_window_class Conky
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

alignment top_right
gap_x 25
gap_y 40
minimum_size 182 600
maximum_width 182

default_bar_size 60 8

#########################
# - Graphics settings - #
#########################
draw_shades no

default_color cccccc

color0 white
color1 E07A1F
color2 white

TEXT
${font Ubuntu:style=Bold:size=8}SYSTEM $stippled_hr${font}
##############
# - SYSTEM - #
##############
${color0}${voffset 6}${font OpenLogos:size=19}u${font}${color}${goto 32}${voffset -14}Kernel:  ${alignr}${color2}${kernel}${color}
${goto 32}uptime: ${alignr}${color2}${uptime}${color}
# |--UPDATES
${goto 32}Updates: ${alignr}${font Ubuntu:style=Bold:size=8}${color1}${execi 360 aptitude search "~U" | wc -l | tail}${color}${font} ${color2}Packages${color}
# |--CPU
${offset 1}${color0}${font Poky:size=16}P${font}${offset -19}${voffset 9}${cpubar cpu0 4,18}${color}${voffset -16}${goto 32}CPU1: ${font Ubuntu:style=Bold:size=8}${color1}${cpu cpu1}%${font} ${alignr}${font Ubuntu:style=Bold:size=8}${color1}${execi 30 sensors | grep 'Core 0' | cut -c15-16}°C${color}${font}  ${color2}${cpugraph cpu1 8,50 CE5C00 E07A1F}${color}
${goto 32}CPU2: ${font Ubuntu:style=Bold:size=8}${color1}${cpu cpu2}%${font} ${alignr}${font Ubuntu:style=Bold:size=8}${color1}${execi 30 sensors | grep 'Core 1' | cut -c15-16}°C${color}${font}  ${color2}${cpugraph cpu2 8,50 CE5C00 E07A1F}${color}
# |--MEM
${color0}${font Poky:size=16}M${font}${color}${goto 32}${voffset -7}RAM: ${font Ubuntu:style=Bold:size=8}${color1}$memperc%${color}${font}
${offset 1}${voffset 2}${color0}${membar 4,18}${color}${goto 32}${voffset -2}F: ${font Ubuntu:style=Bold:size=8}${color2}${memeasyfree}${color}${font} U: ${font Ubuntu:style=Bold:size=8}${color2}${mem}${color}${font}
# |--SWAP
${voffset 2}${color0}${font Poky:size=14}s${font}${color}${voffset -8}${goto 32}SWAP: ${font Ubuntu:style=Bold:size=8}${color1}${swapperc}%${color}${font}
${voffset 4}${offset 1}${color0}${swapbar 4,18}${color}${voffset -4}${goto 32}F: ${font Ubuntu:style=Bold:size=8}${color2}$swapmax${color}${font} U: ${font Ubuntu:style=Bold:size=8}${color2}$swap${color}${font}
# |--BATTERY
${color0}${font Poky:size=13}E${font}${color}${goto 32}${voffset -5}Battery: ${font Ubuntu:style=Bold:size=8}${color1}${battery_percent BAT1}%${color}${font} ${alignr}${color2}${battery_bar 8,60 BAT1}${color}
# |--PROC
${voffset 2}${color0}${font Poky:size=15}a${font}${color}${goto 32}${voffset -10}Processes: ${color2}${alignr 13}CPU${alignr}RAM${color}
${voffset -1}${goto 42}${color2}${top name 1}${color}${font Ubuntu:style=Bold:size=8}${color1} ${goto 126}${top cpu 1}${alignr }${top mem 1}${color}${font}
${voffset -1}${goto 42}${color2}${top name 2}${color}${font Ubuntu:style=Bold:size=8}${color1} ${goto 126}${top cpu 2}${alignr }${top mem 2}${color}${font}
${voffset -1}${goto 42}${color2}${top name 3}${color}${font Ubuntu:style=Bold:size=8}${color1} ${goto 126}${top cpu 3}${alignr }${top mem 3}${color}${font}
#############
# - CLOCK - #
#############
${voffset 4}${font simhei:style=Bold:size=9}DATE $stippled_hr${font}
${voffset 4}${goto 32}${font clockfaces:size=40}O${font}
${voffset -34}${goto 41}${font zoraclockH:size=30}${color2}${execpi 120 /usr/share/conkycolors/bin/conkyClock hour}${color}${font}
${voffset -39}${goto 35}${font zoraclockM:size=40}${color2}${execpi 60 /usr/share/conkycolors/bin/conkyClock minute}${color}${font}
${goto 100}${voffset -45}${font Droid Sans:style=Bold:size=15}${color2}${time %H}${time :%M}${time :%S}${color}${font}
${goto 100}${voffset -2}${goto 100}${font simhei:style=Bold:size=9}${color2}${time %A}${color}${font}
${goto 100}${voffset 5}${font simhei:style=Bold:size=9}${time %Y年%b%d日}${font}${voffset 8}
################
# - CALENDAR - #
################
${voffset -2}${color0}${font Poky:size=16}D${font}${voffset -8}${font Droid Sans:style=Bold:size=7}${offset -17}${voffset 4}${time %d}${font}${color}${voffset -1}${font simhei:size=9}${execpi 300 DJS=`date +%_d`; cal -h|sed '2,7!d'| sed '/./!d' | sed 's/^/${goto 32} /'| sed 's/$/ /' | sed 's/^/ /' | sed /" $DJS "/s/" $DJS "/" "'${font simhei:style=Bold:size=9}${voffset -1}${color1} '"$DJS"'${color}${font simhei:size=9}'" "/}${voffset -1}
#############
# - PHOTO - #
#############
# For a working photo widget you need to specify a file or directory in conkyPhoto or conkyPhotoRandom script in  /home/santa/.conkycolors/bin /usr/share/conkycolors/bin folders
${voffset 4}${font Ubuntu:style=Bold:size=8}PHOTO $stippled_hr${font}
${execi 60 /home/santa/.conkycolors/bin/conkyPhotoRandom}${image /tmp/conkyPhoto.png -s 175x120 -p 4,413}${voffset 114}
##########
# - HD - #
##########
${voffset 4}${font Ubuntu:style=Bold:size=8}HD $stippled_hr${font}
# |--HDTEMP1
  ${voffset 4}${color0}${font Weather:size=15}y${font}${color}${voffset -3}${goto 32}Temperature: ${font Ubuntu:style=Bold:size=8}${color1}${execi 120 hddtemp /dev/sda -n --unit=C}°C${color}${font}${alignr}${color2}/dev/sda${color}
${execpi 30 /usr/share/conkycolors/bin/conkyHD2}
####################
# - YAHOOWEATHER - #
####################
# http://weather.yahoo.com/
${voffset 4}${font Ubuntu:style=Bold:size=8}WEATHER $stippled_hr${font}
${goto 12}${voffset 4}${color0}${font Weather:size=24}y${font}${color}
${voffset -29}${goto 32}Temperature: ${font Ubuntu:style=Bold:size=8}${color1}${execi 600 /usr/share/conkycolors/bin/conkyYahooWeather cur CHXX0116 c}°C${color}${font}
${goto 32}${voffset -2}${color0}${font VariShapes Solid:size=8}q${font}${color}${font Ubuntu:style=Bold:size=8}${color1}${execi 600 /usr/share/conkycolors/bin/conkyYahooWeather min CHXX0116 c}°C${color}${font}  ${voffset -2}${color0}${font VariShapes Solid:size=8}Q${font}${color}${voffset -1}${font Ubuntu:style=Bold:size=8}${color1}${execi 600 /usr/share/conkycolors/bin/conkyYahooWeather max CHXX0116 c}°C${color}${font}
santa@sanTT-ThinkPad:~/.conkycolors$ vim conkyrc
santa@sanTT-ThinkPad:~/.conkycolors$ cat conkyrc
######################
# - Conky settings - #
######################
update_interval 1
total_run_times 0
net_avg_samples 1
cpu_avg_samples 1

imlib_cache_size 0
double_buffer yes
no_buffers yes

format_human_readable

#####################
# - Text settings - #
#####################
use_xft yes
xftfont Ubuntu:size=8
override_utf8_locale yes
text_buffer_size 2048

#############################
# - Window specifications - #
#############################
own_window_class Conky
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

alignment top_right
gap_x 25
gap_y 40
minimum_size 182 600
maximum_width 182

default_bar_size 60 8

#########################
# - Graphics settings - #
#########################
draw_shades no

default_color cccccc

color0 white
color1 E07A1F
color2 white

TEXT
${font Ubuntu:style=Bold:size=8}SYSTEM $stippled_hr${font}
##############
# - SYSTEM - #
##############
${color0}${voffset 6}${font OpenLogos:size=19}u${font}${color}${goto 32}${voffset -14}Kernel:  ${alignr}${color2}${kernel}${color}
${goto 32}uptime: ${alignr}${color2}${uptime}${color}
# |--UPDATES
${goto 32}Updates: ${alignr}${font Ubuntu:style=Bold:size=8}${color1}${execi 360 aptitude search "~U" | wc -l | tail}${color}${font} ${color2}Packages${color}
# |--CPU
${offset 1}${color0}${font Poky:size=16}P${font}${offset -19}${voffset 9}${cpubar cpu0 4,18}${color}${voffset -16}${goto 32}CPU1: ${font Ubuntu:style=Bold:size=8}${color1}${cpu cpu1}%${font} ${alignr}${font Ubuntu:style=Bold:size=8}${color1}${execi 30 sensors | grep 'Core 0' | cut -c15-16}°C${color}${font}  ${color2}${cpugraph cpu1 8,50 CE5C00 E07A1F}${color}
${goto 32}CPU2: ${font Ubuntu:style=Bold:size=8}${color1}${cpu cpu2}%${font} ${alignr}${font Ubuntu:style=Bold:size=8}${color1}${execi 30 sensors | grep 'Core 1' | cut -c15-16}°C${color}${font}  ${color2}${cpugraph cpu2 8,50 CE5C00 E07A1F}${color}
# |--MEM
${color0}${font Poky:size=16}M${font}${color}${goto 32}${voffset -7}RAM: ${font Ubuntu:style=Bold:size=8}${color1}$memperc%${color}${font}
${offset 1}${voffset 2}${color0}${membar 4,18}${color}${goto 32}${voffset -2}F: ${font Ubuntu:style=Bold:size=8}${color2}${memeasyfree}${color}${font} U: ${font Ubuntu:style=Bold:size=8}${color2}${mem}${color}${font}
# |--SWAP
${voffset 2}${color0}${font Poky:size=14}s${font}${color}${voffset -8}${goto 32}SWAP: ${font Ubuntu:style=Bold:size=8}${color1}${swapperc}%${color}${font}
${voffset 4}${offset 1}${color0}${swapbar 4,18}${color}${voffset -4}${goto 32}F: ${font Ubuntu:style=Bold:size=8}${color2}$swapmax${color}${font} U: ${font Ubuntu:style=Bold:size=8}${color2}$swap${color}${font}
# |--BATTERY
${color0}${font Poky:size=13}E${font}${color}${goto 32}${voffset -5}Battery: ${font Ubuntu:style=Bold:size=8}${color1}${battery_percent BAT1}%${color}${font} ${alignr}${color2}${battery_bar 8,60 BAT1}${color}
# |--PROC
${voffset 2}${color0}${font Poky:size=15}a${font}${color}${goto 32}${voffset -10}Processes: ${color2}${alignr 13}CPU${alignr}RAM${color}
${voffset -1}${goto 42}${color2}${top name 1}${color}${font Ubuntu:style=Bold:size=8}${color1} ${goto 126}${top cpu 1}${alignr }${top mem 1}${color}${font}
${voffset -1}${goto 42}${color2}${top name 2}${color}${font Ubuntu:style=Bold:size=8}${color1} ${goto 126}${top cpu 2}${alignr }${top mem 2}${color}${font}
${voffset -1}${goto 42}${color2}${top name 3}${color}${font Ubuntu:style=Bold:size=8}${color1} ${goto 126}${top cpu 3}${alignr }${top mem 3}${color}${font}
#############
# - CLOCK - #
#############
${voffset 4}${font simhei:style=Bold:size=9}DATE $stippled_hr${font}
${voffset 4}${goto 32}${font clockfaces:size=40}O${font}
${voffset -34}${goto 41}${font zoraclockH:size=30}${color2}${execpi 120 /usr/share/conkycolors/bin/conkyClock hour}${color}${font}
${voffset -39}${goto 35}${font zoraclockM:size=40}${color2}${execpi 60 /usr/share/conkycolors/bin/conkyClock minute}${color}${font}
${goto 100}${voffset -45}${font Droid Sans:style=Bold:size=15}${color2}${time %H}${time :%M}${time :%S}${color}${font}
${goto 100}${voffset -2}${goto 100}${font simhei:style=Bold:size=9}${color2}${time %A}${color}${font}
${goto 100}${voffset 5}${font simhei:style=Bold:size=9}${time %Y年%b%d日}${font}${voffset 8}
################
# - CALENDAR - #
################
${voffset -2}${color0}${font Poky:size=16}D${font}${voffset -8}${font Droid Sans:style=Bold:size=7}${offset -17}${voffset 4}${time %d}${font}${color}${voffset -1}${font simhei:size=9}${execpi 300 DJS=`date +%_d`; cal -h|sed '2,7!d'| sed '/./!d' | sed 's/^/${goto 32} /'| sed 's/$/ /' | sed 's/^/ /' | sed /" $DJS "/s/" $DJS "/" "'${font simhei:style=Bold:size=9}${voffset -1}${color1} '"$DJS"'${color}${font simhei:size=9}'" "/}${voffset -1}
#############
# - PHOTO - #
#############
# For a working photo widget you need to specify a file or directory in conkyPhoto or conkyPhotoRandom script in  /home/santa/.conkycolors/bin /usr/share/conkycolors/bin folders
${voffset 4}${font Ubuntu:style=Bold:size=8}PHOTO $stippled_hr${font}
${execi 60 /home/santa/.conkycolors/bin/conkyPhotoRandom}${image /tmp/conkyPhoto.png -s 175x120 -p 4,413}${voffset 114}
##########
# - HD - #
##########
#${voffset 4}${font Ubuntu:style=Bold:size=8}HD $stippled_hr${font}
# |--HDTEMP1
#  ${voffset 4}${color0}${font Weather:size=15}y${font}${color}${voffset -3}${goto 32}Temperature: ${font Ubuntu:style=Bold:size=8}${color1}${execi 120 hddtemp /dev/sda -n --unit=C}°C${color}${font}${alignr}${color2}/dev/sda${color}
#${execpi 30 /usr/share/conkycolors/bin/conkyHD2}

########## - BBCWEATHER - ##########
##
#### 标题栏 ###
${voffset -8}${font simhei:style=Bold:size=9} WEATHER $stippled_hr${font}
#### 判断英文替换云图(17个)###
${goto 5}${voffset 4}${font weather:style=Bold:size=22}${color0}${execi 600 curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/1713/ObservationsRSS.xml" | sed -n '/HKT/n;s/\. .*$//p' | sed 's/sunny/a/;t w-0;s/sunny intervals/b/;t w-0;s/white cloud/d/;t w-0;s/grey cloud/e/;t w-0;s/light rain/g/;t w-0;s/light rain shower/g/;t w-0;s/heavy rain/h/;t w-0;s/heavy rain shower/h/;t w-0;s/light snow/j/;t w-0;s/light snow shower/j/;t w-0;s/sleet/k/;t w-0;s/sleet shower/k/;t w-0;s/clear sky/l/;t w-0;s/partly cloudy/m/;t w-0;s/hail shower/v/;t w-0;:w-0;'}${color}${font}
#### 当前温度 ###
${goto 32}${voffset -29}温度 Temperature: ${font Droid Sans:style=Bold:size=8}${color1}${execi 600 curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/1713/ObservationsRSS.xml" | sed -n '/Temperature/p' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/^.*Temperature: //' | sed 's/ C.*$//'}°C${color}${font}
#### 最高温度 最低温度 ###
${goto 32}${voffset 0}${color0}${font VariShapes Solid:size=8}q${font}${color}${color2}最高 ${execi 600 curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/1713/Next3DaysRSS.xml" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/<[^>]*>//g' | sed 's/^.*Max Temp: //' | sed 's/ C.*$//'}°C${color} ${voffset -2}${color0}${font VariShapes Solid:size=8}Q${font}${voffset -1}${color}${color2}最低 ${execi 600 curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/1586/Next3DaysRSS.xml" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/<[^>]*>//g' | sed 's/^.*Min Temp: //' | sed 's/ C.*$//'}°C${color}
#### 温度计标志 ### 地球标志 ###
${goto 165}${voffset -23}${color0}${font Weather:size=20}y${font}${color}${goto 175}${voffset -18}${font Martin Vogel's Symbols:size=20}m${font}
#### 最高温度 最低温度 ###
${goto 32}${voffset 0}${color0}${font VariShapes Solid:size=8}q${font}${color}${color2}最高 ${execi 600 curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/1713/Next3DaysRSS.xml" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/<[^>]*>//g' | sed 's/^.*Max Temp: //' | sed 's/ C.*$//'}°C${color} ${voffset -2}${color0}${font VariShapes Solid:size=8}Q${font}${voffset -1}${color}${color2}最低 ${execi 600 curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/1713/Next3DaysRSS.xml" | sed -n '/Max Temp/p' | sed '2!d' | sed -e 's/&#xB0;/ /g' | sed -e 's/&#37;/%/g' | sed 's/<[^>]*>//g' | sed 's/^.*Min Temp: //' | sed 's/ C.*$//'}°C${color}
#### 温度计标志 ### 地球标志 ###
${goto 165}${voffset -23}${color0}${font Weather:size=20}y${font}${color}${goto 175}${voffset -18}${font Martin Vogel's Symbols:size=20}m${font}
#### 相对湿度 进度条 ### 冒烟茶杯标志 ###
#${goto 4}${voffset -10}${color0}${font Martin Vogel's Symbols:size=18}K${font}${color}${goto 32}${voffset -12}相对湿度 Relative Humidity:
#${goto 38}${voffset 2}${font Droid Sans:style=Bold:size=8}${color1}${execi 600 curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/1586/ObservationsRSS.xml.xml" | sed -n '/Humidity/p' | sed 's/\(.*\)Humidity: \(.*\)&#37\;\(.*\)/\2/'}%${color}${font}  ${color1}${execbar curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/1586/ObservationsRSS.xml.xml" | sed -n '/Humidity/p' | sed 's/\(.*\)Humidity: \(.*\)&#37\;\(.*\)/\2/'}${color}${font}
#### 风向 风速 ### 旗帜标志 ###
${goto 0}${voffset 0}${color0}${font Webdings:size=24}w${font}${color}${goto 32}${voffset -14} Wind Direction: ${font Arrows:style=Bold:size=18}${color2}${voffset -10}${execi 600 curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/1713/ObservationsRSS.xml" | sed -n '/Wind Direction/p' | sed 's/\(.*\)Wind Direction: \(.*\), Wind Speed\(.*\)/\2/' | sed 's/SSW/b/;t w-0;s/WSW/d/;t w-0;s/WNW/f/;t w-0;s/NNW/h/;t w-0;s/NNE/j/;t w-0;s/ENE/l/;t w-0;s/ESE/n/;t w-0;s/SSE/p/;t w-0;s/SW/c/;t w-0;s/NW/g/;s/NE/k/;t w-0;s/SE/o/;t w-0;t w-0;s/S/a/;t w-0;s/W/e/;t w-0;s/N/i/;t w-0;s/E/m/;t w-0;:w-0;'}${color}${font}
${goto 32}${voffset 4} Wind Speed: ${font Droid Sans:style=Bold:size=8}${color1}${execi 600 curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/1713/ObservationsRSS.xml" | sed -n '/Wind Speed/p' | sed 's/\(.*\)Wind Speed: \(.*\)mph,\(.*\)/\2/'}${color}${font} mph/h
#### 大气压 ### 眼睛标志 ###
${goto 0}${voffset 0}${color0}${font PizzadudeBullets:size=24}1${font}${color}${goto 32}${voffset -12} Pressure: ${font simhei:style=Bold:size=8}${color2}${execi 600 curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/1586/ObservationsRSS.xml" | sed -n '/Pressure/p' | sed 's/\(.*\)Pressure: \(.*\), Visibility\(.*\)/\2/' | sed 's/mb,/ mb兆帕/;s/ rising/高压/;s/ falling/低压/;'}${color}${font}
#### 能见度 ###
${goto 32}${voffset 2} Visibility: ${font simhei:style=Bold:size=8}${color1}${execi 600 curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/1586/ObservationsRSS.xml" | sed -n '/Visibility/p' | sed 's/\(.*\)Visibility: \(.*\)<\/description>\(.*\)/\2/' | sed 's/Good/好/;t w-0;s/Very good/很好/;t w-0;s/Poor/差/;t w-0;s/Very poor/很差/;t w-0;s/Moderate/中等/;t w-0;s/Fog/有雾/;t w-0;:w-0;'}${color}${font}
#### 日出 日落 ###
${goto 4}${voffset 2}${font simhei:style=Bold:size=8}${color2}${execi 600 curl -s --connect-timeout 30 "http://newsrss.bbc.co.uk/weather/forecast/1713/Next3DaysRSS.xml" | sed -n '/Sunrise/p' | sed 's/\(.*\)Sunrise: \(.*\)<\/description>\(.*\)/Sunrise: \2/' | sed '1!d' | sed 's/Sunrise: /日出 Sunrise: /;s/Sunset: /日落 Sunset: /;s/HKT//;s/HKT//;s/\,//;'}${color}${font}

由于我的是笔记本屏幕有限啊所以去掉了些。按个人需要啦。

很多我都搬了
http://forum.ubuntu.org.cn/viewtopic.php?t=313031
写的超详细,绝对的大神哦。我也是按着这里面做的。另外整理下只是给自己留个纪念
  评论这张
 
阅读(3389)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017