Linux系统上鼎鼎大名的美化工具:conky,相信凡是接触过linux系统的朋友都知道,就算没有使用过,应该也是听过的。以前就折腾过好几次,但是没有一次成功过,浪费了很多时间,每次到最后都卸载conky了事儿。
之所以几次都没有成功可以肯定是我技术渣,还有就是网上的教程大多都是几年前的了,我想大概是前辈们玩腻了这些表面的东西,然后就不更新了,所以就算按部就班的跟着别人操作还是会出错。这次又折腾的原因是:我安装了一个我自己还挺好看的主题,但是桌面什么也没有,显得空荡荡的,于是为了追求完美,还是折腾吧。
参考地址:http://www.cnblogs.com/walkbro/archive/2010/02/07/1665433.html
还有就是无数次的GOOGLE加百度。
测试环境:fedora 20 64bit 英文版
Conky版本:Conky 1.9.1
电脑屏幕分辨率:1366 * 768 笔记本
看步骤:
1、安装Conky软件。Crtl+Alt+T 打开终端:输入 sudo yum -y install conky
2、使用gedit 编辑 /etc/conky/conky.conf配置文件,我的配置文件如下:
# Conky, a system monitor, based on torsmo
#
# Any original torsmo code is licensed under the BSD license
#
# All code written since the fork of torsmo is licensed under the GPL
#
# Please see COPYING for details
#
# Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
# Copyright (c) 2005-2012 Brenden Matthews, Philip Kovacs, et. al. (see AUTHORS)
# All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
alignment top_right #显示在右上角
background no
border_width 1
cpu_avg_samples 2
default_color white
default_outline_color white
default_shade_color white
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
use_xft yes
xftfont DejaVu Sans Mono:size=9 #字体大小
gap_x 15
gap_y 50
minimum_size 5 5
net_avg_samples 2
no_buffers yes
out_to_console no
out_to_stderr no
extra_newline no
own_window yes
own_window_class Conky
own_window_type desktop
own_window_argb_visual true
own_window_transparent true
stippled_borders 0
update_interval 1.0 #更新时间 1秒
uppercase no
use_spacer none
show_graph_scale no
show_graph_range no
double_buffer yes #双缓存 我的如果不加这个会不断闪烁
TEXT
${color white}System ${hr 1}${color}
Hostname: $alignr$nodename
Kernel: $alignr$kernel
Uptime: $alignr$uptime
Temp: ${alignr}${acpitemp}°C
CPU: ${alignr}${freq dyn} MHz
Processes: ${alignr}$processes ($running_processes running)
Load: ${alignr}$loadavg
CPU1 ${alignr}${cpu cpu1}%
${cpubar 4 cpu1}
CPU2 ${alignr}${cpu cpu2}%
${cpubar 4 cpu2}
Ram ${alignr}$mem / $memmax ($memperc%)
${membar 4}
swap ${alignr}$swap / $swapmax ($swapperc%)
${swapbar 4}
Highest CPU $alignr CPU% MEM%
${top name 1}$alignr${top cpu 1} ${top mem 1}
${top name 2}$alignr${top cpu 2} ${top mem 2}
${top name 3}$alignr${top cpu 3} ${top mem 3}
Highest MEM $alignr CPU% MEM%
${top_mem name 1}$alignr${top_mem cpu 1} ${top_mem mem 1}
${top_mem name 2}$alignr${top_mem cpu 2} ${top_mem mem 2}
${top_mem name 3}$alignr${top_mem cpu 3} ${top_mem mem 3}
${color white}File system ${hr 1}${color}
Root: ${alignr}${fs_free /} / ${fs_size /}
${fs_bar 4 /}
Home: ${alignr}${fs_free /home} / ${fs_size /home}
${fs_bar 4 /home}
${color white}Network ${hr 1}${color}
Down ${downspeed p1p2} k/s ${alignr}Up ${upspeed p1p2} k/s #这里的p1p2是上网的网卡,也就是说你用哪个网卡上网就你填写哪个。
${downspeedgraph p1p2 25,107} ${alignr}${upspeedgraph p1p2 25,107}
Total ${totaldown p1p2} ${alignr}Total ${totalup p1p2}
几个值得注意的地方我都加了注释,如果想要了解的更加详细,建议直接复制然后Google
因为我的是笔记本电脑所以 我的字体才设置为:9
3、设置开机启动。终端里输入: gnome-session-properties
新建一个开机项目,名称随便如:conky
command输入:/usr/bin/conky -p 10 -p 10 是指用户登陆10秒之后再加载conky
最后面那个是说明,填不填写无所谓。
效果:
最下面那个ERROR请无视,好像是不行,我还没处理好,所以也没放代码。整体还可以吧,因为是笔记本,所以不能添加天气了。屏幕实在太小,显示不了。