linux 的conky新版配置文件 conky.conf


详情参考conky 的github:



sudo apt-get install conky


在home文件下创建配置文件:   .conkyrc




sudo apt-get install lm-sensors

sudo sensors-detect

conky 需要sensors程序获取cpu温度,在命令行直接输入: sensors  即可得到cpu温度,


Adapter: ISA adapter
Core 0:       +52.0°C  (high = +74.0°C, crit = +100.0°C)
Core 1:       +51.0°C  (high = +74.0°C, crit = +100.0°C)



1,创建 startconky,

sudo vi /usr/local/bin/startconky

content  as follows:

sleep 20


该文件要有执行权限, “sudo chmod 755 /usr/local/bin/startconky",





Where is conky.conf?
No conky.conf is created automatically. To create the default one, run:


mkdir -p ~/.config/conky
conky -C > ~/.config/conky/conky.conf

新版的配置文件 conky.conf 如下。(新版和旧版语法不同)



-- vim: ts=4 sw=4 noet ai cindent syntax=lua
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
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 <>.
${color grey}${font OpenLogos:size=16} S${font :size=10}  System $stippled_hr
$color${font OpenLogos:size=10}$sysname:${alignr}$kernel ($machine)
conky.config = {

own_window_argb_visual =no  ,
own_window_argb_value =yes  ,
own_window_transparent= yes  ,
own_window = true,
own_window_class = 'Conky',
own_window_type = 'override',
alignment = 'top_right',
gap_x = 15,--distance to right border of window
gap_y = 60,--distance to top border of window
background = no,
border_width = 1,
cpu_avg_samples = 2,
default_color = 'lightgrey',
default_outline_color = 'white',
default_shade_color = 'white',
draw_borders = false,
draw_graph_borders = true,
draw_outline = false,
draw_shades = false,
use_xft = true,

minimum_height = 50,
minimum_width = 200,
maximum_width= 220 ,
net_avg_samples = 2,
--no_buffers = no,
out_to_console = false,
out_to_stderr = false,
extra_newline = false,

--stippled_borders = 0,
update_interval = 3.0,
uppercase = false,
use_spacer = 'none',
show_graph_scale = false,
show_graph_range = false

conky.text = [[
${color yellow}${alignc}${exec whoami}
${color grey}${font PizzaDude Bullets:size=16}T${font :size=10}   Date&Time $stippled_hr
${color green}${font :size=11} ${time %Y/%m/%e  %H:%M:%S}
${color grey}Uptime:${color #A080F0}     $uptime

${color grey} ${font StyleBats:size=16}V${font OpenLogos:size=10}   CPU&MEM $stippled_hr
${color green}${font OpenLogos:size=10} CPU@${freq}MHz: ${cpu cpu1}%${alignr}${cpubar cpu1 8,60}
${color green} CPU@${freq}MHz: ${cpu cpu2}%${alignr}${cpubar cpu2 8,60}

${color grey}${font StyleBats:size=16}T${font OpenLogos:size=10}  Thread$stippled_hr
${color grey} name              PID   CPU%   ${alignr}MEM%
${color #FF8C00} ${top name 1} ${top pid 1} ${top cpu 1} ${alignr}${top mem 1}
${color #FFA54F} ${top name 2} ${top pid 2} ${top cpu 2} ${alignr}${top mem 2}
${color #FFD700} ${top name 3} ${top pid 3} ${top cpu 3} ${alignr}${top mem 3}
${color #FFEC8B} ${top name 4} ${top pid 4} ${top cpu 4} ${alignr}${top mem 4}

${color grey}${font StyleBats:size=16}E${font :size=10}   MEMORY $stippled_hr
${color #F05020}RAM : $mem/$memmax - $memperc% ${membar 6}
${color #008060}Swap : $swap/$swapmax  ${swapbar 6}
/:  ${fs_used /}/${fs_size /}         ${fs_bar 6 /}
/boot: ${fs_used /boot}/${fs_size /boot}   ${fs_bar 6 /boot}

${color grey} ${font PizzaDude Bullets:size=16}@${font OpenLogos:size=10}   NETWORK $stippled_hr
${color grey}Networking:
Up:$color ${upspeed enp0s3} ${color grey} - Down:$color ${downspeed enp0s3}

${color grey}  LAN:
${color green} Download: ${downspeedf enp1s0 } KB/s $alignr ${totaldown enp1s0 }
${color #40E0D0} Upload: ${upspeedf enp1s0 } KB/s $alignr ${totalup enp1s0 }
${color grey}  WLAN:
${color green} Download: ${downspeedf wlp6s0b1} KB/s $alignr ${totaldown wlp6s0b1}
${color #40E0D0} Upload: ${upspeedf wlp6s0b1} KB/s $alignr ${totalup wlp6s0b1}

${color grey}${font StyleBats:size=16}C ${font :size=10} CPU Temp:$stippled_hr${font OpenLogos:size=10}$color
${color #008090}${exec sensors | grep 'Core 0'|awk  '{print $1,$2,$3}'}
${color #008090}${exec sensors | grep 'Core 1'|awk  '{print $1, $2,$3}'}






以下为旧版配置文件  .conkyrc

# - Window specifications - #
# - 避免重影 - #
own_window_class Conky
own_window yes
own_window_argb_visual no
own_window_argb_value yes
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
own_window_type override  
background yes  
use_xft  yes  
xftfont Zecton:size=8  
xftalpha 0.5  
update_interval 1.0  
total_run_times 0  
double_buffer yes  
no_buffers no  
minimum_size 500 5  
maximum_width 200  
draw_shades yes  
draw_outline no  
draw_borders no  
default_color lightgrey  
alignment top_right  
gap_x 15  
gap_y 50  
uppercase no  
override_utf8_locale yes  
${color white} ${font PizzaDude Bullets:size=16}T${font :size=10}   Date&Time $hr $font $color  
${goto 1000}${time %l:%M}${font}${time %p}  
${color green}${font :size=11} ${time %Y/%m/%e  %H:%M:%S}  
${color white}${font OpenLogos:size=18} S${font :size=10}   SYSTEM $hr $font  
$color $font$sysname:${alignr}$kernel  ($machine)  
${color white} ${font StyleBats:size=16}V${font :size=10}   CPU $hr $font $color  
$color ${font}CPU@${freq}MHz: ${cpu cpu1}% ${alignr}${cpubar cpu1 8,60}  
$color ${font}CPU@${freq}MHz: ${cpu cpu2}% ${alignr}${cpubar cpu1 8,60}  
${color #FF8C00} ${top name 1} $alignr ${top cpu 1}%  
${color #FFA54F} ${top name 2} $alignr ${top cpu 2}%  
${color #FFD700} ${top name 3} $alignr ${top cpu 3}%  
${color #FFEC8B} ${top name 4} $alignr ${top cpu 4}%  
${color white} ${font PizzaDude Bullets:size=16}@${font :size=10}   NETWORK $hr $font $color  
${color white}  LAN:   
${color green} Download: ${downspeedf eth0} KB/s $alignr ${totaldown eth0}  
${color #40E0D0} Upload: ${upspeedf eth0} KB/s $alignr ${totalup eth0}  
${color white}  WLAN:   
${color green} Download: ${downspeedf wlp6s0b1} KB/s $alignr ${totaldown wlp6s0b1}  
${color #40E0D0} Upload: ${upspeedf wlp6s0b1} KB/s $alignr ${totalup wlp6s0b1}  
${color white}${font StyleBats:size=16}E${font :size=10}   MEMORY $hr $font $color  
${color}${font}RAM: $mem/$memmax $alignr $memperc%  
$color ${membar}  
${color #FF8C00} ${top_mem name 1} $alignr ${top_mem mem 1}%  
${color #FFD700} ${top_mem name 2} $alignr ${top_mem mem 2}%  
${color #FFEC8B} ${top_mem name 3} $alignr ${top_mem mem 3}%  
${color}${font}Swap: $swap/$swapmax $alignr $swapperc%  
$color ${swapbar}  
${color white}${font StyleBats:size=16}C ${font :size=10} CPU Temp: $hr $font $color  
${color white}${exec sensors | grep 'Core 0'}  
${color white}${exec sensors | grep 'Core 1'}  
##${color green}CPU2 Temp: ${color red}${exec sensors | grep 'Core 1' | cut -c15-16}°C  
${color white} ${font PizzaDude Bullets:size=16}H ${font :size=10} HDD $hr $font   
$color root /:  ${fs_used /}/${fs_size /} $alignr ${fs_free_perc /}%  
 $color ${fs_bar /}  
##$color home: ${fs_used /home}/${fs_size /home} $alignr ${fs_free_perc /home}%  
## $color ${fs_bar /home}