Code:
# UBUNTU-CONKY
# A comprehensive conky script, configured for use on
# Ubuntu / Debian Gnome, without the need for any external Scripts.
#
# Based on conky-jc and the default .conkyrc.
# INCLUDES:
# - tail of /var/log/messages
# - netstat connections to your computer
#
# -- Pengo (conky@pengo.us)
#
# Possible variables to be used:
#
# Variable Arguments Description
#
# addr (interface) IP address for an interface
# acpiacadapter ACPI ac adapter state.
# acpifan ACPI fan state
# acpitemp ACPI temperature.
# adt746xcpu CPU temperature from therm_adt746x
# adt746xfan Fan speed from therm_adt746x
# alignr (num) Right-justify text, with space of N
# alignc Align text to centre
# battery (num) Remaining capasity in ACPI or APM
# battery. ACPI battery number can be
# given as argument (default is BAT0).
# buffers Amount of memory buffered
# cached Amount of memory cached
# color (color) Change drawing color to color
# cpu CPU usage in percents
# cpubar (height) Bar that shows CPU usage, height is
# bar's height in pixels
# cpugraph (height),(width) (gradient colour 1) (gradient colour 2)
# CPU usage graph, with optional colours in hex,
# minus the #.
# downspeed net Download speed in kilobytes
# downspeedf net Download speed in kilobytes with one
# decimal
# downspeedgraph net (height),(width) (gradient colour 1) (gradient colour 2)
# Download speed graph, colours defined in
# hex, minus the #.
# exec shell command Executes a shell command and displays
# the output in conky. warning: this
# takes a lot more resources than other
# variables. I'd recommend coding wanted
# behaviour in C and posting a patch :-).
# execbar shell command Same as exec, except if the first value
# return is a value between 0-100, it
# will use that number for a bar.
# The size for the bar is currently fixed,
# but that may change in the future.
# execgraph shell command Same as execbar, but graphs values
# execi interval, shell command
# Same as exec but with specific interval.
# Interval can't be less than
# update_interval in configuration.
# font font Specify a different font. Only applies
# to one line.
# fs_bar (height), (fs)Bar that shows how much space is used on
# a file system. height is the height in
# pixels. fs is any file on that file
# system.
# fs_used (fs) Free space on a file system available
# for users.
# fs_used_perc (fs) Free percentage of space on a file
# system available for users.
# fs_free (fs) File system size
# fs_used (fs) File system used space
# hr (height) Horizontal line, height is the height in
# pixels
# platform (dev), type, n platform sensor from sysfs (Linux 2.6). dev
# may be omitted if you have only one platform
# device. type is either in (or vol)
# meaning voltage, fan meaning fan or
# temp/tempf (first in C, second in F)
# meaning temperature. n is number of the
# sensor. See /sys/bus/i2c/devices/ on
# your local computer.
# if_running (process) if PROCESS is running, display
# everything if_running and the matching $endif
# if_existing (file) if FILE exists, display everything between
# if_existing and the matching $endif
# if_mounted (mountpoint) if MOUNTPOINT is mounted, display everything between
# if_mounted and the matching $endif
# else Text to show if any of the above are not true
# kernel Kernel version
# linkstatus (interface) Get the link status for wireless connections
# loadavg (1), (2), (3) System load average, 1 is for past 1
# minute, 2 for past 5 minutes and 3 for
# past 15 minutes.
# machine Machine, i686 for example
# mails Mail count in mail spool. You can use
# program like fetchmail to get mails from
# some server using your favourite
# protocol. See also new_mails.
# mem Amount of memory in use
# membar (height) Bar that shows amount of memory in use
# memmax Total amount of memory
# memperc Percentage of memory in use
#
# metar_ob_time
# metar_temp
# metar_tempf Temp in F
# metar_windchill
# metar_dew_point There are a bunch of these
# metar_rh and they are self-explanatory
# metar_windspeed
# metar_winddir
# metar_swinddir
# metar_cloud
# metar_u2d_time
#
# ml_upload_counter total session upload in mb
# ml_download_counter total session download in mb
# ml_nshared_files number of shared files
# ml_shared_counter total session shared in mb, buggy
# in some mldonkey versions
# ml_tcp_upload_rate tcp upload rate in kb/s
# ml_tcp_download_rate tcp download rate in kb/s
# ml_udp_upload_rate udp upload rate in kb/s
# ml_udp_download_rate udp download rate in kb/s
# ml_ndownloaded_files number of completed files
# ml_ndownloading_files number of downloading files
#
# mpd_artist Artist in current MPD song
# (must be enabled at compile)
# mpd_album Album in current MPD song
# mpd_bar (height) Bar of mpd's progress
# mpd_bitrate Bitrate of current song
# mpd_status Playing, stopped, et cetera.
# mpd_title Title of current MPD song
# mpd_vol MPD's volume
# mpd_elapsed Song's elapsed time
# mpd_length Song's length
# mpd_percent Percent of song's progress
# new_mails Unread mail count in mail spool.
# nodename Hostname
# outlinecolor (color) Change outline color
# pre_exec shell command Executes a shell command one time before
# conky displays anything and puts output
# as text.
# processes Total processes (sleeping and running)
# running_processes Running processes (not sleeping),
# requires Linux 2.6
# shadecolor (color) Change shading color
# stippled_hr (space), Stippled (dashed) horizontal line
# (height)
# swapbar (height) Bar that shows amount of swap in use
# swap Amount of swap in use
# swapmax Total amount of swap
# swapperc Percentage of swap in use
# sysname System name, Linux for example
# offset pixels Move text over by N pixels
# tail logfile, lines (interval)
# Displays last N lines of supplied text
# text file. If interval is not supplied,
# Conky assumes 2x Conky's interval.
# Max of 30 lines.
# Max of 30 lines can be displayed.
# time (format) Local time, see man strftime to get more
# information about format
# totaldown net Total download, overflows at 4 GB on
# Linux with 32-bit arch and there doesn't
# seem to be a way to know how many times
# it has already done that before conky
# has started.
# top type, num This takes arguments in the form:
# top <name> <number>
# Basically, processes are ranked from
# highest to lowest in terms of cpu
# usage, which is what <num> represents.
# The types are: "name", "pid", "cpu", and
# "mem".
# There can be a max of 10 processes listed.
# top_mem type, num Same as top, except sorted by mem usage
# instead of cpu
# totalup net Total upload, this one too, may overflow
# updates Number of updates (for debugging)
# upspeed net Upload speed in kilobytes
# upspeedf net Upload speed in kilobytes with one
# decimal
# upspeedgraph net (height),(width) (gradient colour 1) (gradient colour 2)
# Upload speed graph, colours defined in
# hex, minus the #.
# uptime Uptime
# uptime_short Uptime in a shorter format
#
# seti_prog Seti@home current progress
# seti_progbar (height) Seti@home current progress bar
# seti_credit Seti@hoome total user credit
# variable is given either in format $variable or in ${variable}. Latter
# allows characters right after the variable and must be used in network
# stuff because of an argument
# Use Xft?
use_xft yes
xftfont HandelGotD:size=8
#xftfont DejaVu Sans:size=8
#xftfont Liberation Sans:size=9
#xftfont Terminus:size=8
#xftfont Liberation Sans:size=9
override_utf8_locale yes
text_buffer_size 2048
# Text alpha when using Xft
#xftalpha 0.8
xftalpha 0.5
# Update interval in seconds
update_interval 4
# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
#Set Maximum Width
maximum_width 270
# Minimum size of text area
minimum_size 250 0
# Draw shades?
draw_shades no
# Draw outlines?
draw_outline no
# shadecolor black
default_outline_color black
default_shade_color black
#own_window_colour white
# Draw borders around text
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_margin 4
# border width
border_width 1
# fiddle with window
use_spacer left
#Default font
font arial
# X font when Xft is disabled, you can pick one with program xfontsel
#font 7x12
#font 6x10
#font 7x13
#font 8x13
#font 7x12
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
#font -artwiz-snap-normal-r-normal-*-*-100-*-*-p-*-iso8859-1
# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right
# Gap between borders of screen and text
gap_x 10
gap_y 50
# Subtract file system buffers from used memory?
no_buffers yes
# set to yes if you want all text to be in uppercase
uppercase no
# number of cpu samples to average
# set to 1 to disable averaging
cpu_avg_samples 2
# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 2
# Force UTF8? note that UTF8 support required XFT
override_utf8_locale yes
# Add spaces to keep things from moving about? This only affects certain objects.
use_spacer left
#Use short units for disk size (G = Gigabyte , M = Megabyte, etc) - Doesn't seem to work
#short_units on
# Default colors and also border colors, grey90 == #e5e5e5
default_color grey
color0 red
color1 GreenYellow
color2 turquoise
color3 gold
color4 green
color5 white
color6 MediumSpringGreen
color7 orange
color8 DarkSlateBlue
color9 lightgreen
#Not being used
# ${color4}C: ${color5}${fs_used /media/C} / ${fs_free /media/C} ${color8}${fs_bar 10 /media/C}${color5}${offset -40}${fs_used_perc /media/C}%${color}
# ${color4}D: ${color5}${fs_used /media/D} / ${fs_free /media/D} ${color8}${fs_bar 10 /media/D}${color5}${offset -40}${fs_used_perc /media/D}%${color}
# ${color4}E: ${color5}${fs_used /media/E} / ${fs_free /media/E} ${color8}${fs_bar 10 /media/E}${color5}${offset -40}${fs_used_perc /media/E}%${color}
# ${color4}F: ${color5}${fs_used /media/F} / ${fs_free /media/F} ${color8}${fs_bar 10 /media/F}${color5}${offset -40}${fs_used_perc /media/F}%${color}
# ${color4}G: ${color5}${fs_used /media/G} / ${fs_free /media/G} ${color8}${fs_bar 10 /media/G}${color5}${offset -40}${fs_used_perc /media/G}%${color}
#${if_mounted /media/USB_L} ${color4}USB_L: ${color5}${fs_used /media/L} / ${fs_free /media/L} ${color8}${fs_bar 10 /media/L}${color5}${offset -40}${fs_used_perc /media/L}%${color}${endif}
#${if_mounted /media/USB_M} ${color4}USB_M: ${color5}${fs_used /media/M} / ${fs_free /media/M} ${color8}${fs_bar 10 /media/M}${color5}${offset -40}${fs_used_perc /media/M}%${color}${endif}
#${if_mounted /media/USB_N} ${color4}USB_N: ${color5}${fs_used /media/N} / ${fs_free /media/N} ${color6}${fs_bar 10 /media/N}${color5}${offset -40}${fs_used_perc /media/N}%${color}${endif}
# Text stuff
TEXT
${font :size=12}${color2}${alignc}${time %H:%M}$color$font
${font :size=10}${color tomato}${alignc}${time %A, %d %b. %Y}$color${font :size=8}
${color7}SYSTEM ${hr 2}${color}
${color2}${pre_exec echo $USERNAME} on $nodename
$sysname $kernel
${color tomato}Intel Core2 X6800 ${color4} @ ${color0}${freq_dyn_g}Gz$color
${color4}UpTime: ${color0}$uptime${color}
${color7}PENDING MAIL ${hr 2}${color}
${if_up eth1} ${color4}GMAIL: ${execi 60 conkyEmail --servertype=IMAP --servername=imap.gmail.com --username=XXXXX --password=XXXXX --ssl --mailinfo=2} ${endif}
${color7}TEMPS & CPU LOAD ${hr 2}${color}
${color0}${cpugraph cpu1 15, 120 000000 FF4900}${color} ${offset -90}${voffset 5}${font :size=8}${color5}Load:${cpu cpu1}% ${color}${font :size=8} ${voffset -5}${color0}${cpugraph cpu2 15, 0 000000 FF4900}${color} ${offset -90}${voffset 5}${font :size=8}${color5}Load:${cpu cpu2}% ${color}${font :size=8}
${color4}Core0 Temp: ${color0}${execi 8 sensors | grep -A 1 'Core 0' | cut -c15-16 | sed '/^$/d'}C ${alignr}${color4}Core1 Temp: ${color0}${execi 8 sensors | grep -A 1 'Core 1' | grep -A 1 'crit' | cut -c15-16 | sed '/^$/d'}C
${color4}CPU Temp: ${color5}${hwmon 1 temp 2}C ${alignr}${color4}GPU Temp: ${color5}${execi 300 nvidia-settings -q GPUCoreTemp | grep "caver" | cut -d ':' -f3 | cut -d ' ' -f2 | cut -d '.' -f1 ;}C
${color4}CPU Fan Spd: ${color5}${hwmon 1 fan 2} rpm ${alignr}${color4}${alignr}${color4}Drive sda: ${color5}${hddtemp /dev/sda}
${color4}Vcore: ${color5}${hwmon 1 in 0}V ${alignr}${color4}Drive sdb: ${color5}${hddtemp /dev/sdb}
${color4}MB Temp: ${color5}${hwmon 1 temp 3}C ${alignr}${color4}MB Fan Spd: ${color5}${hwmon 1 fan 3} rpm
${color7}MEMORY / DISK ${hr 2}$color
${color4}RAM: ${color3} $mem/$memmax ${color purple}${membar 10}$color ${offset -100}${font :size=8}${color5}$memperc%${font :size=8}
${color4}Swap: ${color3} $swap/$swapmax ${color purple}${swapbar 10}$color ${offset -100}${font :size=8}${color5}$swapperc%${font :size=8}
${color4}HD IO: ${color3}${diskio} ${color #0077ff}${color #0077ff}${alignr}${diskiograph 10, 150 ff0000 0000ff}${color}
${color7}FILE SYSTEM (Total / Free -- Percent Used) ${hr 2} ${color}
${color4}/root: ${color5}${fs_size /} / ${fs_free /}${color} ${color6}${fs_bar 10 /}${color5}${offset -40}${fs_used_perc /root}%${color}
${color4}/home: ${color5}${fs_used /home} / ${fs_free /home} ${color6}${fs_bar 10 /home}${color5}${offset -40}${fs_used_perc /home}%${color}
${color4}/var: ${color5}${fs_used /var} / ${fs_free /var} ${color6}${fs_bar 10 /var}${color5}${offset -40}${fs_used_perc /var}%${color}
${color4}/usr/local: ${color5}${fs_used /usr/local} / ${fs_free /usr/local} ${color6}${fs_bar 10 /usr/local}${color5}${offset -40}${fs_used_perc /usr/local}%${color}
${color4}/data: ${color5}${fs_used /data} / ${fs_free /data} ${color6}${fs_bar 10 /data}${color5}${offset -40}${fs_used_perc /data}%${color}
${color7}PROCESSES ${hr 2}$color
${color tomato} PROC NAME ${alignr}PID CPU% MEM%$color
${color4}${top name 1} ${alignr}${color5}${top pid 1} ${top cpu 1} ${top mem 1}${color}
${color4}${top name 2} ${alignr}${color5}${top pid 2} ${top cpu 2} ${top mem 2}${color}
${color4}${top name 3} ${alignr}${color5}${top pid 3} ${top cpu 3} ${top mem 3}${color}
${color4}${top name 4} ${alignr}${color5}${top pid 4} ${top cpu 4} ${top mem 4}${color}
${if_up eth1}${color7}NETWORK ${color2}eth1 ${addr br0}) ${color7}${hr 2}$color
${color4}Down: ${color Red}${downspeedf eth1}${color} k/s ${alignr}${color4}Up: ${color Red}${upspeedf eth1}${color} k/s
${color blue}${downspeedgraph eth1 15,100 ff0000 0000ff} ${alignr}${color red}${upspeedgraph eth1
15,100 0000ff ff0000}$color
${color4}Total: ${color5}${totaldown eth1} ${alignr}${color4}Total: ${color5}${totalup eth1}
${else}
${color7}NETWORK: No Network - GW: ${gw_ip} ${color7}${hr 2}
${endif}
${color7}LOGGING ${hr 2}$color
${color5}${execi 30 tail -n3 /var/log/messages | fold -w50}
${color7}WEATHER${hr 2}$color
${color4} Leesburg, VA: ${color4}Current: ${color5}${execi 3600 python ~/Scripts/conkyForecast.py --location=USVA0427 --refetch --datatype=CC}${color4}
Temp: ${color5}${execi 3600 python ~/Scripts/conkyForecast.py --location=USVA0427 -i --refetch --datatype=LT}${color4} Precip: ${color5}${execi 3600 python ~/Scripts/conkyForecast.py --location=USVA0427 -i --refetch --datatype=PC}${color4} Humidity: ${color5}${execi 3600 python ~/Scripts/conkyForecast.py --location=USVA0427 -i --refetch --datatype=HM} ${color4}
Winds: ${color5}${execi 3600 python ~/Scripts/conkyForecast.py --location=USVA0427 -i --refetch --datatype=WS} ${color4}From The:${color5} ${execi 3600 python ~/Scripts/conkyForecast.py --location=USVA0427 -i --refetch --datatype=WD} ${color cyan}${font Arrows:size=10}${execi 3600 python ~/Scripts/conkyForecast.py -r --location=USVA0427 --datatype=BF}${font :size=8}
${font Weather:size=30}${color cyan}${execi 10800 python ~/Scripts/conkyForecast.py --location=USVA0427 --datatype=WF --startday=0 --endday=0 --spaces=0}${font :size=8} ${voffset -22}${offset 10}${font Weather:size=30}${color cyan}${execi 10800 python ~/Scripts/conkyForecast.py --location=USVA0427 --datatype=WF --startday=1 --endday=1}${font :size=8} ${voffset -22}${offset 15}${font Weather:size=30}${color cyan}${execi 10800 python ~/Scripts/conkyForecast.py --location=USVA0427 --datatype=WF --startday=2 --endday=2}${font :size=8} ${voffset -22}${offset 15}${font Weather:size=30}${color cyan}${execi 10800 python ~/Scripts/conkyForecast.py --location=USVA0427 --datatype=WF --startday=3 --endday=3}${font :size=8} ${voffset -22}${offset 15}${font Weather:size=30}${color cyan}${execi 10800 python ~/Scripts/conkyForecast.py --location=USVA0427 --datatype=WF --startday=4 --endday=4}${font :size=8}
${color1}${font monospace:bold:size=10} Now ${color1}${execi 10800 python ~/Scripts/conkyForecast.py --location=USVA0427 --datatype=DW --shortweekday --startday=1 --endday=4 --spaces=3}
${font monospace:bold:size=10}${color4}Hi: ${color5}${execi 10800 python ~/Scripts/conkyForecast.py --location=USVA0427 -i --datatype=HT --hideunits --startday=0} ${execi 10800 python ~/Scripts/conkyForecast.py --location=USVA0427 -i --datatype=HT --hideunits --startday=1 --endday=4 --spaces=3}
${font monospace:bold:size=10}${color4}Lo: ${color5}${execi 10800 python ~/Scripts/conkyForecast.py --location=USVA0427 -i --datatype=LT --hideunits --night --startday=0} ${execi 10800 python ~/Scripts/conkyForecast.py --location=USVA0427 -i --datatype=LT --hideunits --night --startday=1 --endday=4 --spaces=3}
I am using weather and other advance features they work great. In fact, if I start conky by running
Bookmarks