linux 桌面时钟
? 生成桌面时钟的原理是,通过conky来解析对应rc 文件,最终显示到桌面。
?
生成~/.conkyrc文件:
?
use_xft yesxftfont 123:size=8xftalpha 0.1update_interval 1total_run_times 0own_window yesown_window_type overrideown_window_transparent yesown_window_hints undecorated,below,sticky,skip_taskbar,skip_pagerdouble_buffer yesminimum_size 200 200maximum_width 400draw_shades nodraw_outline nodraw_borders nodraw_graph_borders nodefault_color whitedefault_shade_color reddefault_outline_color greenalignment top_rightgap_x 50gap_y 80no_buffers yesuppercase nocpu_avg_samples 2net_avg_samples 1override_utf8_locale yesuse_spacer rightTEXT${voffset 10}${color EAEAEA}${font GE Inspira:pixelsize=60}${time %H:%M}${font}${voffset -35}${offset 10}${color FFA300}${font GE Inspira:pixelsize=21}${time %d} ${voffset -15}${color EAEAEA}${font GE Inspira:pixelsize=11}${time %B} ${time %Y}${font}${voffset 24}${font GE Inspira:pixelsize=29}${offset -90}${time %A}${font}#${voffset 1}${offset 12}${font Ubuntu:pixelsize=10}${color FFA300}HD ${offset 9}$color${fs_free /} / ${fs_size /}${offset 30}${color FFA300}RAM ${offset 9}$color$mem / $memmax${offset 30}${color FFA300}CPU ${offset 9}$color${cpu cpu0}%?
输入命令来执行和解析conkyrc文件:
conky -c ~/.conkyrc &
?
对应rc文件参考:
http://www.osmsg.com/2011/05/conky-themes/
?
conkyrc语法:
http://conky.sourceforge.net/config_settings.html