首页 > linux > conky配置文件

conky配置文件

2012年12月2日 发表评论 阅读评论

conky是linux下一个可定制化程度很高的系统监视工具,这里有我用的一个简单的配置文件

内容放在用户根目录下的.conkyrc中。要用到的第三方工具:hddtmp,sensors,获取硬盘和cpu的温度.

# Conky settings #
background yes
update_interval 1

cpu_avg_samples 1
net_avg_samples 1

override_utf8_locale yes

double_buffer yes
no_buffers yes

text_buffer_size 2048
#imlib_cache_size 0

temperature_unit fahrenheit

# Window specifications #

own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below

border_inner_margin 0
border_outer_margin 0

minimum_size 200 100
maximum_width 0

alignment tr
gap_x 3
gap_y 23

# Graphics settings #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes

# Text settings #
use_xft yes
xftfont WenQuanYi Zen Hei:size=8
#xftfont Monospace:size=8
#xftfont :size=8
xftalpha 0.5

uppercase no

temperature_unit celsius

default_color FFFFFF

# Lua Load #
#lua_load ~/.conky/clock_rings.lua
#lua_draw_hook_pre clock_rings

TEXT
${color FF6600}${font WenQuanYi Zen Hei:size=12}系统运行时间: ${uptime_short}
${color FF6600}${font WenQuanYi Zen Hei:size=12}总进程数: ${processes}
${hr}
${color FF6600}${font WenQuanYi Zen Hei:size=10}计算机名字:${nodename}
${color FF6600}${font WenQuanYi Zen Hei:size=10}系统版本:${pre_exec cat /etc/issue.net} $machine
${color FF6600}${font WenQuanYi Zen Hei:size=10}内核版本: ${kernel}
${color FF6600}${font WenQuanYi Zen Hei:size=10}${time %b%d日星期%a}  ${time %H:%M:%S}
${color FF6600}${hr}
${color FF6600}${font WenQuanYi Zen Hei:size=12}CPU ${execi 30 expr `cat /sys/class/thermal/thermal_zone0/temp` / 1000}°C
${hr}
${color FF6600}${font WenQuanYi Zen Hei:size=10}CPU平均:${color #FF001B}${cpu cpu0}%${goto 140}${color #05FF00}${cpubar cpu0}
${color FF6600}${font WenQuanYi Zen Hei:size=10}CPU1:${color #FF001B}${cpu cpu1}%${goto 140}${color #05FF00}${cpubar cpu1}
${color FF6600}${font WenQuanYi Zen Hei:size=10}CPU2:${color #FF001B}${cpu cpu2}%${goto 140}${color #05FF00}${cpubar cpu2}
${color FF6600}${font WenQuanYi Zen Hei:size=10}CPU3:${color #FF001B}${cpu cpu3}%${goto 140}${color #05FF00}${cpubar cpu3}
${color FF6600}${font WenQuanYi Zen Hei:size=10}CPU4:${color #FF001B}${cpu cpu4}%${goto 140}${color #05FF00}${cpubar cpu4}
${color FF6600}${hr}
${color FF6600}${font WenQuanYi Zen Hei:size=12}内存
${hr}
${color FF6600}${font WenQuanYi Zen Hei:size=10}MEM:${mem}
${color FF6600}${font WenQuanYi Zen Hei:size=10}MAXMEM:${memmax}
${color FF6600}${font WenQuanYi Zen Hei:size=10}占用比例:${memperc}%
${color FF6600}${font WenQuanYi Zen Hei:size=10}SWAP:${swap}:${swapperc}
${hr}
${color FF6600}${font WenQuanYi Zen Hei:size=12}硬盘  ${font WenQuanYi Zen Hei:size=12}${color FF6600}温度:${color #FF001B}${execi 30 nc localhost 7634|cut -d'|' -f 4}°C${color FF6600}${font}
${hr}
${color FF6600}${font WenQuanYi Zen Hei:size=10}读写速度:${color #FF001B}${diskio}
${color FF6600}${font WenQuanYi Zen Hei:size=10}根:${fs_used_perc /}%${goto 80}${fs_size /}${goto 140}${fs_bar /}
${color FF6600}${font WenQuanYi Zen Hei:size=10}boot:${fs_used_perc /boot}%${goto 80}${fs_size /boot}${goto 140}${fs_bar /boot}
${color FF6600}${font WenQuanYi Zen Hei:size=10}home:${fs_used_perc /home}%${goto 80}${fs_size /home}${goto 140}${fs_bar /home}
${color FF6600}${font WenQuanYi Zen Hei:size=10}opt:${fs_used_perc /opt}%${goto 80}${fs_size /opt}${goto 140}${fs_bar /opt}
${color FF6600}${font WenQuanYi Zen Hei:size=10}tmp:${fs_used_perc /tmp}%${goto 80}${fs_size /tmp}${goto 140}${fs_bar /tmp}
${color FF6600}${font WenQuanYi Zen Hei:size=10}usr:${fs_used_perc /usr}%${goto 80}${fs_size /usr}${goto 140}${fs_bar /usr}
${color FF6600}${font WenQuanYi Zen Hei:size=10}local:${fs_used_perc /usr/local}%${goto 80}${fs_size /usr/local}${goto 140}${fs_bar /usr/local}
${color FF6600}${font WenQuanYi Zen Hei:size=10}var:${fs_used_perc /var}%${goto 80}${fs_size /var}${goto 140}${fs_bar /var}
${hr}
${color FF6600}${font WenQuanYi Zen Hei:size=12}网络
${color FF6600}${font WenQuanYi Zen Hei:size=10}下载速度${color #22ccff}${downspeed eth0}k/s
${color FF6600}${font WenQuanYi Zen Hei:size=10}上传速度${color #22ccff}${upspeed eth0}k/s
${color FF6600}${hr}

然后编辑一个shell脚本用来登陆后开启conky:

#!/bin/bash
sleep 8
/usr/bin/conky

最后增加启动项:

在unity菜单里面找到启动应用程序,增加conky的启动项

 

移动设备快速阅读本文:
            请扫描二维码  -->
分类: linux 标签:
  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.