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

原创 2017年06月27日 11:14:50

详情参考conky 的github:https://github.com/brndnmtthws/conky

博客        http://blog.163.com/e_sxkt/blog/static/102729820105274291987/

1,安装:conky

sudo apt-get install conky

配置文件:

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

然后复制一下配置内容到文件。

2,安装sensors

安装步骤:

sudo apt-get install lm-sensors

sudo sensors-detect

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

例如:

coretemp-isa-0000
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)

根据结果适当修改配置文件,即可把结果显示到conky窗口。

然后添加conky到开机启动:

1,创建 startconky,

sudo vi /usr/local/bin/startconky

content  as follows:

#!/bin/sh
sleep 20

conky

该文件要有执行权限, “sudo chmod 755 /usr/local/bin/startconky",
具体内容如下,不直接用命令启动,为了延时: 

打开启动管理器

gnome-session-properties

把这个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
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/>.
]]
--[[
${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,
double_buffer=yes,
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}  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  
  
TEXT  
${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}   



版权声明:本文为博主原创文章,未经博主允许不得转载。

我的conky1.10配置笔记

linux下的conky可以起到非常不错的美化和实用效果。但conky的高度自定义化配置又确实有些让人望而却步。我刚接触linux不久就尝试安装conky的harmattan主题,但是失败了。。我尝试...
  • mhlwsk
  • mhlwsk
  • 2016年07月26日 22:54
  • 5514

conky 1.10配置和开机启动

不多说,先上图。 大家把目光放到右边就行了。 1、安装conky debian或ubuntu用户直接apt-get install conky-all就行了。 或者也可以直接从源码编译安装...
  • little3344
  • little3344
  • 2015年08月04日 13:46
  • 3712

Ubuntu14.04下使用conky美化桌面

Ubuntu14.04下使用conky美化桌面
  • tfc_l
  • tfc_l
  • 2015年06月21日 17:39
  • 2155

conky配置文件,字体,脚本,带clockfaces

  • 2013年11月03日 16:38
  • 3.66MB
  • 下载

我的conky配置

安装conky的方法请看我博客另外一篇文章,这里不再阐述点这里 附上我的配置2013.08.29(吾喷) background no font WenQuanYi Micro Hei:size=10 ...
  • a411717067
  • a411717067
  • 2013年08月29日 15:53
  • 1152

华丽务实 安装Linux性能监测工具Conky

一直以来,对于开源用户来说,一个优秀的系统监视软件是用户十分期待的,不同于Windows系统监视软件工具种类繁多,Linux监视软件可谓屈指可 数,其中Conky软件可以说是优秀App代表。Conky...
  • sanpintian
  • sanpintian
  • 2012年04月01日 12:20
  • 1723

由Conky说说Linux桌面美化

先说Conky,间断用过几回,Ubuntu安装 sudo apt-get install conky 其余发行版参照官方文档:http://conky.sourceforge.net/documen...
  • jiaweihao
  • jiaweihao
  • 2013年11月01日 20:38
  • 1466

conky的linux监控

  • 2015年12月18日 18:45
  • 130KB
  • 下载

Ubuntu 侧边栏软件:conky 安装配置

conky,是ubuntu下的一个侧边栏软件,可以在屏幕上,显示出一些基本的个人信息,常见的包括:电脑名字,IP地址,CPU和内存的使用率,网络速度监控,还有硬盘每个“分区”的使用情况。一.安装和准备...
  • yupr2011
  • yupr2011
  • 2011年03月08日 12:47
  • 4764

配置conky

第一步:安装conky系统 > 系统管理 > 新立德软件包管理器 > 设置 > 软件库 > Ubuntu 软件 ——在这里确保“下载自”里选择的是“主服务器”。   系统 ...
  • breezewin
  • breezewin
  • 2011年11月29日 09:38
  • 1279
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:linux 的conky新版配置文件 conky.conf
举报原因:
原因补充:

(最多只允许输入30个字)