看着conky挺好玩的,按照网上的自己写了个,虽然不是很华丽。。。
效果:
下边是代码.conkyrc
#avoid flicker
double_buffer yes
no_buffers yes
#own window to run simultanious 2 or more conkys
own_window yes
own_window_transparent yes
own_window_type normal
own_window_hints undecorate,sticky,skip_taskbar,skip_pager
#borders
#draw_borders no
border_margin 1
maximum_width 350
#shades
draw_shades no
#draw_graph_borders yes
#draw_borders yes
#position
gap_x 930
gap_y 0
alignment top_left
#behaviour
update_interval 1
#colour
default_color bfbfbf
#default_shade_color 000000
own_window_colour 4c4c4c
#font
use_xft yes
xftfont Wenquanyi Bitmap Song:pixelsize=12
#xftfont VeraSansYuanTi:pixelsize=14
# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes
#to prevent window from moving
use_spacer no
minimum_size 1268 0
#mpd
mpd_host shaiya
mpd_port 6600
# ${offset -22}
TEXT
${voffset -1} 内核: ${color dcff82}${font}${kernel}${color} 开机时间: ${color dcff82}${font}${uptime_short} ${color}
${voffset -1}
${voffset -1} CPU使用: ${color dcff82}${font}${cpu}% ${color}${cpubar}
${voffset -1} 运行进程数: ${color dcff82}${font}${processes} ${color} 活跃进程数: ${color dcff82}${font}${running_processes} ${color}
${voffset -1} 内存使用: ${color dcff82}$mem/$memmax - $memperc% ${color dcff82}${membar}${color}
${voffset -1} 交换空间: ${color dcff82}$swap/$swapmax - $swapperc% ${color dcff82}${swapbar}${color}
${voffset -1} 硬盘 I/O: ${color dcff82}${font}${diskio} ${color}
${voffset -1} 网络使用: ${color dcff82}${font}${downspeed eth0} Kb/s ${color} ${totaldown eth0} 下行 ${color dcff82}${font}${upspeed eth0} Kb/s ${color} ${totalup eth0} 上行
${voffset -1} 文件系统: ${color #dcff82}
${voffset -1} ${color}/ $color${fs_used /}/${fs_size /} ${color #dcff82}${fs_bar /}${color}
${voffset -1} ${color}/home $color${fs_used /home}/${fs_size /home} ${color #dcff82}${fs_bar /home}${color}
${voffset -1} 城 市: 郑州
${voffset -1} 今天天气:${color #dcff82}${execi 7200 python ~/.conky/getweather.py}${color}
${voffset -1} 明天天气:${color #dcff82}${execi 7200 python ~/.conky/getweathert.py}${color}
${voffset -1} 城 市: 南阳
${voffset -1} 今天天气:${color #dcff82}${execi 7200 python ~/.conky/homeget.py}${color}
${voffset -1} 明天天气:${color #dcff82}${execi 7200 python ~/.conky/homegett.py}${color}
下边的修改别人的一个有关天气的脚本