conky - 行者无疆 始于足下 - 行走,思考,在路上

conky

xiaohanyu posted @ Thu, 25 Mar 2010 17:40:41 +0800 in Linux with tags conky gentoo , 1959 readers

Conky is a free, light-weight system monitor for X, that displays any information on your desktop. Conky is licensed under the GPL and runs on Linux and BSD.

Features

Conky has more than 300 built in objects, including support for:

  • a plethora of OS stats (uname, uptime, CPU usage, mem usage, disk usage, "top" like process stats, and network monitoring, just to name a few)
  • built in IMAP and POP3 support
  • built in support for many popular music players (MPD, XMMS2, BMPx, Audacious)
  • can be extended using built in Lua support, or any of your own scripts and programs (tell me more!)
  • built in Imlib2 and Cairo bindings for arbitrary drawing with Lua (tell me more!)

... and much much more.

Conky can display this info either as text, or using simple progress bars and graph widgets, with different fonts and colours.

Installation

In gentoo, it is very simple to install a software, just emerge what you want. But before you really do it, try -pv options to see what will be installed and make your own choice:

Calculating dependencies... done!
[ebuild   R   ] app-admin/conky-1.7.2-r2  USE="X alsa apcupsd imlib portmon truetype vim-syntax weather-xoap -audacious -curl -debug -eve -hddtemp -iostats -lua -lua-cairo -lua-imlib -math -moc -mpd -nano-syntax -nvidia -rss -thinkpad -weather-metar -wifi" 0 kB

For example, if you use moc as a console music player you must add moc USE. What is  USE? Refer to gentoo handbook.

For archlinux, just type "pacman -S conky" and for ubuntu and deb, maybe "apt-get install conky". Refer to your system handbook.

Cofiguration

Usually there is a sample configuration file located in /etc. My file is /etc/conky/conky.conf, just copy this file into your home diretory and rename it to .conkyrc:

sudo cp /etc/conky/conky.conf ~/.conkyrc

then let conky startup with the system.  If you use startx, add this line to your ~/.xinitrc

conky -d 

-d means conky would run as a daemon process.

If you use a desktop environment such as gnome or kde, use the graphical tools, easy job.

And if you feel disappointed about the ugly default configuration, you can configure it by yourself. First you should refer to the man page to know some details about the configuration grammer and configuration choices. Then, I think you'd better refer to google to download a sample .conkyrc and modify it. Here is a sample configuration file:

########## basic configuration ##########
use_spacer right
use_xft yes
font Comic Sans MS:size=9
xftfont Comic Sans MS:size=9
override_utf8_locale yes
update_interval 1.0
own_window no
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 206 5
maximum_width 400
draw_shades yes
draw_outline yes
draw_borders no
draw_graph_borders yes
default_color 00ffe1
default_shade_color ffffff
default_outline_color 000000
alignment top_right
gap_x 10
gap_y 10
cpu_avg_samples 2
uppercase no # set to yes if you want all text to be in uppercase

# predefined color for title
color0 5511dd
# predefined color for hr line
color1 ffd700
# predefined color for graph_bar
color2 ff00ff
# predefined color for any use
color5 ffaa00
color6 b5ff00
########## basic configuration end ##########


TEXT
########## time ##########

${font Comic Sans MS:style=Bold:pixelsize=40}${alignc}${time %H:%M:%S}${font}
${color1}${stippled_hr}${font}$color
#
########## system information ##########
#
OS: $alignr${color}$sysname $kernel${color}
Uptime: $alignr$uptime
Processes:${alignr}$processes ($running_processes running)
#
########## CPU information ##########
#
${cpugraph cpu1 00FF00 FF0000}${cpugraph cpu1}${alignr}
${cpugraph cpu2 0000FF 00FF00}${cpugraph cpu2}${alignr}
# CPU frequency information
# ${color #00FFE1}CPU Frequency: ${color #00ff00}${alignr}${freq 0} MHz
#
########## processes information ##########
#
${font Comic Sans MS:size=14}${color0}Processes ${color1}${stippled_hr 1}$font$color
${color}Highest CPU $alignr CPU% MEM%${color5}
${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}
${top name 4}$alignr${top cpu 4}   ${top mem 4}
${top name 5}$alignr${top cpu 5}   ${top mem 5}
${color}Highest MEM $alignr CPU% MEM%${color6}
${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}
#
########## ram and disk usage ##########
#
${font Comic Sans MS:size=14}${color0}RAM and Disk ${color1}${stippled_hr 1}$font$color
${color}RAM:${color #4169e1}$alignr ${color}$mem ${color #98c2c7}/${color}$memmax${color #4169e1}${color #FF3500} $memperc%
${color2}${membar}
${color}Root: ${color}${alignr}${fs_free /} / ${fs_size /}
${color2}${fs_bar 4 /}
${color}Home: ${color}${alignr}${fs_free /home} / ${fs_size /home}
${color2}${fs_bar 4 /home}
#
########## networking information ##########
#
${font Comic Sans MS:regular:size=14}${color0}NetWorking ${color1}${stippled_hr 1}$font$color
${color}Down:${color} ${downspeed eth0} k/s ${alignr}${color #00FFE1}Up:${color} ${upspeed eth0} k/s
${downspeedgraph eth0 20,115 556B2F 9ACD32}${alignr}${upspeedgraph eth0 20,115 556B2F 9ACD32}
${color}Totat: ${totaldown eth0}${alignr} Total: ${totalup eth0}$color

The grammer is simple, the first part is some basic settings, the second part is the content to show. But the grammer itself is not elegant, to second part is similar to markup language, ${font}${color}Something${color}${font}, just like this, but not so good.

And the following is the result:

Not bad. Enjoy it.

Lily Hungerford said:
Mon, 03 Jun 2019 19:26:55 +0800

Canky is the system where we can deal with the light weight computer and the apparatus with many useful features. The CPU and the other monitoring system at https://www.bestbritishwriter.com/myassignmenthelp-com-review/ are the best feature article and the formation updates with the occurrence.

jones said:
Tue, 09 Jul 2019 05:40:16 +0800

On the off chance that you need some counsel with respect to pdf archives, at that point I would propose that you visit the https://es.altocompresspdf.com/ site. All the significant data with respect to pdf archives is accessible there.

liam said:
Wed, 31 Jul 2019 22:57:23 +0800

This is some thing very informative and point to point. There is no round and round in this article. Like this smplicity . This clears my old point of view. THANKS https://caldwells.com/care_handling

carl said:
Fri, 09 Aug 2019 04:58:02 +0800

ISP Bharat Sanchar Nigam Limited (BSNL) is the pioneer telecom in India, and the policies were further modified to introduce ISPs in the market, Several companies (Bharti Airtel, Reliance Jio Aircel, ACT, Vodafone, Idea Cellular) joined the Indian market, and BSNL Teleservices provides the best information on all telecom and infra services provided by BSNL, and the telephone density in the sector has increased more day by day.

rick said:
Sun, 18 Aug 2019 01:04:03 +0800

Hi students, On this page, I am going to share Meghalaya Board class 12th Model Paper 2020 You can download these sample papers in pdf format for free. These Meghalaya Board 12th Question Paper 2020 are made by the official website of Meghalaya Board of Secondary Education www.mbose.in.

john said:
Wed, 11 Sep 2019 04:57:24 +0800

Many thanks for the exciting blog posting! Simply put your blog post to my favorite blog list and will look forward for additional updates. Simply wanted to write down a word in order to say thanks to you for those wonderful tips. BD PSC Pesult 2019

kevin said:
Thu, 19 Sep 2019 04:42:03 +0800

Just admiring your work and wondering how you managed this blog so well. It’s so remarkable that I can't afford to not go through this valuable information whenever I surf the internet! kitchen appliances reviews

vgr group said:
Thu, 10 Oct 2019 14:07:18 +0800

VGR Group Of Companies is one of the renowned and trustworthy infrastructure construction companies in Hyderabad. We provide best residential, commercial and semi/government construction services. The VGR Group of Companies started its activities in 1992. VGR Group has started businesses in many areas like Coal Trading, Logistics, Construction and Agro-tech. With a ongoing commitment to satisfying its clients, generating value for its shareholders, developing the communities in which it does business, and helping its members to fulfill their potential.<a href=” http://vgrgroup.in/”> vgr group of Companies</a>


Login *


loading captcha image...
(type the code from the image)
or Ctrl+Enter
Host by is-Programmer.com | Power by Chito 1.3.3 beta | © 2007 LinuxGem | Design by Matthew "Agent Spork" McGee