Simple conky Configuration

Source: Internet
Author: User

Looking at conky is quite fun. I wrote one by myself on the Internet, although not very gorgeous...

Effect:

 

 

 

Below is the code. conkyrc

# Avoid flicker
Double_buffer Yes
No_buffers Yes
# Own window to run simultanious 2 or more conkys
Own_window Yes
Own_window_transparent Yes
Own_window_type normal
Own_window_hints undecorate, sticky, skip_taskbar, skip_pager

# Borders
# Draw_borders No
Border_margin 1
Maximum_width 350
# Shades
Draw_shades No
# Draw_graph_borders Yes
# Draw_borders Yes
# Position
Gap_x 930
Gap_y 0
Alignment top_left

# Behaviour
Update_interval 1

# Color
Default_color bfbfbf
# Default_shade_color 000000
Own_window_colour 4c4c4c

# Font
Use_xft Yes
Xftfont wenquanyi bitmap Song: pixelsize = 12
# Xftfont verasansyuanti: pixelsize = 14

# Force utf8? Note that utf8 support required xft
Override_utf8_locale Yes

# To prevent window from moving
Use_spacer No
Minimum_size 1268 0

# MPD
Mpd_host Shaiya
Mpd_port 6600
# $ {Offset-22}

Text
$ {Voffset-1} kernel: $ {color dcff82 }$ {font }$ {kernel }$ {color} Start Time: $ {color dcff82 }$ {font }$ {uptime_short }$ {color}
$ {Voffset-1}
$ {Voffset-1} CPU usage: $ {color dcff82 }$ {font }$ {CPU }%% {color }$ {cpubar}
$ {Voffset-1} Number of Running Processes: $ {color dcff82 }$ {font }$ {processes }$ {color} number of active processes: $ {color dcff82 }$ {font }$ {running_processes }$ {color}
$ {Voffset-1} memory usage: $ {color dcff82} $ MEM/$ memmax-$ memperc % $ {color dcff82 }$ {membar }$ {color}
$ {Voffset-1} swap space: $ {color dcff82} $ swap/$ swapmax-$ swapperc % $ {color dcff82 }$ {swapbar }$ {color}
$ {Voffset-1} hard disk I/O :$ {color dcff82 }$ {font }$ {diskio }$ {color}
$ {Voffset-1} network usage: $ {color dcff82 }$ {font }$ {downspeed eth0} kb/s $ {color }$ {totaldown eth0} downlink $ {color dcff82 }$ {font }$ {upspeed eth0} kb/s $ {color }$ {totalup eth0} upstream
$ {Voffset-1} File System: $ {color # dcff82}
${Voffset-1 }$ {color}/$ color $ {fs_used/}/$ {fs_size/}$ {color # dcff82 }$ {fs_bar/}$ {color}
${Voffset-1 }$ {color}/home $ color $ {fs_used/home}/$ {fs_size/home }$ {color # dcff82 }$ {fs_bar/home} $ {color}
$ {Voffset-1} city: Zhengzhou
$ {Voffset-1} today's weather: $ {color # dcff82 }$ {execi 7200 Python ~ /. Conky/getweather. py }$ {color}
$ {Voffset-1} tomorrow's weather: $ {color # dcff82 }$ {execi 7200 Python ~ /. Conky/getweathert. py }$ {color}
$ {Voffset-1} city: Nanyang
$ {Voffset-1} today's weather: $ {color # dcff82 }$ {execi 7200 Python ~ /. Conky/homeget. py }$ {color}
$ {Voffset-1} tomorrow's weather: $ {color # dcff82 }$ {execi 7200 Python ~ /. Conky/homegett. py }$ {color}

 

 

 

The following is a weather script for modifying others.

 

#! /Usr/bin/ENV python <br/> #-*-coding: UTF-8-*-<br/> Import sys, urllib2 <br/> #57083 is the code of Zhengzhou, if you want to use this step, you need to modify it to the code of your city <br/> # You can query (URL) on http://wap.weather.com.cn/wap/search/< br/> url = 'HTTP: // wap.weather.com.cn/wap/57083/h24/' <br/> Req = urllib2.request (URL) <br/> FD = urllib2.urlopen (req) <br/> DATA = FD. read (2048) <br/> Index = data. find ("weather:") <br/> result = data [index + 9: data. find ("/N", index)] <br/> Index = data. find ("temperature:") <br/> result + = data [index + 9: data. find ("/N", index)]. replace ("degree", "°C "). replace ("to", "-") + "" <br/> Index = data. find ("Wind:") <br/> result + = data [index + 9: data. find ("/N", index)] <br/> Print result

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.