相关帖子可参考
我个人自定义修改后的效果
实际配置:
下载下来的conky主题还需要一个查询公网IP的脚本,所以这个需要自己写,并把它放置到主目录下的.scripts目录(隐藏目录,没有则新建)下,此外,默认的配置文件有一个语法错误,执行conky程序时有错误提示:border_margin 1为无效的配置选项(把它注释掉或删除就可以了)。
我自己实际操作中所做的改动:添加一个查询公网IP的脚本(比如查询路由器的地址,通过路由器的互联网接入方式)
1、安装conky、curlsudo apt-get install conky
sudo apt-get install curl
2、新建一个名为ip.sh的脚本文件,输入如下内容:
#!/bin/bash
curl icanhazip.com
exit
保存文件。
3、在主目录下新建一个.scripts目录,并把ip.sh移到该目录下。
4、解压下载下来的conky主题配置(我是在 http://blog.conky.be 网站上下载的),得到一个隐藏的目录文件.conkytheme,得在终端上使用ls -a命令才能查看到,所以不要以为解压后什么也没有得到。
5、修改隐藏目录.conkytheme中的conkyrc文件。
把own_window_type override修改为own_window_type normal,使conky能够嵌入桌面;注释掉border_margin 1(即在其前面加一个#号)。剩下的其他设置根据你的具体情况修改吧。把 .conkytheme目录移到个人的主目录下。
ps:可以根据你的显示器的实际分辨率,用gimp修改下载下来的conky主题配置里面的pix目录下的frame.png图片的分辨率(gimp中选择“图像”->“缩放图像”)
下面给出我的实际配置文件(显示器分辨率是1366x768)
# Locale, fonts and font sizes.
use_xft yes
xftfont Droid Sans:size=9
override_utf8_locale yes
# Conky performance
update_interval 1
total_run_times 0
double_buffer yes
no_buffers yes
net_avg_samples 2
text_buffer_size 1024
# Execute it in its own window
own_window yes
own_window_transparent yes
#own_window_type override
own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# Borders, margins.
draw_borders no
#border_margin 1
# Own window color
own_window_colour 393834
# Font colors
default_color B7B2AD
#default_color EFEEED
# Text shadows
draw_shades no
# Header colors
color0 DD3A21
# Minimum dimensions
minimum_size 1440 0
# Conky positioning.
alignment bottom_left
gap_x 0
gap_y 24
# Output
TEXT
#${image ~/.conkytheme/pix/frame.png -p 0,0 -s 1280x180}
${image ~/.conkytheme/pix/frame2.png -p -1,0 -s 1366x192}
${voffset 20}${font Droid Sans:style=Bold:size=12}${color0}${goto 210}File System:${goto 660}Network:${goto 430}Disk I/O:${goto 920}Processes:${font}${color}
${voffset 6}${goto 210}System (/):${goto 310}${fs_free /} / ${fs_size /}${goto 660}Upspeed: ${goto 760}${upspeedgraph eth0 10,100 B7B2AD B7B2AD} ${upspeed eth0}${goto 430}Disk Read: ${goto 500}${diskiograph_read /dev/sda 10,100 FFFC77 FF8177} $diskio_read ${goto 920}${font Droid Sans:style=Bold:size=12}Load:${goto 1020}$loadavg${color}${font}
${goto 15}Kernel: ${goto 70}${kernel}${goto 210}( ${fs_type /} )${goto 310}${fs_bar 10,100 /}${goto 660}Downspeed: ${goto 760}${downspeedgraph eth0 10,100 B7B2AD B7B2AD}${font Droid Sans:style=Bold:size=9} ${downspeed eth0}${font}${goto 430}Disk Write: ${goto 500}${diskiograph_write /dev/sda 10,100 FFFC77 FF8177} $diskio_write ${goto 920}${font Droid Sans:style=Bold:size=10}${color0}Highest CPU${goto 1020} CPU% MEM%${goto 1120}Highest MEM${goto 1220}CPU% MEM% ${font}${color}
${goto 15}CPU: ${goto 70}${cpubar cpu1 10,100}${font Droid Sans:style=Bold:size=9} ${cpu cpu1}%${font}${goto 210}Home (/Home):${goto 310}${fs_free /home} / ${fs_size /home}${goto 660}Total Uploaded: ${goto 760}${totalup eth0}${color}${goto 430}Local (/usr/local):${goto 530}${fs_free /usr/local} / ${fs_size /usr/local}${goto 920}${top name 1}${goto 1020}${top cpu 1} ${top mem 1}${goto 1120}${top_mem name 1}${goto 1220}${top_mem cpu 1} ${top_mem mem 1}${color}
${goto 15}RAM: ${goto 70}${membar 10,100}${font Droid Sans:style=Bold:size=9} $memperc%${font}${goto 210}( ${fs_type /home} )${goto 310}${fs_bar 10,100 /home}${goto 660}Total Download: ${goto 760}${totaldown eth0}${font}${color}${goto 430}( ${fs_type /usr/local} )${goto 530}${fs_bar 10,100 /usr/local}${goto 920}${top name 2}${goto 1020}${top cpu 2} ${top mem 2}${goto 1120}${top_mem name 2}${goto 1220}${top_mem cpu 2} ${top_mem mem 2}${color}
${goto 15}SWAP:${goto 70}${swapbar 10,100}${font Droid Sans:style=Bold:size=9} $swapperc%${font}${goto 210}Opt (/opt):${goto 310}${fs_free /opt} / ${fs_size /opt}${goto 660}Local IP: ${goto 760}${addr eth0}${font}${color}${goto 430}Var (/var):${goto 530}${fs_free /var} / ${fs_size /var}${goto 920}${top name 3}${goto 1020}${top cpu 3} ${top mem 3}${goto 1120}${top_mem name 3}${goto 1220}${top_mem cpu 3} ${top_mem mem 3}${color}
${goto 15}Uptime: ${goto 70}${uptime}${font}${goto 210}( ${fs_type /opt} )${goto 310}${fs_bar 10,100 /opt}${goto 660}Public IP: ${goto 760}${execi 10800 ~/.scripts/ip.sh}${goto 430}( ${fs_type /var} )${goto 530}${fs_bar 10,100 /var}${goto 920}${color}${top name 4}${goto 1020}${top cpu 4} ${top mem 4}${goto 1120}${top_mem name 4}${goto 1220}${top_mem cpu 4} ${top_mem mem 4}${color}
|
相关tips:
1、命令行下启动conky
conky -c $HOME/.conkytheme/conkyrc
2、开机自动启动conky
“系统”->“首选项”->“启动应用程序”->“添加”
名称:conky
命令:conky -c /home/jarson/.conkytheme/conkyrc
(用你实际的用户名替换掉jarson,尝试过使用$HOME来代替/home/jarson,不过貌似不行)
注释:系统信息实时监控(可略)
阅读(5829) | 评论(0) | 转发(0) |