VSIDO Community

VSIDO Support => Conky => Topic started by: Sector11 on January 14, 2013, 05:56:31 PM

Title: Conky Support, Codes and Screenshots
Post by: Sector11 on January 14, 2013, 05:56:31 PM
I do this in the form of a "screenshot thread" as well.
(http://t.imgbox.com/acgXad5M.jpg) (http://imgbox.com/acgXad5M) ...  (http://t.imgbox.com/aczDUrM8.jpg) (http://imgbox.com/aczDUrM8)
Three new VSIDO installs:
Title: Multiple Conkys on Multiple Desktops
Post by: Sector11 on January 14, 2013, 06:02:53 PM
By design, in a terminal conky will start the default conky at: etc/conky/conky.conf.

Now if a user, or the creator of a distro, installs/includes conky they use the "user" default location: ~/.conkyrc and that will be the conky that conky runs. This is the case with VSIDO, the default conky is ~/.conkyrc

But what if you want to run 2, 3, 4,  5 - 10 conkys.

Use a bash script: ssc.sh
#!/bin/sh
# click to start, click to stop
if pidof conky | grep [0-9] > /dev/null
  then
    exec killall conky
  else
    sleep 30  # sleep not required for xfce on startup - 30 or more for others
    conky -c ~/Conky/conky1 &
    conky -c ~/Conky/conky2 &
    conky -c ~/Conky/conky3 &
    conky -c ~/Conky/conky4 &
  exit
fi


The sleep command can be used like this:
(sleep 30s && conky -c /Conky/conky1) &
(sleep 30s && conky -c /Conky/conky2) &
(sleep 30s && conky -c /Conky/conky3) &
(sleep 30s && conky -c /Conky/conky4) &

but then you need it for every command - which will come in handy in a second.

With ssc.sh you can put it in your OpenBox autostart as well IF you make it the LAST command, it will NOT return to autostart.sh:
## Start conkys
(sleep 2s && /media/5/Conky/OBMenuS/ssc.sh) &
exit


You can assign it to a tint2 clock click function:
clock_rclick_command = /media/5/Conky/OBMenuS/ssc.sh  ## start/stop all my conkys

you can put an entry in OpenBox:
Label: ssc - SSC - Srart|Stop Conky or Bob's your Uncle (anything you want)
Execute: /media/5/Conky/OBMenuS/ssc.sh
[list=*]
Now the multiple desktop trick.

This came to me by way of an old friend "mobilediesel" gotta find him and invite him here.

EDIT: I forgot another VERY important part of this.
There is a line in conky above TEXT, similar to if not that same as:

own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
A lot of people use it because it's what they found in the internet  or in the default conky.

sticky - means the conky is on every desktop.  So for the conkys that you do NOT want on all desktops, drop the sticky.
own_window_hints undecorated,below,skip_taskbar,skip_pager

Next ... Install wmctrl
sudo apt-get install wmctrl

QuoteWmctrl is a command line tool to interact with an
EWMH/NetWM compatible X Window Manager (examples include
Enlightenment, icewm, kwin, metacity, and sawfish).

Wmctrl provides command line access to almost all the features
defined in the EWMH specification. For example it can maximize
windows, make them sticky, set them to be always on top. It can
switch and resize desktops and perform many other useful
operations.

Take a look, 13 conkys running on 4 desktops and only one file to edit to change what's running: ssc.sh

(http://t.imgbox.com/abs4kE8J.jpg) (http://imgbox.com/abs4kE8J)

By trial and error I discovered that 'wmctrl' does not like going from desktop 0 to desktop 1, etc, and then back to desktop 0.  Conky counts desktops: 1, 2, 3, 4, etc but wmctrl counts 0, 1, 2, 3, etc.  And here is where sleep comes in for every command,  Linux reads the bash script lines one at a time and actions them in order, so if there are two lines say lines 7 and 8:

sleep 10 ....
sleep 2 ...

... the sleep 2 line is activates 2 seconds after the scripts starts, not 12 seconds as I once thought.

If your conkys on any particular desktop start slow because they need to gather information, ie weather, the "next" desktop change needs a sleep time to make sure the information is displayed "before" changing the desktop to the next section.  You'll need to test and tweak things to get it right.

So here it is, my "SSC.sh" script, as you see I have commented out conkys but left them there for a bit because I change things occasionally.
#!/bin/bash
# click to start, click to stop

if pidof conky | grep [0-9] > /dev/null
  then
exec killall conky
  else
     #conky -c /media/5/conky/test274.johnraff.conky &
     #conky -c /media/5/conky/test275.johnraff.conky &
#conky -c /media/5/Conky/S11_v9_R.conky &
#conky -c /media/5/conky/test287.memory.conky &

# on desktop 4 only
(sleep 1s && wmctrl -s 3 && conky -c /media/5/conky/Didier-T/conkyrc_meteo_graph_baro) &
(sleep 1s && wmctrl -s 3 && conky -c /media/5/conky/Didier-T/conkyrc_meteo_lua) &

# on desktop 3 only
(sleep 10s && wmctrl -s 2 && conky -c /media/5/Conky/TeoWeatherClock/Teo_Clock_2.conky) &
(sleep 10s && wmctrl -s 2 && conky -c /media/5/Conky/jed_greyclock_conkyrc) &
#(sleep 10s && wmctrl -s 2 && conky -c /media/5/Conky/Chronograph_mrpeachy.conky) &
#(sleep 10s && wmctrl -s 2 && conky -c /media/5/conky/Didier-T/conkyrc_meteo_graph_baro) &
#(sleep 10s && wmctrl -s 2 && conky -c /media/5/conky/Didier-T/conkyrc_meteo_lua) &

# on desktop 2 only (change to 5s if using desktop 3)
(sleep 18s && wmctrl -s 1 && conky -c /media/5/Conky/S11_Dates.conky) &
(sleep 18s && wmctrl -s 1 && conky -c /media/5/Conky/S11_VNS.conky) &
(sleep 18s && wmctrl -s 1 && conky -c /media/5/Conky/S11_Rem_Cal.conky) &
(sleep 18s && wmctrl -s 1 && conky -c /media/5/Conky/S11_Disk_Activity.conky) &
#(sleep 18s && wmctrl -s 1 && conky -c /media/5/Conky/S11_v9_SM.conky) &
#(sleep 18s && wmctrl -s 1 && conky -c /media/5/Conky/S11_mrp_FSYS.conky) &
(sleep 18s && wmctrl -s 1 && conky -c /media/5/Conky/S11_v9_H.conky) &
(sleep 18s && wmctrl -s 1 && conky -c /media/5/Conky/S11_v9_R.conky) &

# on desktop 1 only (change to 10s if using desktop 3)
(sleep 25s && wmctrl -s 0 && conky -c /media/5/Conky/VO_Radiotray.conky) &
(sleep 25s && wmctrl -s 0 && conky -c /media/5/Conky/Chronograph_mrpeachy.conky) &
#(sleep 25s && wmctrl -s 0 && conky -c /media/5/Conky/TeoWeatherClock/Teo_Clock_2.conky) &
#(sleep 25s && wmctrl -s 0 && conky -c /media/5/Conky/S11_Chronograph.conky) &
#(sleep 25s && wmctrl -s 0 && conky -c /media/5/Conky/S11_coin.conky) &

# on all desktops
(sleep 15s && wmctrl -s 0 && conky -c /media/5/Conky/S11_email.conky) &
  exit
fi


If you have questions, just ask.
Title: Dark or Light wallpapers with different tint2 configs
Post by: Sector11 on January 14, 2013, 06:05:36 PM
Create two bash files "light" and "dark" put them in your path (~/bin) and make them executable.

These are just some setups I have (one is default stuff) so you'll have to change things to match your setup.  These batch files also assume you have conky and tint2 running in one form or another

Light background (my bash file names are different I have light/dark bash scripts for another purpose)

(http://t.imgbox.com/aclFCmps.jpg) (http://imgbox.com/aclFCmps)

~/bin/light

#!/bin/bash
# ----------
# Light backgrounds

(sleep 1s && killall tint2 && tint2) &
(sleep 1s && killall conky && conky) &
exit 0


(http://t.imgbox.com/acns0ttZ.jpg) (http://imgbox.com/acns0ttZ)

~/bin/dark

#!/bin/bash
# ----------
# dark backgrounds

  (sleep 1s && killall tint2 && tint2 -c  ~/.config/tint2/t2launchrc) &
  (sleep 1s && killall tint2 && tint2 -c  ~/.config/tint2/tint2rc_bot) &
    (sleep 1s && killall conky && conky -c ~/.conkyrc.vsido) &
exit 0


Now just open a terminal and type "light" or "dark"

Or in OpenBox two menu items:

label: Dark
Execute ~/bin/dark



label: Light
Execute ~/bin/light


Of course I get around light/dark walls by using a shadow background, but it's not necessary.  See the light wallpaper above - on a dark background the shadow cannot be seen.

OH OH!!!  I need to use The ORB now...  new changes coming.
Title: Conky Links
Post by: Sector11 on January 14, 2013, 06:06:27 PM
Official Conky Sources
Conky Home (http://conky.sourceforge.net/)
Conky Documentation (http://conky.sourceforge.net/documentation.html)
Conky Manual (http://conky.sourceforge.net/docs.html)
Config Settings (above TEXT) (http://conky.sourceforge.net/config_settings.html)
Conky Variables (below TEXT) (http://conky.sourceforge.net/variables.html)
Conky Wiki! (http://wiki.conky.cc/index.php?title=Conky_Wiki)

Interesting Links
ConkyGUI (http://conkygui.sourceforge.net/) - its aim is to speed the editing of the conky config files.
blendmaster.name (http://blendmaster.name/2009/01/compiz-and-conky-bff/) - Conky and Compiz

Conky Threads on various forums (lots of samples)

#! Crunchbang - they can't have just one. Noooooo - conky isn't interesting enough.
The New Monster Conky Thread (http://crunchbanglinux.org/forums/topic/16909/the-new-monster-conky-thread/)
My Conky Config (http://crunchbanglinux.org/forums/topic/59/my-conky-config/) - Archive
Conky Help (http://crunchbanglinux.org/forums/topic/2047/conky-help/) - Archive
August 2011 Conky Thread (http://crunchbanglinux.org/forums/topic/14541/august-2011-conky-thread/) - Archive
September 2011 Conky Thread (http://crunchbanglinux.org/forums/topic/14877/september-2011-conky-thread/) - Archive
October 2011 Conky Thread (http://crunchbanglinux.org/forums/topic/15318/october-2011-conky-thread/) - Archive
November 2011 Conky Thread (http://crunchbanglinux.org/forums/topic/15850/november-2011-conky-thread/) - Archive
December 2011 Conky Thread (http://crunchbanglinux.org/forums/topic/16380/december-2011-conky-thread/) - Archive
Conky weather scripts using Accuweather/WUnderground/NWS/Weather.com (http://crunchbanglinux.org/forums/topic/19235/conky-weather-scripts-using-accuweatherwundergroundnwsweathercom/) - TeoBigusGeekus
interactive conky (http://crunchbanglinux.org/forums/topic/18419/interactive-conky/) - mrpeachy
weather in conky (v9000 LUA script) (http://crunchbanglinux.org/forums/topic/16100/weather-in-conky-lua-scripts/) - mrpeachy

ARCH Linux
conky configs and screenshots! (https://bbs.archlinux.org/viewtopic.php?id=39906/)
Debian Post your conkyrc + screenshot (http://forums.debian.net/viewtopic.php?f=3&t=16707)
Fedora Conky & .conkyrc - Examples & Screenshots (http://forums.fedoraforum.org/showthread.php?t=187902)

Ubuntu
Post your .conkyrc files w/ screenshots (http://ubuntuforums.org/showthread.php?t=281865)
Conky Lua & Cairo Troubleshooting (http://ubuntuforums.org/showthread.php?t=1280453)
LinuxMint Conky Showoff thread (http://forums.linuxmint.com/viewtopic.php?f=60&t=30209&start=0)

openSUSE
How to install conky with both cairo and imlib2 in lua bingdings (http://forums.opensuse.org/english/get-help-here/applications/443850-how-install-conky-both-cairo-imlib2-lua-bingdings.html) -- Thread
malcolmlewis: Python/openSUSE_Factory:
conkyForecast (http://software.opensuse.org/search?q=conkyforecast&baseproject=ALL&lang=en&include_home=true)
conkygooglecalendar (http://software.opensuse.org/search?q=conkygooglecalendar&baseproject=ALL&lang=en&include_home=true)
conkykeyring (http://software.opensuse.org/search?q=conkykeyring&baseproject=ALL&lang=en&include_home=true)

Conky-Artists-Group - at deviantart.com
deviantart·com (https://conky-artists-group.deviantart.com/) - Founder: Londonali1010 (https://londonali1010.deviantart.com/)

arpinux (https://arpinux.deviantart.com/), BigRZA (https://bigrza.deviantart.com/), Blitz-Bomb (https://blitz-bomb.deviantart.com/), Chicoray (https://chicoray.deviantart.com/), Elchacmool (https://elchacmool.deviantart.com/), ElderVLaCoste (https://eldervlacoste.deviantart.com/), Freeazy (https://freeazy.deviantart.com/), giancarlo64 (https://giancarlo64.deviantart.com/), Helmuthdu (https://helmuthdu.deviantart.com/), Iacoporosso (https://iacoporosso.deviantart.com/), LaGaDesk (https://lagadesk.deviantart.com/), minteastwood (https://minteastwood.deviantart.com/), Mloodszy (https://mloodszy.deviantart.com/), mmesantos1 (https://mmesantos1.deviantart.com/), Psyjunta (https://psyjunta.deviantart.com/), Pukinpr (https://pukinpr.deviantart.com/), Shamen456 (https://shamen456.deviantart.com/), Votritis (https://votritis.deviantart.com/), vrkalak (https://vrkalak.deviantart.com/), wlourf (https://wlourf.deviantart.com/)

Other links (blogs, wikis, websites, etc.)

! CrunchBang Conky Wiki (http://crunchbanglinux.org/wiki/conky) – An excellent reference.
ARCHWiki: Conky (https://wiki.archlinux.org/index.php/Conky) - Also and excellent source.
todo.txt-cli (http://wiki.github.com/ginatrapani/todo.txt-cli/linux-with-conky)
Gentoo Linux Conky Howto (http://www.gentoo.org/doc/en/conky-howto.xmldoc_chap1)

Blogs:
Lusule Online:
[list=*]
Lua Links
Blogs:
The Peachy Blog (http://thepeachyblog.blogspot.com/p/index-or-home-page.html)
Blog about conky & Lua (http://u-scripts.blogspot.com/) -- by Wlourf

Links
lua API (http://conky.sourceforge.net/lua.html) -- sourceforge
The Programing Language Lua (http://www.lua.org/)
About Lua (http://www.lua.org/about.html)
Lua (programming language) (http://en.wikipedia.org/wiki/Lua_%28programming_language%29) -- wikipedia
Lua-users wiki (http://lua-users.org/wiki/LuaTutorial) - Tutorial
Lua: for the beginner (http://lua.gts-stolberg.de/en/index.php), italia (http://lua.gts-stolberg.de/it/index.php%7C), français (http://lua.gts-stolberg.de/fr/index.php%7C), español (http://lua.gts-stolberg.de/es/index.php%7C), Deutsche (http://lua.gts-stolberg.de/index.php) -- a German site, very nice
Lua-Cairo Binding (http://luaforge.net/projects/luacairo/)

Cairo links
Official page of the Cairo 2D library (http://www.cairographics.org/)
Some samples (http://www.cairographics.org/samples/)
A tutorial for beginners (http://www.cairographics.org/tutorial/)
The library manual (http://www.cairographics.org/manual/)
Available functions in the Lua binding of Cairo (http://www.dynaset.org/dogusanh/luacairo.html)

Français
Vos Conkyrc (http://crunchbanglinux-fr.org/forum/viewtopic.php?id=35&p=1) (forum #! Crunchbang (Fr))
(1) Conky : Postez vos conkyrc ou certaines parties intéressantes (http://forum.ubuntu-fr.org/viewtopic.php?id=99471&p=1) (forum Ubuntu - closed)
(2) Conky : Postez vos conkyrc ou certaines parties intéressantes (http://forum.ubuntu-fr.org/viewtopic.php?id=285039&p=1) (forum Ubuntu  - closed)
(3) Conky : Postez vos conkyrc ou certaines parties intéressantes (http://forum.ubuntu-fr.org/viewtopic.php?id=326972) (forum Ubuntu  - closed)
(4) Conky : Postez vos conkyrc ou certaines parties intéressantes (http://forum.ubuntu-fr.org/viewtopic.php?id=426625) (forum Ubuntu)
Postez vos scripts Lua pour Conky ! (http://forum.ubuntu-fr.org/viewtopic.php?id=402081) (forum Ubuntu)
Conky - Partage de scripts (http://forums.fedora-fr.org/viewtopic.php?id=32946) (forum Fedora)

Español
Posteen sus Conky's (http://ubuntuforums.org/showthread.php?t=778190&highlight=Conky)

Deutsch
Mandriva User.de (http://www.mandrivauser.de/) - Conky Inhalt (http://www.mandrivauser.de/doku/doku.php?id=anwendung:multimedia:conky-alles%7C)

Russian
Тема: Постим свой .conkyrc со скриншотом (http://forum.ubuntu.ru/index.php?topic=63273.0)

Italian
Posta il tuo .conkyrc & png (http://forum.ubuntu-it.org/index.php/topic,290268.0.html)
Title: Re: Conky Codes and Images
Post by: Sector11 on January 14, 2013, 06:16:38 PM
ragamatrix posted a nice horizontal conky using mrpeachy's v9000 script for a widescreen monitor. Imagine my surprise when I found it was based on one of my templates.

His screenshot (http://pix.toile-libre.org/upload/original/1357895075.png)

I don't have a screen so I had a shot at redoing it to fit my 1280 screen.  I added a white circle where the moon is since it was a new moon the day I made it and that space was empty, it is exactly the same size as the moon image being called so you'll be able to see the unseen part of the moon.

Under construction: · · · · · · · And the finished work:
(http://t.imgbox.com/ackVRjM9.jpg) (http://imgbox.com/ackVRjM9) (http://t.imgbox.com/abeKsWQ0.jpg) (http://imgbox.com/abeKsWQ0)

I also put all the controls back in place so changing one number changes a whole "group" ----

The conkys above use:

-- horizontal calc added to each days "X" values
dataxp=85 -- ???+(dataxp*1)


change that one number:

-- horizontal calc added to each days "X" values
dataxp=75 -- ???+(dataxp*1)

and things move closer:
(http://t.imgbox.com/abekV4e6.jpg) (http://imgbox.com/abekV4e6)

Unfortunately it's not as easy with the draw-bg.lua script.  I also dropped the ${voffset -500} line from the conky by putting all the lua calls on one line. The ending \ is what does that.

The conky:

# killall conky && conky -c /media/5/conky/conkybarre_v9000 &
# by ragamatrix - Jan 2013
# -- Paramètres Conky Météo -- #
# Text alignment, other possible values are commented
alignment tl
#alignment top_right
#alignment bottom_left
#alignment bottom_right
# -- Conky settings -- #
background yes
update_interval 1
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
double_buffer yes
no_buffers yes
text_buffer_size 265 #2048
imlib_cache_size 0
# -- Window specifications -- #
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,sticky,skip_taskbar,skip_pager,below
show_graph_range no
show_graph_scale no
short_units yes
own_window_class Conky
border_inner_margin 0
border_outer_margin 0
# -- Graphics settings -- #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
# -- Colours -- #
default_color 00BFFF #  0 191 255 DeepSkyBlue
color0 FFDEAD #255 222 173 NavajoWhite
color1 7FFF00 #127 255   0 Chartreuse
color2 778899 #119 136 153 LightSlateGray
color3 FF8C00 #255 140   0 DarkOrange
color4 B0E0E6 #Powder Blue #F0FFFF #240 255 255 Azure
color5 FFDEAD #255 222 173 NavajoWhite
color6 7B68EE #123 104 238 MediumSlateBlue
color7 00FFFF #  0 255 255 Cyan
color8 FFFF00 #255 255   0 Yellow
color9 FF0000 #255   0   0 Red
# Gap between borders of screen and text
# same thing as passing -x at command line

gap_x 5 # left-right
gap_y 5 # up-down
# Minimum size of text area

minimum_size 1900 86  #Taille minimum (px) ; largeur / hauteur
maximum_width 1900  #Largeur maximum (px)
#out_to_console no
# Force UTF8? note that UTF8 support required XFT
#override_utf8_locale yes
# Stippled borders?
#stippled_borders 0
# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
#total_run_times 0
# set to yes if you want all text to be in uppercase
uppercase no

# Add spaces to keep things from moving about?  This only affects certain objects.
use_spacer right #left right none

# -- Text settings -- #
# Use Xft?
use_xft yes
xftalpha 1.0
#xftfont DejaVu:style=Bold:size=6
xftfont Monofur:bold:size=12

# -- Lua load -- #
lua_load ~/v9000/v9000.lua
lua_draw_hook_pre weather
lua_load /media/5/conky/LUA/template_meteo_barre.lua
lua_load /media/5/Conky/LUA/draw-bg.lua
##############################################

TEXT
${lua conky_draw_bg 15 0 0 480 87 0x000000 0.5}\
${lua conky_draw_bg 15 482 0 75 87 0x000000 0.5}\
${lua conky_draw_bg 15 567 0 75 87 0x000000 0.5}\
${lua conky_draw_bg 15 652 0 75 87 0x000000 0.5}\
${lua conky_draw_bg 15 737 0 75 87 0x000000 0.5}\
${lua conky_draw_bg 15 822 0 75 87 0x000000 0.5}\
${lua conky_draw_bg 15 907 0 75 87 0x000000 0.5}\
${lua conky_draw_bg 15 992 0 75 87 0x000000 0.5}\
${lua conky_draw_bg 15 1076 0 75 87 0x000000 0.5}\
${lua conky_draw_bg 15 1160 0 75 87 0x000000 0.5}\
${lua conky_draw_bg 30 105 5 60 60 0xffffff 0.2}


and the LUA script (with the 85 back in place), imagine my surprise when I saw it - one of mine modified.  :D
--[[
The latest script is a lua only weather script. aka: v9000
http://crunchbang.org/forums/viewtopic.php?id=16100

the file:
http://dl.dropbox.com/u/19008369/weatheragain9000.lua.tar.gz

mrppeachys LUA Tutorial
http://crunchbang.org/forums/viewtopic.php?id=17246
]]
_G.weather_script = function()--#### DO NOT EDIT THIS LINE ##############
--these tables hold the coordinates for each repeat do not edit #########
top_left_x_coordinate={}--###############################################
top_left_y_coordinate={}--###############################################
--#######################################################################
--SET DEFAULTS ##########################################################
--set defaults do not localise these defaults if you use a seperate display script
default_font="Monofur"--font must be in quotes
default_font_size=12
default_color=0xB0E0E6 --Powder Blue
default_alpha=1 --fully opaque
default_image_width=40
default_image_height=40
-- ## New Options ###
default_face="bold"
-- "normal" for normal/normal
-- "bold" for normal/bold
-- "italic" for italic/normal
-- "bolditalic" for italic/bold
--END OF DEFAULTS #######################################################
--START OF WEATHER CODE -- START OF WEATHER CODE -- START OF WEATHER CODE

-- ======================================================================
-- SUN & MOON RISE ------------------------------------------------------
   out({fs=15,x=10,y=14,txt="Sun"})
     out({fs=15,x=50,y=14,txt="|"})
     out({fs=15,x=60,y=14,txt="Moon"})
   out({c=0xF0FFFF,x=10,y=30,txt="Rise "})
     out({c=0xF0FFFF,fs=15,x=50,y=30,txt="|"})
      out({c=0xFFFF00,x=10,y=45,txt=sun_rise_24[1]})
   out({c=0xF0FFFF,x=60,y=30,txt="Rise"})
     out({c=0xFFFF00,fs=15,x=50,y=45,txt="|"})
      out({c=0xFFFF00,x=60,y=45,txt=moon_rise_24[1]})
-- SUN & MOON SET -------------------------------------------------------
   out({c=0xF0FFFF,x=10,y=65,txt="Set"})
     out({c=0xF0FFFF,fs=15,x=50,y=65,txt="|"})
      out({x=10,y=80,txt=sun_set_24[1]})
   out({c=0xF0FFFF,x=60,y=65,txt="Set"})
     out({fs=15,x=50,y=80,txt="|"})
      out({x=60,y=80,txt=moon_set_24[1]})
-- ======================================================================
-- MOON PHASE - CENTRE --------------------------------------------------
   image({x=105,y=05,w=60,h=60,file=moon_icon[1]})
--   image({x=105,y=05,w=60,h=60,file="/media/5/Conky/images/red+x.png"})
   --out({c=0xF0FFFF.0,x=190,y=235,txt=moon_phase[1]})
-- ======================================================================
-- CURRENT FOR TODAY - SEE TOP LEFT -------------------------------------
   image({x=170,y=05,w=60,h=60,file=now["weather_icon"]})
--   image({x=170,y=05,w=60,h=60,file="/media/5/Conky/images/red+x.png"})
   out({x=170,y=70,txt="T"})
      out({c=0xFF8C00,x=180,y=70,txt=now["temp"]})
   out({x=205,y=70,txt="±"})
      out({c=0xF0FFFF,x=215,y=70,txt=now["feels_like"]})
-- ======================================================================
-- FORECAST FOR TODAY ---------------------------------------------------
out({fs=15,x=240,y=14,txt="Forecast"})
   image({x=300,y=20,w=50,h=50,file=weather_icon[1]})
--   image({x=300,y=20,w=50,h=50,file="/media/5/Conky/images/red+x.png"})
-- out({c=0xF0FFFF,x=300,y=23,txt="↑ "})
     out({c=0xFF8C00,fs=14,x=300,y=23,txt=high_temp[1]})
-- out({c=0xF0FFFF,x=330,y=23,txt="↓ "})
     out({c=0x00BFFF,fs=14,x=330,y=23,txt=low_temp[1]})
-- Humidity -------------------------------------------------------------
   out({c=0xF0FFFF,x=240,y=30,txt="Hum"})
      out({x=270,y=30,txt=now["humidity"].."%"})
-- Dew Point ------------------------------------------------------------
   out({c=0xF0FFFF,x=240,y=42,txt="DP"})
      out({x=270,y=42,txt=now["dew_point"].."°"})
-- Chance of Rain -------------------------------------------------------
   out({c=0xF0FFFF,x=240,y=54,txt="CR?"})
      out({x=270,y=54,txt=precipitation[1].."%"})
-- Cloud Cover
   out({c=0xF0FFFF,x=240,y=66,txt="CC"})
      out({x=270,y=66,txt=cloud_cover[1].."%"})
-- Ceiling
--   out({c=0xF0FFFF,x=240,y=65,txt="Ceil"})
--     out({x=270,y=65,txt=now["ceiling"]})
-- BOTTOM
-- UV -------------------------------------------------------------------
   out({c=0xF0FFFF,x=100,y=82,txt="UVI"})
     out({x=130,y=82,txt=uv_index_num[1]})
       out({x=155,y=82,txt=uv_index_txt[1]})
-- Barometric Pressure --------------------------------------------------
   out({c=0xF0FFFF,x=220,y=82,txt="BarP"})
out({x=260,y=82,txt=now["pressure_mb"].." mb"})
-- ======================================================================
-- FORECAST FOR NEXT 3 HOURS --------------------------------------------
-- 1st hour
  image({w=30,h=30,x=360,y=10,file=now["fc_hour1_wicon"]})
--  image({w=30,h=30,x=360,y=10,file="/media/5/Conky/images/red+x.png"})
  out({x=360,y=12,txt=now["fc_hour1_time_24"]..":00"})
  out({c=0xF0FFFF,x=365,y=45,txt=now["fc_hour1_temp"]})
-- 2nd hour
  image({w=30,h=30,x=400,y=10,file=now["fc_hour2_wicon"]})
--  image({w=30,h=30,x=400,y=10,file="/media/5/Conky/images/red+x.png"})
  out({x=400,y=12,txt=now["fc_hour2_time_24"]..":00"})
  out({c=0xF0FFFF,x=405,y=45,txt=now["fc_hour3_temp"]})
-- 3rd hour
  image({w=30,h=30,x=440,y=10,file=now["fc_hour3_wicon"]})
--  image({w=30,h=30,x=440,y=10,file="/media/5/Conky/images/red+x.png"})
out({x=440,y=12,txt=now["fc_hour3_time_24"]..":00"})
out({c=0xF0FFFF,x=445,y=45,txt=now["fc_hour3_temp"]})
-- ======================================================================
-- WIND INFORMATION for today--------------------------------------------
   image({w=30,h=30,x=360,y=50,file=now["wind_icon"]})
-- image({w=30,h=30,x=360,y=50,file="/media/5/Conky/images/red+x.png"})
   out({fs=14,x=400,y=61,txt=now["wind_deg"]})
   out({fs=14,x=442,y=62,txt=now["wind_nesw"]})
--   out({x=333,y=265,txt="@"})
      out({fs=14,x=400,y=76,txt=now["wind_km"]})

---------------------------------------------- END FORECAST FOR TODAY ---
-- ======================================================================

-- forecast calculations
-- horizontal text calcs
dataxm=497
dataxn=527
dataxd=510
dataxt=535
dataxrs=503
-- vertical text calcs
dataymd=13
datayn=25
datayh=35
datayl=60
datayr=73
datays=83
-- image calcs
imx=490
imy=25
-- horizontal calc added to each days "X" values
dataxp=85 -- ???+(dataxp*1)

-- FORECAST for the next 9 days

-- Forecast day 2 -- x = l|r  y = u|d
out({x=dataxm,y=dataymd,txt=forecast_month_short[2]})
out({x=dataxn,y=dataymd,txt=forecast_date[2]})
  out({x=dataxd,y=datayn,txt=forecast_day_short[2]})
image({x=imx,y=imy,file=weather_icon[2]})
-- image({x=imx,y=imy,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,x=dataxt,y=datayh,txt=high_temp[2]})
out({c=0x00BFFF,x=dataxt,y=datayl,txt=low_temp[2]})
out({c=0xFFFF00,x=dataxrs,y=datayr,txt=sun_rise_24[2]})
out({x=dataxrs,y=datays,txt=sun_set_24[2]})

-- Forecast day 3 -- x = l|r  y = u|d
out({x=dataxm+(dataxp*1),y=dataymd,txt=forecast_month_short[3]})
out({x=dataxn+(dataxp*1),y=dataymd,txt=forecast_date[3]})
  out({x=dataxd+(dataxp+1),y=datayn,txt=forecast_day_short[3]})
image({x=imx+(dataxp*1),y=imy,file=weather_icon[3]})
-- image({x=imx+(dataxp*1),y=imy,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,x=dataxt+(dataxp*1),y=datayh,txt=high_temp[3]})
out({c=0x00BFFF,x=dataxt+(dataxp*1),y=datayl,txt=low_temp[3]})
out({c=0xFFFF00,x=dataxrs+(dataxp*1),y=datayr,txt=sun_rise_24[3]})
out({x=dataxrs+(dataxp*1),y=datays,txt=sun_set_24[3]})

-- Forecast day 4 -- x = l|r  y = u|d
out({x=dataxm+(dataxp*2),y=dataymd,txt=forecast_month_short[4]})
out({x=dataxn+(dataxp*2),y=dataymd,txt=forecast_date[4]})
  out({x=dataxd+(dataxp*2),y=datayn,txt=forecast_day_short[4]})
image({x=imx+(dataxp*2),y=imy,file=weather_icon[4]})
-- image({x=imx+(dataxp*2),y=imy,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,x=dataxt+(dataxp*2),y=datayh,txt=high_temp[4]})
out({c=0x00BFFF,x=dataxt+(dataxp*2),y=datayl,txt=low_temp[4]})
out({c=0xFFFF00,x=dataxrs+(dataxp*2),y=datayr,txt=sun_rise_24[4]})
out({x=dataxrs+(dataxp*2),y=datays,txt=sun_set_24[4]})

-- Forecast day 5 -- x = l|r  y = u|d
out({x=dataxm+(dataxp*3),y=dataymd,txt=forecast_month_short[5]})
out({x=dataxn+(dataxp*3),y=dataymd,txt=forecast_date[5]})
  out({x=dataxd+(dataxp*3),y=datayn,txt=forecast_day_short[5]})
image({x=imx+(dataxp*3),y=imy,file=weather_icon[5]})
-- image({x=imx+(dataxp*3),y=imy,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,x=dataxt+(dataxp*3),y=datayh,txt=high_temp[5]})
out({c=0x00BFFF,x=dataxt+(dataxp*3),y=datayl,txt=low_temp[5]})
out({c=0xFFFF00,x=dataxrs+(dataxp*3),y=datayr,txt=sun_rise_24[5]})
out({x=dataxrs+(dataxp*3),y=datays,txt=sun_set_24[5]})

-- Forecast day 6 -- x = l|r  y = u|d
out({x=dataxm+(dataxp*4),y=dataymd,txt=forecast_month_short[6]})
out({x=dataxn+(dataxp*4),y=dataymd,txt=forecast_date[6]})
  out({x=dataxd+(dataxp*4),y=datayn,txt=forecast_day_short[6]})
image({x=imx+(dataxp*4),y=imy,file=weather_icon[6]})
-- image({x=imx+(dataxp*4),y=imy,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,x=dataxt+(dataxp*4),y=datayh,txt=high_temp[6]})
out({c=0x00BFFF,x=dataxt+(dataxp*4),y=datayl,txt=low_temp[6]})
out({c=0xFFFF00,x=dataxrs+(dataxp*4),y=datayr,txt=sun_rise_24[6]})
out({x=dataxrs+(dataxp*4),y=datays,txt=sun_set_24[6]})

-- Forecast day 7 -- x = l|r  y = u|d
out({x=dataxm+(dataxp*5),y=dataymd,txt=forecast_month_short[7]})
out({x=dataxn+(dataxp*5),y=dataymd,txt=forecast_date[7]})
  out({x=dataxd+(dataxp*5),y=datayn,txt=forecast_day_short[7]})
image({x=imx+(dataxp*5),y=imy,file=weather_icon[7]})
-- image({x=imx+(dataxp*5),y=imy,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,x=dataxt+(dataxp*5),y=datayh,txt=high_temp[7]})
out({c=0x00BFFF,x=dataxt+(dataxp*5),y=datayl,txt=low_temp[7]})
out({c=0xFFFF00,x=dataxrs+(dataxp*5),y=datayr,txt=sun_rise_24[7]})
out({x=dataxrs+(dataxp*5),y=datays,txt=sun_set_24[7]})

-- Forecast day 8 -- x = l|r  y = u|d
out({x=dataxm+(dataxp*6),y=dataymd,txt=forecast_month_short[8]})
out({x=dataxn+(dataxp*6),y=dataymd,txt=forecast_date[8]})
  out({x=dataxd+(dataxp*6),y=datayn,txt=forecast_day_short[8]})
image({x=imx+(dataxp*6),y=imy,file=weather_icon[8]})
-- image({x=imx+(dataxp*6),y=imy,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,x=dataxt+(dataxp*6),y=datayh,txt=high_temp[8]})
out({c=0x00BFFF,x=dataxt+(dataxp*6),y=datayl,txt=low_temp[8]})
out({c=0xFFFF00,x=dataxrs+(dataxp*6),y=datayr,txt=sun_rise_24[8]})
out({x=dataxrs+(dataxp*6),y=datays,txt=sun_set_24[8]})

-- Forecast day 9 -- x = l|r  y = u|d
out({x=dataxm+(dataxp*7),y=dataymd,txt=forecast_month_short[9]})
out({x=dataxn+(dataxp*7),y=dataymd,txt=forecast_date[9]})
  out({x=dataxd+(dataxp*7),y=datayn,txt=forecast_day_short[9]})
image({x=imx+(dataxp*7),y=imy,file=weather_icon[9]})
-- image({x=imx+(dataxp*7),y=imy,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,x=dataxt+(dataxp*7),y=datayh,txt=high_temp[9]})
out({c=0x00BFFF,x=dataxt+(dataxp*7),y=datayl,txt=low_temp[9]})
out({c=0xFFFF00,x=dataxrs+(dataxp*7),y=datayr,txt=sun_rise_24[9]})
out({x=dataxrs+(dataxp*7),y=datays,txt=sun_set_24[9]})

-- Forecast day 10 -- x = l|r  y = u|d
out({x=dataxm+(dataxp*8),y=dataymd,txt=forecast_month_short[10]})
out({x=dataxn+(dataxp*8),y=dataymd,txt=forecast_date[10]})
  out({x=dataxd+(dataxp*8),y=datayn,txt=forecast_day_short[10]})
image({x=imx+(dataxp*8),y=imy,file=weather_icon[10]})
-- image({x=imx+(dataxp*8),y=imy,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,x=dataxt+(dataxp*8),y=datayh,txt=high_temp[10]})
out({c=0x00BFFF,x=dataxt+(dataxp*8),y=datayl,txt=low_temp[10]})
out({c=0xFFFF00,x=dataxrs+(dataxp*8),y=datayr,txt=sun_rise_24[10]})
out({x=dataxrs+(dataxp*8),y=datays,txt=sun_set_24[10]})

--]]
--#######################################################################
--END OF WEATHER CODE ----END OF WEATHER CODE ----END OF WEATHER CODE ---
--#######################################################################
end--of weather_display function do not edit this line ##################
--#######################################################################


Today we have a moon phase so here it is again complete with an old wallpaper with an added twist:
(http://t.imgbox.com/actlLUVZ.jpg) (http://imgbox.com/actlLUVZ)
VSIDO is popping out of a Stargate!

For anyone interested here is the 10x10 pixel red+x.png (http://i.imgbox.com/advAmbiJ.png) I use to place images that have transparent edges in conky.
Title: Re: Conky Codes and Images
Post by: Sector11 on January 14, 2013, 06:52:36 PM
Part III of III

VSIDO defauly conky is a nice conky, works well on a large screen.  I modified it just a touch here, and tad there and got:

S11_VSIDO.conkyrc with a touch of Teo! - 1a_accuweather_conky_INT/accuweather_conky
(http://t.imgbox.com/adj5QLkS.jpg) (http://imgbox.com/adj5QLkS)

The conky
# killall conky && conky -c /media/5/Conky/S11_VSIDO.conkyrc &
# Original by: VastOne on VSIDO

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# fiddle with window
use_spacer right

# Use Xft?
use_xft yes
xftfont Monofur:bold:size=12
xftalpha 1.0
# text_buffer_size 256

# Update interval in seconds
update_interval 1

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

own_window yes
own_window_type normal
own_window_hints undecorated,below,skip_taskbar,skip_pager
own_window_transparent yes
# own_window_argb_visual yes
own_window_class Conky

# Stippled borders?
stippled_borders 0

# border margins
border_inner_margin 5

# border width
border_width 0

# Default colors and also border colors
default_color 00BFFF #  0 191 255 DeepSkyBlue
color0 FFDEAD #255 222 173 NavajoWhite
color1 7FFF00 #127 255   0 Chartreuse
color2 778899 #119 136 153 LightSlateGray
color3 FF8C00 #255 140   0 DarkOrange
color4 F0FFFF #240 255 255 Azure
color5 FFDEAD #255 222 173 NavajoWhite
color6 7B68EE #123 104 238 MediumSlateBlue
color7 00FFFF #  0 255 255 Cyan
color8 FFFF00 #255 255   0 Yellow
color9 FF0000 #255   0   0 Red

#default_shade_color black
#default_outline_color grey
own_window_colour 000000

# Text alignment, other possible values are commented
#alignment top_middle
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 10
gap_y 10

minimum_size 1150 0  ## width, height
#maximum_width 1000     ## width


# 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

# Shortens units to a single character (kiB->k, GiB->G, etc.). Default is off (no).
short_units yes

lua_load /media/5/Conky/LUA/draw-bg.lua
# lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.2
#
TEXT
${lua conky_draw_bg 10 0 0 0 0 0x000000 0.3}\
${image /media/5/Conky/images/debian4.png -p 0,0 -s 50x50}\
${execi 600 bash /media/5/Conky/accuweather_conky/accuw_script}\
        ${color}Kernel ${color4}${kernel}\
${color}MEM${color4}${if_match ${memperc}<10}  ${memperc}\
${else}${if_match ${memperc}<100} ${memperc}\
${else}${memperc}${endif}${endif}%\
${color}(${mem})\
${color}CPU${color4}${if_match ${platform f71882fg.2560 temp 1}<100} ${platform f71882fg.2560 temp 1}\
${else}${platform f71882fg.2560 temp 1}${endif}°\
${color}MB${color4}${if_match ${platform f71882fg.2560 temp 2}<100} ${platform f71882fg.2560 temp 2}\
${else}${platform f71882fg.2560 temp 2}${endif}°\
${color}HD${color4}${if_match ${execi 5 hddtemp -n /dev/sda}<100} ${execi 5 hddtemp -n /dev/sda}\
${else}${execi 5 hddtemp -n /dev/sda}${endif}${color1}°\
${color}${goto 680}Now\
${goto 760}${execi 600 sed -n '1p' /media/5/Conky/accuweather_conky/tod_ton}\
${goto 840}${execi 600 sed -n '6p' /media/5/Conky/accuweather_conky/tod_ton}\
${goto 920}${execi 600 sed -n '11p' /media/5/Conky/accuweather_conky/tod_ton}\
${goto 1000}${execi 600 sed -n '16p' /media/5/Conky/accuweather_conky/tod_ton}\
${goto 1080}${execi 600 sed -n '1p' /media/5/Conky/accuweather_conky/last_days}
        ${color}NET${color4} Dn: ${color2}${downspeedgraph eth0 12,150 00ff00 ff0000 -t -l}     ${color}Up: ${color2}${upspeedgraph eth0 12,150 ff0000 00ff00 -t -l}  ${color}Uptime ${color1}${uptime_short}\
${color3}${goto 680}↑ ${execi 600 sed -n '4p' /media/5/Conky/accuweather_conky/tod_ton}°\
${goto 760}↑ ${execi 600 sed -n '9p' /media/5/Conky/accuweather_conky/tod_ton}°\
${goto 840}↑ ${execi 600 sed -n '14p' /media/5/Conky/accuweather_conky/tod_ton}°\
${goto 920}↑ ${execi 600 sed -n '19p' /media/5/Conky/accuweather_conky/tod_ton}°\
${goto 1000}↑ ${execi 600 sed -n '24p' /media/5/Conky/accuweather_conky/tod_ton}°\
${goto 1080}↑ ${execi 600 sed -n '4p' /media/5/Conky/accuweather_conky/last_days}°
        ${color}CPU: 1${color4}${if_match ${cpu cpu1}<10}  ${cpu cpu1}\
${else}${if_match ${cpu cpu1}<100} ${cpu cpu1}\
${else}${cpu cpu0}${endif}${endif}%\
  ${color}2${color4}${if_match ${cpu cpu0}<10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0}<100} ${cpu cpu0}\
${else}${cpu cpu0}${endif}${endif}%\
  ${color}3${color4}${if_match ${cpu cpu0}<10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0}<100} ${cpu cpu0}\
${else}${cpu cpu0}${endif}${endif}%\
  ${color}4${color4}${if_match ${cpu cpu0}<10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0}<100} ${cpu cpu0}\
${else}${cpu cpu0}${endif}${endif}%\
  ${color}Fan ${color4}${platform f71882fg.2560 fan 1} rpm\
${goto 680}↓ ${execi 600 sed -n '5p' /media/5/Conky/accuweather_conky/tod_ton}°\
${goto 760}↓ ${execi 600 sed -n '10p' /media/5/Conky/accuweather_conky/tod_ton}°\
${goto 840}↓ ${execi 600 sed -n '15p' /media/5/Conky/accuweather_conky/tod_ton}°\
${goto 920}↓ ${execi 600 sed -n '20p' /media/5/Conky/accuweather_conky/tod_ton}°\
${goto 1000}↓ ${execi 600 sed -n '25p' /media/5/Conky/accuweather_conky/tod_ton}°\
${goto 1080}↓ ${execi 600 sed -n '5p' /media/5/Conky/accuweather_conky/last_days}°\
${voffset -20}${goto 725}${font conkyweather:size=20}${color4}${execi 600  sed -n '2p' /media/5/Conky/accuweather_conky/curr_cond}\
${goto 805}${execi 600  sed -n '2p' /media/5/Conky/accuweather_conky/tod_ton}\
${goto 885}${execi 600  sed -n '12p' /media/5/Conky/accuweather_conky/tod_ton}\
${goto 965}${execi 600  sed -n '17p' /media/5/Conky/accuweather_conky/tod_ton}\
${goto 1045}${execi 600  sed -n '22p' /media/5/Conky/accuweather_conky/tod_ton}\
${goto 1125}${execi 600  sed -n '2p' /media/5/Conky/accuweather_conky/last_days}${font}
Title: Re: Conky Codes and Images
Post by: Sector11 on January 14, 2013, 06:56:47 PM
Part II of III

A few tweaks to the conky and the accuw_script and it's a little narrower:

1a_accuweather_conky_INT/accuweather_conky Version 2
(http://t.imgbox.com/acn3F9VW.jpg) (http://imgbox.com/acn3F9VW)

The edited conky:
# killall conky && conky -c /media/5/Conky/accuweather_conky/conkyrc_acc_int &
###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
#own_window_colour gray
own_window_class Conky
own_window_title Chronograph Full 2

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type normal
# own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
# own_window_argb_value 0

minimum_size 100 735  ## width, height
maximum_width 100   ## width

gap_x 10  ### left &right
gap_y 10  ### up & down

alignment tl #ml
####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
#xftfont CorporateMonoExtraBold:size=9
xftfont monofur:bold:size=12
# X font when Xft is disabled, you can pick one with program xfontsel
#font 5x7
#font 6x10
#font 7x13
#font 8x13
#font 9x15
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
draw_shades no
default_shade_color black

draw_outline no # amplifies text if yes
default_outline_color black

default_color DCDCDC #220 220 220 Gainsboro
color0 8FBC8F #143 188 143 DarkSeaGreen
color1 C2CCFF #119 136 153 LightSlateGray
color2 FF8C00 #255 140   0 DarkOrange
color3 7FFF00 #127 255   0 Chartreuse
color4 FFA07A #255 160 122 LightSalmon
color5 FFDEAD #255 222 173 NavajoWhite
color6 00BFFF #  0 191 255 DeepSkyBlue
color7 00FFFF #  0 255 255 Cyan
color8 FFFF00 #255 255   0 Yellow
color9 B22222 #178  34  34 FireBrick
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes #no
#default_graph_size 15 40
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################
# Boolean value, if true, Conky will be forked to background when started.
background yes

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 256

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

# If enabled, values which are in bytes will be printed in human readable
# format (i.e., KiB, MiB, etc). If disabled, bytes is printed instead
format_human_readable yes

# Shortens units to a single character (kiB->k, GiB->G, etc.). Default is off.
short_units yes

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
# temperature_unit Fahrenheit

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
### draw-bg.lua - Above and After TEXT - requires a composite manager ########
# ----------------------------------------------------------------------------
lua_load /media/5/Conky/LUA/draw-bg.lua
#TEXT
# ${lua conky_draw_bg 125 0 0 0 0 0x000000 0.3}
# ============================================================================
## OR Both above TEXT - No composite manager required.
# ----------------------------------------------------------------------------
#lua_load /media/5/Conky/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 12 0 0 0 0 0x000000 0.5
# TEXT
#######################################################  End LUA Settings  ###

update_interval 1

TEXT
${lua conky_draw_bg 12 0 0 0 0 0x000000 0.3}\
Looking Out${execi 600 bash /media/5/Conky/accuweather_conky/accuw_script}
Now\
${goto 50}${font conkyweather:size=40}${execi 600  sed -n '2p' /media/5/Conky/accuweather_conky/curr_cond}${font}
${voffset -40} ${execi 600 sed -n '4p' /media/5/Conky/accuweather_conky/curr_cond}°


${execi 600 sed -n '1p' /media/5/Conky/accuweather_conky/tod_ton}\
${goto 50}${font conkyweather:size=40}${execi 600  sed -n '2p' /media/5/Conky/accuweather_conky/tod_ton}${font}
${voffset -40}↑ ${execi 600 sed -n '4p' /media/5/Conky/accuweather_conky/tod_ton}°
↓ ${execi 600 sed -n '5p' /media/5/Conky/accuweather_conky/tod_ton}°
${stippled_hr 5 1}
${execi 600 sed -n '6p' /media/5/Conky/accuweather_conky/tod_ton}\
${goto 50}${font conkyweather:size=40}${execi 600  sed -n '7p' /media/5/Conky/accuweather_conky/tod_ton}${font}
${voffset -40}↑ ${execi 600 sed -n '9p' /media/5/Conky/accuweather_conky/tod_ton}°
↓ ${execi 600 sed -n '10p' /media/5/Conky/accuweather_conky/tod_ton}°
      ${stippled_hr 5 1}
${execi 600 sed -n '11p' /media/5/Conky/accuweather_conky/tod_ton}\
${goto 50}${font conkyweather:size=40}${execi 600  sed -n '12p' /media/5/Conky/accuweather_conky/tod_ton}${font}
${voffset -40}↑ ${execi 600 sed -n '14p' /media/5/Conky/accuweather_conky/tod_ton}°
↓ ${execi 600 sed -n '15p' /media/5/Conky/accuweather_conky/tod_ton}°
      ${stippled_hr 5 1}
${execi 600 sed -n '16p' /media/5/Conky/accuweather_conky/tod_ton}\
${goto 50}${font conkyweather:size=40}${execi 600  sed -n '17p' /media/5/Conky/accuweather_conky/tod_ton}${font}
${voffset -40}↑ ${execi 600 sed -n '19p' /media/5/Conky/accuweather_conky/tod_ton}°
↓ ${execi 600 sed -n '20p' /media/5/Conky/accuweather_conky/tod_ton}°
      ${stippled_hr 5 1}
${execi 600 sed -n '21p' /media/5/Conky/accuweather_conky/tod_ton}\
${goto 50}${font conkyweather:size=40}${execi 600  sed -n '22p' /media/5/Conky/accuweather_conky/tod_ton}${font}
${voffset -40}↑ ${execi 600 sed -n '24p' /media/5/Conky/accuweather_conky/tod_ton}°
↓ ${execi 600 sed -n '25p' /media/5/Conky/accuweather_conky/tod_ton}°
      ${stippled_hr 5 1}
${execi 600 sed -n '1p' /media/5/Conky/accuweather_conky/last_days}\
${goto 50}${font conkyweather:size=40}${execi 600  sed -n '2p' /media/5/Conky/accuweather_conky/last_days}${font}
${voffset -40}↑ ${execi 600 sed -n '4p' /media/5/Conky/accuweather_conky/last_days}°
↓ ${execi 600 sed -n '5p' /media/5/Conky/accuweather_conky/last_days}°
      ${stippled_hr 5 1}
${execi 600 sed -n '6p' /media/5/Conky/accuweather_conky/last_days}\
${goto 50}${font conkyweather:size=40}${execi 600  sed -n '7p' /media/5/Conky/accuweather_conky/last_days}${font}
${voffset -40}↑ ${execi 600 sed -n '9p' /media/5/Conky/accuweather_conky/last_days}°
↓ ${execi 600 sed -n '10p' /media/5/Conky/accuweather_conky/last_days}°
      ${stippled_hr 5 1}
${execi 600 sed -n '11p' /media/5/Conky/accuweather_conky/last_days}\
${goto 50}${font conkyweather:size=40}${execi 600  sed -n '12p' /media/5/Conky/accuweather_conky/last_days}${font}
${voffset -40}↑ ${execi 600 sed -n '14p' /media/5/Conky/accuweather_conky/last_days}°
↓ ${execi 600 sed -n '15p' /media/5/Conky/accuweather_conky/last_days}°
      ${stippled_hr 5 1}
${execi 600 sed -n '16p' /media/5/Conky/accuweather_conky/last_days}\
${goto 50}${font conkyweather:size=40}${execi 600  sed -n '17p' /media/5/Conky/accuweather_conky/last_days}${font}
${voffset -40}↑ ${execi 600 sed -n '19p' /media/5/Conky/accuweather_conky/last_days}°
↓ ${execi 600 sed -n '20p' /media/5/Conky/accuweather_conky/last_days}°
      ${stippled_hr 5 1}
${execi 600 sed -n '21p' /media/5/Conky/accuweather_conky/last_days}\
${goto 50}${font conkyweather:size=40}${execi 600  sed -n '22p' /media/5/Conky/accuweather_conky/last_days}${font}
${voffset -40}↑ ${execi 600 sed -n '24p' /media/5/Conky/accuweather_conky/last_days}°
↓ ${execi 600 sed -n '25p' /media/5/Conky/accuweather_conky/last_days}°


The re-edited accuw_script
#!/bin/bash

#function: test_image_day
test_image_day () {
    case $1 in
         su)
           echo a
         ;;
         msu)
           echo b
         ;;
         psu)
           echo c
         ;;
         ic)
           echo c
         ;;
         h)
           echo c
         ;;
         mc)
           echo d
         ;;
         c)
           echo e
         ;;
         d)
           echo e
         ;;
         f)
           echo 0
         ;;
         s)
           echo h
         ;;
         mcs)
           echo g
         ;;
         psus)
           echo g
         ;;
         t)
           echo l
         ;;
         mct)
           echo k
         ;;
         psut)
           echo k
         ;;
         r)
           echo i
         ;;
         fl)
           echo p
         ;;
         mcfl)
           echo o
         ;;
         psfl)
           echo o
         ;;
         sn)
           echo r
         ;;
         mcsn)
           echo o
         ;;
         i)
           echo E
         ;;
         sl)
           echo u
         ;;
         fr)
           echo i
         ;;
         rsn)
           echo v
         ;;
         w)
           echo 6
         ;;
         ho)
           echo 5
         ;;
         co)
           echo E
         ;;
         cl)
           echo A
         ;;
         mcl)
           echo B
         ;;
         pc)
           echo C
         ;;
         pcs)
           echo G
         ;;
         pct)
           echo K
         ;;
        esac
}

#function: test_image_night
test_image_night () {
    case $1 in
su)
           echo a
         ;;
         msu)
           echo b
         ;;
         psu)
           echo c
         ;;
         c)
           echo f
         ;;
         d)
           echo f
         ;;
         f)
           echo f
         ;;
         s)
           echo h
         ;;
         psus)
           echo g
         ;;
         t)
           echo l
         ;;
         psut)
           echo k
         ;;
         r)
           echo i
         ;;
         fl)
           echo p
         ;;
         psfl)
           echo o
         ;;
         sn)
           echo r
         ;;
         i)
           echo E
         ;;
         sl)
           echo u
         ;;
         fr)
           echo i
         ;;
         rsn)
           echo v
         ;;
         ho)
           echo 5
         ;;
         co)
           echo E
         ;;
         cl)
           echo A
         ;;
         w)
           echo 6
         ;;
         mcl)
           echo B
         ;;
         pc)
           echo C
         ;;
         ic)
           echo B
         ;;
         h)
           echo B
         ;;
         mc)
           echo C
         ;;
         pcs)
           echo G
         ;;
         mcs)
           echo G
         ;;
         pct)
           echo K
         ;;
         mct)
           echo K
         ;;
         mcfl)
           echo O
         ;;
         mcsn)
           echo O
         ;;
        esac
}

kill -STOP $(pidof conky)
killall wget

#put your Accuweather address here
## address="http://www.accuweather.com/en/gr/chania/182654/weather-forecast/182654"
## address="http://www.accuweather.com/en/gr/kastoria/178682/weather-forecast/178682"
## address="http://www.accuweather.com/en/ar/buenos-aires/7894/weather-forecast/7894"
address="http://www.accuweather.com/en/ar/general-urquiza/1228994/weather-forecast/1228994"

loc_id=$(echo $address|sed 's/\/weather-forecast.*$//'|sed 's/^.*\///')
last_number=$(echo $address|sed 's/^.*\///')

curr_addr="$(echo $address|sed 's/weather-forecast.*$//')"current-weather/"$last_number"
wget -O /media/5/Conky/accuweather_conky/curr_cond_raw "$curr_addr"

addr1="$(echo $address|sed 's/weather-forecast.*$//')"daily-weather-forecast/"$last_number"
wget -O /media/5/Conky/accuweather_conky/tod_ton_raw "$addr1"

addr2="$addr1"?day=6
wget -O /media/5/Conky/accuweather_conky/last_days_raw "$addr2"

#current conditions
if [[ -s /media/5/Conky/accuweather_conky/curr_cond_raw ]]; then

    sed -i '/detail-now/,/#details/!d' /media/5/Conky/accuweather_conky/curr_cond_raw
    egrep -i '"cond"|icon i-|detail-tab-panel' /media/5/Conky/accuweather_conky/curr_cond_raw > /media/5/Conky/accuweather_conky/curr_cond
    sed -i -e 's/^.*detail-tab-panel //g' -e 's/^.*icon i-//g' -e 's/"><\/div>.*$//g' /media/5/Conky/accuweather_conky/curr_cond
    sed -i -e 's/^.*"cond">//g' -e 's/&deg/\n/g' -e 's/<\/span>.*"temp">/\n/g' -e 's/<.*>//g' /media/5/Conky/accuweather_conky/curr_cond
    sed -i -e 's/">//g' -e 's/-->//g' -e 's/\r$//g' -e 's/ i-alarm.*$//g' /media/5/Conky/accuweather_conky/curr_cond
time=$(sed -n 1p /media/5/Conky/accuweather_conky/curr_cond)
    image=$(sed -n 2p /media/5/Conky/accuweather_conky/curr_cond)
if [[ $time == day ]]; then
    sed -i 2s/$image/$(test_image_day $image)/ /media/5/Conky/accuweather_conky/curr_cond
elif [[ $time == night ]]; then
    sed -i 2s/$image/$(test_image_night $image)/ /media/5/Conky/accuweather_conky/curr_cond
fi

fi

#First 5 days
if [[ -s /media/5/Conky/accuweather_conky/tod_ton_raw ]]; then

    sed -i '/feed-tabs/,/\.feed-tabs/!d' /media/5/Conky/accuweather_conky/tod_ton_raw
    egrep -i 'Early AM|Today|Tonight|Overnight|icon i-|cond|temp|Mon|Tue|Wed|Thu|Fri|Sat|Sun' /media/5/Conky/accuweather_conky/tod_ton_raw > /media/5/Conky/accuweather_conky/tod_ton
    sed -i -e 's/^.*#">//g' -e 's/^.*icon i-//g' -e 's/^.*cond">//g' -e 's/^.*temp">//g' /media/5/Conky/accuweather_conky/tod_ton
    sed -i -e 's/Lo<\/span> /\n/g' -e 's/<\/a>.*$//g' -e 's/ "><.*$//g' -e 's/&#.*$//g' -e 's/teo//g' /media/5/Conky/accuweather_conky/tod_ton
    sed -i -e 's/<span>.*$//g' -e 's/<\/span>//g' -e 's/\r$//g' -e 's/ i-alarm.*$//g' /media/5/Conky/accuweather_conky/tod_ton
sed -i -e 's/Early AM/E-AM/' -e 's/Today/Day/' -e 's/Tonight/Nite/' -e 's/Overnight/O-nite/' -e 's/Mon$/Mon/' -e 's/Tue$/Tue/' -e 's/Wed$/Wed/' -e 's/Thu$/Thu/' -e 's/Fri$/Fri/' -e 's/Sat$/Sat/' -e 's/Sun$/Sun/' /media/5/Conky/accuweather_conky/tod_ton
    time=$(sed -n 1p /media/5/Conky/accuweather_conky/tod_ton)
    image=$(sed -n 2p /media/5/Conky/accuweather_conky/tod_ton)
if [[ $time == Day ]]; then
    sed -i 2s/$image/$(test_image_day $image)/ /media/5/Conky/accuweather_conky/tod_ton
elif [[ $time == Nite || $time == O-nite || $time == "E-AM" ]]; then
    sed -i 2s/$image/$(test_image_night $image)/ /media/5/Conky/accuweather_conky/tod_ton
        sed -i 3a- /media/5/Conky/accuweather_conky/tod_ton
fi
    for (( i=7; i<=22; i+=5 ))
  do
          image=$(sed -n "${i}"p /media/5/Conky/accuweather_conky/tod_ton)
      sed -i ${i}s/$image/$(test_image_day $image)/ /media/5/Conky/accuweather_conky/tod_ton
  done

fi

#Next 5 days
if [[ -s /media/5/Conky/accuweather_conky/last_days_raw ]]; then

    sed -i '/feed-tabs/,/\.feed-tabs/!d' /media/5/Conky/accuweather_conky/last_days_raw
    egrep -i 'icon i-|cond|temp|Mon|Tue|Wed|Thu|Fri|Sat|Sun' /media/5/Conky/accuweather_conky/last_days_raw > /media/5/Conky/accuweather_conky/last_days
    sed -i -e 's/^.*#">//g' -e 's/^.*icon i-//g' -e 's/^.*cond">//g' -e 's/^.*temp">//g' /media/5/Conky/accuweather_conky/last_days
    sed -i -e 's/Lo<\/span> /\n/g' -e 's/<\/a>.*$//g' -e 's/ "><.*$//g' -e 's/&#.*$//g' -e 's/teo//g' /media/5/Conky/accuweather_conky/last_days
    sed -i -e 's/<span>.*$//g' -e 's/<\/span>//g' -e 's/\r$//g' -e 's/ i-alarm.*$//g' /media/5/Conky/accuweather_conky/last_days
sed -i -e 's/Mon$/Mon/' -e 's/Tue$/Tue/' -e 's/Wed$/Wed/' -e 's/Thu$/Thu/' -e 's/Fri$/Fri/' -e 's/Sat$/Sat/' -e 's/Sun$/Sun/' /media/5/Conky/accuweather_conky/last_days
    for (( i=2; i<=22; i+=5 ))
  do
          image=$(sed -n "${i}"p /media/5/Conky/accuweather_conky/last_days)
      sed -i ${i}s/$image/$(test_image_day $image)/ /media/5/Conky/accuweather_conky/last_days
  done

fi

kill -CONT $(pidof conky)
Title: Re: Conky Codes and Images
Post by: Sector11 on January 14, 2013, 06:58:08 PM
Part I of III

Here's another one of Teo's scripts, shown with draw-bg.lua and various wallpapers.

1a_accuweather_conky_INT/accuweather_conky
(http://t.imgbox.com/adgjsWzg.jpg) (http://imgbox.com/adgjsWzg)
Note: The change from Today to Tonight on the extreme right.  I waited for that to happen.

Using:
minimum_size 140 735  ## width, height
maximum_width 140   ## width

was important to set the size because of all the negative ${voffset} commands to being text up in line.

I have made some changes to the "accuw_script" so that it uses lowercase as well.

The Conky
# killall conky && conky -c /media/5/Conky/accuweather_conky/conkyrc_acc_int &
###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
#own_window_colour gray
own_window_class Conky
own_window_title Chronograph Full 2

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type normal
# own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
# own_window_argb_value 0

minimum_size 140 735  ## width, height
maximum_width 140   ## width

gap_x 10  ### left &right
gap_y 10  ### up & down

alignment tl #ml
####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
#xftfont CorporateMonoExtraBold:size=9
xftfont monofur:bold:size=12
# X font when Xft is disabled, you can pick one with program xfontsel
#font 5x7
#font 6x10
#font 7x13
#font 8x13
#font 9x15
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
draw_shades no
default_shade_color black

draw_outline no # amplifies text if yes
default_outline_color black

default_color DCDCDC #220 220 220 Gainsboro
color0 8FBC8F #143 188 143 DarkSeaGreen
color1 C2CCFF #119 136 153 LightSlateGray
color2 FF8C00 #255 140   0 DarkOrange
color3 7FFF00 #127 255   0 Chartreuse
color4 FFA07A #255 160 122 LightSalmon
color5 FFDEAD #255 222 173 NavajoWhite
color6 00BFFF #  0 191 255 DeepSkyBlue
color7 00FFFF #  0 255 255 Cyan
color8 FFFF00 #255 255   0 Yellow
color9 B22222 #178  34  34 FireBrick
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes #no
#default_graph_size 15 40
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################
# Boolean value, if true, Conky will be forked to background when started.
background yes

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 256

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

# If enabled, values which are in bytes will be printed in human readable
# format (i.e., KiB, MiB, etc). If disabled, bytes is printed instead
format_human_readable yes

# Shortens units to a single character (kiB->k, GiB->G, etc.). Default is off.
short_units yes

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
# temperature_unit Fahrenheit

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
### draw-bg.lua - Above and After TEXT - requires a composite manager ########
# ----------------------------------------------------------------------------
lua_load /media/5/Conky/LUA/draw-bg.lua
#TEXT
# ${lua conky_draw_bg 125 0 0 0 0 0x000000 0.3}
# ============================================================================
## OR Both above TEXT - No composite manager required.
# ----------------------------------------------------------------------------
#lua_load /media/5/Conky/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 12 0 0 0 0 0x000000 0.5
# TEXT
#######################################################  End LUA Settings  ###

update_interval 1

TEXT
${lua conky_draw_bg 12 0 0 0 0 0x000000 0.3}\
Looking Out ${hr 2}$color${execi 600 bash /media/5/Conky/accuweather_conky/accuw_script}
Now\
${goto 90}${font conkyweather:size=40}${execi 600  sed -n '2p' /media/5/Conky/accuweather_conky/curr_cond}${font}
${voffset -40}   ${execpi 600 sed -n '4p' /media/5/Conky/accuweather_conky/curr_cond}°


${execpi 600 sed -n '1p' /media/5/Conky/accuweather_conky/tod_ton}\
${goto 90}${font conkyweather:size=40}${execi 600  sed -n '2p' /media/5/Conky/accuweather_conky/tod_ton}${font}
${voffset -40}    ↑ ${execpi 600 sed -n '4p' /media/5/Conky/accuweather_conky/tod_ton}°
    ↓ ${execpi 600 sed -n '5p' /media/5/Conky/accuweather_conky/tod_ton}°
${stippled_hr 5 1}
${execpi 600 sed -n '6p' /media/5/Conky/accuweather_conky/tod_ton}\
${goto 90}${font conkyweather:size=40}${execi 600  sed -n '7p' /media/5/Conky/accuweather_conky/tod_ton}${font}
${voffset -40}    ↑ ${execpi 600 sed -n '9p' /media/5/Conky/accuweather_conky/tod_ton}°
    ↓ ${execpi 600 sed -n '10p' /media/5/Conky/accuweather_conky/tod_ton}°
          ${stippled_hr 5 1}
${execpi 600 sed -n '11p' /media/5/Conky/accuweather_conky/tod_ton}\
${goto 90}${font conkyweather:size=40}${execi 600  sed -n '12p' /media/5/Conky/accuweather_conky/tod_ton}${font}
${voffset -40}    ↑ ${execpi 600 sed -n '14p' /media/5/Conky/accuweather_conky/tod_ton}°
    ↓ ${execpi 600 sed -n '15p' /media/5/Conky/accuweather_conky/tod_ton}°
          ${stippled_hr 5 1}
${execpi 600 sed -n '16p' /media/5/Conky/accuweather_conky/tod_ton}\
${goto 90}${font conkyweather:size=40}${execi 600  sed -n '17p' /media/5/Conky/accuweather_conky/tod_ton}${font}
${voffset -40}    ↑ ${execpi 600 sed -n '19p' /media/5/Conky/accuweather_conky/tod_ton}°
    ↓ ${execpi 600 sed -n '20p' /media/5/Conky/accuweather_conky/tod_ton}°
          ${stippled_hr 5 1}
${execpi 600 sed -n '21p' /media/5/Conky/accuweather_conky/tod_ton}\
${goto 90}${font conkyweather:size=40}${execi 600  sed -n '22p' /media/5/Conky/accuweather_conky/tod_ton}${font}
${voffset -40}    ↑ ${execpi 600 sed -n '24p' /media/5/Conky/accuweather_conky/tod_ton}°
    ↓ ${execpi 600 sed -n '25p' /media/5/Conky/accuweather_conky/tod_ton}°
          ${stippled_hr 5 1}
${execpi 600 sed -n '1p' /media/5/Conky/accuweather_conky/last_days}\
${goto 90}${font conkyweather:size=40}${execi 600  sed -n '2p' /media/5/Conky/accuweather_conky/last_days}${font}
${voffset -40}    ↑ ${execpi 600 sed -n '4p' /media/5/Conky/accuweather_conky/last_days}°
    ↓ ${execpi 600 sed -n '5p' /media/5/Conky/accuweather_conky/last_days}°
          ${stippled_hr 5 1}
${execpi 600 sed -n '6p' /media/5/Conky/accuweather_conky/last_days}\
${goto 90}${font conkyweather:size=40}${execi 600  sed -n '7p' /media/5/Conky/accuweather_conky/last_days}${font}
${voffset -40}    ↑ ${execpi 600 sed -n '9p' /media/5/Conky/accuweather_conky/last_days}°
    ↓ ${execpi 600 sed -n '10p' /media/5/Conky/accuweather_conky/last_days}°
          ${stippled_hr 5 1}
${execpi 600 sed -n '11p' /media/5/Conky/accuweather_conky/last_days}\
${goto 90}${font conkyweather:size=40}${execi 600  sed -n '12p' /media/5/Conky/accuweather_conky/last_days}${font}
${voffset -40}    ↑ ${execpi 600 sed -n '14p' /media/5/Conky/accuweather_conky/last_days}°
    ↓ ${execpi 600 sed -n '15p' /media/5/Conky/accuweather_conky/last_days}°
          ${stippled_hr 5 1}
${execpi 600 sed -n '16p' /media/5/Conky/accuweather_conky/last_days}\
${goto 90}${font conkyweather:size=40}${execi 600  sed -n '17p' /media/5/Conky/accuweather_conky/last_days}${font}
${voffset -40}    ↑ ${execpi 600 sed -n '19p' /media/5/Conky/accuweather_conky/last_days}°
    ↓ ${execpi 600 sed -n '20p' /media/5/Conky/accuweather_conky/last_days}°
          ${stippled_hr 5 1}
${execpi 600 sed -n '21p' /media/5/Conky/accuweather_conky/last_days}\
${goto 90}${font conkyweather:size=40}${execi 600  sed -n '22p' /media/5/Conky/accuweather_conky/last_days}${font}
${voffset -40}    ↑ ${execpi 600 sed -n '24p' /media/5/Conky/accuweather_conky/last_days}°
    ↓ ${execpi 600 sed -n '25p' /media/5/Conky/accuweather_conky/last_days}°


and the accuw_script
#!/bin/bash

#function: test_image_day
test_image_day () {
    case $1 in
         su)
           echo a
         ;;
         msu)
           echo b
         ;;
         psu)
           echo c
         ;;
         ic)
           echo c
         ;;
         h)
           echo c
         ;;
         mc)
           echo d
         ;;
         c)
           echo e
         ;;
         d)
           echo e
         ;;
         f)
           echo 0
         ;;
         s)
           echo h
         ;;
         mcs)
           echo g
         ;;
         psus)
           echo g
         ;;
         t)
           echo l
         ;;
         mct)
           echo k
         ;;
         psut)
           echo k
         ;;
         r)
           echo i
         ;;
         fl)
           echo p
         ;;
         mcfl)
           echo o
         ;;
         psfl)
           echo o
         ;;
         sn)
           echo r
         ;;
         mcsn)
           echo o
         ;;
         i)
           echo E
         ;;
         sl)
           echo u
         ;;
         fr)
           echo i
         ;;
         rsn)
           echo v
         ;;
         w)
           echo 6
         ;;
         ho)
           echo 5
         ;;
         co)
           echo E
         ;;
         cl)
           echo A
         ;;
         mcl)
           echo B
         ;;
         pc)
           echo C
         ;;
         pcs)
           echo G
         ;;
         pct)
           echo K
         ;;
        esac
}

#function: test_image_night
test_image_night () {
    case $1 in
su)
           echo a
         ;;
         msu)
           echo b
         ;;
         psu)
           echo c
         ;;
         c)
           echo f
         ;;
         d)
           echo f
         ;;
         f)
           echo f
         ;;
         s)
           echo h
         ;;
         psus)
           echo g
         ;;
         t)
           echo l
         ;;
         psut)
           echo k
         ;;
         r)
           echo i
         ;;
         fl)
           echo p
         ;;
         psfl)
           echo o
         ;;
         sn)
           echo r
         ;;
         i)
           echo E
         ;;
         sl)
           echo u
         ;;
         fr)
           echo i
         ;;
         rsn)
           echo v
         ;;
         ho)
           echo 5
         ;;
         co)
           echo E
         ;;
         cl)
           echo A
         ;;
         w)
           echo 6
         ;;
         mcl)
           echo B
         ;;
         pc)
           echo C
         ;;
         ic)
           echo B
         ;;
         h)
           echo B
         ;;
         mc)
           echo C
         ;;
         pcs)
           echo G
         ;;
         mcs)
           echo G
         ;;
         pct)
           echo K
         ;;
         mct)
           echo K
         ;;
         mcfl)
           echo O
         ;;
         mcsn)
           echo O
         ;;
        esac
}

kill -STOP $(pidof conky)
killall wget

#put your Accuweather address here
address="http://www.accuweather.com/en/ar/general-urquiza/1228994/weather-forecast/1228994"

loc_id=$(echo $address|sed 's/\/weather-forecast.*$//'|sed 's/^.*\///')
last_number=$(echo $address|sed 's/^.*\///')

curr_addr="$(echo $address|sed 's/weather-forecast.*$//')"current-weather/"$last_number"
wget -O /media/5/Conky/accuweather_conky/curr_cond_raw "$curr_addr"

addr1="$(echo $address|sed 's/weather-forecast.*$//')"daily-weather-forecast/"$last_number"
wget -O /media/5/Conky/accuweather_conky/tod_ton_raw "$addr1"

addr2="$addr1"?day=6
wget -O /media/5/Conky/accuweather_conky/last_days_raw "$addr2"

#current conditions
if [[ -s /media/5/Conky/accuweather_conky/curr_cond_raw ]]; then

    sed -i '/detail-now/,/#details/!d' /media/5/Conky/accuweather_conky/curr_cond_raw
    egrep -i '"cond"|icon i-|detail-tab-panel' /media/5/Conky/accuweather_conky/curr_cond_raw > /media/5/Conky/accuweather_conky/curr_cond
    sed -i -e 's/^.*detail-tab-panel //g' -e 's/^.*icon i-//g' -e 's/"><\/div>.*$//g' /media/5/Conky/accuweather_conky/curr_cond
    sed -i -e 's/^.*"cond">//g' -e 's/&deg/\n/g' -e 's/<\/span>.*"temp">/\n/g' -e 's/<.*>//g' /media/5/Conky/accuweather_conky/curr_cond
    sed -i -e 's/">//g' -e 's/-->//g' -e 's/\r$//g' -e 's/ i-alarm.*$//g' /media/5/Conky/accuweather_conky/curr_cond
time=$(sed -n 1p /media/5/Conky/accuweather_conky/curr_cond)
    image=$(sed -n 2p /media/5/Conky/accuweather_conky/curr_cond)
if [[ $time == day ]]; then
    sed -i 2s/$image/$(test_image_day $image)/ /media/5/Conky/accuweather_conky/curr_cond
elif [[ $time == night ]]; then
    sed -i 2s/$image/$(test_image_night $image)/ /media/5/Conky/accuweather_conky/curr_cond
fi

fi

#First 5 days
if [[ -s /media/5/Conky/accuweather_conky/tod_ton_raw ]]; then

    sed -i '/feed-tabs/,/\.feed-tabs/!d' /media/5/Conky/accuweather_conky/tod_ton_raw
    egrep -i 'Early AM|Today|Tonight|Overnight|icon i-|cond|temp|Mon|Tue|Wed|Thu|Fri|Sat|Sun' /media/5/Conky/accuweather_conky/tod_ton_raw > /media/5/Conky/accuweather_conky/tod_ton
    sed -i -e 's/^.*#">//g' -e 's/^.*icon i-//g' -e 's/^.*cond">//g' -e 's/^.*temp">//g' /media/5/Conky/accuweather_conky/tod_ton
    sed -i -e 's/Lo<\/span> /\n/g' -e 's/<\/a>.*$//g' -e 's/ "><.*$//g' -e 's/&#.*$//g' -e 's/teo//g' /media/5/Conky/accuweather_conky/tod_ton
    sed -i -e 's/<span>.*$//g' -e 's/<\/span>//g' -e 's/\r$//g' -e 's/ i-alarm.*$//g' /media/5/Conky/accuweather_conky/tod_ton
sed -i -e 's/Early AM/Early AM/' -e 's/Today/Today/' -e 's/Tonight/Tonight/' -e 's/Overnight/Overnight/' -e 's/Mon$/Monday/' -e 's/Tue$/Tuesday/' -e 's/Wed$/Wednesday/' -e 's/Thu$/Thursday/' -e 's/Fri$/Friday/' -e 's/Sat$/Saturday/' -e 's/Sun$/Sunday/' /media/5/Conky/accuweather_conky/tod_ton
    time=$(sed -n 1p /media/5/Conky/accuweather_conky/tod_ton)
    image=$(sed -n 2p /media/5/Conky/accuweather_conky/tod_ton)
if [[ $time == Today ]]; then
    sed -i 2s/$image/$(test_image_day $image)/ /media/5/Conky/accuweather_conky/tod_ton
elif [[ $time == Tonight || $time == Overnight || $time == "Early AM" ]]; then
    sed -i 2s/$image/$(test_image_night $image)/ /media/5/Conky/accuweather_conky/tod_ton
        sed -i 3a- /media/5/Conky/accuweather_conky/tod_ton
fi
    for (( i=7; i<=22; i+=5 ))
  do
          image=$(sed -n "${i}"p /media/5/Conky/accuweather_conky/tod_ton)
      sed -i ${i}s/$image/$(test_image_day $image)/ /media/5/Conky/accuweather_conky/tod_ton
  done

fi

#Next 5 days
if [[ -s /media/5/Conky/accuweather_conky/last_days_raw ]]; then

    sed -i '/feed-tabs/,/\.feed-tabs/!d' /media/5/Conky/accuweather_conky/last_days_raw
    egrep -i 'icon i-|cond|temp|Mon|Tue|Wed|Thu|Fri|Sat|Sun' /media/5/Conky/accuweather_conky/last_days_raw > /media/5/Conky/accuweather_conky/last_days
    sed -i -e 's/^.*#">//g' -e 's/^.*icon i-//g' -e 's/^.*cond">//g' -e 's/^.*temp">//g' /media/5/Conky/accuweather_conky/last_days
    sed -i -e 's/Lo<\/span> /\n/g' -e 's/<\/a>.*$//g' -e 's/ "><.*$//g' -e 's/&#.*$//g' -e 's/teo//g' /media/5/Conky/accuweather_conky/last_days
    sed -i -e 's/<span>.*$//g' -e 's/<\/span>//g' -e 's/\r$//g' -e 's/ i-alarm.*$//g' /media/5/Conky/accuweather_conky/last_days
sed -i -e 's/Mon$/Monday/' -e 's/Tue$/Tuesday/' -e 's/Wed$/Wednesday/' -e 's/Thu$/Thursday/' -e 's/Fri$/Friday/' -e 's/Sat$/Saturday/' -e 's/Sun$/Sunday/' /media/5/Conky/accuweather_conky/last_days
    for (( i=2; i<=22; i+=5 ))
  do
          image=$(sed -n "${i}"p /media/5/Conky/accuweather_conky/last_days)
      sed -i ${i}s/$image/$(test_image_day $image)/ /media/5/Conky/accuweather_conky/last_days
  done

fi

kill -CONT $(pidof conky)
Title: Re: Conky Codes and Images
Post by: Sector11 on January 14, 2013, 07:00:32 PM
Quote from: jedi@Sector11 an lwfitz, amazing stuff.  I'm really hooked on the horizontal Conky's.  Nice weather scheme in that one on Post # 5 Sector11!!!  :D

You want horizontal here's my latest . yesterday, it is now my main conky!

(http://t.imgbox.com/acx9w6nK.jpg) (http://imgbox.com/acx9w6nK)

The conky: S11_VSIDO_v9.conkyrc
# killall conky && conky -c /media/5/Conky/S11_VSIDO_v9.conkyrc &
# Original by: VastOne on VSIDO

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# fiddle with window
use_spacer none #right

# Use Xft?
use_xft yes
xftfont Monofur:bold:size=12
xftalpha 1.0
# text_buffer_size 256

# Update interval in seconds
update_interval 1

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

own_window yes
own_window_type normal
own_window_hints undecorated,below,skip_taskbar,skip_pager
own_window_transparent yes
# own_window_argb_visual yes
own_window_class Conky

# Stippled borders?
stippled_borders 0

# border margins
border_inner_margin 3

# border width
border_width 0

# Default colors and also border colors
default_color 00BFFF #  0 191 255 DeepSkyBlue
color0 FFDEAD #255 222 173 NavajoWhite
color1 7FFF00 #127 255   0 Chartreuse
color2 778899 #119 136 153 LightSlateGray
color3 FF8C00 #255 140   0 DarkOrange
color4 F0FFFF #240 255 255 Azure
color5 FFDEAD #255 222 173 NavajoWhite
color6 7B68EE #123 104 238 MediumSlateBlue
color7 00FFFF #  0 255 255 Cyan
color8 FFFF00 #255 255   0 Yellow
color9 FF0000 #255   0   0 Red

#default_shade_color black
#default_outline_color grey
own_window_colour 000000

# Text alignment, other possible values are commented
#alignment top_middle
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 5 # left-right
gap_y 5 # up-down

minimum_size 1265 0  ## width, height
#maximum_width 1250     ## width


# 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

# Shortens units to a single character (kiB->k, GiB->G, etc.). Default is off (no).
short_units yes

###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load ~/Conky/LUA/draw-bg.lua
#TEXT
#${lua conky_draw_bg 10 0 0 0 0 0x000000 0.6}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
lua_load /media/5/Conky/LUA/draw-bg.lua
lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.4
# lua_draw_hook_post draw-bg 125 0 0 0 0 0x000000 0.01
#
# TEXT
#
############### V9000 ########################################################
#starts the lua weather data gathering function, call once at top of conkyrc
lua_load ~/v9000/v9000.lua
lua_draw_hook_post weather
lua_load /media/5/Conky/templates/VSIDO-v9-template.lua
#######################################################  End LUA Settings  ###
#
TEXT
${execi 600 bash /media/5/Conky/accuweather_conky/accuw_script}\
        ${color}Kernel ${color4}${kernel}\
${color}MEM${color4}${if_match ${memperc}<10}  ${memperc}\
${else}${if_match ${memperc}<100} ${memperc}\
${else}${memperc}${endif}${endif}%\
${color}(${mem})\
${color}CPU${color4}${if_match ${platform f71882fg.2560 temp 1}<100} ${platform f71882fg.2560 temp 1}\
${else}${platform f71882fg.2560 temp 1}${endif}°\
${color}MB${color4}${if_match ${platform f71882fg.2560 temp 2}<100} ${platform f71882fg.2560 temp 2}\
${else}${platform f71882fg.2560 temp 2}${endif}°\
${color}HD${color4}${if_match ${execi 5 hddtemp -n /dev/sda}<100} ${execi 5 hddtemp -n /dev/sda}\
${else}${execi 5 hddtemp -n /dev/sda}${endif}°
        ${color}NET${color4} Dn: ${color2}${downspeedgraph eth0 12,150 00ff00 ff0000 -t -l}     ${color}Up: ${color2}${upspeedgraph eth0 12,150 ff0000 00ff00 -t -l}  ${color}Uptime ${color1}${uptime_short}
        ${color}CPU: 1${color4}${if_match ${cpu cpu1}<10}  ${cpu cpu1}\
${else}${if_match ${cpu cpu1}<100} ${cpu cpu1}\
${else}${cpu cpu0}${endif}${endif}%\
  ${color}2${color4}${if_match ${cpu cpu0}<10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0}<100} ${cpu cpu0}\
${else}${cpu cpu0}${endif}${endif}%\
  ${color}3${color4}${if_match ${cpu cpu0}<10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0}<100} ${cpu cpu0}\
${else}${cpu cpu0}${endif}${endif}%\
  ${color}4${color4}${if_match ${cpu cpu0}<10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0}<100} ${cpu cpu0}\
${else}${cpu cpu0}${endif}${endif}%\
  ${color}Fan ${color4}${platform f71882fg.2560 fan 1} rpm\
  ${color}VRX·${color7}03  ${color4}04·${color1}${exec conkyDaysDiff 20130304}  ${color4}11·${color7}${exec conkyDaysDiff 20130311}  ${color4}16·${color3}${exec conkyDaysDiff 20130316}${color4}


VSIDO-v9-template.lua mrpeachy's v9000 is required (http://crunchbang.org/forums/viewtopic.php?id=16100&p=1).
--[[
The latest script is a lua only weather script. aka: v9000
http://crunchbanglinux.org/forums/topic/16100/weather-in-conky/

the file:
http://dl.dropbox.com/u/19008369/current%20v9000/v9000.tar.gz

mrppeachys LUA Tutorial
http://crunchbanglinux.org/forums/topic/17246/how-to-using-lua-scripts-in-conky/
]]
_G.weather_script = function()--#### DO NOT EDIT THIS LINE ##############
--these tables hold the coordinates for each repeat do not edit #########
top_left_x_coordinate={}--###############################################
top_left_y_coordinate={}--###############################################
--#######################################################################
--SET DEFAULTS ##########################################################
--set defaults do not localise these defaults if you use a seperate display script
-- default_font="CorporateMonoExtraBold"--font must be in quotes
-- default_font_size=10
default_font="monofur"--font must be in quotes
default_font_size=12
default_color=0xffffff--white
default_alpha=1--fully opaque
default_image_width=20
default_image_height=20
-- ## New Options ###
default_face="bold"
-- "normal" for normal/normal
-- "bold" for normal/bold
-- "italic" for italic/normal
-- "bolditalic" for italic/bold
--END OF DEFAULTS #######################################################
--START OF WEATHER CODE -- START OF WEATHER CODE -- START OF WEATHER CODE

datax=670
dataxx=55
dataxx1=dataxx+30

datay1=13
datay2=25
datay3=40
datay4=55

datayy=13 --datay+(datayy*1)

imgx=687
imgx1=55 -- (imgx1*1)

imgyh=165
imgyf=190
imgyy=39 -- imgy+(imgyy*1)

-- out({c=0x00FFFF,,a=1,x=6,y=50,txt="cpu:"..conky_parse("${cpu}")})
-- VSIDO ICON ORB
image({w=55,h=55,x=5,y=5,file="/home/sector11/images/vsido/orbwallpaper3.png"})
-- today
out({c=0x00FFFF,a=1,x=datax,y=datay1,txt=forecast_day_short[1]})
out({c=0x00FFFF,a=1,x=datax+30,y=datay1,txt=forecast_date[1]})
  image({x=imgx,y=17,h=25,w=25,file=weather_icon[1]})
--image({x=imgx,y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax,y=datay2,txt=high_temp[1]})
out({c=0xF0FFFF,a=1,x=datax,y=datay3,txt=low_temp[1]})

out({c=0x00FFFF,a=1,x=datax+dataxx,y=datay1,txt="Current"})
out({c=0xF0FFFF,a=1,x=datax+dataxx,y=datay2,txt=now["temp"]})
out({c=0xFFDEAD,a=1,x=datax+dataxx,y=datay3,txt=now["feels_like"]})
  image({x=imgx+(imgx1*1),y=17,h=25,w=25,file=now["weather_icon"]})
--image({x=imgx+(imgx1*1),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})

out({c=0x00FFFF,a=1,x=datax+(dataxx*2),y=datay1,txt=forecast_day_short[2]})
out({c=0x00FFFF,a=1,x=datax+(dataxx*2+30),y=datay1,txt=forecast_date[2]})
  image({x=imgx+(imgx1*2),y=17,h=25,w=25,file=weather_icon[2]})
--image({x=imgx+(imgx1*2),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax+(dataxx*2),y=datay2,txt=high_temp[2]})
out({c=0xF0FFFF,a=1,x=datax+(dataxx*2),y=datay3,txt=low_temp[2]})

out({c=0x00FFFF,a=1,x=datax+(dataxx*3),y=datay1,txt=forecast_day_short[3]})
out({c=0x00FFFF,a=1,x=datax+(dataxx*3+30),y=datay1,txt=forecast_date[3]})
  image({x=imgx+(imgx1*3),y=17,h=25,w=25,file=weather_icon[3]})
--image({x=imgx+(imgx1*3),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax+(dataxx*3),y=datay2,txt=high_temp[3]})
out({c=0xF0FFFF,a=1,x=datax+(dataxx*3),y=datay3,txt=low_temp[3]})

out({c=0x00FFFF,a=1,x=datax+(dataxx*4),y=datay1,txt=forecast_day_short[4]})
out({c=0x00FFFF,a=1,x=datax+(dataxx*4+30),y=datay1,txt=forecast_date[4]})
  image({x=imgx+(imgx1*4),y=17,h=25,w=25,file=weather_icon[4]})
--image({x=imgx+(imgx1*4),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax+(dataxx*4),y=datay2,txt=high_temp[4]})
out({c=0xF0FFFF,a=1,x=datax+(dataxx*4),y=datay3,txt=low_temp[4]})

out({c=0x00FFFF,a=1,x=datax+(dataxx*5),y=datay1,txt=forecast_day_short[5]})
out({c=0x00FFFF,a=1,x=datax+(dataxx*5+30),y=datay1,txt=forecast_date[5]})
  image({x=imgx+(imgx1*5),y=17,h=25,w=25,file=weather_icon[5]})
--image({x=imgx+(imgx1*5),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax+(dataxx*5),y=datay2,txt=high_temp[5]})
out({c=0xF0FFFF,a=1,x=datax+(dataxx*5),y=datay3,txt=low_temp[5]})

out({c=0x00FFFF,a=1,x=datax+(dataxx*6),y=datay1,txt=forecast_day_short[6]})
out({c=0x00FFFF,a=1,x=datax+(dataxx*6+30),y=datay1,txt=forecast_date[6]})
  image({x=imgx+(imgx1*6),y=17,h=25,w=25,file=weather_icon[6]})
--image({x=imgx+(imgx1*6),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax+(dataxx*6),y=datay2,txt=high_temp[6]})
out({c=0xF0FFFF,a=1,x=datax+(dataxx*6),y=datay3,txt=low_temp[6]})

out({c=0x00FFFF,a=1,x=datax+(dataxx*7),y=datay1,txt=forecast_day_short[7]})
out({c=0x00FFFF,a=1,x=datax+(dataxx*7+30),y=datay1,txt=forecast_date[7]})
  image({x=imgx+(imgx1*7),y=17,h=25,w=25,file=weather_icon[7]})
--image({x=imgx+(imgx1*7),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax+(dataxx*7),y=datay2,txt=high_temp[7]})
out({c=0xF0FFFF,a=1,x=datax+(dataxx*7),y=datay3,txt=low_temp[7]})

out({c=0x00FFFF,a=1,x=datax+(dataxx*8),y=datay1,txt=forecast_day_short[8]})
out({c=0x00FFFF,a=1,x=datax+(dataxx*8+30),y=datay1,txt=forecast_date[8]})
  image({x=imgx+(imgx1*8),y=17,h=25,w=25,file=weather_icon[8]})
--image({x=imgx+(imgx1*8),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax+(dataxx*8),y=datay2,txt=high_temp[8]})
out({c=0xF0FFFF,a=1,x=datax+(dataxx*8),y=datay3,txt=low_temp[8]})

out({c=0x00FFFF,a=1,x=datax+(dataxx*9),y=datay1,txt=forecast_day_short[9]})
out({c=0x00FFFF,a=1,x=datax+(dataxx*9+30),y=datay1,txt=forecast_date[9]})
  image({x=imgx+(imgx1*9),y=17,h=25,w=25,file=weather_icon[9]})
--image({x=imgx+(imgx1*9),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax+(dataxx*9),y=datay2,txt=high_temp[9]})
out({c=0xF0FFFF,a=1,x=datax+(dataxx*9),y=datay3,txt=low_temp[9]})

out({c=0x00FFFF,a=10,x=datax+(dataxx*10),y=datay1,txt=forecast_day_short[10]})
out({c=0x00FFFF,a=10,x=datax+(dataxx*10+30),y=datay1,txt=forecast_date[10]})
  image({x=imgx+(imgx1*10),y=17,h=25,w=25,file=weather_icon[10]})
--image({x=imgx+(imgx1*10),y=17,h=25,w=25,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=datax+(dataxx*10),y=datay2,txt=high_temp[10]})
out({c=0xF0FFFF,a=1,x=datax+(dataxx*10),y=datay3,txt=low_temp[10]})

-- BOTTOM LINE
out({c=0xF0FFFF,a=1,x=datax,y=datay4,txt="Today's Weather:"})
out({c=0x00FFFF,a=1,x=datax+115,y=datay4,txt="Pressure"})
out({c=0xF0FFFF,a=1,x=datax+175,y=datay4,txt=now["pressure_mb"].." mb"})
out({c=0x00FFFF,a=1,x=datax+245,y=datay4,txt="Humidity"})
out({c=0xF0FFFF,a=1,x=datax+305,y=datay4,txt=now["humidity"].."%"})

out({c=0x00FFFF,a=1,x=datax+338,y=datay4,txt="Dew Point"})
out({c=0xF0FFFF,a=1,x=datax+405,y=datay4,txt=now["dew_point"].."°"})
out({c=0x00FFFF,a=1,x=datax+435,y=datay4,txt="UV Index"})
out({c=0xF0FFFF,a=1,x=datax+495,y=datay4,txt=uv_index_num[1]})
out({c=0xF0FFFF,a=1,x=datax+515,y=datay4,txt=uv_index_txt[1]})

-- yellow line
--image({w=45,h=1,x=5,y=550,file="/media/5/Conky/images/yellow_1.png"})

--########################################################################################
--END OF WEATHER CODE ----END OF WEATHER CODE ----END OF WEATHER CODE ---
--#######################################################################
end--of weather_display function do not edit this line ##################
--#######################################################################
Title: Re: Conky Codes and Images
Post by: Sector11 on January 14, 2013, 07:01:46 PM
This actually took a few days to do, life kept getting in the way.  So to relax, I worked on a conky.

On the left is the default conky that comes with 1d1_Accuweather_INT_Images (http://crunchbang.org/forums/viewtopic.php?id=19235&p=1), by TeoBigusGeekus, you'll need the script, on the right a new layout.

Both are set to use General Urquiza, CABA, Argentina.
(http://t.imgbox.com/abxF0dOy.jpg) (http://imgbox.com/abxF0dOy)

The conky:

# killall conky && conky -c /media/5/Conky/Accuweather/Teo_Clock_Gen_Urquiza_AccuW.conky &
#
# Thank you:
# Chronograph LUA - mrpeachy (originally 4 clocks - tweaked by Sector11)
# v9000 LUA weather - mrpeachy
# background - londonali1010, mrpeachy, dk75
# TeoBigusGeekus - for the weather scripts

###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
own_window_class Conky
own_window_title Teo Weather Clock General Urquiza

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type normal
# own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
# own_window_argb_value 0

#minimum_size 420 420  ## width, height
#maximum_width 420     ## width

### For use with The-Clock.lua
minimum_size 300 0  ## width, height
maximum_width 300     ## width

gap_x 10 #15        ### left &right
gap_y 10        ### up & down

### alignment values or top_left, bottom_right, etc
# tl, tm, tr
# ml, mm, mr
# bl, bm, br
alignment top_right

####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
#xftfont CorporateMonoExtraBold:size=9
xftfont monofur:bold:size=11
# X font when Xft is disabled, you can pick one with program xfontsel
#font 5x7
#font 6x10
#font 7x13
#font 8x13
#font 9x15
#font *mintsmild.se*
#font -*-*-*-*-*-*-34-*-*-*-*-*-*-*

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
draw_shades no
default_shade_color black

draw_outline no # amplifies text if yes
default_outline_color black

default_color DCDCDC #220 220 220 Gainsboro
color0 8FBC8F #143 188 143 DarkSeaGreen
#color1 C2CCFF # Not a clue - a blue #778899 #119 136 153 LightSlateGray
color1 AFEEEE #175 238 238 PaleTurquoise
color2 FF8C00 #255 140   0 DarkOrange
color3 7FFF00 #127 255   0 Chartreuse
color4 FFA07A #255 160 122 LightSalmon
color5 FFDEAD #255 222 173 NavajoWhite
color6 00BFFF #  0 191 255 DeepSkyBlue
color7 00FFFF #  0 255 255 Cyan
color8 FFFF00 #255 255   0 Yellow
color9 B22222 #178  34  34 FireBrick
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes #no
#default_graph_size 15 40
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################
# Boolean value, if true, Conky will be forked to background when started.
background yes

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 256

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

# If enabled, values which are in bytes will be printed in human readable
# format (i.e., KiB, MiB, etc). If disabled, bytes is printed instead
format_human_readable yes

# Shortens units to a single character (kiB->k, GiB->G, etc.). Default is off.
short_units yes


imlib_cache_size 0

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
# temperature_unit Fahrenheit

## default bar size
default_bar_size 200 20

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## draw-bg.lua - Above and After TEXT - requires a composite manager.
##
lua_load /media/5/Conky/LUA/draw-bg.lua
#TEXT
# ${lua conky_draw_bg 125 0 0 0 0 0x000000 0.3}
#
# ----------------------------------------------------------------------------
## OR Both above TEXT - No composite manager required.
#
#lua_load ~/Conky_WeatherCom_metric/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 20 0 0 0 0 0x000000 0.3
#
# TEXT
### Teo Weather Clock ########################################################
lua_load /media/5/Conky/LUA/Teo_Weather_Clock.lua
lua_draw_hook_post main
##############################  End LUA Settings  ###
# The all important - How often conky refreshes.
# If you have a "Crey" try: 0.2 - smokin' - but watch the CPU useage go UP!
update_interval 1

TEXT
${lua conky_draw_bg 10 0 0 0 0 0x000000 0.4}\
${lua conky_draw_bg 123 30 30 246 246 0xffffff 0.2}\
${texeci 500 bash /media/5/Conky/Accuweather/acc_int_images}\
${font monofur:size=24}${color7}${execi 600 sed -n '29p' /media/5/Conky/Accuweather/curr_cond}°${alignr}${color5}${execi 600 sed -n '30p' /media/5/Conky/Accuweather/curr_cond}°${font}
${color7}Temp${alignr 15}${color5}±${font}





${image /media/5/Conky/Accuweather/cc.png -p 102,120 -s 90x54}








${color}Today${alignr}${color1}Tonight${color}
${color5}↑ ${color2}${execi 600 sed -n '26p' /media/5/Conky/Accuweather/first_days}°${alignr}${color5}↓ ${color7}${execi 600 sed -n '31p' /media/5/Conky/Accuweather/first_days}°
${image /media/5/Conky/Accuweather/tod.png -p 0,280 -s 120x72}${image /media/5/Conky/Accuweather/ton.png -p 180,280 -s 120x72}



${color5}± ${execi 600 sed -n '27p' /media/5/Conky/Accuweather/first_days}°${alignr}± ${execi 600 sed -n '32p' /media/5/Conky/Accuweather/first_days}°
${goto 60} ${color5}SUN${goto 100}${color}↑ ${execi 600 sed -n '39p' /media/5/Conky/Accuweather/curr_cond}${goto 180}${color1}↓ ${execi 600 sed -n '40p' /media/5/Conky/Accuweather/curr_cond}
${goto 60}${color5}MOON ${goto 100}${color}↑ ${execi 600 sed -n '41p' /media/5/Conky/Accuweather/curr_cond}${goto 180}${color1}↓ ${color1}${execi 600 sed -n '42p' /media/5/Conky/Accuweather/curr_cond}
${color5}Humidity ${color7}${execi 600 sed -n '33p' /media/5/Conky/Accuweather/curr_cond}${alignr 5}${color5}Dew Point ${color7}${execi 600 sed -n '37p' /media/5/Conky/Accuweather/curr_cond}°${color}
${color5}Pressure ${color7}${execi 600 sed -n '34p' /media/5/Conky/Accuweather/curr_cond}${alignr 5}${color5}UV Index ${color7}${execi 600 sed -n '36p' /media/5/Conky/Accuweather/curr_cond}
${color5}Wind ${color7}${execi 600 sed -n '31p' /media/5/Conky/Accuweather/curr_cond} ${execi 600 sed -n '32p' /media/5/Conky/Accuweather/curr_cond}\
${alignr 5}${color5}Cloud Cover ${color7}${execi 600 sed -n '35p' /media/5/Conky/Accuweather/curr_cond}
${alignc}${color5}Visibility ${color7}${execi 600 sed -n '38p' /media/5/Conky/Accuweather/curr_cond}
${color1}${stippled_hr 5 1}
${color5}${execi 600 sed -n '5p' /media/5/Conky/Accuweather/first_days}${goto 113}${execi 600 sed -n '10p' /media/5/Conky/Accuweather/first_days}${goto 217}${execi 600 sed -n '15p' /media/5/Conky/Accuweather/first_days}
${image /media/5/Conky/Accuweather/6.png -p 0,475 -s 90x54}${image /media/5/Conky/Accuweather/11.png -p 110,475 -s 90x54}${image /media/5/Conky/Accuweather/16.png -p 210,475 -s 90x54}


↑ ${color2}${execi 600 sed -n '8p' /media/5/Conky/Accuweather/first_days}${goto 55}${color5}↓ ${color1}${execi 600 sed -n '9p' /media/5/Conky/Accuweather/first_days}\
${goto 111}↑ ${color2}${execi 600 sed -n '13p' /media/5/Conky/Accuweather/first_days}${goto 160}${color5}↓ ${color1}${execi 600 sed -n '14p' /media/5/Conky/Accuweather/first_days}\
${goto 215}↑ ${color2}${execi 600 sed -n '18p' /media/5/Conky/Accuweather/first_days}${goto 264}${color5}↓ ${color1}${execi 600 sed -n '19p' /media/5/Conky/Accuweather/first_days}

${color5}${execi 600 sed -n '20p' /media/5/Conky/Accuweather/first_days}${goto 113}${execi 600 sed -n '1p' /media/5/Conky/Accuweather/last_days}${goto 217}${execi 600 sed -n '6p' /media/5/Conky/Accuweather/last_days}
${image /media/5/Conky/Accuweather/21.png -p 0,565 -s 90x54}${image /media/5/Conky/Accuweather/last_2.png -p 106,565 -s 90x54}${image /media/5/Conky/Accuweather/last_7.png -p 210,565 -s 90x54}


↑ ${color2}${execi 600 sed -n '23p' /media/5/Conky/Accuweather/first_days}${goto 55}${color5}↓ ${color1}${execi 600 sed -n '24p' /media/5/Conky/Accuweather/first_days}\
${goto 111}↑ ${color2}${execi 600 sed -n '4p' /media/5/Conky/Accuweather/last_days}${goto 160}${color5}↓ ${color1}${execi 600 sed -n '5p' /media/5/Conky/Accuweather/last_days}\
${goto 215}↑ ${color2}${execi 600 sed -n '9p' /media/5/Conky/Accuweather/last_days}${goto 264}${color5}↓ ${color1}${execi 600 sed -n '10p' /media/5/Conky/Accuweather/last_days}

${color5}${execi 600 sed -n '11p' /media/5/Conky/Accuweather/last_days}${goto 113}${execi 600 sed -n '16p' /media/5/Conky/Accuweather/last_days}${goto 217}${execi 600 sed -n '21p' /media/5/Conky/Accuweather/last_days}
${image /media/5/Conky/Accuweather/last_12.png -p 0,655 -s 90x54}${image /media/5/Conky/Accuweather/last_17.png -p 106,655 -s 90x54}${image /media/5/Conky/Accuweather/last_22.png -p 210,655 -s 90x54}


↑ ${color2}${execi 600 sed -n '14p' /media/5/Conky/Accuweather/last_days}${goto 55}${color5}↓ ${color1}${execi 600 sed -n '15p' /media/5/Conky/Accuweather/last_days}\
${goto 111}↑ ${color2}${execi 600 sed -n '19p' /media/5/Conky/Accuweather/last_days}${goto 160}${color5}↓ ${color1}${execi 600 sed -n '20p' /media/5/Conky/Accuweather/last_days}\
${goto 215}↑ ${color2}${execi 600 sed -n '24p' /media/5/Conky/Accuweather/last_days}${goto 264}${color5}↓ ${color1}${execi 600 sed -n '25p' /media/5/Conky/Accuweather/last_days}
${color1}${stippled_hr 5 1}
${color3}With ${color}${nodename} ${color3}for the past: ${color}${uptime_short}
${color3}Kernel: ${color}${kernel}
${color3}CPU ${color7}1: ${color}${if_match ${cpu cpu1}<10}  ${cpu cpu1}\
${else}${if_match ${cpu cpu1}<100} ${cpu cpu1}\
${else}${cpu cpu1}\
${endif}${endif} %\
${color7}2: ${color}${if_match ${cpu cpu2}<10}  ${cpu cpu2}\
${else}${if_match ${cpu cpu2}<100} ${cpu cpu2}\
${else}${cpu cpu2}\
${endif}${endif} %\
${color7}3: ${color}${if_match ${cpu cpu3}<10}  ${cpu cpu3}\
${else}${if_match ${cpu cpu3}<100} ${cpu cpu3}\
${else}${cpu cpu3}\
${endif}${endif} %\
${color7}Avg: ${color}${if_match ${cpu cpu0}<10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0}<100} ${cpu cpu0}\
${else}${cpu cpu0}\
${endif}${endif} %
${color3}CPU: ${color}${platform f71882fg.2560 temp 1}°${goto 90}${color3}SDA: ${color}${execi 15 hddtemp -n /dev/sda}°${goto 167}${color3}GPU: ${color}${nvidia temp}°${goto 245}${color3}MB: ${color}${platform f71882fg.2560 temp 2}°
${color3}RAM: ${color}${mem} / ${memmax} / ${memperc}% ${alignr 5}${color3}Swap: ${color}${swap} ${color}/ ${color}${swapmax}
${color3}eth-0 ${color7}Down: ${color}${downspeedf eth0}${goto 200}${color7}Up:  ${color}${upspeedf eth0}
${color1}${stippled_hr 5 1}


Teo_Weather_Clock.lua - the 24 hour clock adapted for Teo's scripts.

--[[ multiple analogue clocks by mrpeachy - 18 Jun 2012
21 Jun 2012 - Chronograph modifications by Sector11
22 Jun 2012 - again with mrpeachy's help day names, numbers and month names
12 Nov 2012 - memory leak plugged - mrpeachy
14 Nov 2012 - Personnalisation - Didier-T (forum Ubuntu.fr)
26 Nov 2012 - The Clock - Sector11 (small version)

use in conkyrc

lua_load /path/Chronograph.lua
lua_draw_hook_pre main
TEXT

-- INDEX use search|find with: -- ### sonething ###

-- ### CLOCK POSITION - AND DEFAULTS ###
-- ### SET BORDER OPTIONS FOR "CLOCKS" ### -- I don't know how to remove this - NOT NEEDED
--     See lines 39 to 41 for overall size changes
-- ### START DIAL B ### Day Names Dial ###
--     See Lines 77 - 79 and 145 for changes
-- ### START DIAL C ### Month Names Dial ###
--     See Lines 143 -145 and 192 for changes
-- ### START DIAL D ### Day Numbers Dial ###
--     See Lines 226 & 257 for  changes
-- ### START CLOCK A ###
--     See Lines  &  and 456 & 483 changes
-- MARKS AROUND CLOCK A -- Large Main 24 HR Clock
-- CLOCK A HOUR HAND
-- CLOCK A MINUTE HAND SETUP
-- CLOCK A SECOND HAND SETUP
-- PART SECOND HAND Lines: 503 519, 531

NOTE:  Putting ### CLOCK A ### last insures that it's functions are written
       over the other dials.
]]

require 'cairo'
-- ### CLOCK POSITION - AND DEFAULTS ##########################################
local init={
center_x=153, --from 135 = +40
center_y=153, --from 135
radius=140,
lang="English", -- English French Greek Spanish
hour=24, -- 12 | 24
second=true, --true | false - Seconds: dots and numbers IF 12HR
line=true, -- true | false - Part Second Hand
handday=false, -- DAY NAME hand - true or false
--handdaynum=false, -- DAY NUMBER hand - true or false
handmonth=false, -- MONTH NAME hand - true or false
color=0xFF0000, --color for day, day number and month IF NO SECOND HAND
alpha=1 --alpha for day, day number and month IF NO SECOND HAND
}

-- ONLY NEED ONE COPY OF THIS FUNCTION
function rgb_to_r_g_b(col,alp)
  return ((col / 0x10000) % 0x100) / 255, ((col / 0x100) % 0x100) / 255, (col % 0x100) / 255, alp
end
local colr, colg, colb, cola=rgb_to_r_g_b(init.color,init.alpha)

function conky_main()
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
cr = cairo_create(cs)
local extents=cairo_text_extents_t:create()
tolua.takeownership(extents)

-- ### CLOCK 12|24 HR SELECTOR ############################
local clock_type_A=init.hour
-- ############################ CLOCK 12|24 HR SELECTOR ###

-- ### SET BORDER OPTIONS FOR "CLOCKS" ####################
--local clock_border_width=0
-- set color and alpha for clock border
--local cbr,cbg,cbb,cba=1,1,1,1 -- full opaque white
-- gap from clock border to minute marks
local b_to_m=0
-- #################### SET BORDER OPTIONS FOR "CLOCKS" ###

-- ### START DIAL B ### Day Names Dial ####################
-- DIAL POSITION
local center_x=init.center_x
local center_y=init.center_y
local radius=42
-- FONT
cairo_select_font_face (cr, "monofur", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 14)
-- TABLE OF TEXT -- in order
if init.lang == "English" then text_days={"Sun","Mon","Tue","Wed","Thr","Fri","Sat",} end
if init.lang == "French" then text_days={"dim","lun","mar","mer","jeu","ven","sam",} end
if init.lang == "Greek" then text_days={"ΔΕΥ","ΤΡΙ","ΤΕΤ","ΠΕΜ","ΠΑΡ","ΣΑΒ","ΚΥΡ",} end
if init.lang == "Spanish" then text_days={"dom","lun","mar","mie","jue","vie","sab",} end

local day_number=tonumber(os.date("%w"))
if init.handday == true then
  for i=1,7 do
-- work out points
    local point=(math.pi/180)*((360/7)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)
  end
else
  for i=1,7 do -- working out points
    if day_number == i-1 then
      cairo_set_source_rgba (cr,0,1,1,1) -- active colour
    else
      cairo_set_source_rgba (cr,1,1,1,0.07) -- non-active day names
    end
    local point=(math.pi/180)*((360/7)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)
  end
-- INNER POINTS POSITION, radius smaller than text circle
  local radius=27
  for i=1,7 do
    if day_number == i-1 then
      cairo_set_source_rgba (cr,0,1,1,1) -- active colour
    else
      cairo_set_source_rgba (cr,1,1,1,0.07) -- non-active
    end
    local point=(math.pi/180)*((360/7)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_stroke (cr)
  end
end
-- ######################################### END DIAL B ###

-- ### START DIAL C ### Month Names Dial ##################
-- DIAL POSITION
local center_x=init.center_x --(+85)
local center_y=init.center_y
local radius=73
-- FONT
cairo_select_font_face (cr, "monofur", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 14)
-- TABLE OF TEXT -- in order
if init.lang == "English" then text_days={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",} end
if init.lang == "French" then text_days={"jan","fév","mar","avr","mai","jui","jul","aôu","sep","oct","nov","déc",} end
if init.lang == "Greek" then text_days={"ΙΑΝ","ΦΕΒ","ΜΑΡ","ΑΠΡ","ΜΑΙ","ΙΟΥ","ΙΟΥ","ΑΥΓ","ΣΕΠ","ΟΚΤ","ΝΟΕ","ΔΕΚ",} end
if init.lang == "Spanish" then text_days={"ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",} end

local this_month=tonumber(os.date("%m"))
if init.handmonth == true then
  for i=1,12 do
-- OUTER POINTS POSTION FOR -- ### START DIAL C ## TEXT
    local point=(math.pi/180)*((360/12)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)
  end
else
  for i=1,12 do
    if this_month == i then
      cairo_set_source_rgba (cr,0,1,1,1) -- active month colour
    else
      cairo_set_source_rgba (cr,1,1,1,0.07) -- non-active month names
    end
-- OUTTER POINTS POSTION FOR TEXT
    local point=(math.pi/180)*((360/12)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)
  end
-- INNER POINTS POSITION, radius smaller than text circle
  local radius=58
  for i=1,12 do
    if this_month == i then
      cairo_set_source_rgba (cr,0,1,1,1) -- active colour
else
      cairo_set_source_rgba (cr,1,1,1,0.07) -- non-active month names
    end
    local point=(math.pi/180)*((360/12)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_stroke (cr)
  end
end
-- ######################################### END DIAL C ###

-- ### START DIAL D ### Day Numbers Dial ##################
-- GET NUMBER OF DAYS IN CURRENT MONTH
-- calculate Feb, then set up table
year4num=os.date("%Y")
t1=os.time({year=year4num,month=03,day=01,hour=00,min=0,sec=0});
t2=os.time({year=year4num,month=02,day=01,hour=00,min=0,sec=0});
if init.hour == 12 then
  febdaynum=tonumber((os.difftime(t1,t2))/(12*60*60))
else
  febdaynum=tonumber((os.difftime(t1,t2))/(24*60*60))
end
-- MONTH TABLE to get number of days
monthdays={31,febdaynum,31,30,31,30,31,31,30,31,30,31}
this_month=tonumber(os.date("%m"))
number_days=monthdays[this_month]
-- TEXT positioning DAY #'s
local center_x=init.center_x
local center_y=init.center_y
local radius=105
cairo_select_font_face (cr, "Liquid Crystal", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size (cr, 20)
local this_day=tonumber(os.date("%d"))
  for i=1,number_days do
-- OUTTER POINTS POSTION FOR TEXT
    local point=(math.pi/180)*((360/number_days)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
    --only print even numbers
    if math.mod(i, 2) == 0 and math.mod(this_day, 2)==0 then
    text=string.format("%02d",i) --formats numbers to double digits
    elseif math.mod(i, 2) ~= 0 and math.mod(this_day, 2)~=0 then
    text=string.format("%02d",i) --formats numbers to double digits
    else
    text=""
    end --odd even matching
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
if i==this_day then
     cairo_set_source_rgba (cr,0,1,1,1) -- active colour
else
cairo_set_source_rgba (cr,1,1,1,0.35) -- dim inactive numbers
end
     cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
     cairo_show_text (cr, text)
     cairo_stroke (cr)
  end
-- INNER POINTS POSITION, radius smaller than text circle
  local radius=90
  for i=1,number_days do
    local point=(math.pi/180)*((360/number_days)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
if i==this_day then
     cairo_set_source_rgba (cr,0,1,1,1) -- active colour
else
cairo_set_source_rgba (cr,1,1,1,0.35) -- dim the points
end
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_stroke (cr)
  end
-- ######################################### END DIAL D ###

-- ### START CLOCK A ######################################
-- SET MARKS ###
-- MARKS AROUND CLOCK A -- Large Main 24 HR Clock
local number_marks_A=init.hour
-- set mark length
local m_length_A=0 -- doesn't work but can't delete
-- set mark width
local m_width_A=0 -- doesn't work but can't delete
-- set mark line cap type
local m_cap=CAIRO_LINE_CAP_ROUND
-- set mark color and alpha,red blue green alpha
local mr,mg,mb,ma=1,1,1,0 -- opaque white -- doesn't work but can't delete
-- SETUP HOUR HANDS ###
-- CLOCK A HOUR HAND
hh_length_A=90
-- set hour hand width
hh_width_A=4
-- set hour hand line cap
hh_cap=CAIRO_LINE_CAP_ROUND
-- set hour hand color
-- hhr,hhg,hhb,hha=1,0,1,0 -- fully opaque white --doesn't work
-- SETUP MINUTE HANDS ###
-- CLOCK A MINUTE HAND SETUP
-- set length of minute hand
mh_length_A=123
-- set minute hand width
mh_width_A=2
-- set minute hand line cap
mh_cap=CAIRO_LINE_CAP_ROUND
-- set minute hand color
--mhr,mhg,mhb,mha=1,1,1,0.5 -- fully opaque white --doesn't work

-- SETUP SECOND HAND ###
-- CLOCK A SECOND HAND SETUP -- DOESN'T WORK - Why ???????????????????????????
-- set length of seconds hand -- yes I know it is commented out!
--sh_length_A=150
-- set hour hand width
--sh_width_A=2
-- set hour hand line cap
--sh_cap=CAIRO_LINE_CAP_ROUND
-- set seconds hand color
--shr,shg,shb,sha=1,0,0,1 -- fully opaque red

-- PART SECOND HAND
--position
--get seconds value
local seconds=tonumber(os.date("%S"))
--calculate rotation of second hand in degrees
if init.line == true then
  local arc=(math.pi/180)*((360/60)*seconds)
  --calculate point 1
  local radius1=120
  local x1=0+radius1*math.sin(arc)
  local y1=0-radius1*math.cos(arc)
  --calculate point 2
  local radius2=130
  local x2=0+radius2*math.sin(arc)
  local y2=0-radius2*math.cos(arc)
  --draw line connecting points
  cairo_move_to (cr, center_x+x1,center_y+y1)
  cairo_line_to (cr, center_x+x2, center_y+y2)
  cairo_set_source_rgba (cr,255/255,0/255,0/255,1) -- PART SECOND HAND
  cairo_stroke (cr)
end

-- CLOCK A ### 12 HR TIME ###
-- CLOCK SETTINGS
clock_radius=0 --does not work
clock_centerx=init.center_x -- centre of Clock hands
clock_centery=init.center_y -- centre of Clock hands
-- DRAWING CODE
-- DRAW MARKS
-- stuff that can be moved outside of the loop, needs only be set once
-- calculate end and start radius for marks
m_end_rad=clock_radius-b_to_m
m_start_rad=m_end_rad-m_length_A -- WHAT IS THIS??
-- set line cap type
cairo_set_line_cap  (cr, m_cap)
-- set line width
cairo_set_line_width (cr,m_width_A)
-- set color and alpha for marks
cairo_set_source_rgba (cr,mr,mg,mb,ma)
-- START LOOP FOR HOUR MARKS
for i=1,number_marks_A do
-- drawing code using the value of i to calculate degrees
-- calculate start point for 12/24 hour mark
radius=m_start_rad
point=(math.pi/180)*((i-1)*(360/number_marks_A))
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- set start point for line
cairo_move_to (cr,clock_centerx+x,clock_centery+y)
-- calculate end point for 12/24 hour mark
radius=m_end_rad
point=(math.pi/180)*((i-1)*(360/number_marks_A))
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- set path for line
cairo_line_to (cr,clock_centerx+x,clock_centery+y)
-- draw the line
cairo_stroke (cr)
end -- of for loop
-- HOUR MARKS -- ???????????????????????????????????????????????????????????????
-- TIME CALCULATIONS CLOCK A
if clock_type_A==12 then
hours=tonumber(os.date("%I"))
-- convert hours to seconds
h_to_s=hours*60*60
elseif clock_type_A==24 then
hours=tonumber(os.date("%H"))
-- convert hours to seconds
h_to_s=hours*60*60
end
minutes=tonumber(os.date("%M"))
-- convert minutes to seconds
m_to_s=minutes*60
-- get current seconds
seconds=tonumber(os.date("%S"))
-- DRAW HOUR HAND ###
-- get hours minutes seconds as just seconds
hsecs=h_to_s+m_to_s+seconds
-- calculate degrees for each second
hsec_degs=hsecs*(360/(60*60*clock_type_A)) -- use equation ~ eliminate decimals
-- set radius to calculate hand points
radius=hh_length_A
-- set start line coordinates, the center of the circle
cairo_move_to (cr,clock_centerx,clock_centery)
-- calculate coordinates for end of hour hand
point=(math.pi/180)*hsec_degs
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- describe the line we will draw
cairo_line_to (cr,clock_centerx+x,clock_centery+y)
-- set up line attributes and draw line
cairo_set_line_width (cr,hh_width_A)
cairo_set_source_rgba (cr,0,1,1,0.7) -- active colour Hour Hand ================
cairo_set_line_cap  (cr, hh_cap)
cairo_stroke (cr)
-- DRAW MINUTE HAND
-- get minutes and seconds just as seconds
msecs=m_to_s+seconds
-- calculate degrees for each second
msec_degs=msecs*0.1
-- set radius to calculate hand points
radius=mh_length_A
-- set start line coordinates, the center of the circle
cairo_move_to (cr,clock_centerx,clock_centery)
-- calculate coordinates for end of minute hand
point=(math.pi/180)*msec_degs
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- describe the line we will draw
cairo_line_to (cr,clock_centerx+x,clock_centery+y)
-- set up line attributes and draw line
cairo_set_line_width (cr,mh_width_A)
cairo_set_source_rgba (cr,0,1,1,0.7) -- active colour Minute Hand ==============
cairo_set_line_cap  (cr, mh_cap)
cairo_stroke (cr)
-- ### CLOCK A ###
local center_x=init.center_x -- Centre of the HR / Min Numbers
local center_y=init.center_y -- Centre of the HR / Min Numbers
local radius=init.radius -- 12/24 HR CLOCK Hours/Minutes radius -- seeline 42
cairo_select_font_face (cr, "DS-Digital", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size (cr, 22)
cairo_set_source_rgba (cr,1,1,1,1.0) -- HR Clock numbers
-- TABLE OF TEXT -- in order
if init.hour == 12 then
  text_days={"12","01","02","03","04","05","06","07","08","09","10","11",}
  for i=1,12 do
-- OUTTER POINTS POSTION FOR TEXT
    local point=(math.pi/180)*((360/12)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_set_source_rgba (cr,1,1,1,1.0) -- colour of HR Numbers
    cairo_stroke (cr)
  end
-- INNER POINTS POSITION, radius smaller than text circle
  local radius=124 -- 12 HR Clock
  for i=1,12 do
    local point=(math.pi/180)*((360/12)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_set_source_rgba (cr,1,1,1,0.50)
    cairo_stroke (cr)
  end
end
if init.hour == 24 then
  text_days={"00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23",}
  for i=1,24 do
-- OUTTER POINTS POSTION FOR TEXT
    local point=(math.pi/180)*((360/24)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)
  end
-- INNER POINTS POSITION, radius smaller than text circle
  local radius=124 -- 24 HR Clock
  for i=1,24 do
    local point=(math.pi/180)*((360/24)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_set_source_rgba (cr,1,1,1,0.4)
    cairo_stroke (cr)
  end
end

-- ############################################################################
-- POSITION FOR TEXT HOUR NUMBERS
  if init.hour == 12 and init.second == true then
    text_days={"","01","02","03","04","","06","07","08","09","","11","12","13","14","","16","17","18","19","","21","22","23","24","","26","27","28","29","","31","32","33","34","","36","37","38","39","","41","42","43","44","","46","47","48","49","","51","52","53","54","","56","57","58","59","",}
-- INNER POINTS POSITION, radius smaller than text circle
    cairo_set_source_rgba (cr,1,1,1,0.07) -- does not work -- settings moved
    cairo_select_font_face (cr, "monofur", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
    for i=1,60 do
      local radius=124 -- dots for seconds Clock A (12 dial)
      local point=(math.pi/180)*((360/60)*(i-1))
      local x=0+radius*(math.sin(point))
      local y=0-radius*(math.cos(point))
      if seconds == i-1 then
        cairo_set_source_rgba (cr,255/255,0/255,0/255,0.07) -- does not work - settings moved
      else
        if i-1 == 0 or i-1 == 5 or i-1 == 10 or i-1 == 15 or i-1 == 25 or i-1 == 30 or i-1 == 35 or i-1 == 40 or i-1 == 45 or i-1 == 50 or i-1 == 55 then
          cairo_set_source_rgba (cr,0,1,1,1) -- active colour
        else
          cairo_set_source_rgba (cr,0,1,1,0.0) -- dots for seconds A Clock
        end
      end
      cairo_arc (cr,center_x+x,center_y+y,1/2,0,2*math.pi)
      cairo_stroke (cr)
    end
    radius=radius-3
    cairo_set_font_size (cr, 10)
    for i=1,60 do
-- OUTTER POINTS POSTION FOR TEXT
      local point=(math.pi/180)*((360/60)*(i-1))
      local x=0+radius*(math.sin(point))
      local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
      local text=text_days[i]--gets text from table
      if seconds == tonumber(text) then
      cairo_set_source_rgba (cr,0,1,1,1.0) -- active colour
      else
        cairo_set_source_rgba (cr,1,1,1,0.15) -- seconds numbers
      end
      cairo_text_extents(cr,text,extents)
      local width=extents.width
      local height=extents.height
      cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
      cairo_show_text (cr, text)
      cairo_stroke (cr)
    end
  end
-- ############################################################################
cairo_stroke (cr)
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
end -- end main function
--[[ mrpeachy wrote:

    the numbers are drawn using a for loop somewhere, like this

    for i=1,12 do
    calculate position of number
    move_to(x,y)
    show_text(i)
    end

    change it to something like this

    for i=1,12 do
    calculate position of number
      if i==month_number then
      move_to(x,y)
      show_text(month_number)
      else
      move_to(x,y)
      show_text(i)
      end
    end ]]


draw-bg.lua

--[[Background originally by londonali1010 (2009)
    ability to set any size for background mrpeachy 2011
    ability to set variables for bg in conkyrc dk75

  the change is that if you set width and/or height to 0
  then it assumes the width and/or height of the conky window

so:

Above and After TEXT  (requires a composite manager or it blinks!)

lua_load ~/wea_conky/draw_bg.lua
TEXT
${lua conky_draw_bg 10 0 0 0 0 0x000000 0.4}

OR Both above TEXT (no composite manager required - no blinking!)
@Mr Peachy
lua_load ~/wea_conky/draw_bg.lua
lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.5
TEXT

Note
${lua conky_draw_bg 20 0 0 0 0 0x000000 0.4}
  See below:        1  2 3 4 5 6        7

${lua conky_draw_bg corner_radius x_position y_position width height color alpha}

covers the whole window and will change if you change the minimum_size setting

1 = 20             corner_radius
2 = 0             x_position
3 = 0             y_position
3 = 0             width
5 = 0             height
6 = 0x000000      color
7 = 0.4           alpha

######### calendar function ##################################################

then to use it, you activate the calendar function BELOW TEXT like this

${lua luacal {settings}}

#${lua luacal {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gh=,gt=,gv=,sd=}}
#    x=x position top left
#    y=y position top left
#    tf=title font, eg "mono" must be in quotes
#    tfs=title font size
#    tc=title color
#    ta=title alpha
#    bf=body font, eg "mono" must be in quotes
#    bfs=body font size
#    bc=body color
#    ba=body alpha
#    hf=highlight font, eg "mono" must be in quotes
#    hfs=highlight font size
#    hc=highlight color
#    ha=highlight alpha
#    sp=spacer, eg " " or sp="0"... 0,1 or 2 spaces can help with positioning of non-monospaced fonts

#    gt=gap from title to body
#    gh=gap horizontal between columns
#    gv=gap vertical between rows
#    sd=start day, 0=Sun, 1=Mon

#    hstyle = heading style, 0=just days, 1=date insert
#    tdf=title date font, eg "mono" must be in quotes
#    tdfs=title date font size
#    tdc=title date color
#    tda=title date alpha

# test line
-- ${lua luacal {x=10,y=100,tf="Purisa",tfs=24,tc=0xf67e16,ta=1,bf="First Order",bfs=26,bc=0xecd32a,ba=1,hf="Purisa",hfs=18,hc=0xf67e16,ha=1,sp=" ",gh=40,gt=25,gv=20,sd=0,hstyle=1,tdf="First Order",tdfs=28,tdc=0xff0000,tda=1}}


]]

require 'cairo'
local    cs, cr = nil
function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
function conky_draw_bg(r,x,y,w,h,color,alpha)
if conky_window == nil then return end
if cs == nil then cairo_surface_destroy(cs) end
if cr == nil then cairo_destroy(cr) end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
w=w
h=h
if w=="0" then w=tonumber(conky_window.width) end
if h=="0" then h=tonumber(conky_window.height) end
cairo_set_source_rgba (cr,rgb_to_r_g_b(color,alpha))
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
-----------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_fill (cr)
------------------------------------------------------------
cairo_surface_destroy(cs)
cairo_destroy(cr)
return ""
end
-- ###### calendar function ##################################################
function conky_luacal(caltab) -- {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gt=,gh=,gv=,sd=,hstyle=,tdf=,tdfs=,tdc=,tda=}
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--############################################################################
if caltab.x==nil then
caltab=loadstring("return" .. caltab)()
end
local cal_x=caltab.x
local cal_y=caltab.y
local tfont=caltab.tf or "mono"
local tfontsize=caltab.tfs or 12
local tc=caltab.tc or 0xffffff
local ta=caltab.ta or 1
local bfont=caltab.bf or "mono"
local bfontsize=caltab.bfs or 12
local bc=caltab.bc or 0xffffff
local ba=caltab.ba or 1
local hfont=caltab.hf or "mono"
local hfontsize=caltab.hfs or 12
local hc=caltab.hc or 0xff0000
local ha=caltab.ha or 1
local spacer=caltab.sp or " "
local gaph=caltab.gh or 20
local gapt=caltab.gt or 15
local gapl=caltab.gv or 15
local sday=caltab.sd or 0
local hstyle=caltab.hstyle or 0
--convert colors
--local font=string.gsub(font,"_"," ")
local tred,tgreen,tblue,talpha=rgb_to_r_g_b(tc,ta)
--main body text color
local bred,bgreen,bblue,balpha=rgb_to_r_g_b(bc,ba)
--highlight text color
local hred,hgreen,hblue,halpha=rgb_to_r_g_b(hc,ha)
--############################################################################
--calendar calcs
local year=os.date("%G")
local today=tonumber(os.date("%d"))
local t1 = os.time( {    year=year,month=03,day=01,hour=00,min=0,sec=0} );
local t2 = os.time( {    year=year,month=02,day=01,hour=00,min=0,sec=0} );
local feb=(os.difftime(t1,t2))/(24*60*60)
local monthdays={ 31, feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
local day=tonumber(os.date("%w"))+1-sday
local day_num = today
local remainder=day_num % 7
local start_day=day-(day_num % 7)
if start_day<0 then start_day=7+start_day end
local month=os.date("%m")
local mdays=monthdays[tonumber(month)]
local x=mdays+start_day
local dnum={}
local dnumh={}
if mdays+start_day<36 then
dlen=35
plen=29
else
dlen=42
plen=36
end
for i=1,dlen do
    if i<=start_day then
    dnum[i]="  "
    else
    dn=i-start_day
        if dn=="nil" then dn=0 end
        if dn<=9 then dn=(spacer .. dn) end
        if i>x then dn="" end
        dnum[i]=dn
        dnumh[i]=dn
        if dn==(spacer .. today) or dn==today then
        dnum[i]=""
        end
        if dn==(spacer .. today) or dn==today then
        dnumh[i]=dn
        place=i
        else dnumh[i]="  "
        end
    end
end--for
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
local extents=cairo_text_extents_t:create()
tolua.takeownership(extents)
if hstyle==0 then
    if tonumber(sday)==0 then
    dys={"SU","MO","TU","WE","TH","FR","SA"}
    else
    dys={"MO","TU","WE","TH","FR","SA","SU"}
    end
    --draw calendar titles
elseif hstyle==1 then
    if tonumber(sday)==0 then
    dys={"SU","MO"," ","  ","  ","FR","SA"}
    cairo_text_extents(cr,"MO",extents)
    local s=extents.x_advance+gaph
    local f=gaph*5
    local tdfont=caltab.tdf        or "mono"
    local tdfontsize=caltab.tdfs    or 12
    local tdc=caltab.tdc        or 0xffffff
    local tda=caltab.tda        or 1
    cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, tdfontsize);
    local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
    cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
    local insert=os.date("%b %y")
    cairo_text_extents(cr,insert,extents)
    local w=extents.x_advance
    cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
    cairo_show_text (cr,insert)
    cairo_stroke (cr)
    else
    dys={"MO","TU"," ","  ","  ","SA","SU"}
    cairo_text_extents(cr,"TU",extents)
    local s=extents.x_advance+gaph
    local f=gaph*5
    local tdfont=caltab.tdf        or "mono"
    local tdfontsize=caltab.tdfs    or 12
    local tdc=caltab.tdc        or 0xffffff
    local tda=caltab.tda        or 1
    cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, tdfontsize);
    local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
    cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
    local insert=os.date("%b %y")
    cairo_text_extents(cr,insert,extents)
    local w=extents.x_advance
    cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
    cairo_show_text (cr,insert)
    cairo_stroke (cr)
    end
end
--draw calendar titles
for i=1,7 do
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
cairo_move_to (cr, cal_x+(gaph*(i-1)), cal_y)
cairo_show_text (cr, dys[i])
cairo_stroke (cr)
end
--draw calendar body
cairo_select_font_face (cr, bfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, bfontsize);
cairo_set_source_rgba (cr,bred,bgreen,bblue,balpha)
for i=1,plen,7 do
local fn=i
    for i=fn,fn+6 do
    cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
    cairo_show_text (cr, dnum[i])
    cairo_stroke (cr)
    end
end
--highlight
cairo_select_font_face (cr, hfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, hfontsize);
cairo_set_source_rgba (cr,hred,hgreen,hblue,halpha)
for i=1,plen,7 do
local fn=i
    for i=fn,fn+6 do
    cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
    cairo_show_text (cr, dnumh[i])
    cairo_stroke (cr)
    end
end
--############################################################################
caltab=nil
dlen=nil
plen=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function#######################################################
Title: Re: Conky Codes and Images
Post by: lwfitz on January 14, 2013, 07:03:36 PM
(http://ompldr.org/taDFrZQ) (http://ompldr.org/vaDFrZQ)
Title: Re: Conky Codes and Images
Post by: Sector11 on January 14, 2013, 07:04:08 PM
Works well on white too!  OK So I'm conky crazy!!!!!

(http://t.imgbox.com/admGXkVb.jpg) (http://imgbox.com/admGXkVb)

##### TEST #####
# killall conky && conky -c ~/.conkyrc.vsido &
# .conkyrc - Edited from various examples across the 'net
# Used by VastOne on #!

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Use Xft?
use_xft yes
xftfont Liberation Mono:bold:size=13.5
xftalpha 0.9

# Update interval in seconds
update_interval 1

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Minimum size of text area  - not required unless you need to FORCE things
#minimum_size 1024 0
#maximum_width 1024

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no
own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window yes
own_window_transparent yes
own_window_class conky-semi
#own_window_argb_visual yes

# Stippled borders?
stippled_borders 0

# border margins
# border_inner_margin 0
# border_outer_margin 0
# border_width 1

# Default and border colors
default_color 73AEB4 ## VSIDO Light Blue
color0 7D8C93 ## VSIDO Light Grey
color1 32CD32 ## VSIDO Lime Green

#default_shade_color black
#default_outline_color grey
own_window_colour 000000

# Text alignment, other possible values are commented
alignment top_left

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 0
gap_y 5

# 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 none

### Added
# Shortens units to a single character (kiB->k, GiB->G, etc.). Default is off.
short_units yes

# lua_load ~/Conky/LUA/draw-bg.lua
# lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.3
#
TEXT
${image $HOME/images/debian2.png -s 40x40 -p 1,0}    ${color}Kernel ${color0}${kernel} ${color}Disk ${color0}${fs_used /} ${color1}/ ${color0}${fs_size /} ${color}Network ${color0}${downspeedgraph eth0 14,100 000000 ff0000} ${upspeedgraph eth0 14,100 000000 00ff00}
    ${color}CPU ${color0}${if_match ${cpu cpu0} < 10} ${cpu cpu0}${else}${cpu cpu0}${endif}${color1}%   \
${color}RAM ${color0}${if_match ${memperc} < 10} ${memperc}${else}${memperc}${endif}${color1}%   \
${color0}${mem} ${color1}/ ${color0}${memmax}   ${color}SDA ${color0}${execi 5 hddtemp -n /dev/sda}${color1}°${goto 530}${color}Uptime ${color1}${uptime_short}${color}
Title: Re: Conky Codes and Images
Post by: Sector11 on January 14, 2013, 07:06:19 PM
MINE!!! I tell you all MINE! - Contract?  What contract?  ALPHA TEAM Contract ... OH!!!   8o

Just pullin' yer leg! Sure enough ...

Now that I have liquored it up {hic} and added NVIDIA, a new screenshot to compare differences in width:

Heeeeeeeeeeeeeeeeeeeeeers Marvin!
(http://t.imgbox.com/acdY1eUg.jpg) (http://imgbox.com/acdY1eUg)

The top piece of code is the original conky line with the hash marks removed from the colour commands like: ${color 7D8C93} - it even has the overkill of colour changes.  Like:
${color 7D8C93} ${color 7D8C93}${color 73AEB4} ${color 73AEB4}Network${color 7D8C93}

Save this as: ~/.conkyrc.vsido and use the second line to KFC and restart this conky.
##### TEST #####
# killall conky && conky -c ~/.conkyrc.vsido &
# .conkyrc - Edited from various examples across the 'net
# Used by VastOne on #!

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Use Xft?
use_xft yes
xftfont Liberation Sans:size=15
xftalpha 0.9

#text_buffer_size 2048
## text_buffer_size is not required by this conky:
## Size of the standard text buffer (default is 256 bytes). This buffer is used
## for intermediary text, such as individual lines, output from $exec vars, and
## various other variables. Increasing the size of this buffer can drastically
## reduce Conky's performance, but will allow for more text display per variable.
## The size of this buffer cannot be smaller than the default value of 256 bytes.
##
## The KEY: for more text display per variable.

# Update interval in seconds
update_interval 1

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Minimum size of text area  - not required unless you need to FORCE things
#minimum_size 1024 0
#maximum_width 1024

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no
own_window_type normal #desktop - to allow right clicks on the conky.
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window yes
own_window_transparent yes
own_window_class conky-semi
# own_window_argb_visual yes

# Stippled borders?
stippled_borders 0

# border margins
# border_margin 0 ## <<--- defunct now use below
# border_inner_margin 0
# border_outer_margin 0

# border width
# border_width 1  # above you have draw_borders no - this not required

# Default and border colors
default_color 73AEB4 ## VSIDO Light Blue
color0 7D8C93 ## VSIDO Light Grey
color1 32CD32 ## VSIDO Lime Green

#default_shade_color black
#default_outline_color grey
own_window_colour 000000

# Text alignment, other possible values are commented
#alignment top_middle
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 0
gap_y 5

# 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 none

### Added
# Shortens units to a single character (kiB->k, GiB->G, etc.). Default is off.
short_units yes

# lua_load ~/Conky/LUA/draw-bg.lua
# lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.3
#
TEXT
${image $HOME/images/debian2.png -s 40x40 -p 1,-1} ${color 7D8C93}      ${color 73AEB4}Kernel${color 7D8C93} $kernel ${color 73AEB4} Uptime ${color lime green}${uptime_short} ${color 7D8C93} CPU ${color 73AEB4}${cpu cpu0}% ${color 7D8C93}RAM ${color 73AEB4}${memperc}% ${mem} / ${memmax} ${color 7D8C93} ${color 7D8C93}Disk ${color 73AEB4}${fs_used /}/${fs_size /} ${color 7D8C93}HD${color 73AEB4} ${execi 5 hddtemp -n /dev/sda}° ${color 7D8C93} ${color 7D8C93}${color 73AEB4} ${color 73AEB4}Network${color 7D8C93} ${voffset 3}${downspeedgraph eth0 14,100 000000 ff0000} ${upspeedgraph eth0 14,100 000000 00ff00}

${color white}  Hardcoded kernels - original font|size:
${image $HOME/images/debian2.png -s 40x40 -p 1,78}       ${color}Kernel ${color0}3.2.0-4-amd64 ${color}Disk ${color0}${fs_used /} ${color1}/ ${color0}${fs_size /} ${color}Network${color0} ${voffset 2}${downspeedgraph eth0 14,100 000000 ff0000} ${upspeedgraph eth0 14,100 000000 00ff00}
       ${color}CPU ${color0}${if_match ${cpu cpu0} < 10}0${cpu cpu0}${else}${cpu cpu0}${endif}${color1}%   \
${color}RAM ${color0}${if_match ${memperc} < 10}0${memperc}${else}${memperc}${endif}${color1}%   \
${color0}${mem} ${color1}/ ${color0}${memmax}   ${color}SDA${color0} ${execi 5 hddtemp -n /dev/sda}${color1}°${goto 530}${color}Uptime ${color1}${uptime_short}

${image $HOME/images/debian2.png -s 40x40 -p 1,147}       ${color}Kernel ${color0}3.6.0-3.dmz.2-liquorix-amd64 ${color}Disk ${color0}${fs_used /} ${color1}/ ${color0}${fs_size /} ${color}Network${color0} ${voffset 2}${downspeedgraph eth0 14,100 000000 ff0000} ${upspeedgraph eth0 14,100 000000 00ff00}
       ${color}CPU ${color0}${if_match ${cpu cpu0} < 10}0${cpu cpu0}${else}${cpu cpu0}${endif}${color1}%   \
${color}RAM ${color0}${if_match ${memperc} < 10}0${memperc}${else}${memperc}${endif}${color1}%   \
${color0}${mem} ${color1}/ ${color0}${memmax}   ${color}SDA${color0} ${execi 5 hddtemp -n /dev/sda}${color1}°${goto 530}${color}Uptime ${color1}${uptime_short}${color}

${color white}  real working code - no "0X%" just padded spaces - still moves around - not mono font:

${image $HOME/images/debian2.png -s 40x40 -p 1,257}       ${color}Kernel ${color0}${kernel} ${color}Disk ${color0}${fs_used /} ${color1}/ ${color0}${fs_size /} ${color}Network${color0} ${voffset 2}${downspeedgraph eth0 14,100 000000 ff0000} ${upspeedgraph eth0 14,100 000000 00ff00}
       ${color}CPU ${color0}${if_match ${cpu cpu0} < 10} ${cpu cpu0}${else}${cpu cpu0}${endif}${color1}%   \
${color}RAM ${color0}${if_match ${memperc} < 10} ${memperc}${else}${memperc}${endif}${color1}%   \
${color0}${mem} ${color1}/ ${color0}${memmax}   ${color}SDA ${color0}${execi 5 hddtemp -n /dev/sda}${color1}°${goto 530}${color}Uptime ${color1}${uptime_short}${color}

${font DejaVu Sans Mono:size=13}${color white} real working code - no "0X%" just padded spaces - DejaVu Sans Mono size 13

${image $HOME/images/debian2.png -s 40x40 -p 1,367}    ${color}Kernel ${color0}${kernel} ${color}Disk ${color0}${fs_used /} ${color1}/ ${color0}${fs_size /} ${color}Network${color0} ${voffset 2}${downspeedgraph eth0 14,100 000000 ff0000} ${upspeedgraph eth0 14,100 000000 00ff00}
    ${color}CPU ${color0}${if_match ${cpu cpu0} < 10} ${cpu cpu0}${else}${cpu cpu0}${endif}${color1}%   \
${color}RAM ${color0}${if_match ${memperc} < 10} ${memperc}${else}${memperc}${endif}${color1}%   \
${color0}${mem} ${color1}/ ${color0}${memmax}   ${color}SDA ${color0}${execi 5 hddtemp -n /dev/sda}${color1}°${goto 530}${color}Uptime ${color1}${uptime_short}${color}

${font Liberation Mono:bold:size=13}${color white} real working code - no "0X%" just padded spaces - Liberation Mono size 13 bold

${image $HOME/images/debian2.png -s 40x40 -p 1,467}    ${color}Kernel ${color0}${kernel} ${color}Disk ${color0}${fs_used /} ${color1}/ ${color0}${fs_size /} ${color}Network${color0} ${voffset 2}${downspeedgraph eth0 14,100 000000 ff0000} ${upspeedgraph eth0 14,100 000000 00ff00}
    ${color}CPU ${color0}${if_match ${cpu cpu0} < 10} ${cpu cpu0}${else}${cpu cpu0}${endif}${color1}%   \
${color}RAM ${color0}${if_match ${memperc} < 10} ${memperc}${else}${memperc}${endif}${color1}%   \
${color0}${mem} ${color1}/ ${color0}${memmax}   ${color}SDA ${color0}${execi 5 hddtemp -n /dev/sda}${color1}°${goto 530}${color}Uptime ${color1}${uptime_short}${color}

${font Liberation Mono:bold:size=13.5}${color white} real working code - no "0X%" just padded spaces - Liberation Mono size 13.5 bold

${image $HOME/images/debian2.png -s 40x40 -p 1,567}    ${color}Kernel ${color0}${kernel} ${color}Disk ${color0}${fs_used /} ${color1}/ ${color0}${fs_size /} ${color}Network${color0} ${voffset 2}${downspeedgraph eth0 14,100 000000 ff0000} ${upspeedgraph eth0 14,100 000000 00ff00}
    ${color}CPU ${color0}${if_match ${cpu cpu0} < 10} ${cpu cpu0}${else}${cpu cpu0}${endif}${color1}%   \
${color}RAM ${color0}${if_match ${memperc} < 10} ${memperc}${else}${memperc}${endif}${color1}%   \
${color0}${mem} ${color1}/ ${color0}${memmax}   ${color}SDA ${color0}${execi 5 hddtemp -n /dev/sda}${color1}°${goto 530}${color}Uptime ${color1}${uptime_short}${color}


Made one addition the Liberation bold 13.5 size.
IMHO: That's the one!
Title: Re: Conky Codes and Images
Post by: Sector11 on January 14, 2013, 07:06:57 PM
OK, here's another idea for a default conky, that will fit smaller screens as well - like mine.

I like the last 2 ines - liberation mono size 13... nice clean font:
(http://t.imgbox.com/acoYfUw0.jpg) (http://imgbox.com/acoYfUw0)

Here's the original conky on my screen
(http://t.imgbox.com/acy5Cyqj.jpg) (http://imgbox.com/acy5Cyqj)

On the top the "not quite" original code.

Thoughts ... opinions ... criticisms ... just don't toss rotten veggies or eggs please.
Title: Re: Conky Codes and Images
Post by: Sector11 on January 14, 2013, 07:08:02 PM
Here's a simple little conky:

(http://t.imgbox.com/abqwQWhD.jpg) (http://imgbox.com/abqwQWhD)
I ran it under two kernals, notice the difference in width.

I am using minimum_width only:
minimum_size 160 0     ## width, height
#maximum_width 160       ## width

That way the "3.6-trunk-amd64" kernal looks good and so does the "3.6.0-3.dmz.2-liquorix-amd64" as that sets the width for the conky

Some other things I'm using are:
${time %x}
Quote%x     Preferred date representation based on locale, without the time     Example: 02/05/09 for February 5, 2009
as you see in the image above, mine is 26/12/12 = 26 December 2012 as set by my LOCALE settings system wide
${time %X}
Quote%X     Preferred time representation based on locale, without the date     Example: 03:59:16 or 15:59:16
Mine shows 03:37:20 PM as Argentina doesn't use 24HR time "officially" (so my local conky uses %T =24HR)

The two time commands above makes the conky a bit mote "international" as it uses the machines "LOCALE" settings.

For CPU's I have:
# CPU 1:${alignr 5}${cpu cpu1}%
# CPU 2:${alignr 5}${cpu cpu2}%
# CPU 3:${alignr 5}${cpu cpu3}%
# CPU 4:${alignr 5}${cpu cpu4}%
# CPU Avg:${alignr 5}${cpu cpu0}%
CPU:${alignr 5}${cpu cpu0}%

... to show people that they can use all their CPU's and the "Average"

The VSIDO Logo: (http://t.imgbox.com/adlPJ5pD.jpg) (http://imgbox.com/adlPJ5pD)

and the conky:
# killall conky && conky &
## VSIDO Default conky
###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
own_window_colour gray
own_window_class Conky
own_window_title VSIDO Default Conky

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type normal
own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
# own_window_argb_value 255

minimum_size 160 0     ## width, height
#maximum_width 160       ## width

gap_x 10 # left-right
gap_y 0 # up-down

alignment middle_right
###################################################  End Window Settings  ###
###  Font Settings  #########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont Monofont:bold:size=9

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes

draw_shades no
default_shade_color black

draw_outline no # amplifies text if yes
default_outline_color black

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
default_shade_color gray
default_outline_color black

default_color DCDCDC #220 220 220 Gainsboro
color0 8FBC8F #143 188 143 DarkSeaGreen
color1 778899 #119 136 153 LightSlateGray
color2 FF8C00 #255 140   0 DarkOrange
color3 7FFF00 #127 255   0 Chartreuse
color4 FFA07A #255 160 122 LightSalmon
color5 FFDEAD #255 222 173 NavajoWhite
color6 00BFFF #  0 191 255 DeepSkyBlue
color7 00FFFF #  0 255 255 Cyan
color8 FFFF00 #255 255   0 Yellow
color9 B22222 #178  34  34 FireBrick
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 1
# graph borders
draw_graph_borders yes
#default_graph_size 15 40
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################
# Boolean value, if true, Conky will be forked to background when started.
background yes

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none
0
# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 1028

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
# temperature_unit Fahrenheit

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load ~/Conky/LUA/draw-bg.lua
#TEXT
#${lua conky_draw_bg 10 0 0 0 0 0x000000 0.6}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
lua_load ~/Conky/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 15 0 0 0 0 0x000000 0.5
# lua_draw_hook_post draw-bg 125 0 0 0 0 0x000000 0.01
#
# TEXT
#
#######################################################  End LUA Settings  ###
update_interval 1

TEXT
${lua conky_draw_bg 15 0 0 0 0 0x000000 0.5}${image $HOME/Conky/images/VSIDO_Logo.png -s 60x60 -p 0,0}\
${alignr 5}${time %X}
${alignr 5}${time %x}

${alignr 5}${uptime_short}
${hr}
${alignc}${kernel}
${hr}
Host:${alignr 5}${nodename}

RAM:${alignr 5}${mem} / ${memmax}
Swap:${alignr 5}${swap} / ${swapmax}
Disk:${alignr 5}${fs_used /} / ${fs_size /}

# CPU 1:${alignr 5}${cpu cpu1}%
# CPU 2:${alignr 5}${cpu cpu2}%
# CPU 3:${alignr 5}${cpu cpu3}%
# CPU 4:${alignr 5}${cpu cpu4}%
# CPU Avg:${alignr 5}${cpu cpu0}%
CPU:${alignr 5}${cpu cpu0}%

/Root: ${fs_size /}${alignr 5}${fs_used_perc /}%${color}
/Home: ${fs_size /home}${alignr 5}${fs_used_perc /home}%

DISK ${hr}
Read:${alignr 5}${diskio_read /dev/sda}
Write:${alignr 5}${diskio_write /dev/sda}

NETWORK ${hr}
${alignc}${downspeedgraph eth0 14,140 000000 ff0000}

Down:${alignr 5}${downspeedf eth0}
${alignc}${upspeedgraph eth0 14,140 000000 00ff00}

Up:${alignr 5}${upspeedf eth0}


Have fun!
Title: Re: Conky Codes and Images
Post by: lwfitz on January 14, 2013, 07:23:51 PM
Monitor #1

(http://ompldr.org/tZ3Fvaw) (http://ompldr.org/vZ3Fvaw)


Monitor #2

(http://ompldr.org/tZ3FvbA) (http://ompldr.org/vZ3FvbA)


Under a load

(http://ompldr.org/tZ3Fvag) (http://ompldr.org/vZ3Fvag)

conky_chrono

own_window yes
own_window_type desktop
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
#own_window_colour white
own_window_class Conky
own_window_title Chronograph TEST
double_buffer yes

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type normal
#own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#own_window_argb_value 5

minimum_size 275 675 ## width, height
maximum_width 275    ## width

gap_x 10
gap_y 40 

# tl, tm, tr
# ml, mm, mr
# bl, bm, br
alignment tl
#alignment top_middle
# Use Xft (anti-aliased font and stuff)
use_xft yes
#xftfont CorporateMonoExtraBold:size=9
xftfont monofur:bold:size=14
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes
uppercase no
draw_shades no
default_shade_color black
draw_outline no # amplifies text if yes
default_outline_color black
color1 000000 ## Black
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes #no
#default_graph_size 15 40
background yes
use_spacer none
text_buffer_size 256
no_buffers yes
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2
format_human_readable yes
short_units yes
update_interval 1
imlib_cache_size 0

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
temperature_unit Fahrenheit

####### Load Lua #########
lua_load ~/Conky/s11_clock.lua
lua_draw_hook_post main

lua_load ~/Conky/rings.lua
lua_draw_hook_pre main_rings

##############################  End LUA  ###

TEXT













${voffset 12}${goto 127}${font BlackChancery:bold:size=15}${color1}${platform f71882fg.656 temp 1}${font BlackChancery:bold:size=15}F
${voffset -8}${goto 95}${font BlackChancery:bold:size=25}${color1}1${goto 181}2
${voffset -11}${goto 115}${font BlackChancery:bold:size=15}${color1}CPU
${voffset -4}${goto 93}${font BlackChancery:bold:size=25}${color1}3${goto 179}4
${voffset -10}${goto 127}${font BlackChancery:bold:size=20}${color1}${cpu cpu0}%

${voffset 20}${goto 110}${font BlackChancery:bold:size=15}${color1}RAM
${voffset -7}${goto 90}${font BlackChancery:bold:size=12}${mem}${goto 140}/ ${memmax}${voffset 7}
${goto 110}${font BlackChancery:bold:size=15}${color1}SWAP
${voffset -7}${goto 90}${font BlackChancery:bold:size=12}${swap}${goto 140}/ ${swapmax}


conky_rings_storage

own_window yes
own_window_type desktop
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
#own_window_colour white
own_window_class Conky
own_window_title Chronograph TEST
double_buffer yes

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type normal
#own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#own_window_argb_value 5


minimum_size 275 1100 ## width, height
maximum_width 275    ## width

gap_x -165
gap_y 25

### alignment values or top_left, bottom_right, etc
# tl, tm, tr
# ml, mm, mr
# bl, bm, br
#alignment tl
alignment top_middle
use_xft yes
xftfont monofur:bold:size=14

xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes

uppercase no
draw_shades no
default_shade_color black
draw_outline no # amplifies text if yes
default_outline_color black
color1 000000 ## Black
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes #no
#default_graph_size 15 40
background yes
use_spacer none
text_buffer_size 256
no_buffers yes
short_units yes
pad_percents 2
format_human_readable yes
short_units yes
imlib_cache_size 0
temperature_unit Fahrenheit
update_interval 1

###  Load Lua  ###########################################################

lua_load ~/Conky/rings_2.lua
lua_draw_hook_pre main_rings

##############################  End LUA Settings  ###

TEXT
#${lua conky_draw_bg 132 3 3 264 264 0x000000 0.5}
#${lua conky_draw_bg 98 37 37 196 196 0xFFFFFF 0.2}
#${lua conky_draw_bg 68 67 67 136 136 0x000000 0.4}
#${lua conky_draw_bg 35 100 100 70 70 0x000000 0.3}


${voffset 10}${goto 150}${font BlackChancery:bold:size=15}${color1}/root
${voffset -10}${goto 125}${font BlackChancery:size=10}Used ${goto 190}${fs_used /}
${goto 125}Size ${goto 190}${fs_size /}
${goto 145}${font BlackChancery:bold:size=15}${color1}/home
${voffset -10}${goto 125}${font BlackChancery:size=10}Used ${goto 190}${fs_used /home}
${goto 125} Size${goto 190}${fs_size /home}






${goto 132}${font BlackChancery:bold:size=15}${color1}External
${voffset -5}${goto 122}${font BlackChancery:size=12}Used ${goto 190}${fs_used /media/external}
${goto 122}Size${goto 190}${fs_size /media/external}






${goto 138}${font BlackChancery:bold:size=15}${color1}Videos
${voffset -5}${goto 122}${font BlackChancery:size=12}Used ${goto 190}${fs_used /media/sdb1}
${goto 122}Size${goto 190}${fs_size /media/sdb1}
${goto 148}${font BlackChancery:size=20}${hddtemp /dev/sdb}F



${voffset -9}${goto 128}${font BlackChancery:bold:size=15}${color1}Software
${voffset -5}${goto 122}${font BlackChancery:size=12}Used ${goto 190}${fs_used /media/sdd1}
${goto 122}Size${goto 190}${fs_size /media/sdd1}
${goto 148}${font BlackChancery:size=20}${hddtemp /dev/sdd}F



${voffset -15}${goto 134}${font BlackChancery:bold:size=15}${color1}Storage
${voffset -5}${goto 122}${font BlackChancery:size=12}Used ${goto 190}${fs_used /media/storage}
${goto 122}Size${goto 190}${fs_size /media/storage}
${goto 148}${font BlackChancery:size=20}${hddtemp /dev/sdc}F


conky_weather

# 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,skip_taskbar,skip_pager

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# fiddle with window
use_spacer yes
use_xft yes

# Update interval in seconds
update_interval 3

# Minimum size of text area
minimum_size 1100 200
maximum_width 1100

override_utf8_locale yes

# Draw shades?
draw_shades yes

# Text stuff
draw_outline yes # amplifies text if yes
draw_borders no
#font
xftfont Arial:size=9
uppercase no # set to yes if you want all text to be in uppercase

# Stippled borders?
stippled_borders 3

# border margins
border_margin 9

# border width
border_width 10

# Default colors and also border colors, grey90 == #e5e5e5
default_color cbcbcb

own_window_colour brown
own_window_transparent yes

# Text alignment, other possible values are commented
#alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right
alignment top_middle
# Gap between borders of screen and text
gap_x -965
gap_y 30

imlib_cache_size 0

TEXT
${texeci 500 bash $HOME/Accuweather_Conky_USA_Images/acc_usa_images}${image $HOME/Accuweather_Conky_USA_Images/cc.png -p 0,70 -s 180x108}
${font BlackChancery:bold:size=15}${execpi 600 sed -n '3p' $HOME/Accuweather_Conky_USA_Images/curr_cond}${font BlackChancery:bold:size=12}${goto 525}${execpi 600 sed -n '6p' $HOME/Accuweather_Conky_USA_Images/tod_ton} ${goto 750}${execpi 600 sed -n '11p' $HOME/Accuweather_Conky_USA_Images/tod_ton} ${goto 975} ${execpi 600 sed -n '16p' $HOME/Accuweather_Conky_USA_Images/tod_ton}${font BlackChancery:bold:size=10}
${goto 200}TEMP:$color${goto 325}${execpi 600 sed -n '4p' $HOME/Accuweather_Conky_USA_Images/curr_cond}°F (${execpi 600 sed -n '5p' $HOME/Accuweather_Conky_USA_Images/curr_cond}°F)
${goto 200}WIND:$color${goto 325}${execpi 600 sed -n '6p' $HOME/Accuweather_Conky_USA_Images/curr_cond} ${execpi 600 sed -n '14p' $HOME/Accuweather_Conky_USA_Images/curr_cond}
${goto 200}HUM:$color${goto 325}${execpi 600 sed -n '7p' $HOME/Accuweather_Conky_USA_Images/curr_cond}
${goto 200}DEW:$color${goto 325}${execpi 600 sed -n '11p' $HOME/Accuweather_Conky_USA_Images/curr_cond}
${goto 200}SUNRISE:$color${goto 325}${execpi 600 sed -n '15p' $HOME/Accuweather_Conky_USA_Images/curr_cond}
${goto 200}SUNSET:$color${goto 325}${execpi 600 sed -n '16p' $HOME/Accuweather_Conky_USA_Images/curr_cond}
${image $HOME/Accuweather_Conky_USA_Images/7.png -p 480,50 -s 180x108}
${image $HOME/Accuweather_Conky_USA_Images/12.png -p 705,50 -s 180x108}
${image $HOME/Accuweather_Conky_USA_Images/17.png -p 930,50 -s 180x108}


rings.lua
[code]

--[[ RINGS with SECTORS widget
   v1.0 by wlourf (08.08.2010)
   this widget draws a ring with differents effects
   http://u-scripts.blogspot.com/2010/08/rings-sectors-widgets.html
   
To call the script in a conky, use, before TEXT
   lua_load /path/to/the/script/rings.lua
   lua_draw_hook_pre main_rings
and add one line (blank or not) after TEXT


Parameters are :
3 parameters are mandatory
name      - the name of the conky variable to display,
           for example for {$cpu cpu0}, just write name="cpu"
arg         - the argument of the above variable,
           for example for {$cpu cpu0}, just write arg="cpu0"
             arg can be a numerical value if name=""
max         - the maximum value the above variable can reach,
           for example for {$cpu cpu0}, just write max=100
   
Optional parameters:
xc,yc      - coordinates of the center of the ring,
           default = middle of the conky window
radius      - external radius of the ring, in pixels,
           default = quarter of the width of the conky window
thickness   - thickness of the ring, in pixels, default = 10 pixels
start_angle   - starting angle of the ring, in degrees, value can be negative,
           default = 0 degree
end_angle   - ending angle of the ring, in degrees,
           value must be greater than start_angle, default = 360 degrees
sectors      - number of sectors in the ring, default = 10
gap_sectors - gap between two sectors, in pixels, default = 1 pixel
cap         - the way to close a sector, available values are
            "p" for parallel , default value
            "r" for radial (follow the radius)
inverse_arc   - if set to true, arc will be anticlockwise, default=false
border_size   - size of the border, in pixels, default = 0 pixel i.e. no border
fill_sector   - if set to true, each sector will be completely filled,
           default=false, this parameter is inoperate if sectors=1
background   - if set to false, background will not be drawn, default=true
foreground   - if set to false, foreground will not be drawn, default=true

Colours tables below are defined into braces :
{position in the gradient (0 to 1), colour in hexadecimal, alpha (0 to 1)}
example for a single colour table :
{{0,0xFFAA00,1}} position parameter doesn't matter
example for a two-colours table :
{{0,0xFFAA00,1},{1,0x00AA00,1}} or {{0.5,0xFFAA00,1},{1,0x00AA00,1}}
example for a three-colours table :
{{0,0xFFAA00,1},{0.5,0xFF0000,1},{1,0x00AA00,1}}

bg_colour1   - colour table for background,
           default = {{0,0x00ffff,0.1},{0.5,0x00FFFF,0.5},{1,0x00FFFF,0.1}}
fg_colour1   - colour table for foreground,
           default = {{0,0x00FF00,0.1},{0.5,0x00FF00,1},{1,0x00FF00,0.1}
Title: Re: Conky Codes and Images
Post by: lwfitz on January 14, 2013, 07:25:02 PM
Monitor #1
(http://ompldr.org/tZ3Q3cA) (http://ompldr.org/vZ3Q3cA)


Monitor #2
(http://ompldr.org/tZ3Q3bw) (http://ompldr.org/vZ3Q3bw)


Under a load
(http://ompldr.org/tZ3Q3cQ) (http://ompldr.org/vZ3Q3cQ)
Title: Re: Conky Codes and Images
Post by: lwfitz on January 14, 2013, 07:25:53 PM
(http://ompldr.org/tZ3gyeg) (http://ompldr.org/vZ3gyeg)

(http://ompldr.org/tZ3gyeA) (http://ompldr.org/vZ3gyeA)

conky_chrono
own_window yes
own_window_type desktop
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
#own_window_colour white
own_window_class Conky
own_window_title Chronograph TEST
double_buffer yes

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type normal
#own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#own_window_argb_value 5

minimum_size 270 260 ## width, height
maximum_width 270   ## width

gap_x 20
gap_y 20 

# tl, tm, tr
# ml, mm, mr
# bl, bm, br
alignment tl
#alignment top_left
# Use Xft (anti-aliased font and stuff)
use_xft yes
#xftfont CorporateMonoExtraBold:size=9
xftfont monofur:bold:size=14
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes
uppercase no
draw_shades no
default_shade_color black
draw_outline no # amplifies text if yes
default_outline_color black
color1 000000 ## Black
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes #no
#default_graph_size 15 40
background yes
use_spacer none
text_buffer_size 256
no_buffers yes
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2
format_human_readable yes
short_units yes
update_interval 1
imlib_cache_size 0

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
temperature_unit Fahrenheit

####### Load Lua #########
lua_load ~/Conky/s11_clock.lua
lua_draw_hook_pre main

#lua_load ~/Conky/rings.lua
#lua_draw_hook_pre main_rings

##############################  End LUA  ###

TEXT


conky_storage
own_window yes
own_window_type desktop
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
own_window_colour red
own_window_class Conky
own_window_title Chronograph TEST
double_buffer yes

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type normal
#own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#own_window_argb_value 5

minimum_size 530 300 ## width, height
maximum_width 530  ## width

gap_x 10
gap_y 150 

# tl, tm, tr
# ml, mm, mr
# bl, bm, br
alignment bl
#alignment top_left
# Use Xft (anti-aliased font and stuff)
use_xft yes
#xftfont CorporateMonoExtraBold:size=9
xftfont WhiteRabbit:bold:size=20
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes
uppercase no
draw_shades no
default_shade_color black
draw_outline no # amplifies text if yes
default_outline_color black
color1 000000 ## Black
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes #no
#default_graph_size 15 40
background yes
use_spacer none
text_buffer_size 256
no_buffers yes
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2
format_human_readable yes
short_units yes
update_interval 1
imlib_cache_size 0

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
temperature_unit Fahrenheit

####### Load Lua #########
##load script
lua_load ~/Conky/mounted.lua
lua_load ~/Conky/allcombined_2.lua

## first lua command below text:
## ${lua get_mounted_data interval}, where interval is a number.  This starts data gathering
## to get output:
## ${lua mount partition_number data_type text_length}, where partition number is a number
## text_length is optional, lets you specify the max number of characters the function returns. only affects fsys and mount data options
## data_type can be
## total - shows total number of partitions mounted, requires a partition_number also, use 1, could be used in an if_match
## fsys - shows filesystem
## size - shows space used in appropriate units
## free - shows free space in appropriate units
## use% - shows % used
## mount - shows mountpoint

##############################  End LUA  ###

TEXT
${lua get_mounted_data 10}${lua mount 1 fsys}${goto 175}${lua mount 1 size}${goto 275}${lua mount 1 use%}${goto 375}${lua mount 1 mount 10}
${lua gradbar {2,45,"${fs_used_perc /}",100,74,5,10,1,0xFFFFFF,.1,0xFFFFFF,.5,0x3366CC,.85,0x0000CC,1}}

${lua mount 7 fsys}${goto 175}${lua mount 7 size}${goto 275}${lua mount 7 use%}${goto 375}${lua mount 7 mount 10}
${lua gradbar
{2,106,"${fs_used_perc /home}",100,74,5,10,1,0xFFFFFF,.1,0xFFFFFF,.5,0x3366CC,.85,0x0000CC,1}}

${lua mount 2 fsys}${goto 175}${lua mount 2 size}${goto 275}${lua mount 2 use%}${goto 375}${lua mount 2 mount 10}
${lua gradbar {2,168,"${fs_used_perc /media/External}",100,74,5,10,1,0xFFFFFF,.1,0xFFFFFF,.5,0x3366CC,.85,0x0000CC,1}}

${lua mount 3 fsys}${goto 175}${lua mount 3 size}${goto 275}${lua mount 3 use%}${goto 375}${lua mount 3 mount 10}
${lua gradbar {2,230,"${fs_used_perc /media/sda5}",100,74,5,10,1,0xFFFFFF,.1,0xFFFFFF,.5,0x3366CC,.85,0x0000CC,1}}

${lua mount 4 fsys}${goto 175}${lua mount 4 size}${goto 275}${lua mount 4 use%}${goto 375}${lua mount 4 mount 10}
${lua gradbar {2,293,"${fs_used_perc /media/sdb5}",100,74,5,10,1,0xFFFFFF,.1,0xFFFFFF,.5,0x3366CC,.85,0x0000CC,1}}

${lua mount 5 fsys}${goto 175}${lua mount 5 size}${goto 275}${lua mount 5 use%}${goto 375}${lua mount 5 mount 10}
${lua gradbar {2,355,"${fs_used_perc /media/storage}",100,74,5,10,1,0xFFFFFF,.1,0xFFFFFF,.5,0x3366CC,.85,0x0000CC,1}}

${lua mount 6 fsys}${goto 175}${lua mount 6 size}${goto 275}${lua mount 6 use%}${goto 375}${lua mount 6 mount 10}
${lua gradbar {2,420,"${fs_used_perc /}",100,74,5,10,1,0xFFFFFF,.1,0xFFFFFF,.5,0x3366CC,.85,0x0000CC,1}}


conky_cpu
[code] use_xft yes
  xftalpha 1.0
  update_interval 1
  total_run_times 0
  cpu_avg_samples 4
  no_buffers no
  double_buffer yes
  override_utf8_locale yes

#overall position of conky window
  alignment middle_middle
  gap_x 150
  gap_y -145
  minimum_size 260 550
  maximum_width 260

#overall appearance of conky window
  own_window yes
  own_window_type desktop
  own_window_transparent yes
  own_window_colour red
  own_window_hints undecorated,below,skip_taskbar,skip_pager
  draw_borders no

#default text apperance
  xftfont Ubuntu:bold:size=15
  draw_shades yes
  draw_outline yes
  default_shade_color white
  default_outline_color black
  uppercase no

#border around graphs
  draw_graph_borders yes

###  Color Settings  #########################################################
draw_shades no
default_shade_color black

draw_outline no # amplifies text if yes
default_outline_color black
#####################################################  End Color Settings

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type normal
#own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent
Title: Re: Conky Codes and Images
Post by: lwfitz on January 14, 2013, 07:26:51 PM
Its overflowing to the second monitor......

Monitor #1
(http://ompldr.org/tZ3hheg) (http://ompldr.org/vZ3hheg)


Monitor #2
(http://ompldr.org/tZ3hiMA) (http://ompldr.org/vZ3hiMA)
Title: Re: Conky Codes and Images
Post by: lwfitz on January 14, 2013, 07:29:05 PM
A couple Conky screenshots for your enjoyment  ;D

(http://ompldr.org/tZ3o2MQ) (http://ompldr.org/vZ3o2MQ)

(http://ompldr.org/tZ3p4cA) (http://ompldr.org/vZ3p4cA)
Title: Re: Conky Codes and Images
Post by: lwfitz on January 14, 2013, 07:29:48 PM
(http://ompldr.org/taDBkcQ) (http://ompldr.org/vaDBkcQ)


(http://ompldr.org/taDBkcA) (http://ompldr.org/vaDBkcA)


conky_info
background yes
update_interval 1

cpu_avg_samples 2
net_avg_samples 2

double_buffer yes
no_buffers yes
text_buffer_size 2048

gap_x 10
gap_y 0
minimum_size 285 800
#maximum_width 190
own_window yes
own_window_type conky
own_window_transparent yes
#own_window_argb_visual
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
border_inner_margin 0
border_outer_margin 0
alignment ml

draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
temperature_unit fahrenheit

override_utf8_locale yes
use_xft yes
xftfont 6x10:size=8
xftalpha 0.5
uppercase no

default_color FFFFFF
color1 660000
color2 AAAAAA
color3 DDDDDD
color4 CC3333

## Lua ##
lua_load /home/luke/Conky/allcombined_2.lua

## lua funcions
## background ##################################################################
#${lua draw_bg {corner_radius,x_position,y_position,width,height,color,alpha,draw_type,line_width,outline_color,outline_alpha}}
#note for background: set width=0 - width will be conky window width, set height=0 - height will be conky window height
# draw_type: 1=fill, 2=outline(must specify line_width), 3=outline and fill (must specify line_width, outline_color and outline_alpha)
## gradient bars ###############################################################
#${lua gradbar {x_position,y_position,"conky_object",object_max_value,number_of_divisions,division_width,division_height,division_gap,bg_color,bg_alpha,start_color,start_alpha,mid_color,mid_alpha,end_color,end_alpha}}
## calendar ###############################################################
#${lua luacal {x_position,y_position,"title_font",title_fontsize,title_color,title_alpha,"dates_font",dates_fontsize,dates_color,dates_alpha,"highlight_font",highlight_fontsize,highlight_color,highlight_alpha,"spacer",colum_gap,title_gap,row_gap,start_day}
#note for calendar: start day... 0=sunday, 1=monday ... "spacer" can help align calendar with non fix width fonts
## textured background ###############################################################
#${lua tex_bg {corner_radius,x_position,y_position,width,height,"/path/to/texture.png"}}
## lua draw images ###############################################################
#${lua luaimage {x_position,y_position,width,height,"/path/to/image"}}
#note for images: set width=0 - width will be image width, set height=0 - height will be image height
## lua draw text ###############################################################
#${lua luatext {x_position,y_position,color,alpha,"font",fontsize,"justify"}}
#note for text: justify can be "r" = right, "c" = center, "l" = left
#${lua draw_bg {10,0,0,0,0,0x000000,0.3}}

TEXT
${goto 0}${color1}${font Pseudo APL:size=14,weight:bold}Motherboard ${goto 240}${hwmon temp 1}F
${goto 5}${color}${font Pseudo APL:size=11,weight:normal}${execi 1000 cat /sys/class/dmi/id/board_vendor} ${execi 1000 cat /sys/class/dmi/id/board_name}
${lua gradbar {5,55,"${hwmon temp 1}",210,150,1,17,1,0xFFFFFF,.1,0xFFFFFF,.5,0xFF3333,.85,0x990000,1}}
${voffset 5}
${goto 0}${color1}${font Pseudo APL:size=14,weight:bold}CPU${goto 240}${platform coretemp.0 temp 2}F
${goto 5}${color}${font Pseudo APL:size=11,weight:normal}${execi 1000 cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //' | sort -u | cut -c1-60}
${lua gradbar {5,136,"${platform coretemp.0 temp 2}",220,150,1,17,1,0xFFFFFF,.1,0xFFFFFF,.5,0xFF3333,.85,0x990000,1}}
${voffset 5}
${goto 13}${color}${font Pseudo APL:size=11,weight:normal}CPU1 ${cpu cpu1}%     CPU2 ${cpu cpu2}%     CPU3 ${cpu cpu3}     CPU4 ${cpu cpu4}%
${lua gradbar {5,190,"${cpu cpu1}",100,150,1,17,1,0xFFFFFF,.1,0xFFFFFF,.5,0xFF3333,.85,0x990000,1}}
${voffset 5}
${goto 0}${color1}${font Pseudo APL:size=14,weight:bold}Memory
${goto 5}${color}${font Pseudo APL:size=11,weight:normal}Total:${execi 1000 free -tm | grep -i mem |gawk '{ print $2}'}MB - Used: $mem - Free: $memfree
${lua gradbar {5,271,"${memperc}",100,150,1,17,1,0xFFFFFF,.1,0xFFFFFF,.5,0xFF3333,.85,0x990000,1}}
${voffset 3}
${goto 5}${color}${font Pseudo APL:size=11,weight:normal}Total:${execi 1000 free -tm | grep -i swap |gawk '{ print $2}'}MB - Used: $swap - Free: $swapfree
${lua gradbar {5,325,"${swapperc}",100,150,1,17,1,0xFFFFFF,.1,0xFFFFFF,.5,0xFF3333,.85,0x990000,1}}
${voffset 5}
${goto 0}${color1}${font Pseudo APL:size=14,weight:bold}Graphic Card${goto 240} ${hwmon 2 temp 1}F
${goto 5}${color}${font Pseudo APL:size=11,weight:normal}ATI XT Mobility Radeon HD 5870 1GB GDDR5
${lua gradbar {5,400,"${hwmon 2 temp 1}",200,150,1,17,1,0xFFFFFF,.1,0xFFFFFF,.5,0xFF3333,.85,0x990000,1}}
${voffset 0}
${goto 0}${color1}${font Pseudo APL:size=14,weight:bold}Network
${goto 5}${color}${font Pseudo APL:size=11,weight:normal}Intel Centrino Advanced-N + WiMAX 6250
${goto 5}${color}${font Pseudo APL:size=11,weight:normal}SSID: ${wireless_essid wlan0} ${goto 240}Speed: ${wireless_bitrate wlan0}
${goto 5}Mode: ${wireless_mode wlan0} ${goto 240}Quality: ${wireless_link_qual_perc wlan0}%
${goto 5}Down: ${downspeed wlan0} ${goto 240}Up: ${upspeed wlan0}
${goto 5}Total Down: ${totaldown wlan0}${goto 240}Total Up: ${totalup wlan0}
$${voffset -5}
${goto 5}${downspeedgraph wlan0 25,160 FFFFFF 990000}${goto 240}${upspeedgraph wlan0 25,160 FFFFFF 990000}
${goto 0}${color1}${font Pseudo APL:size=14,weight:bold}Storage${goto 240}${hddtemp /dev/sda}F
${goto 5}${color}${font Pseudo APL:size=11,weight:normal}500GB Seagate Momentus XT Hybrid @ 7200rpm
${goto 5}${color}${font Pseudo APL:size=11,weight:normal}/root${goto 240}${fs_size /}
${lua gradbar {5,656,"${fs_used_perc /}",100,150,1,17,1,0xFFFFFF,.1,0xFFFFFF,.5,0xFF3333,.85,0x990000,1}}
${voffset 8}${goto 5}${font Pseudo APL:size=11,weight:normal}${color}Used${goto 150}${fs_used /}
${goto 5}${font Pseudo APL:size=11,weight:normal}${color}Free${goto 150}${fs_free /}
${voffset 5}${goto 5}${color}${font Pseudo APL:size=11,weight:normal}/home${goto 240}${fs_size /home}
${lua gradbar {5,740,"${fs_used_perc /home}",100,150,1,17,1,0xFFFFFF,.1,0xFFFFFF,.5,0xFF3333,.85,0x990000,1}}
${voffset 8}${goto 5}${font Pseudo APL:size=11,weight:normal}${color}Used${goto 150}${fs_used /home}
${goto 5}${font Pseudo APL:size=11,weight:normal}${color}Free${goto 150}${fs_free /home}


conky_clock
# -- Conky settings -- #
#background no
update_interval 1

cpu_avg_samples 2
net_avg_samples 2

override_utf8_locale yes

double_buffer yes
no_buffers yes

text_buffer_size 2048
imlib_cache_size 0

# -- Window specifications -- #

own_window_class Conky
own_window yes
own_window_type desktop
own_window_argb_visual yes
own_window_argb_value 180
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

border_inner_margin 0
border_outer_margin 0

minimum_size 350 300
maximum_width 350

alignment tr
gap_x 10
gap_y 10

# -- Graphics settings -- #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

# -- Text settings -- #
use_xft yes
xftfont Ubuntu:size=9
xftalpha 1

uppercase no

default_color FFFFFF

# -- Lua Load -- #
lua_load ~/Conky/rings.lua
lua_draw_hook_pre clock_rings
lua_load ~/Conky/marks.lua
lua_draw_hook_post main


TEXT
${image ~/images/orb_red.png -s 150x150 -p 130,80}




















${font Pseudo APL:size=13}${texeci 500 bash $HOME/Accuweather_Conky_USA_Images/acc_usa_images}${image $HOME/Accuweather_Conky_USA_Images/cc.png -p -15,290 -s 210x128}
${font Pseudo APL:size=13}${goto 165}TEMP${alignr 3}${execpi 600 sed -n '4p' $HOME/Accuweather_Conky_USA_Images/curr_cond}°F (${execpi 600 sed -n '5p' $HOME/Accuweather_Conky_USA_Images/curr_cond}°F)
${goto 165}WIND${alignr 3}${execpi 600 sed -n '6p' $HOME/Accuweather_Conky_USA_Images/curr_cond} ${execpi 600 sed -n '14p' $HOME/Accuweather_Conky_USA_Images/curr_cond}
#${goto 165}HUM${alignr 3}${execpi 600 sed -n '7p' $HOME/Accuweather_Conky_USA_Images/curr_cond}
#${goto 200}PRESS${alignr 3}${execpi 600 sed -n '8p' $HOME/Accuweather_Conky_USA_Images/curr_cond}
#${goto 200}CLOUD COVER${alignr 3}${execpi 600 sed -n '9p' $HOME/Accuweather_Conky_USA_Images/curr_cond}
#${goto 200}UV INDEX${alignr 10}${execpi 600 sed -n '10p' $HOME/Accuweather_Conky_USA_Images/curr_cond}
#${goto 165}DEW POINT${alignr 3}${execpi 600 sed -n '11p' $HOME/Accuweather_Conky_USA_Images/curr_cond}
#${goto 200}CEILING${alignr 3}${execpi 600 sed -n '12p' $HOME/Accuweather_Conky_USA_Images/curr_cond}
#${goto 200}VISIB.${alignr 3}${execpi 600 sed -n '13p' $HOME/Accuweather_Conky_USA_Images/curr_cond}
${goto 165}SUNRISE${alignr 3}${execpi 600 sed -n '15p' $HOME/Accuweather_Conky_USA_Images/curr_cond}
${goto 165}SUNSET${alignr 3}${execpi 600 sed -n '16p' $HOME/Accuweather_Conky_USA_Images/curr_cond}
#${font WhiteRabbit:size=15}Current Weather ${alignr 3}${execpi 600 sed -n '3p' $HOME/Accuweather_Conky_USA_Images/curr_cond}

${font Pseudo APL:size=13}${goto 20}${execpi 600 sed -n '6p' $HOME/Accuweather_Conky_USA_Images/tod_ton}${goto 140}${execpi 600 sed -n '11p' $HOME/Accuweather_Conky_USA_Images/tod_ton}${goto 255}${execpi 600 sed -n '16p' $HOME/Accuweather_Conky_USA_Images/tod_ton}

${voffset -12}${font Pseudo APL:size=10}${goto 100}${execpi 600 sed -n '9p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 210}${execpi 600 sed -n '14p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 330}${execpi 600 sed -n '19p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F
${font Pseudo APL:size=10}${goto 100}${execpi 600 sed -n '10p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 210}${execpi 600 sed -n '15p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 330}${execpi 600 sed -n '20p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${image $HOME/Accuweather_Conky_USA_Images/7.png -p 10,430 -s 95x57}${image $HOME/Accuweather_Conky_USA_Images/12.png -p 125,430 -s 95x57}${image $HOME/Accuweather_Conky_USA_Images/17.png -p 250,430 -s 95x57}


marks.lua
--==============================================================================
--                            multi_rings.lua
--
--  author  : SLK
--  version : v2011011601
--  license : Distributed under the terms of GNU GPL version 2 or later
--
--==============================================================================

require 'cairo'

--------------------------------------------------------------------------------
--                                                                    clock DATA
-- HOURS
clock_h = {
    {
    name='time',                   arg='%H',                    max_value=12,
    x=200,                           y=150,
    graph_radius=140,
    graph_thickness=3,
    graph_unit_angle=30,           graph_unit_thickness=5,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.0,
    graph_fg_colour=0xFFFFFF,      graph_fg_alpha=0.0,
    txt_radius=100,
    txt_weight=1,                  txt_size=10.0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=0,
    graduation_radius=120,
    graduation_thickness=10,        graduation_mark_thickness=1,
    graduation_unit_angle=30,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=1,
    },
}

-------------------------------------------------------------------------------
--                                                                 rgb_to_r_g_b
-- converts color in hexa to decimal
--
function rgb_to_r_g_b(colour, alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

-------------------------------------------------------------------------------
--                                                            angle_to_position
-- convert degree to rad and rotate (0 degree is top/north)
--
function angle_to_position(start_angle, current_angle)
    local pos = current_angle + start_angle
    return ( ( pos * (2 * math.pi / 360) ) - (math.pi / 2) )
end

-------------------------------------------------------------------------------
--                                                              draw_clock_ring
-- displays clock
--
function draw_clock_ring(display, data, value)
    local max_value = data['max_value']
    local x, y = data['x'], data['y']
    local graph_radius = data['graph_radius']
    local graph_thickness, graph_unit_thickness = data['graph_thickness'], data['graph_unit_thickness']
    local graph_unit_angle = data['graph_unit_angle']
    local graph_bg_colour, graph_bg_alpha = data['graph_bg_colour'], data['graph_bg_alpha']
    local graph_fg_colour, graph_fg_alpha = data['graph_fg_colour'], data['graph_fg_alpha']

    -- background ring
    cairo_arc(display, x, y, graph_radius, 0, 2 * math.pi)
    cairo_set_source_rgba(display, rgb_to_r_g_b(graph_bg_colour, graph_bg_alpha))
    cairo_set_line_width(display, graph_thickness)
    cairo_stroke(display)

    -- arc of value
    local val = (value % max_value)
    local i = 1
    while i <= val do
        cairo_arc(display, x, y, graph_radius,(  ((graph_unit_angle * i) - graph_unit_thickness)*(2*math.pi/360)  )-(math.pi/2),((graph_unit_angle * i) * (2*math.pi/360))-(math.pi/2))
        cairo_set_source_rgba(display,rgb_to_r_g_b(graph_fg_colour,graph_fg_alpha))
        cairo_stroke(display)
        i = i + 1
    end
    local angle = (graph_unit_angle * i) - graph_unit_thickness

    -- graduations marks
    local graduation_radius = data['graduation_radius']
    local graduation_thickness, graduation_mark_thickness = data['graduation_thickness'], data['graduation_mark_thickness']
    local graduation_unit_angle = data['graduation_unit_angle']
    local graduation_fg_colour, graduation_fg_alpha = data['graduation_fg_colour'], data['graduation_fg_alpha']
    if graduation_radius > 0 and graduation_thickness > 0 and graduation_unit_angle > 0 then
        local nb_graduation = 360 / graduation_unit_angle
        local i = 1
        while i <= nb_graduation do
            cairo_set_line_width(display, graduation_thickness)
            cairo_arc(display, x, y, graduation_radius, (((graduation_unit_angle * i)-(graduation_mark_thickness/2))*(2*math.pi/360))-(math.pi/2),(((graduation_unit_angle * i)+(graduation_mark_thickness/2))*(2*math.pi/360))-(math.pi/2))
            cairo_set_source_rgba(display,rgb_to_r_g_b(graduation_fg_colour,graduation_fg_alpha))
            cairo_stroke(display)
            cairo_set_line_width(display, graph_thickness)
            i = i + 1
        end
    end

    -- text
    local txt_radius = data['txt_radius']
    local txt_weight, txt_size = data['txt_weight'], data['txt_size']
    local txt_fg_colour, txt_fg_alpha = data['txt_fg_colour'], data['txt_fg_alpha']
    local movex = txt_radius * (math.cos((angle * 2 * math.pi / 360)-(math.pi/2)))
    local movey = txt_radius * (math.sin((angle * 2 * math.pi / 360)-(math.pi/2)))
    cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, txt_weight);
    cairo_set_font_size (display, txt_size);
    cairo_set_source_rgba (display, rgb_to_r_g_b(txt_fg_colour, txt_fg_alpha));
    cairo_move_to (display, x + movex - (txt_size / 2), y + movey + 3);
    cairo_show_text (display, value);
    cairo_stroke (display);
end

-------------------------------------------------------------------------------
--                                                              draw_gauge_ring
-- displays gauges
--
function draw_gauge_ring(display, data, value)
    local max_value = data['max_value']
    local x, y = data['x'], data['y']
    local graph_radius = data['graph_radius']
    local graph_thickness, graph_unit_thickness = data['graph_thickness'], data['graph_unit_thickness']
    local graph_start_angle = data['graph_start_angle']
    local graph_unit_angle = data['graph_unit_angle']
    local graph_bg_colour, graph_bg_alpha = data['graph_bg_colour'], data['graph_bg_alpha']
    local graph_fg_colour, graph_fg_alpha = data['graph_fg_colour'], data['graph_fg_alpha']
    local hand_fg_colour, hand_fg_alpha = data['hand_fg_colour'], data['hand_fg_alpha']
    local graph_end_angle = (max_value * graph_unit_angle) % 360

    -- background ring
    cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, 0), angle_to_position(graph_start_angle, graph_end_angle))
    cairo_set_source_rgba(display, rgb_to_r_g_b(graph_bg_colour, graph_bg_alpha))
    cairo_set_line_width(display, graph_thickness)
    cairo_stroke(display)

    -- arc of value
    local val = value % (max_value + 1)
    local start_arc = 0
    local stop_arc = 0
    local i = 1
    while i <= val do
        start_arc = (graph_unit_angle * i) - graph_unit_thickness
        stop_arc = (graph_unit_angle * i)
        cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
        cairo_set_source_rgba(display, rgb_to_r_g_b(graph_fg_colour, graph_fg_alpha))
        cairo_stroke(display)
        i = i + 1
    end
    local angle = start_arc

    -- hand
    start_arc = (graph_unit_angle * val) - (graph_unit_thickness * 2)
    stop_arc = (graph_unit_angle * val)
    cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
    cairo_set_source_rgba(display, rgb_to_r_g_b(hand_fg_colour, hand_fg_alpha))
    cairo_stroke(display)

    -- graduations marks
    local graduation_radius = data['graduation_radius']
    local graduation_thickness, graduation_mark_thickness = data['graduation_thickness'], data['graduation_mark_thickness']
    local graduation_unit_angle = data['graduation_unit_angle']
    local graduation_fg_colour, graduation_fg_alpha = data['graduation_fg_colour'], data['graduation_fg_alpha']
    if graduation_radius > 0 and graduation_thickness > 0 and graduation_unit_angle > 0 then
        local nb_graduation = graph_end_angle / graduation_unit_angle
        local i = 0
        while i < nb_graduation do
            cairo_set_line_width(display, graduation_thickness)
            start_arc = (graduation_unit_angle * i) - (graduation_mark_thickness / 2)
            stop_arc = (graduation_unit_angle * i) + (graduation_mark_thickness / 2)
            cairo_arc(display, x, y, graduation_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
            cairo_set_source_rgba(display,rgb_to_r_g_b(graduation_fg_colour,graduation_fg_alpha))
            cairo_stroke(display)
            cairo_set_line_width(display, graph_thickness)
            i = i + 1
        end
    end

    -- text
    local txt_radius = data['txt_radius']
    local txt_weight, txt_size = data['txt_weight'], data['txt_size']
    local txt_fg_colour, txt_fg_alpha = data['txt_fg_colour'], data['txt_fg_alpha']
    local movex = txt_radius * math.cos(angle_to_position(graph_start_angle, angle))
    local movey = txt_radius * math.sin(angle_to_position(graph_start_angle, angle))
    cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, txt_weight)
    cairo_set_font_size (display, txt_size)
    cairo_set_source_rgba (display, rgb_to_r_g_b(txt_fg_colour, txt_fg_alpha))
    cairo_move_to (display, x + movex - (txt_size / 2), y + movey + 3)
    cairo_show_text (display, value)
    cairo_stroke (display)

    -- caption
    local caption = data['caption']
    local caption_weight, caption_size = data['caption_weight'], data['caption_size']
    local caption_fg_colour, caption_fg_alpha = data['caption_fg_colour'], data['caption_fg_alpha']
    local tox = graph_radius * (math.cos((graph_start_angle * 2 * math.pi / 360)-(math.pi/2)))
    local toy = graph_radius * (math.sin((graph_start_angle * 2 * math.pi / 360)-(math.pi/2)))
    cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, caption_weight);
    cairo_set_font_size (display, caption_size)
    cairo_set_source_rgba (display, rgb_to_r_g_b(caption_fg_colour, caption_fg_alpha))
    cairo_move_to (display, x + tox + 5, y + toy + 1)
    -- bad hack but not enough time !
    if graph_start_angle < 105 then
        cairo_move_to (display, x + tox - 30, y + toy + 1)
    end
    cairo_show_text (display, caption)
    cairo_stroke (display)
end

-------------------------------------------------------------------------------
--                                                               go_clock_rings
-- loads data and displays clock
--
function go_clock_rings(display)
    local function load_clock_rings(display, data)
        local str, value = '', 0
        str = string.format('${%s %s}',data['name'], data['arg'])
        str = conky_parse(str)
        value = tonumber(str)
        draw_clock_ring(display, data, value)
    end
   
    for i in pairs(clock_h) do
        load_clock_rings(display, clock_h[i])
    end
end

-------------------------------------------------------------------------------
--                                                               go_gauge_rings
-- loads data and displays gauges
--
function go_gauge_rings(display)
    local function load_gauge_rings(display, data)
        local str, value = '', 0
        str = string.format('${%s %s}',data['name'], data['arg'])
        str = conky_parse(str)
        value = tonumber(str)
        draw_gauge_ring(display, data, value)
    end

end

-------------------------------------------------------------------------------
--                                                                         MAIN
function conky_main()
    if conky_window == nil then
        return
    end

    local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
    local display = cairo_create(cs)
   
    local updates = conky_parse('${updates}')
    update_num = tonumber(updates)
   
    if update_num > 5 then
        go_clock_rings(display)
        go_gauge_rings(display)
    end

end


rings.lua
--[[
Clock Rings by londonali1010 (2009)

This script draws percentage meters as rings, and also draws clock hands if you want! It is fully customisable; all options are described in the script. This script is based off a combination of my clock.lua script and my rings.lua script.

IMPORTANT: if you are using the 'cpu' function, it will cause a segmentation fault if it tries to draw a ring straight away. The if statement near the end of the script uses a delay to make sure that this doesn't happen. It calculates the length of the delay by the number of updates since Conky started. Generally, a value of 5s is long enough, so if you update Conky every 1s, use update_num > 5 in that if statement (the default). If you only update Conky every 2s, you should change it to update_num > 3; conversely if you update Conky every 0.5s, you should use update_num > 10. ALSO, if you change your Conky, is it best to use "killall conky; conky" to update it, otherwise the update_num will not be reset and you will get an error.

To call this script in Conky, use the following (assuming that you save this script to ~/scripts/rings.lua):
lua_load ~/scripts/clock_rings-v1.1.1.lua
lua_draw_hook_pre clock_rings

Changelog:
+ v1.1.1 -- Fixed minor bug that caused the script to crash if conky_parse() returns a nil value (20.10.2009)
+ v1.1 -- Added colour option for clock hands (07.10.2009)
+ v1.0 -- Original release (30.09.2009)
]]

settings_table = {
{
-- Edit this table to customise your rings.
-- You can create more rings simply by adding more elements to settings_table.
-- "name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'.
name='time',
-- "arg" is the argument to the stat type, e.g. if in Conky you would write ${cpu cpu0}, 'cpu0' would be the argument. If you would not use an argument in the Conky variable, use ''.
arg='%I.%M',
-- "max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100.
max=12,
-- "bg_colour" is the colour of the base ring.
bg_colour=0xFFFFFF,
-- "bg_alpha" is the alpha value of the base ring.
bg_alpha=0,
-- "fg_colour" is the colour of the indicator part of the ring.
fg_colour=0xFFFFFF,
-- "fg_alpha" is the alpha value of the indicator part of the ring.
fg_alpha=0,
-- "x" and "y" are the x and y coordinates of the centre of the ring, relative to the top left corner of the Conky window.
x=175, y=175,
-- "radius" is the radius of the ring.
radius=50,
-- "thickness" is the thickness of the ring, centred around the radius.
thickness=5,
-- "start_angle" is the starting angle of the ring, in degrees, clockwise from top. Value can be either positive or negative.
start_angle=0,
-- "end_angle" is the ending angle of the ring, in degrees, clockwise from top. Value can be either positive or negative, but must be larger than start_angle.
end_angle=360
},
{
name='time',
arg='%M.%S',
max=60,
bg_colour=0xFFFFFF,
bg_alpha=0,
fg_colour=0xFFFFFF,
fg_alpha=0,
x=175, y=175,
radius=56,
thickness=5,
start_angle=0,
end_angle=360
},
{
name='time',
arg='%S',
max=60,
bg_colour=0xFFFFFF,
bg_alpha=0,
fg_colour=0xFFFFFF,
fg_alpha=0,
x=175, y=175,
radius=62,
thickness=5,
start_angle=0,
end_angle=360
},
}


-- Use these settings to define the origin and extent of your clock.

clock_r=125

-- "clock_x" and "clock_y" are the coordinates of the centre of the clock, in pixels, from the top left of the Conky window.

clock_x=200
clock_y=150

-- Colour & alpha of the clock hands

clock_colour=0xFFFFFF
clock_alpha=1

-- Do you want to show the seconds hand?

show_seconds=true

require 'cairo'

function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

function draw_ring(cr,t,pt)
local w,h=conky_window.width,conky_window.height

local xc,yc,ring_r,ring_w,sa,ea=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['start_angle'],pt['end_angle']
local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha']

local angle_0=sa*(2*math.pi/360)-math.pi/2
local angle_f=ea*(2*math.pi/360)-math.pi/2
local t_arc=t*(angle_f-angle_0)

-- Draw background ring

cairo_arc(cr,xc,yc,ring_r,angle_0,angle_f)
cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga))
cairo_set_line_width(cr,ring_w)
cairo_stroke(cr)

-- Draw indicator ring

cairo_arc(cr,xc,yc,ring_r,angle_0,angle_0+t_arc)
cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
cairo_stroke(cr)
end

function draw_clock_hands(cr,xc,yc)
local secs,mins,hours,secs_arc,mins_arc,hours_arc
local xh,yh,xm,ym,xs,ys

secs=os.date("%S")
mins=os.date("%M")
hours=os.date("%I")

secs_arc=(2*math.pi/60)*secs
mins_arc=(2*math.pi/60)*mins+secs_arc/60
hours_arc=(2*math.pi/12)*hours+mins_arc/12

-- Draw hour hand

xh=xc+0.7*clock_r*math.sin(hours_arc)
yh=yc-0.7*clock_r*math.cos(hours_arc)
cairo_move_to(cr,xc,yc)
cairo_line_to(cr,xh,yh)

cairo_set_line_cap(cr,CAIRO_LINE_CAP_ROUND)
cairo_set_line_width(cr,5)
cairo_set_source_rgba(cr,rgb_to_r_g_b(clock_colour,clock_alpha))
cairo_stroke(cr)

-- Draw minute hand

xm=xc+clock_r*math.sin(mins_arc)
ym=yc-clock_r*math.cos(mins_arc)
cairo_move_to(cr,xc,yc)
cairo_line_to(cr,xm,ym)

cairo_set_line_width(cr,3)
cairo_stroke(cr)

-- Draw seconds hand

if show_seconds then
xs=xc+clock_r*math.sin(secs_arc)
ys=yc-clock_r*math.cos(secs_arc)
cairo_move_to(cr,xc,yc)
cairo_line_to(cr,xs,ys)

cairo_set_line_width(cr,1)
cairo_stroke(cr)
end
end

function conky_clock_rings()
local function setup_rings(cr,pt)
local str=''
local value=0

str=string.format('${%s %s}',pt['name'],pt['arg'])
str=conky_parse(str)

value=tonumber(str)
if value == nil then value = 0 end
pct=value/pt['max']

draw_ring(cr,pct,pt)
end

-- Check that Conky has been running for at least 5s

if conky_window==nil then return end
local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual, conky_window.width,conky_window.height)

local cr=cairo_create(cs)

local updates=conky_parse('${updates}')
update_num=tonumber(updates)

if update_num>5 then
for i in pairs(settings_table) do
setup_rings(cr,settings_table[i])
end
end

draw_clock_hands(cr,clock_x,clock_y)
end


allcombined_2.lua
--[[ by mrpeachy -
combines background bar and calendar functions
]]
require 'cairo'
require 'imlib2'

function rgb_to_r_g_b(col_a)
return ((col_a[1] / 0x10000) % 0x100) / 255., ((col_a[1] / 0x100) % 0x100) / 255., (col_a[1] % 0x100) / 255., col_a[2]
end

function conky_gradbar(bartab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
local updates=tonumber(conky_parse('${updates}'))
if updates>5 then
--#########################################################################################################
--convert to table
local bartab=loadstring("return" .. bartab)()
local bar_startx=bartab[1]
local bar_starty=bartab[2]
local number=bartab[3]
local number=conky_parse(number)
local number_max=bartab[4]
local divisions=bartab[5]
local div_width=bartab[6]
local div_height=bartab[7]
local div_gap=bartab[8]
local bg_col=bartab[9]
local bg_alpha=bartab[10]
local st_col=bartab[11]
local st_alpha=bartab[12]
local mid_col=bartab[13]
local mid_alpha=bartab[14]
local end_col=bartab[15]
local end_alpha=bartab[16]
--color conversion
local br,bg,bb,ba=rgb_to_r_g_b({bg_col,bg_alpha})
local sr,sg,sb,sa=rgb_to_r_g_b({st_col,st_alpha})
local mr,mg,mb,ma=rgb_to_r_g_b({mid_col,mid_alpha})
local er,eg,eb,ea=rgb_to_r_g_b({end_col,end_alpha})
if number==nil then number=0 end
local number_divs=(number/number_max)*divisions
cairo_set_line_width (cr,div_width)
--gradient calculations
for i=1,divisions do
if i<(divisions/2) and i<=number_divs then
colr=((mr-sr)*(i/(divisions/2)))+sr
colg=((mg-sg)*(i/(divisions/2)))+sg
colb=((mb-sb)*(i/(divisions/2)))+sb
cola=((ma-sa)*(i/(divisions/2)))+sa
elseif i>=(divisions/2) and i<=number_divs then
colr=((er-mr)*((i-(divisions/2))/(divisions/2)))+mr
colg=((eg-mg)*((i-(divisions/2))/(divisions/2)))+mg
colb=((eb-mb)*((i-(divisions/2))/(divisions/2)))+mb
cola=((ea-ma)*((i-(divisions/2))/(divisions/2)))+ma
else
colr=br
colg=bg
colb=bb
cola=ba
end
cairo_set_source_rgba (cr,colr,colg,colb,cola)
cairo_move_to (cr,bar_startx+((div_width+div_gap)*i-1),bar_starty)
cairo_rel_line_to (cr,0,div_height)
cairo_stroke (cr)
end
--#########################################################################################################
end-- if updates>5
bartab=nil
colr=nil
colg=nil
colb=nil
cola=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_draw_bg(bgtab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--#########################################################################################################
--convert to table
local bgtab=loadstring("return" .. bgtab)()
local r=bgtab[1]
local x=bgtab[2]
local y=bgtab[3]
local w=bgtab[4]
local h=bgtab[5]
local color=bgtab[6]
local alpha=bgtab[7]
if w==0 then
w=tonumber(conky_window.width)
end
if h==0 then
h=tonumber(conky_window.height)
end
cairo_set_source_rgba (cr,rgb_to_r_g_b({color,alpha}))
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
--the drawing part---------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_fill (cr)
--#########################################################################################################
bgtab=nil
w=nil
h=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_luacal(caltab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--####################################################################################################
local caltab=loadstring("return" .. caltab)()
local cal_x=caltab[1]
local cal_y=caltab[2]
local tfont=caltab[3]
local tfontsize=caltab[4]
local tc=caltab[5]
local ta=caltab[6]
local bfont=caltab[7]
local bfontsize=caltab[8]
local bc=caltab[9]
local ba=caltab[10]
local hfont=caltab[11]
local hfontsize=caltab[12]
local hc=caltab[13]
local ha=caltab[14]
local spacer=caltab[15]
local gaph=caltab[16]
local gapt=caltab[17]
local gapl=caltab[18]
local sday=caltab[19]
--convert colors
--local font=string.gsub(font,"_"," ")
local tred,tgreen,tblue,talpha=rgb_to_r_g_b({tc,ta})
--main body text color
local bred,bgreen,bblue,balpha=rgb_to_r_g_b({bc,ba})
--highlight text color
local hred,hgreen,hblue,halpha=rgb_to_r_g_b({hc,ha})
--###################################################
--calendar calcs
local year=os.date("%G")
local today=tonumber(os.date("%d"))
local t1 = os.time( {    year=year,month=03,day=01,hour=00,min=0,sec=0} );
local t2 = os.time( {    year=year,month=02,day=01,hour=00,min=0,sec=0} );
local feb=(os.difftime(t1,t2))/(24*60*60)
local monthdays={ 31, feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
local day=tonumber(os.date("%w"))+1-sday
local day_num = today
local remainder=day_num % 7
local start_day=day-(day_num % 7)
if start_day<0 then start_day=7+start_day end     
local month=os.date("%m")
local mdays=monthdays[tonumber(month)]
local x=mdays+start_day
local dnum={}
local dnumh={}
if mdays+start_day<36 then
dlen=35
plen=29
else
dlen=42
plen=36
end
for i=1,dlen do
if i<=start_day then
dnum[i]="  "
else
dn=i-start_day
if dn=="nil" then dn=0 end
if dn<=9 then dn=(spacer .. dn) end
if i>x then dn="" end
dnum[i]=dn
dnumh[i]=dn
if dn==(spacer .. today) or dn==today then
dnum[i]=""
end
if dn==(spacer .. today) or dn==today then
dnumh[i]=dn
place=i
else dnumh[i]="  "
end
end
end--for
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
if tonumber(sday)==0 then
dys={"SU","MO","TU","WE","TH","FR","SA"}
else
dys={"MO","TU","WE","TH","FR","SA","SU"}
end
--draw calendar titles
for i=1,7 do
cairo_move_to (cr, cal_x+(gaph*(i-1)), cal_y)
cairo_show_text (cr, dys[i])
cairo_stroke (cr)
end
--draw calendar body
cairo_select_font_face (cr, bfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, bfontsize);
cairo_set_source_rgba (cr,bred,bgreen,bblue,balpha)
for i=1,plen,7 do
local fn=i
for i=fn,fn+6 do
cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
cairo_show_text (cr, dnum[i])
cairo_stroke (cr)
end
end
--highlight
cairo_select_font_face (cr, hfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, hfontsize);
cairo_set_source_rgba (cr,hred,hgreen,hblue,halpha)
for i=1,plen,7 do
local fn=i
for i=fn,fn+6 do
cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
cairo_show_text (cr, dnumh[i])
cairo_stroke (cr)
end
end
--#########################################################################################################
caltab=nil
dlen=nil
plen=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_luaimage(imtab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--#########################################################################################################
local imtab=loadstring("return" .. imtab)()
local im_x=imtab[1]
local im_y=imtab[2]
local im_w=imtab[3]
local im_h=imtab[4]
local file=imtab[5]
local show = imlib_load_image(file)
if show == nil then return end
imlib_context_set_image(show)
if tonumber(im_w)==0 then
width=imlib_image_get_width()
else
width=tonumber(im_w)
end
if tonumber(im_h)==0 then
height=imlib_image_get_height()
else
height=tonumber(im_h)
end
imlib_context_set_image(show)
local scaled=imlib_create_cropped_scaled_image(0, 0, imlib_image_get_width(), imlib_image_get_height(), width, height)
imlib_free_image()
imlib_context_set_image(scaled)
imlib_render_image_on_drawable(im_x, im_y)
imlib_free_image()
show=nil
--#########################################################################################################
imtab=nil
height=nil
width=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_tex_bg(textab)
local textab=loadstring("return" .. textab)()
local tex_file=textab[6]
local surface = cairo_image_surface_create_from_png(tostring(tex_file))
local cw,ch = conky_window.width, conky_window.height
local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, cw,ch)
local cr=cairo_create(cs)
--#########################################################################################################
--convert to table
local r=textab[1]
local x=textab[2]
local y=textab[3]
local w=textab[4]
local h=textab[5]
if w=="0" then
w=cw
end
if h=="0" then
h=ch
end
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
--the drawing part---------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_clip (cr)
cairo_new_path (cr);
--image part
cairo_set_source_surface (cr, surface, 0, 0)
cairo_paint (cr)
--#########################################################################################################
textab=nil
w=nil
h=nil
cairo_destroy(cr)
cairo_surface_destroy (cs)
cairo_surface_destroy (surface)
cr=nil
return ""
end-- end main function

function conky_luatext(txttab)--x,y,c,a,f,fs,txt,j ##################################################
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--#########################################################################################################
--convert to table
local txttab=loadstring("return" .. txttab)()
local x=txttab[1]
local y=txttab[2]
local c=txttab[3]
local a=txttab[4]
local f=txttab[5]
local fs=txttab[6]
local j=txttab[7]
local txt=txttab[8]
cairo_select_font_face (cr, f, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, fs)
local extents=cairo_text_extents_t:create()
cairo_text_extents(cr,txt,extents)
local wx=extents.x_advance
cairo_set_source_rgba (cr,rgb_to_r_g_b({c,a}))
if j=="l" then
cairo_move_to (cr,x,y)
elseif j=="c" then
cairo_move_to (cr,x-(wx/2),y)
elseif j=="r" then
cairo_move_to (cr,x-wx,y)
end
cairo_show_text (cr,txt)
cairo_stroke (cr)
--#########################################################################################################
txttab=nil
cairo_destroy(cr)
cairo_surface_destroy (cs)
cr=nil
return ""
end-- end main function


Credit goes to:

mrpeachy for his allcombined.lua

TeoBigusGeekus for his weather scipts (http://crunchbang.org/forums/viewtopic.php?id=19235)

Falldown for theVSIDO orb (http://vsido.freeforums.org/orb-logo-designs-t53.html)

And finally the wallpaper can be found here (http://ompldr.org/vaDBlMg)
Title: Re: Conky Codes and Images
Post by: lwfitz on January 14, 2013, 07:30:45 PM
Always making changes :D

(http://ompldr.org/taDBpcQ) (http://ompldr.org/vaDBpcQ)
Title: Mayans were wrong!
Post by: jedi on January 14, 2013, 08:55:23 PM
Originally posted: Sat Dec 22, 2012 6:09 am

Well congratulations Earth!  It's the 22nd of Dec. and the Mayans got it wrong.  The new Epoch has begun.  In celebration of this magnanimous event, heres my latest VSIDO build logged in to Xfce4, with 3 Conky's and 4 Tint2 panels!  Thanks VastOne for the greatest distro ever, and thanks again Sector11 for getting me here and the outstanding help from the both of you in all things Conky and Linux!  Your both scholars and gentlemaen!
VSIDO (built from the iso image of 20 Dec. 2012) logged into Xfce4.10.

(http://en.zimagez.com/miniature/vsidoxfce.jpg) (http://en.zimagez.com/zimage/vsidoxfce.php)
Title: Re: Mayans were wrong!
Post by: jedi on January 14, 2013, 09:00:12 PM
Originally posted: Sat Dec 22, 2012 9:16 am
Quote from: Sector11That's one sweet setup Jed.  You have yours on one large piece of real estate. Mine is smaller so I build on each  Desktop.  :D
Thank you kindly sir!  Yes the (I know I shouldn't say it) 1920x1080 res is pretty sweet.  One drawback on a laptop though is the smallness of the fonts.  Also when I 'borrow' one of you guys' Conkys, there is always so much tweaking to do to make it big enough for my screen!  Complain, complain, complain!  Is this vsido build awesome or what?  Lovin' it!!!
Title: Re: Mayans were wrong!
Post by: jedi on January 14, 2013, 09:01:25 PM
Originally posted: Sat Dec 22, 2012 6:03 pm

Thanks guys!  It only looks that way because of Sector11 and VastOne's hard work!  I really do only know how to Ctrl-C and Ctrl-V!!!
Title: Too Blue
Post by: jedi on January 14, 2013, 09:10:03 PM
Originally posted: Sun Dec 23, 2012 6:45 pm

Did some rearranging and here's the latest...  Added some color....

(http://en.zimagez.com/miniature/tooblue.jpg) (http://en.zimagez.com/zimage/tooblue.php)

Too much blue right?
Title: Re: Too Blue
Post by: jedi on January 14, 2013, 09:12:28 PM
Originally posted: Sun Dec 23, 2012 8:46 pm

Quote from: VastOneGotta ask, OB or Xfce on that epic layout Jed?
Sorry to disappoint guys, but it's Xfce4.  I don't realy have anything against OB I just find that Xfce4 seems a little more polished and the ease of use, for me anyway, seems easier to tweak on.  OB is really great though, and I have gone to the effort to get it totally tweaked this time as well.  On the Conky's I post, if there is an Xfce menu button or logout button in the Tint2 panel, that'll be the giveaway that it's Xfce.

@Sectpr11. Yes it's prolly my fav color.  Kinda captures the mood for me as well.  I find Christmas time depressing!  Pity Party, Pity Party!!!   :roll:
Title: OB growing on me...
Post by: jedi on January 14, 2013, 09:17:45 PM
Originally posted: Tue Dec 25, 2012 2:33 pm

Ok, so I like OpenBox a little more than I thought!  I mean look at this scrot; you can't tell the difference between it and say Xfce4.  IMO anyway.  Couple questions though.  I'd like another Tint2 panel at the top left with an icon to logout of OB.  Tried all my feeble mind could think of to no avail. I know I can just right-click on the desktop and use the menu to do it, but I'd just as soon have the icon if possible.  Also, at the top of my screen you see another Tint2 panel (which are actually 2 panels) with the wicd icon there.  The only way I get it there is to go through the OB menu and manually start wicd.  The wireless starts and runs fine without me doing that, I'd just like an icon to look at and see my network is up and running.  I had this working before in OB but I don't remember what I did.  :oops:   Also an icon to adjust the volume would be nice up there as well.  Am I asking too much?  Don't worry about responding with an answer (if you know the answers!!!) until after the holidays!

And at last, here it is, the scrot!

(http://en.zimagez.com/miniature/objed.jpg) (http://en.zimagez.com/zimage/objed.php)

OB is way understated!
Title: Minimal default VSIDO Conky
Post by: jedi on January 14, 2013, 10:31:02 PM
Originally posted: Sat Jan 05, 2013 6:23 pm

This is my latest Tint2 and Conky setups.  I like the simplistic Conky across the top that is the default with VSIDO.  I made a couple of little changes.  Email top right, and a v9000 forecast covers all the bases.

(http://www.zimagez.com/miniature/liquorixmemob.png) (http://www.zimagez.com/zimage/liquorixmemob.php)
Title: Re: Minimal default VSIDO Conky
Post by: jedi on January 14, 2013, 10:37:14 PM
Originally posted: Mon Jan 07, 2013 11:29 pm

OK, so I finally did it!!!  This is my version of the VSIDO default horizontal Conky.  I've added some stuff, got rid of some more stuff, added some weather, and conkyEmail.  The weather is courtesy of Teo's hard work and fantastic weather scripts!!!  Thanks also to Sector11 for the original idea...

(http://en.zimagez.com/miniature/hzvsidoconky0.jpg) (http://en.zimagez.com/zimage/hzvsidoconky0.php)

Is it this cold every-where or what!  Check out the current temperature!!!  And we're just getting started with the bitter cold part of winter...  Not the time of year to take a leak in the great outdoors!!!  Might end up having some unfortunate surgery!!!

And then I found the ORB!!!  So a new scrot to show it off!  Already made a couple other edits as well.  Changed how sed was printing out the message underneath the days forecast to include the whole thing...  The next few days, since I have the real-estate, I'll add another day to the thing so it's an official 3 day forecast.  Well 4 if you count "Today"...  Of all the Conky's I've done, this one is the one I'm most proud of!  How silly is that?

(http://en.zimagez.com/miniature/coldoutside.jpg) (http://en.zimagez.com/zimage/coldoutside.php)

Compare the RAM usage between the two scrots!  Over 20 hours of uptime, Iceweasel open in the top one then closed in the bottom one.  Amazing!!!

I was going to post the code for this, but I keep getting the "forbidden" message.  Anyone who wants it just ask!
Title: Re: Minimal default VSIDO Conky
Post by: jedi on January 14, 2013, 10:45:47 PM
Originally posted: Tue Jan 08, 2013 12:09 pm

Memory usage of the horizontal Conky.

(http://en.zimagez.com/miniature/htopconky.png) (http://en.zimagez.com/zimage/htopconky.php)
Title: Lua codes and screenshots.
Post by: falldown on January 14, 2013, 11:41:22 PM
This is a place to post your Lua creations.

Just about done with this one.
(http://ompldr.org/taDJkNQ) (http://ompldr.org/vaDJkNQ)

Gradient background boxes, weather,  and all text drawn in lua.

I will paste the code along with updates.
Title: Re: Lua codes and screenshots.
Post by: VastOne on January 15, 2013, 12:44:31 AM
^ Very nice falldown, looking forward to that code.
Title: Re: Minimal default VSIDO Conky
Post by: VastOne on January 15, 2013, 12:45:50 AM
Incredible scrots Jed!  Each one gets better and better
Title: Re: Lua codes and screenshots.
Post by: Sector11 on January 15, 2013, 01:29:27 AM
It's scary what you can do with LUA falldown.

Awesome but scary... No wait, it's your new avatar that's scary ... but awesome as well.
Title: Re: Lua codes and screenshots.
Post by: falldown on January 15, 2013, 01:44:45 AM
Why thank you guys.. means a lot.

Peachy is the one that writes amazing lua scripts.. I just play with them.  :)
Title: Re: Minimal default VSIDO Conky
Post by: jedi on January 15, 2013, 01:46:57 AM
Well thank-you very much VastOne!!!  Learned a lot from you and Sector11...
Title: Re: Lua codes and screenshots.
Post by: Sector11 on January 15, 2013, 02:20:01 AM
Quote from: falldown on January 15, 2013, 01:44:45 AM
Why thank you guys.. means a lot.

Peachy is the one that writes amazing lua scripts.. I just play with them.  :)

Ha!  You're quoting me now
I'll take that as a compliment.
Title: Re: Minimal default VSIDO Conky
Post by: Sector11 on January 15, 2013, 02:37:27 AM
These two have become my default conkys!
(http://t.imgbox.com/adw8Or7o.jpg) (http://imgbox.com/adw8Or7o)

Conky inspired by VastOne and mrpeachy
Wallpaper inspired by VastOne and the earliest recorded historical interest in Golf!
Title: Im Batman!
Post by: lwfitz on January 15, 2013, 09:08:56 AM
(http://ompldr.org/taDJ4dw) (http://ompldr.org/vaDJ4dw)


(http://ompldr.org/taDJ4dg) (http://ompldr.org/vaDJ4dg)

You can get all the files here including the wallpaper and the custom images for Teos weather script


Teos weather scripts can be found here (http://crunchbang.org/forums/viewtopic.php?id=19235)

Title: Re: Mayans were wrong!
Post by: Sector11 on January 15, 2013, 02:43:55 PM
I agree with the title ...  I did this a few days ago:
(http://t.imgbox.com/abdKfSmx.jpg) (http://imgbox.com/abdKfSmx)
Free Image Hosting by imgbox.com (http://imgbox.com)
Title: Re: Too Blue
Post by: Sector11 on January 15, 2013, 02:44:44 PM
Actually it fits the theme (default) of the forum.  :D
Title: Re: Lua codes and screenshots.
Post by: falldown on January 15, 2013, 06:03:13 PM
Here we go..
All lua code is written By the MIGHTY MrPeachy. Hands down my favorite script writer.
The layout uses his v9000 & Bargraph scripts.

README....
.v9000_config.lua (this file goes in your /home/username directory)
--SETTINGS AND PREFERENCES--SETTINGS AND PREFERENCES--SETTINGS AND PREFERENCES
function weather_settings()--#### DO NOT EDIT THIS LINE #################
--#######################################################################
--[[set update interval.  update interval is based on conky cycles
if your conkyrc has an update_interval of 1, ie updates every second
then if you enter 60 below, the script will update every 60 seconds
however, if your conkyrc update_interval is 10, then by setting 60 below,
v9000 will update every 600 seconds (10 minutes)]]
local update_interval=1800 --avoid an interval of 1
--get web address by going to the intellicast site and entering your location in the box
--click on "Extended Forecast" to get the necessary address
local web="http://www.intellicast.com/Local/Forecast.aspx?unit=F&location=USMO9688"--insert unit=C& after aspx? for C
--set location of weather images (replace "benjamin" with your own username)
local weathericons="/home/falldown/v9000/additional_files/weathericons_falldown/"
--short conditions setup
--this section allows you to set your own shorter terms to replace the terms foud in conditions
--to use for current: now["conditions_short"], now["conditions_short_caps"], now["conditions_short_lc"]
--to use for forecast: conditions_short[n], conditions_short_caps[n], conditions_short_lc[n]
--ALSO USE THIS TABLE TO ENTER CONDITIONS TRANSLATIONS
con_short={--start of table, put entries below in form eg: ["Thunderstorm"]="T.Strm",
["Wind Early"]="Wnd AM",
["Snow Showers"]="Sn Shws",
["Thunderstorm"]="T.Strm",--remember to put a comma at the end of every entry
["Scattered"]="Scat",
["Few Snow Showers"]="Fw Sn Shws",
["Wind"]="Wnd",
["Showers"]="Shws",
}--this bracket closes the table
--the script is capable of converting between several unit types
--set how many decimal places you want the conversions to show
local decimal_places=1
--some weather data options need to come with their own units attached as they can be NA on occasion
--set here what you want to have for units, or set "" for nothing
--include spaces, if desired, for formatting purposes.
--NOTE ALSO EDIT THESE SETTINGS FOR TRANSLATION PURPOSES
local visibility_unit=" mi"
local wind_mph_unit=" mph"
local wind_km_unit=" kmh"
local wind_kts_unit=" kts"
local ceiling_unit=" ft"
local wind_degrees_unit="°"
--do you want the script to use translation tables?
--set 1 if you want to translate, 0 if not.
--the translation tables are located below
local translate=0
--set alerts on or off, set to 0 so that the script does not check for alerts
--set 1 to check for alerts
local alert_check=1
--#######################################################################
--TRANSLATION TABLES, activate by setting translate=1 above
--use con_short table above to translate weather conditions
--edit units settings above to complete translation
--translate NESW text
neswtext={
S="t_S",
SSW="tsetSSW",
SW="t_SW",
WSW="t_WSW",
W="t_W",
WNW="t_WNW",
NW="t_NW",
NNW="t_NNW",
N="t_N",
NNE="t_NNE",
NE="t_NE",
ENE="t_ENE",
E="t_E",
ESE="t_ESE",
SE="t_SE",
SSE="t_SSE",
}--end of  N E S W text table
--translate time suffix
tsuffix={
AM="t_AM",
PM="t_PM",
}--end of time suffix table
--enter translations for uv index text
uvindextext={
["Low"]="t_Low",
["Moderate"]="t_Moderate",
["High"]="t_High",
["Very High"]="t_Very High",--format is different because of the space in the text
["Extreme"]="t_Extreme",
}--end of uv text table
--enter translations for moonpahse
moonphases={
["New"]="t_New",
["Full"]="t_Full",
["First Quarter"]="t_First Quarter",
["Last Quarter"]="t_Last Quarter",
["Waning Gibbous"]="t_Waning Gibbous",
["Waning Crescent"]="t_Waning Crescent",
["Waxing Crescent"]="t_Waxing Crescent",
["Waxing Gibbous"]="t_Waxing Gibbous",
}--end of moon phase table
--enter translations for FULL day names
daynames={
Monday="t_Monday",
Tuesday="t_Tuesday",
Wednesday="t_Wednesday",
Thursday="t_Thursday",
Friday="t_Friday",
Saturday="t_Saturday",
Sunday="t_Sunday",
}--end day names table
--enter translations for SHORT day names
dayshort={
Monday="t_Mon",
Tuesday="t_Tue",
Wednesday="t_Wed",
Thursday="t_Thu",
Friday="t_Fri",
Saturday="t_Sat",
Sunday="t_Sun"
}--end short day names table
--enter translation for FULL month names
monthnames={
January="t_January",
February="t_February",
March="t_March",
April="t_April",
May="t_May",
June="t_June",
July="t_July",
August="t_August",
September="t_September",
October="t_October",
November="t_November",
December="t_December"
}--end of month name translations
--enter translations for SHORT month names
monthshort={
January="t_Jan",
February="t_Feb",
March="t_Mar",
April="t_Apr",
May="t_May",
June="t_Jun",
July="t_Jul",
August="t_Aug",
September="t_Sep",
October="t_Oct",
November="t_Nov",
December="t_Dec"
}--end of short month name translations
--enter some additional translations
additional={
NA="t_NA",
Unl="t_Unl"--for ceiling data option
}--end of additional translations
--END OF TRANSLATION TABLES
--#######################################################################
--NOTE if you make changes to these settings, they will only take effect at the next weather update
--or after killall conky and restart
--#######################################################################
if translate==1 then
return {update_interval,web,weathericons,con_short,decimal_places,visibility_unit,wind_mph_unit,wind_km_unit,wind_kts_unit,ceiling_unit,wind_degrees_unit,translate,alert_check,neswtext,tsuffix,uvindextext,moonphases,daynames,dayshort,monthnames,monthshort,additional}
else
return {update_interval,web,weathericons,con_short,decimal_places,visibility_unit,wind_mph_unit,wind_km_unit,wind_kts_unit,ceiling_unit,wind_degrees_unit,translate,alert_check}
end
end--OF SETTINGS AND PREFERENCES ########################################
--#######################################################################

(you will need to go intellicast weather and get your location.)

conky_system (this is the conkyrc)
##############################################
#  Settings
##############################################
max_specials 10000
max_user_text 1500000
background no
use_xft yes
#xftfont Sans:size=12
#xftalpha 1
font Mono:size=8
total_run_times 0
own_window yes
own_window_argb_visual yes
own_window_transparent yes
own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 230 750
maximum_width 230
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
default_color white
default_shade_color black
default_outline_color white
alignment middle_left
gap_x 10
gap_y 10
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
color1 86acad #darker blue
color2 b1c9c9 #lighter blue
text_buffer_size 100000
top_name_width 10
update_interval 1

lua_load /home/falldown/v9000/bargraph.lua
lua_load /home/falldown/v9000/v9000.lua
lua_draw_hook_post weather
lua_load /home/falldown/v9000/config.lua

TEXT


config.lua (This is where all the lua, weather and text settings are)
--DISPLAY FUNCTION--DISPLAY FUNCTION--DISPLAY FUNCTION--DISPLAY FUNCTION-
_G.weather_script = function()--#### DO NOT EDIT THIS LINE ##############
--#######################################################################
--## CALL bargraph.lua ##################################################
function conky_main()
     conky_main_bars()
end
--#######################################################################
--these tables hold the coordinates for each repeat do not edit #########
top_left_x_coordinate={}--###############################################
top_left_y_coordinate={}--###############################################
--#######################################################################
--SET DEFAULTS ##########################################################
--set defaults do not localise these defaults if you use a seperate display script
default_font="LaudatioC"--font must be in quotes
default_font_size=12
default_color=0xffffff--white
default_alpha=1--fully opaque
default_image_width=50
default_image_height=50
--END OF DEFAULTS #######################################################
--START OF WEATHER CODE -- START OF WEATHER CODE -- START OF WEATHER CODE
--#######################################################################
--background start#######################################################

subtab={
{d="start",x=5.5,y=10.5},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=200,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=125},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-200,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=5,gan=65,x=5,y=10,w=200,h=125,grad={{c=0x000000,a=1,p=0},{c=0x000000,a=1,p=1}},lw=1,sub=1,db=0,subtab=subtab})

subtab={
{d="start",x=5,y=10},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=200,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=125},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-200,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=5,gan=80,x=5,y=10,w=200,h=125,grad={{c=0x000000,a=0.35,p=0.0},{c=0xffffff,a=0.35,p=0.71},{c=0xffffff,a=0.35,p=0.73},{c=0xffffff,a=0.35,p=0.75},{c=0x000000,a=0.0,p=1}},lw=1,sub=1,db=0,subtab=subtab})

--######################################################################

subtab={
{d="start",x=5.5,y=165.5},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=200,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=70},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-200,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=2,x=5,y=155,w=200,h=90,grad={{c=0x000000,a=1,p=0},{c=0x000000,a=1,p=1}},lw=1,sub=1,db=0,subtab=subtab})

subtab={
{d="start",x=5,y=165},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=200,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=70},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-200,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=5,gan=80,x=5,y=155,w=200,h=90,grad={{c=0x000000,a=0.3,p=0.0},{c=0xffffff,a=0.35,p=0.67},{c=0xffffff,a=0.35,p=0.69},{c=0xffffff,a=0.35,p=0.71},{c=0x000000,a=0.2,p=1}},lw=1,sub=1,db=0,subtab=subtab})

subtab={
{d="start",x=10,y=200},
{d="rline",x=180,y=0},
{d="rline",x=0,y=1.5},
{d="rline",x=-180,y=0},
}
grec({g=2,x=5,y=155,w=200,h=90,grad={{c=0x000000,a=0.4,p=0.0},{c=0xffffff,a=1,p=0.5},{c=0x000000,a=0.4,p=1}},lw=1,sub=1,db=0,subtab=subtab})

--######################################################################

subtab={
{d="start",x=5.5,y=265.5},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=200,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=70},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-200,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=2,x=5,y=200,w=200,h=90,grad={{c=0x000000,a=1,p=0},{c=0x000000,a=1,p=1}},lw=1,sub=1,db=0,subtab=subtab})

subtab={
{d="start",x=5,y=265},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=200,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=70},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-200,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=5,gan=80,x=5,y=200,w=200,h=90,grad={{c=0x000000,a=0.2,p=0.0},{c=0xffffff,a=0.35,p=0.63},{c=0xffffff,a=0.35,p=0.65},{c=0xffffff,a=0.35,p=0.67},{c=0x000000,a=0.3,p=1}},lw=1,sub=1,db=0,subtab=subtab})

subtab={
{d="start",x=10,y=297},
{d="rline",x=180,y=0},
{d="rline",x=0,y=1.5},
{d="rline",x=-180,y=0},
}
grec({g=2,x=5,y=155,w=200,h=90,grad={{c=0x000000,a=0.4,p=0.0},{c=0xffffff,a=1,p=0.5},{c=0x000000,a=0.4,p=1}},lw=1,sub=1,db=0,subtab=subtab})

--######################################################################

subtab={
{d="start",x=5.5,y=365.5},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=200,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=70},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-200,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=2,x=5,y=200,w=200,h=90,grad={{c=0x000000,a=1,p=0},{c=0x000000,a=1,p=1}},lw=1,sub=1,db=0,subtab=subtab})

subtab={
{d="start",x=5,y=365},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=200,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=70},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-200,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=5,gan=80,x=5,y=200,w=200,h=90,grad={{c=0x000000,a=0.2,p=0.0},{c=0xffffff,a=0.35,p=0.59},{c=0xffffff,a=0.35,p=0.61},{c=0xffffff,a=0.35,p=0.63},{c=0x000000,a=0.3,p=1}},lw=1,sub=1,db=0,subtab=subtab})

subtab={
{d="start",x=10,y=397},
{d="rline",x=180,y=0},
{d="rline",x=0,y=1.5},
{d="rline",x=-180,y=0},
}
grec({g=2,x=5,y=155,w=200,h=90,grad={{c=0x000000,a=0.4,p=0.0},{c=0xffffff,a=1,p=0.5},{c=0x000000,a=0.4,p=1}},lw=1,sub=1,db=0,subtab=subtab})

--######################################################################

subtab={
{d="start",x=5.5,y=465.5},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=200,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=70},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-200,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=2,x=5,y=200,w=200,h=90,grad={{c=0x000000,a=1,p=0},{c=0x000000,a=1,p=1}},lw=1,sub=1,db=0,subtab=subtab})

subtab={
{d="start",x=5,y=465},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=200,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=70},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-200,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=5,gan=80,x=5,y=200,w=200,h=90,grad={{c=0x000000,a=0.2,p=0.0},{c=0xffffff,a=0.35,p=0.55},{c=0xffffff,a=0.35,p=0.57},{c=0xffffff,a=0.35,p=0.59},{c=0x000000,a=0.3,p=1}},lw=1,sub=1,db=0,subtab=subtab})

subtab={
{d="start",x=10,y=497},
{d="rline",x=180,y=0},
{d="rline",x=0,y=1.5},
{d="rline",x=-180,y=0},
}
grec({g=2,x=5,y=155,w=200,h=90,grad={{c=0x000000,a=0.4,p=0.0},{c=0xffffff,a=1,p=0.5},{c=0x000000,a=0.4,p=1}},lw=1,sub=1,db=0,subtab=subtab})

--######################################################################

subtab={
{d="start",x=5.5,y=565.5},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=200,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=70},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-200,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=2,x=5,y=200,w=200,h=90,grad={{c=0x000000,a=1,p=0},{c=0x000000,a=1,p=1}},lw=1,sub=1,db=0,subtab=subtab})

subtab={
{d="start",x=5,y=565},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=200,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=70},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-200,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=5,gan=80,x=5,y=200,w=200,h=90,grad={{c=0x000000,a=0.2,p=0.0},{c=0xffffff,a=0.35,p=0.51},{c=0xffffff,a=0.35,p=0.53},{c=0xffffff,a=0.35,p=0.55},{c=0x000000,a=0.3,p=1}},lw=1,sub=1,db=0,subtab=subtab})

subtab={
{d="start",x=10,y=597},
{d="rline",x=180,y=0},
{d="rline",x=0,y=1.5},
{d="rline",x=-180,y=0},
}
grec({g=2,x=5,y=155,w=200,h=90,grad={{c=0x000000,a=0.4,p=0.0},{c=0xffffff,a=1,p=0.5},{c=0x000000,a=0.4,p=1}},lw=1,sub=1,db=0,subtab=subtab})

--######################################################################

subtab={
{d="start",x=5.5,y=665.5},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=200,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=70},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-200,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=2,x=5,y=200,w=200,h=90,grad={{c=0x000000,a=1,p=0},{c=0x000000,a=1,p=1}},lw=1,sub=1,db=0,subtab=subtab})

subtab={
{d="start",x=5,y=665},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=200,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=70},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-200,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=5,gan=80,x=5,y=200,w=200,h=90,grad={{c=0x000000,a=0.2,p=0.0},{c=0xffffff,a=0.35,p=0.47},{c=0xffffff,a=0.35,p=0.49},{c=0xffffff,a=0.35,p=0.51},{c=0x000000,a=0.3,p=1}},lw=1,sub=1,db=0,subtab=subtab})

subtab={
{d="start",x=10,y=697},
{d="rline",x=180,y=0},
{d="rline",x=0,y=1.5},
{d="rline",x=-180,y=0},
}
grec({g=2,x=5,y=155,w=200,h=90,grad={{c=0x000000,a=0.4,p=0.0},{c=0xffffff,a=1,p=0.5},{c=0x000000,a=0.4,p=1}},lw=1,sub=1,db=0,subtab=subtab})

--Background setup end ##################################################
--#######################################################################
--Config start###########################################################

starty=15
gap=15
ypos=0
ypos=starty+ypos
out({c=0xACACAC,a=1,f="LaudatioC",fs=18,x=60,y=ypos+4,txt=conky_parse"${sysname}/debian"})
ypos=gap+ypos
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=10,y=ypos+6,txt=conky_parse"${kernel}"})
image({x=145,y=37,h=75,w=75,file="/home/falldown/images/vsido-logo-rev4.png"})

--data titles
ypos=gap+ypos
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=10,y=ypos+10,txt="uptime:"})
ypos=gap+ypos
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=10,y=ypos+50,txt="MEM:"})
ypos=gap+ypos
ypos=0
ypos=starty+gap+gap+ypos
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=65,y=ypos+10,txt=conky_parse"${uptime}"})
ypos=gap+ypos

--## MEM BARGRAPH #########################################################

num=tonumber(conky_parse("${memperc}"))
--num=100--hard code num to see gradient on full bar
local num_max=100
local bar_ht=12
local crd=0--corner rad
local tht=bar_ht+(2*crd)--total length
local bar_wd=202--length of flat bar top/bottom
local twd=bar_wd+(2*crd)
local tlx=15--top left corner x
local tly=103--top left corner y
local bar=(bar_wd/num_max)*num

--gradient indicator
subtab={
{d="start",x=tlx+crd,y=tly+tht},
{d="rline",x=0,y=bar_ht},
{d="rline",x=200,y=0},
{d="rline",x=0,y=-bar_ht},
}
grec({g=2,x=tlx,y=tly,w=bar+(2*crd),h=tht,grad={{c=0x000000,a=0,p=0},{c=0xffffff,a=1,p=0.94},{c=0xffffff,a=1,p=0.99},{c=0x000000,a=0,p=1}},sub=1,db=0,subtab=subtab})

--######################################################################
--MEM SECTION
ypos=gap+ypos
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=65,y=ypos+66,txt=conky_parse"${mem}/${memmax}"})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=65,y=ypos+35,txt=conky_parse"${memperc}%"})
ypos=gap+ypos

--CPU SECTION
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=10,y=ypos+80,txt="CPU1:"})
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=130,y=ypos+80,txt="TEMP:"})
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=10,y=ypos+132,txt="CPU2:"})
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=130,y=ypos+132,txt="TEMP:"})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=170,y=ypos+80,txt=conky_parse"${hwmon 1 temp 2}°C"})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=50,y=ypos+80,txt=conky_parse"${cpu cpu1}%"})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=170,y=ypos+132,txt=conky_parse"${hwmon 1 temp 3}°C"})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=50,y=ypos+132,txt=conky_parse"${cpu cpu2}%"})
--CPU BARGRAPH ########################################################

num=tonumber(conky_parse("${cpu cpu1}"))
--num=100--hard code num to see gradient on full bar
local num_max=100
local bar_ht=12
local crd=0--corner rad
local tht=bar_ht+(2*crd)--total length
local bar_wd=202--length of flat bar top/bottom
local twd=bar_wd+(2*crd)
local tlx=15--top left corner x
local tly=163--top left corner y
local bar=(bar_wd/num_max)*num

--gradient indicator
subtab={
{d="start",x=tlx+crd,y=tly+tht},
{d="rline",x=0,y=bar_ht},
{d="rline",x=200,y=0},
{d="rline",x=0,y=-bar_ht},
}
grec({g=2,x=tlx,y=tly,w=bar+(2*crd),h=tht,grad={{c=0x000000,a=0,p=0},{c=0xffffff,a=1,p=0.94},{c=0xffffff,a=1,p=0.99},{c=0x000000,a=0,p=1}},sub=1,db=0,subtab=subtab})

num=tonumber(conky_parse("${cpu cpu2}"))
--num=100--hard code num to see gradient on full bar
local num_max=100
local bar_ht=12
local crd=0--corner rad
local tht=bar_ht+(2*crd)--total length
local bar_wd=202--length of flat bar top/bottom
local twd=bar_wd+(2*crd)
local tlx=15--top left corner x
local tly=215--top left corner y
local bar=(bar_wd/num_max)*num

--gradient indicator
subtab={
{d="start",x=tlx+crd,y=tly+tht},
{d="rline",x=0,y=bar_ht},
{d="rline",x=200,y=0},
{d="rline",x=0,y=-bar_ht},
}
grec({g=2,x=tlx,y=tly,w=bar+(2*crd),h=tht,grad={{c=0x000000,a=0,p=0},{c=0xffffff,a=1,p=0.94},{c=0xffffff,a=1,p=0.99},{c=0x000000,a=0,p=1}},sub=1,db=0,subtab=subtab})

--######################################################################
--Net SECTION
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=10,y=ypos+180,txt="NET UP:"})
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=10,y=ypos+233,txt="NET DOWN:"})
--out({c=0xffffff,a=1,f="LaudatioC",fs=14,x=260,y=ypos+180,txt=conky_parse"${memperc}%"})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=60,y=ypos+180,txt=conky_parse"${upspeed}"})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=85,y=ypos+233,txt=conky_parse"${downspeed}"})

--NET BARGRAPH##########################################################
num=tonumber(conky_parse("${upspeedf}"))
--num=100--hard code num to see gradient on full bar
local num_max=100
local bar_ht=12
local crd=0--corner rad
local tht=bar_ht+(2*crd)--total length
local bar_wd=202--length of flat bar top/bottom
local twd=bar_wd+(2*crd)
local tlx=15--top left corner x
local tly=263--top left corner y
local bar=(bar_wd/num_max)*num

--gradient indicator
subtab={
{d="start",x=tlx+crd,y=tly+tht},
{d="rline",x=0,y=bar_ht},
{d="rline",x=200,y=0},
{d="rline",x=0,y=-bar_ht},
}
grec({g=2,x=tlx,y=tly,w=bar+(2*crd),h=tht,grad={{c=0x000000,a=0,p=0},{c=0xffffff,a=1,p=0.94},{c=0xffffff,a=1,p=0.99},{c=0x000000,a=0,p=1}},sub=1,db=0,subtab=subtab})

num=tonumber(conky_parse("${downspeedf}"))
--num=100--hard code num to see gradient on full bar
local num_max=100
local bar_ht=12
local crd=0--corner rad
local tht=bar_ht+(2*crd)--total length
local bar_wd=202--length of flat bar top/bottom
local twd=bar_wd+(2*crd)
local tlx=15--top left corner x
local tly=317--top left corner y
local bar=(bar_wd/num_max)*num

--gradient indicator
subtab={
{d="start",x=tlx+crd,y=tly+tht},
{d="rline",x=0,y=bar_ht},
{d="rline",x=200,y=0},
{d="rline",x=0,y=-bar_ht},
}
grec({g=2,x=tlx,y=tly,w=bar+(2*crd),h=tht,grad={{c=0x000000,a=0,p=0},{c=0xffffff,a=1,p=0.94},{c=0xffffff,a=1,p=0.99},{c=0x000000,a=0,p=1}},sub=1,db=0,subtab=subtab})

--######################################################################
--Last fm SECTION
image({x=45,y=655,h=48,w=125,file="/home/falldown/v9000/Lastfm/logo1.png"})
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=75,y=ypos+620,txt="PLAYING"})
out({c=0xffffff,a=1,f="LaudatioC",fs=10,x=10,y=ypos+640,txt=conky_parse"${rss http://ws.audioscrobbler.com/1.0/user/chris-falldown/recenttracks.rss 1 item_titles 1 }"})
--######################################################################
--Time and Date SECTION
out({c=0xffffff,a=1,f="LaudatioC",fs=24,x=55,y=ypos+340,txt=conky_parse"${time %I:%M:%S}"})
out({c=0xACACAC,a=1,f="LaudatioC",fs=24,x=25,y=ypos+295,txt=conky_parse"${time %B %d %Y}"})
--######################################################################
--Weather SECTION
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=35,y=ypos+377,txt=weather_location})
image({x=170,y=475,h=50,w=50,file=now["weather_icon"]})
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=10,y=ypos+390,txt="Conditions:"})
out({c=0xffffff,a=1,f="LaudatioC",fs=14,x=75,y=ypos+390,txt=now["conditions_short"]})
image({x=10,y=498,h=45,w=45,file=now["wind_icon"]})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=55,y=ypos+450,txt=now["wind_mph"]})
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=30,y=ypos+405,txt="Temperature:"})
out({c=0xffffff,a=1,f="LaudatioC",fs=14,x=112,y=ypos+405,txt=now["temp"].."°F"})
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=65,y=ypos+420,txt="Feels Like:"})
out({c=0xffffff,a=1,f="LaudatioC",fs=14,x=130,y=ypos+421,txt=now["temp"].."°F"})
--out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=440,y=ypos-10,txt="Weather for "})
--######################################################################
--NEXT 3 HOUR SECTION
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=60,y=567,txt="NEXT 3 HOURS"})
image({w=30,h=30,x=40,y=570,file=now["fc_hour1_wicon"]})--good
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=10,y=584,txt=now["fc_hour1_time"].." "..now["fc_hour1_ampm"]})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=10,y=595,txt=now["fc_hour1_temp"].."°F"})

image({w=30,h=30,x=115,y=570,file=now["fc_hour2_wicon"]})--good
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=85,y=584,txt=now["fc_hour2_time"].." "..now["fc_hour2_ampm"]})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=85,y=595,txt=now["fc_hour2_temp"].."°F"})

image({w=30,h=30,x=185,y=570,file=now["fc_hour3_wicon"]})--good
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=155,y=584,txt=now["fc_hour3_time"].." "..now["fc_hour3_ampm"]})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=155,y=595,txt=now["fc_hour3_temp"].."°F"})

--ALERTS SECTION
--show alert icon
image({x=5,y=600,h=22,w=22,file=alert_icon})
--show number of alerts
out({x=24,y=618,fs=22,txt=alert_number})
--display alert information
display_alerts=2--set number of alerts to show,set 0 to show all
top_left_alert_x=40--set top left coordinates for entire alerts section
top_left_alert_y=615--^alerts will display in a single column
alert_gap=40--sets the gap between the TOP of one alert and the Top of the next alert
--#######################################################################################################################################
if alert_number==0 then noal=1 elseif alert_number~=0 and display_alerts>alert_number then noal=alert_number else noal=display_alerts end
for i=1,noal do--start of alerts display section. do not edit ###########################################################################
local tlx=top_left_alert_x--write output relative to tlx #################################
local tly=top_left_alert_y+((i-1)*alert_gap)--write output relative to tlx ###############
--########################################################################################
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=tlx,y=tly,txt=alert_type[i]})
out({c=0xffffff,a=1,f="LaudatioC",fs=10,x=tlx,y=tly+15,txt=alert_issued[i]})
--########################################################################################
end--of alert display section ############################################################
--########################################################################################

--#######################################################################
--END OF CODE ----END OF CODE ----END OF CODE ---
--#######################################################################
end--of function do not edit this line ##################################
--#######################################################################


bargraph.lua (this draws all the pretty stuff)
[code]--easy compound shape drawing with gradients by mrpeachy 8/13/12

require 'cairo'

function conky_main_bars()
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
cr = cairo_create(cs)
local updates=tonumber(conky_parse('${updates}'))
if updates>5 then
--#########################################################################################################
--[[subtab={} instructions #############################################################################
each step of the drawn shape must be in a sub table
first entry must be d="start", set x and y of start point of shape
other entried can be these types
d="line" , draws a line to set coordinates,x and y
d="rline" , draws a relative line starting at the last set point of the shape, x and y values are relative to this point
d="arc_c" , draws an clockwise arc for the set amount of degrees starting at the last set point of the shape
d="arc_a" , draws an anticlockwise arc for the set amount of degrees starting at the last set point of the shape
for arc_c and arc_a you need to set a circle quandrant where the arc will start
q=1 is the top right quarter of the circle
q=2 is the bottom right quarter
q=3 is bottom left quarter
q=4 is the top left quarter
r is the radius of the circle
degs is the number of degrees to be drawn
EG:
subtab={--start of sub path table
{d="start",x=100,y=100},
{d="rline",x=150,y=0},
{d="arc_c",q=1,r=50,degs=90},
{d="rline",x=0,y=25},
{d="rline",x=-50,y=0},
{d="rline",x=0,y=-10},
{d="arc_a",q=1,r=15,degs=90},
{d="line",x=100,y=150},
}--end of sub path table
--NOTE setting up subtab by ityself does not draw anything, subtab is then sent to the function grec in the table below
--grec settings #################################
Title: Re: Lua codes and screenshots.
Post by: lwfitz on January 15, 2013, 06:28:35 PM
BEAUTIFUL! I cant wait to break this when I get home tonight  ;D Thanks buddy!
Title: Re: Lua codes and screenshots.
Post by: falldown on January 15, 2013, 06:53:11 PM
You are welcome.. and enjoy.
I will help with any questions you may have.
Title: Re: Lua codes and screenshots.
Post by: Sector11 on January 15, 2013, 08:21:32 PM
I have to thank you too falldown.

I'm going to grab that and take it apart with toothpicks, then I'll grab my MIL's Singer and stitch it back together.  Who know, it might work!
Title: Re: Lua codes and screenshots.
Post by: falldown on January 15, 2013, 08:34:23 PM
 :D Load it just as you would v9000.
Title: Re: Lua codes and screenshots.
Post by: jedi on January 15, 2013, 08:35:18 PM
Quote from: Sector11 on January 15, 2013, 08:21:32 PM
I have to thank you too falldown.

I'm going to grab that and take it apart with toothpicks, then I'll grab my MIL's Singer and stitch it back together.  Who know, it might work!
And once Sector11 is done sewing, I'll try it on to see if fits me as well.  Love *borrowing* from you guys!!!
Title: Re: Lua codes and screenshots.
Post by: Sector11 on January 15, 2013, 08:40:06 PM
Quote from: falldown on January 15, 2013, 08:34:23 PM
:D Load it just as you would v9000.

Of course, that's a given.  Except that last part will not work for me outside of the US.

Then I have to tweak this, touch that, snip snip - a stitch here and there ...
WHY!
.. just because!   ;D
Title: Re: Lua codes and screenshots.
Post by: falldown on January 15, 2013, 08:45:19 PM
Snip away
Title: Re: Lua codes and screenshots.
Post by: Sector11 on January 15, 2013, 10:34:35 PM
@ falldown

Quick question the ~/.v9000_config.lua script, did you make any changes that are "required" by this setup?

Too bad the bash 'fold' function wouldn't work with LUA.
Title: Re: Im Batman!
Post by: jst_joe on January 15, 2013, 11:35:24 PM
And all this time I thought you were from Monrovia.  :o
Title: Re: Im Batman!
Post by: jedi on January 16, 2013, 01:20:56 AM
OK, if your Batman, then I'm 'Doubting Thomas'!!!  ;D
Title: Re: Lua codes and screenshots.
Post by: falldown on January 16, 2013, 02:22:25 AM
I don't believe that I changed anything to fit this particular setup S11
Title: Re: Lua codes and screenshots.
Post by: jedi on January 16, 2013, 03:44:10 AM
Lua rulez!!!
Title: Re: Lua codes and screenshots.
Post by: falldown on January 16, 2013, 03:51:12 AM
I agree.
yea it takes more code.. and yes it can be complicated, but it rules!!
Title: Re: Im Batman!
Post by: lwfitz on January 16, 2013, 04:55:16 AM
Quote from: jst_joe on January 15, 2013, 11:35:24 PM
And all this time I thought you were from Monrovia.  :o


Monrovia is code for Gotham! Didnt you know?


HAHA Jed!
Title: New Look New Wall!!!
Post by: jedi on January 16, 2013, 10:01:05 AM
Knocked this together this am.  Wall thanks to Falldown, and Sector11.  Weather courtesy of Arclance.  Mail thanks to VO.  :)

(http://en.zimagez.com/miniature/desktop310.png) (http://en.zimagez.com/zimage/desktop310.php)

With the Greatest band in history playing on GMB with VastOne's Layouts;

(http://en.zimagez.com/miniature/desktop410.png) (http://en.zimagez.com/zimage/desktop410.php)
Title: Re: New Look New Wall!!!
Post by: VastOne on January 16, 2013, 03:32:00 PM
Incredible layout and theme jedi!  Very nice ...  8)
Title: Re: New Look New Wall!!!
Post by: Sector11 on January 17, 2013, 08:52:08 PM
Yes, Jed .... awesome!
Title: Re: New Look New Wall!!!
Post by: jedi on January 17, 2013, 09:43:00 PM
Thanks guys.  More 'borrowed' stuff from the artists at VSIDO!!!
Title: Re: Lua codes and screenshots.
Post by: lwfitz on January 18, 2013, 03:08:34 AM
Hey falldown any idea what is causing two wind advisory's to show?

(http://ompldr.org/taDRiYw) (http://ompldr.org/vaDRiYw)

I didnt change anything except the location from the intellicast site


EDIT:

Disregard my lua noobieness (is that a word?) I figured it out
Title: Re: Lua codes and screenshots.
Post by: falldown on January 18, 2013, 03:31:16 AM
I am not sure.. The Intellicast show multiple advisories here.. for stagnant air conditions. 
I will dig deeper into. 

I think that is a word..  :D
Title: Re: Lua codes and screenshots.
Post by: lwfitz on January 18, 2013, 03:41:55 AM
Quote from: falldown on January 18, 2013, 03:31:16 AM
I am not sure.. The Intellicast show multiple advisories here.. for stagnant air conditions. 
I will dig deeper into. 

I think that is a word..  :D

Haha if its not a real word it should be!


So now I really do have a question........

subtab={
{d="start",x=5.5,y=10.5},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=200,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=125},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-200,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=5,gan=65,x=5,y=10,w=200,h=125,grad={{c=0x000000,a=1,p=0},{c=0x000000,a=1,p=1}},lw=1,sub=1,db=0,subtab=subtab})

subtab={
{d="start",x=5,y=10},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=200,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=125},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-200,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=5,gan=80,x=5,y=10,w=200,h=125,grad={{c=0x000000,a=0.35,p=0.0},{c=0xffffff,a=0.35,p=0.71},{c=0xffffff,a=0.35,p=0.73},{c=0xffffff,a=0.35,p=0.75},{c=0x000000,a=0.0,p=1}},lw=1,sub=1,db=0,subtab=subtab})


Is the background for the memory portion. Is this also where I change the size of that section? Like I wasnt to extend that background all the way down to my cpu area. Am I explaining good enough?
Title: Re: Lua codes and screenshots.
Post by: falldown on January 18, 2013, 03:52:34 AM
Yes.. correct.
The first
{d="arc_c",q=4,r=10,degs=90},
is the top left corner of that box.

Also
subtab={
{d="start",x=5.5,y=10.5},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=200,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=125},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-200,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=5,gan=65,x=5,y=10,w=200,h=125,grad={{c=0x000000,a=1,p=0},{c=0x000000,a=1,p=1}},lw=1,sub=1,db=0,subtab=subtab})

This is the base solid background and the following
subtab={
{d="start",x=5,y=10},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=200,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=125},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-200,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=5,gan=80,x=5,y=10,w=200,h=125,grad={{c=0x000000,a=0.35,p=0.0},{c=0xffffff,a=0.35,p=0.71},{c=0xffffff,a=0.35,p=0.73},{c=0xffffff,a=0.35,p=0.75},{c=0x000000,a=0.0,p=1}},lw=1,sub=1,db=0,subtab=subtab})

is the gradient overlay.

The bargraph.lua explains the different g=(gradients) you can use.
Title: Re: Lua codes and screenshots.
Post by: lwfitz on January 18, 2013, 04:04:58 AM
^ Thanks buddy
Title: Re: Lua codes and screenshots.
Post by: falldown on January 18, 2013, 04:09:20 AM
Anytime!!  :)
Title: Re: Lua codes and screenshots.
Post by: jedi on January 18, 2013, 07:01:04 AM
Falldown - Got it working awesome first try!  Awesome conky!  Couple questions.  In a post here on VSIDO, I saw a scrot of this conky on your desktop with a shadow underneath.  How do I get the shadow?  It looked great!  Next question, could I have the last.fm .png file your using?  It would make my life easier as I'm artistically challenged and have to st*** I mean *borrow* all my creativity from you guys!  It is a great conky!  :-\
Title: Re: Conky Codes and Images
Post by: incognito on January 18, 2013, 07:15:41 AM
I see a lot of amazing work here.  I have a couple of questions

Do all of you use VSIDO who has posted here?  If so, was there anything else you need to install to run these configurations you are posting? I do not have much experience with Conky but I think I can learn by trying as long as cut copy and paste works and I can get some help if I need it

Thanks
Title: Re: Conky Codes and Images
Post by: jedi on January 18, 2013, 07:38:13 AM
Quote from: incognito on January 18, 2013, 07:15:41 AM
I see a lot of amazing work here.  I have a couple of questions

Do all of you use VSIDO who has posted here?  If so, was there anything else you need to install to run these configurations you are posting? I do not have much experience with Conky but I think I can learn by trying as long as cut copy and paste works and I can get some help if I need it

Thanks
Hello incognito and welcome to VSIDO!  I can't speak for "everyone", but I'd have to say that 99.999% of the users here use VSIDO!  Conky comes with VSIDO by default as does Tint2 which you may have seen on some of the configs in the form of panels and or icons.  In order to get and install VSIDO, just follow the instructions in the VSIDO Download link at the top of the page.  We'd be glad to have you...
It is a really great Linux distribution!
Jed
Title: Re: Conky Codes and Images
Post by: Sector11 on January 18, 2013, 12:13:37 PM
Made a change to one of my desktop 2 conkys.  And wanted to stop the crying - I admit it, I like Batman

(http://t.imgbox.com/ache4YPA.jpg) (http://imgbox.com/ache4YPA)
although I did make him:  VSIDO Batman

The Conky - no longer just a Disk Activity conky, must change name.
# killall conky && conky -c /media/5/Conky/S11_Disk_Activity.conky &
###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
own_window_class Conky
own_window_title Disk Activity

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type override
# own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#own_window_argb_value 150

minimum_size 270 0 #225 ## width, height
maximum_width 270 ## width, usually a good idea to equal minimum width

gap_x 10 ### left &right
gap_y 10 ### up & down

alignment tl
####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont monofur:bold:size=12
#xftfont WenQuanYi Micro Hei Mono:size=8

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes

draw_shades no #### <<<<<<------------------To see it easier on light screens.
#default_shade_color black

draw_outline no #### <<<<<<---------------- Amplifies text if yes
default_outline_color black

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
default_shade_color gray
default_outline_color black

default_color DCDCDC #Gainsboro
color0 ffe595 #Teo Gold
color1 778899 #LightSlateGrey
color2 FF8C00 #Darkorange
color3 7FFF00 #Chartreuse
color4 FFA07A #LightSalmon
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 00FFFF #Cyan #48D1CC #MediumTurquoise
color8 FFFF00 #Yellow
color9 FF0000 #Red  #A52A2A #DarkRed
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes #no
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################

# Boolean value, if true, Conky will be forked to background when started.
background no

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 256

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

## default bar size
default_bar_size 200 20

## Specify a default width and height for graphs.
## Example: 'default_graph_size 0 25'. This is particularly useful for execgraph
## and execigraph as they do not take size arguments
## default_graph_size 220 100

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load /media/5/Conky/LUA/dra2w-bg.lua
#TEXT
#${lua conky_draw_bg 10 0 0 0 0 0x000000 0.6}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
lua_load /media/5/Conky/LUA/draw-bg.lua
lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.5
### mount.lua ##################################################################
#
##instructions
##load script
##lua_load ~/path_to/mounted.lua
#lua_load /media/5/Conky/LUA/mounted.lua
## first lua command below text:
## ${lua get_mounted_data interval}, where interval is a number.  This starts data gathering
## to get output:
## ${lua mount partition_number data_type}, where partition number is a number
## data_type can be
## total - shows total number of partitions mounted, requires a partition_number also, use 1, could be used in an if_match
## fsys - shows filesystem
## size - shows space used in appropriate units
## free - shows free space in appropriate units
## use% - shows % used
## mount - shows mountpoint
#######################################################  End LUA Settings  ###

#digiThe all important - How often conky refreshes.
# If you have a "Crey" try: 0.2 - smokin' - but watch the CPU useage go UP!
update_interval 1 # in seconds

# stuff after 'TEXT' will be formatted on screen
TEXT
${color3}${alignc}${time %A %d %B %Y}
${color5}${time %T}${alignr 15}${uptime_short}

${alignc}${color3}Hosted by: ${color5}${nodename}
${alignc}${color}${kernel}

${color3} Disk Activity
${goto 10}${diskiograph 50,250 FF0000 0000FF -t -l}${goto 10}${color0}${cpubar cpu4 50,250}${color}\
${voffset -35}${goto 80}SDA: R: ${diskio_read /dev/sda}
${goto 80}     W: ${diskio_write /dev/sda}
${voffset 5}${goto 60}${color1}${fs_bar /}${goto 60}${color0}${cpubar cpu4}${color}
${voffset -30}/Root   ${fs_size /}${goto 170}Used${goto 220}${fs_used_perc /}%
${goto 60}${color1}${fs_bar_free /}${goto 60}${color0}${cpubar cpu4}${color}
${voffset -30}${goto 170}Free${goto 220}${fs_free_perc /}%
${goto 60}${color1}${fs_bar /home}${goto 60}${color0}${cpubar cpu4}${color}
${voffset -30}/Home   ${fs_size /home}${goto 170}Used${goto 220}${fs_used_perc /home}%
${goto 60}${color1}${fs_bar_free /home}${goto 60}${color0}${cpubar cpu4}${color}
${voffset -30}${goto 170}Free${goto 220}${fs_free_perc /home}%
${goto 60}${color1}${fs_bar /media/5}${goto 60}${color0}${cpubar cpu4}${color}
${voffset -30} /M/5   ${fs_size /media/5}${goto 170}Used${goto 220}${fs_used_perc /media/5}%
${goto 60}${color1}${fs_bar_free /media/5}${goto 60}${color0}${cpubar cpu4}${color}
${voffset -30}${goto 170}Free${goto 220}${fs_free_perc /media/5}%
${color6}${hr}
${color3}CPU Frequency:${alignr 10}${color}${freq_g}Ghz

${goto 10}${color5}CPU1\
${voffset -8}${goto 60}${color1}${cpubar cpu1}${color5}${goto 60}${cpugraph cpu1 -t 20,200 FF0000 FFFF00}\
${voffset -12}${goto 70}${color}${if_match ${cpu cpu1}<10}  ${cpu cpu1}\
${else}${if_match ${cpu cpu1}<100} ${cpu cpu1}\
${else}${cpu cpu1}${endif}${endif}%

${goto 10}${color5}CPU2\
${voffset -8}${goto 60}${color1}${cpubar cpu2}${color5}${goto 60}${cpugraph cpu2 -t 20,200 FF0000 FFFF00}\
${voffset -12}${goto 70}${color}${if_match ${cpu cpu2}<10}  ${cpu cpu2}\
${else}${if_match ${cpu cpu2}<100} ${cpu cpu2}\
${else}${cpu cpu2}${endif}${endif}%

${goto 10}${color5}CPU3\
${voffset -8}${goto 60}${color1}${cpubar cpu3}${color5}${goto 60}${cpugraph cpu3 -t 20,200 FF0000 FFFF00}\
${voffset -12}${goto 70}${color}${if_match ${cpu cpu3}<10}  ${cpu cpu3}\
${else}${if_match ${cpu cpu3}<100} ${cpu cpu3}\
${else}${cpu cpu3}${endif}${endif}%

${goto 10}${color5}CPU0\
${voffset -8}${goto 60}${color1}${cpubar cpu0}${color5}${goto 60}${cpugraph cpu0 -t 20,200 FF0000 FFFF00}\
${voffset -12}${goto 70}${color}${if_match ${cpu cpu0}<10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0}<100} ${cpu cpu0}\
${else}${cpu cpu0}${endif}${endif}%

${color3}RAM: ${color5}${mem}${color3}/${color5}${memmax}${alignr 5}${color3}Swap: ${color5}${swap}${color3}/${color5}${swapmax}
${color3}SDA: ${color7}Read: ${color5}${diskio_read /dev/sda}${goto 160}${color7}Write: ${color5}${diskio_write /dev/sda}
${alignc}${color3}Network speeds for eth0
${color7}Down:${goto 60}${color5}${downspeedf eth0}${goto 125}${color7}Up:${goto 160}${color5}${upspeedf eth0}
${color6}${hr}${color}
Title: Re: Conky Codes and Images
Post by: Sector11 on January 18, 2013, 12:21:39 PM
Welcome incognito

I agree with Jed. And would like to add that it is not a requirement to be using VSIDO to even use our forum.  Stick around we'll grow on you.

Most distros today come with a default conky out of the box.  VSIDO is no different, however a few of us here are addicted to conky - and loving it.
Title: Re: Im Batman!
Post by: Sector11 on January 18, 2013, 12:24:33 PM
Heeeerrrrrrrreeeeeees VSIDO Batman
(http://t.imgbox.com/ache4YPA.jpg) (http://imgbox.com/ache4YPA)
Title: Re: Im Batman!
Post by: lwfitz on January 18, 2013, 03:13:46 PM
Quote from: Sector11 on January 18, 2013, 12:24:33 PM
Heeeerrrrrrrreeeeeees VSIDO Batman
(http://t.imgbox.com/ache4YPA.jpg) (http://imgbox.com/ache4YPA)


??? ??? That looks awesome Sector11! WOW!
Title: Re: Im Batman!
Post by: Sector11 on January 18, 2013, 05:50:54 PM
Quote from: lwfitz on January 18, 2013, 03:13:46 PM
??? ??? That looks awesome Sector11! WOW!

And his first villain - The Washer!
some guy running around in his underwear  pimping car washes!
Title: Re: Lua codes and screenshots.
Post by: falldown on January 18, 2013, 07:01:47 PM
Sure can Jed. I will post the new design (with shadow) and last fm logo in a few moments.
Title: Re: Lua codes and screenshots.
Post by: falldown on January 18, 2013, 07:17:28 PM
For the new conky.
All files remain the same.. with the exception of the
config.lua
--DISPLAY FUNCTION--DISPLAY FUNCTION--DISPLAY FUNCTION--DISPLAY FUNCTION-
_G.weather_script = function()--#### DO NOT EDIT THIS LINE ##############
--#######################################################################
--## CALL bargraph.lua ##################################################
function conky_main()
     conky_main_bars()
end
--#######################################################################
--these tables hold the coordinates for each repeat do not edit #########
top_left_x_coordinate={}--###############################################
top_left_y_coordinate={}--###############################################
--#######################################################################
--SET DEFAULTS ##########################################################
--set defaults do not localise these defaults if you use a seperate display script
default_font="LaudatioC"--font must be in quotes
default_font_size=12
default_color=0xffffff--white
default_alpha=1--fully opaque
default_image_width=50
default_image_height=50
--END OF DEFAULTS #######################################################
--START OF WEATHER CODE -- START OF WEATHER CODE -- START OF WEATHER CODE
--#######################################################################
--background start#######################################################

subtab={
{d="start",x=10.5,y=15.5},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=203,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=727},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-203,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=2,x=5,y=10,w=210,h=727,grad={{c=0x000000,a=1,p=0},{c=0x000000,a=0.4,p=1}},lw=1,sub=1,db=0,subtab=subtab})

subtab={
{d="start",x=5.5,y=10.5},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=200,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=725},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-200,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=5,gan=65,x=5,y=10,w=200,h=125,grad={{c=0x000000,a=1,p=0},{c=0x000000,a=1,p=1}},lw=1,sub=1,db=0,subtab=subtab})

subtab={
{d="start",x=30,y=0},
--{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=185,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=725},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-185,y=0},
--{d="arc_c",q=3,r=10,degs=90},
}
grec({g=5,gan=80,x=30,y=0,w=195,h=745,grad={{c=0x000000,a=0,p=0.0},{c=0xffffff,a=0.20,p=0.5},{c=0x000000,a=0,p=1}},lw=1,sub=1,db=0,subtab=subtab})

subtab={
{d="start",x=5,y=10},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=15,y=0},
--{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=745},
--{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-15,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=2,x=5,y=0,w=25,h=745,grad={{c=0xffffff,a=0.2,p=0},{c=0xffffff,a=0.3,p=0.7}},lw=1,sub=1,db=0,subtab=subtab})

--######################################################################

subtab={
{d="start",x=10,y=200},
{d="rline",x=180,y=0},
{d="rline",x=0,y=1.5},
{d="rline",x=-180,y=0},
}
grec({g=2,x=5,y=155,w=200,h=90,grad={{c=0x000000,a=0,p=0.0},{c=0xffffff,a=1,p=0.5},{c=0x000000,a=0.4,p=1}},lw=1,sub=1,db=0,subtab=subtab})

--######################################################################

subtab={
{d="start",x=10,y=297},
{d="rline",x=180,y=0},
{d="rline",x=0,y=1.5},
{d="rline",x=-180,y=0},
}
grec({g=2,x=5,y=155,w=200,h=90,grad={{c=0x000000,a=0,p=0.0},{c=0xffffff,a=1,p=0.5},{c=0x000000,a=0.4,p=1}},lw=1,sub=1,db=0,subtab=subtab})

--######################################################################

subtab={
{d="start",x=10,y=397},
{d="rline",x=180,y=0},
{d="rline",x=0,y=1.5},
{d="rline",x=-180,y=0},
}
grec({g=2,x=5,y=155,w=200,h=90,grad={{c=0x000000,a=0,p=0.0},{c=0xffffff,a=1,p=0.5},{c=0x000000,a=0.4,p=1}},lw=1,sub=1,db=0,subtab=subtab})

--######################################################################

subtab={
{d="start",x=10,y=497},
{d="rline",x=180,y=0},
{d="rline",x=0,y=1.5},
{d="rline",x=-180,y=0},
}
grec({g=2,x=5,y=155,w=200,h=90,grad={{c=0x000000,a=0,p=0.0},{c=0xffffff,a=1,p=0.5},{c=0x000000,a=0.4,p=1}},lw=1,sub=1,db=0,subtab=subtab})

--######################################################################

subtab={
{d="start",x=10,y=597},
{d="rline",x=180,y=0},
{d="rline",x=0,y=1.5},
{d="rline",x=-180,y=0},
}
grec({g=2,x=5,y=155,w=200,h=90,grad={{c=0x000000,a=0,p=0.0},{c=0xffffff,a=1,p=0.5},{c=0x000000,a=0.4,p=1}},lw=1,sub=1,db=0,subtab=subtab})

--######################################################################

subtab={
{d="start",x=10,y=697},
{d="rline",x=180,y=0},
{d="rline",x=0,y=1.5},
{d="rline",x=-180,y=0},
}
grec({g=2,x=5,y=155,w=200,h=90,grad={{c=0x000000,a=0,p=0.0},{c=0xffffff,a=1,p=0.5},{c=0x000000,a=0.4,p=1}},lw=1,sub=1,db=0,subtab=subtab})

--Background setup end ##################################################
--#######################################################################
--Config start###########################################################

starty=15
gap=15
ypos=0
ypos=starty+ypos
out({c=0xACACAC,a=1,f="LaudatioC",fs=18,x=60,y=ypos+4,txt=conky_parse"${sysname}/debian"})
ypos=gap+ypos
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=10,y=ypos+6,txt=conky_parse"${kernel}"})
image({x=145,y=37,h=75,w=75,file="/home/falldown/images/vsido-logo-rev4.png"})

--data titles
ypos=gap+ypos
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=10,y=ypos+10,txt="uptime:"})
ypos=gap+ypos
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=10,y=ypos+50,txt="MEM:"})
ypos=gap+ypos
ypos=0
ypos=starty+gap+gap+ypos
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=65,y=ypos+10,txt=conky_parse"${uptime}"})
ypos=gap+ypos

--## MEM BARGRAPH #########################################################

num=tonumber(conky_parse("${memperc}"))
--num=100--hard code num to see gradient on full bar
local num_max=100
local bar_ht=12
local crd=0--corner rad
local tht=bar_ht+(2*crd)--total length
local bar_wd=202--length of flat bar top/bottom
local twd=bar_wd+(2*crd)
local tlx=15--top left corner x
local tly=103--top left corner y
local bar=(bar_wd/num_max)*num

--gradient indicator
subtab={
{d="start",x=tlx+crd,y=tly+tht},
{d="rline",x=0,y=bar_ht},
{d="rline",x=200,y=0},
{d="rline",x=0,y=-bar_ht},
}
grec({g=2,x=tlx,y=tly,w=bar+(2*crd),h=tht,grad={{c=0x000000,a=0,p=0},{c=0xffffff,a=1,p=0.94},{c=0xffffff,a=1,p=0.99},{c=0x000000,a=0,p=1}},sub=1,db=0,subtab=subtab})

--######################################################################
--MEM SECTION
ypos=gap+ypos
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=65,y=ypos+66,txt=conky_parse"${mem}/${memmax}"})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=65,y=ypos+35,txt=conky_parse"${memperc}%"})
ypos=gap+ypos

--CPU SECTION
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=10,y=ypos+80,txt="CPU1:"})
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=130,y=ypos+80,txt="TEMP:"})
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=10,y=ypos+132,txt="CPU2:"})
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=130,y=ypos+132,txt="TEMP:"})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=170,y=ypos+80,txt=conky_parse"${hwmon 1 temp 2}°C"})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=50,y=ypos+80,txt=conky_parse"${cpu cpu1}%"})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=170,y=ypos+132,txt=conky_parse"${hwmon 1 temp 3}°C"})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=50,y=ypos+132,txt=conky_parse"${cpu cpu2}%"})
--CPU BARGRAPH ########################################################

num=tonumber(conky_parse("${cpu cpu1}"))
--num=100--hard code num to see gradient on full bar
local num_max=100
local bar_ht=12
local crd=0--corner rad
local tht=bar_ht+(2*crd)--total length
local bar_wd=202--length of flat bar top/bottom
local twd=bar_wd+(2*crd)
local tlx=15--top left corner x
local tly=163--top left corner y
local bar=(bar_wd/num_max)*num

--gradient indicator
subtab={
{d="start",x=tlx+crd,y=tly+tht},
{d="rline",x=0,y=bar_ht},
{d="rline",x=200,y=0},
{d="rline",x=0,y=-bar_ht},
}
grec({g=2,x=tlx,y=tly,w=bar+(2*crd),h=tht,grad={{c=0x000000,a=0,p=0},{c=0xffffff,a=1,p=0.94},{c=0xffffff,a=1,p=0.99},{c=0x000000,a=0,p=1}},sub=1,db=0,subtab=subtab})

num=tonumber(conky_parse("${cpu cpu2}"))
--num=100--hard code num to see gradient on full bar
local num_max=100
local bar_ht=12
local crd=0--corner rad
local tht=bar_ht+(2*crd)--total length
local bar_wd=202--length of flat bar top/bottom
local twd=bar_wd+(2*crd)
local tlx=15--top left corner x
local tly=215--top left corner y
local bar=(bar_wd/num_max)*num

--gradient indicator
subtab={
{d="start",x=tlx+crd,y=tly+tht},
{d="rline",x=0,y=bar_ht},
{d="rline",x=200,y=0},
{d="rline",x=0,y=-bar_ht},
}
grec({g=2,x=tlx,y=tly,w=bar+(2*crd),h=tht,grad={{c=0x000000,a=0,p=0},{c=0xffffff,a=1,p=0.94},{c=0xffffff,a=1,p=0.99},{c=0x000000,a=0,p=1}},sub=1,db=0,subtab=subtab})

--######################################################################
--Net SECTION
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=10,y=ypos+180,txt="NET UP:"})
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=10,y=ypos+233,txt="NET DOWN:"})
--out({c=0xffffff,a=1,f="LaudatioC",fs=14,x=260,y=ypos+180,txt=conky_parse"${memperc}%"})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=60,y=ypos+180,txt=conky_parse"${upspeed}"})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=85,y=ypos+233,txt=conky_parse"${downspeed}"})

--NET BARGRAPH##########################################################
num=tonumber(conky_parse("${upspeedf}"))
--num=100--hard code num to see gradient on full bar
local num_max=100
local bar_ht=12
local crd=0--corner rad
local tht=bar_ht+(2*crd)--total length
local bar_wd=202--length of flat bar top/bottom
local twd=bar_wd+(2*crd)
local tlx=15--top left corner x
local tly=263--top left corner y
local bar=(bar_wd/num_max)*num

--gradient indicator
subtab={
{d="start",x=tlx+crd,y=tly+tht},
{d="rline",x=0,y=bar_ht},
{d="rline",x=200,y=0},
{d="rline",x=0,y=-bar_ht},
}
grec({g=2,x=tlx,y=tly,w=bar+(2*crd),h=tht,grad={{c=0x000000,a=0,p=0},{c=0xffffff,a=1,p=0.94},{c=0xffffff,a=1,p=0.99},{c=0x000000,a=0,p=1}},sub=1,db=0,subtab=subtab})

num=tonumber(conky_parse("${downspeedf}"))
--num=100--hard code num to see gradient on full bar
local num_max=100
local bar_ht=12
local crd=0--corner rad
local tht=bar_ht+(2*crd)--total length
local bar_wd=202--length of flat bar top/bottom
local twd=bar_wd+(2*crd)
local tlx=15--top left corner x
local tly=317--top left corner y
local bar=(bar_wd/num_max)*num

--gradient indicator
subtab={
{d="start",x=tlx+crd,y=tly+tht},
{d="rline",x=0,y=bar_ht},
{d="rline",x=200,y=0},
{d="rline",x=0,y=-bar_ht},
}
grec({g=2,x=tlx,y=tly,w=bar+(2*crd),h=tht,grad={{c=0x000000,a=0,p=0},{c=0xffffff,a=1,p=0.94},{c=0xffffff,a=1,p=0.99},{c=0x000000,a=0,p=1}},sub=1,db=0,subtab=subtab})

--######################################################################
--Last fm SECTION
image({x=45,y=655,h=48,w=125,file="/home/falldown/v9000/Lastfm/logo1.png"})
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=75,y=ypos+620,txt="PLAYING"})
out({c=0xffffff,a=1,f="LaudatioC",fs=10,x=10,y=ypos+640,txt=conky_parse"${rss http://ws.audioscrobbler.com/1.0/user/chris-falldown/recenttracks.rss 1 item_titles 1 }"})
--######################################################################
--Time and Date SECTION
out({c=0xffffff,a=1,f="LaudatioC",fs=24,x=55,y=ypos+340,txt=conky_parse"${time %I:%M:%S}"})
out({c=0xACACAC,a=1,f="LaudatioC",fs=24,x=25,y=ypos+295,txt=conky_parse"${time %B %d %Y}"})
--######################################################################
--Weather SECTION
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=35,y=ypos+377,txt=weather_location})
image({x=170,y=475,h=50,w=50,file=now["weather_icon"]})
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=10,y=ypos+390,txt="Conditions:"})
out({c=0xffffff,a=1,f="LaudatioC",fs=14,x=75,y=ypos+390,txt=now["conditions_short"]})
image({x=10,y=498,h=45,w=45,file=now["wind_icon"]})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=55,y=ypos+450,txt=now["wind_mph"]})
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=30,y=ypos+405,txt="Temperature:"})
out({c=0xffffff,a=1,f="LaudatioC",fs=14,x=112,y=ypos+405,txt=now["temp"].."°F"})
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=65,y=ypos+420,txt="Feels Like:"})
out({c=0xffffff,a=1,f="LaudatioC",fs=14,x=130,y=ypos+421,txt=now["temp"].."°F"})
--out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=440,y=ypos-10,txt="Weather for "})
--######################################################################
--NEXT 3 HOUR SECTION
out({c=0xACACAC,a=1,f="LaudatioC",fs=12,x=60,y=567,txt="NEXT 3 HOURS"})
image({w=30,h=30,x=40,y=570,file=now["fc_hour1_wicon"]})--good
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=10,y=584,txt=now["fc_hour1_time"].." "..now["fc_hour1_ampm"]})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=10,y=595,txt=now["fc_hour1_temp"].."°F"})

image({w=30,h=30,x=115,y=570,file=now["fc_hour2_wicon"]})--good
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=85,y=584,txt=now["fc_hour2_time"].." "..now["fc_hour2_ampm"]})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=85,y=595,txt=now["fc_hour2_temp"].."°F"})

image({w=30,h=30,x=185,y=570,file=now["fc_hour3_wicon"]})--good
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=155,y=584,txt=now["fc_hour3_time"].." "..now["fc_hour3_ampm"]})
out({c=0xffffff,a=1,f="LaudatioC",fs=12,x=155,y=595,txt=now["fc_hour3_temp"].."°F"})

--ALERTS SECTION
--show alert icon
image({x=5,y=600,h=22,w=22,file=alert_icon})
--show number of alerts
out({x=24,y=618,fs=22,txt=alert_number})
--display alert information
display_alerts=2--set number of alerts to show,set 0 to show all
top_left_alert_x=40--set top left coordinates for entire alerts section
top_left_alert_y=610--^alerts will display in a single column
alert_gap=15--sets the gap between the TOP of one alert and the Top of the next alert
--#######################################################################################################################################
if alert_number==0 then noal=1 elseif alert_number~=0 and display_alerts>alert_number then noal=alert_number else noal=display_alerts end
for i=1,noal do--start of alerts display section. do not edit ###########################################################################
local tlx=top_left_alert_x--write output relative to tlx #################################
local tly=top_left_alert_y+((i-1)*alert_gap)--write output relative to tlx ###############
--########################################################################################
out({c=0xffffff,a=1,f="LaudatioC",fs=10,x=tlx,y=tly,txt=alert_type[i]})
--out({c=0xffffff,a=1,f="LaudatioC",fs=10,x=tlx,y=tly+15,txt=alert_issued[i]})
--########################################################################################
end--of alert display section ############################################################
--########################################################################################

--#######################################################################
--END OF CODE ----END OF CODE ----END OF CODE ---
--#######################################################################
end--of function do not edit this line ##################################
--#######################################################################


Which will give you this..
(http://s7.postimage.org/7ex7368tj/Screenshot_01172013_04_27_10_PM.jpg) (http://postimage.org/image/7ex7368tj/)
and here is the last fm logo..
http://dl.dropbox.com/u/60081679/Lastfm.tar.gz (http://dl.dropbox.com/u/60081679/Lastfm.tar.gz)
Title: Re: Lua codes and screenshots.
Post by: jedi on January 18, 2013, 07:50:33 PM
Thanks falldown!  Awesome stuff!!!
Title: Re: Lua codes and screenshots.
Post by: falldown on January 18, 2013, 07:54:47 PM
Thank you and you are welcome.  :)
Title: Re: Conky Codes and Images
Post by: falldown on January 18, 2013, 10:58:17 PM
S11 what would you say are a set of "Generic" system info commands for conky that would work with every install?

So far I am thinking
nodename
system
kernel
cpu cpu0 %
memperc %
upspeedf / downspeedf
totalup / totaldown

I am wanting to create a template (very simple) for Peachy's interactive conky.
Title: Re: Lua codes and screenshots.
Post by: jedi on January 18, 2013, 11:11:10 PM
OK, love the shadow effect.  It is beyond the scope of mental capacities however to figure out how you got the light grey strip on the left of the conky.  I'd rather it not be there on mine.  (picky picky picky)  Is there an easy way to get rid of it?  Also is there a way to keep the shadow effect and have the conky broken up into boxes like it was originally?

Don't waste a lot of time on this!  I've been known to change Conky's hourly!!!  My problem is when I see that much lua code I start  :'( like a little baby cause it's so far over my head!!!
Title: Re: Lua codes and screenshots.
Post by: falldown on January 18, 2013, 11:29:51 PM
Easy solution Jed.. The top code is all the pretty lua drawing code.

Take this at the top of each set of codes..
subtab={
{d="start",x=10.5,y=15.5},

and make a dramatic change to one of the values.. (how I started learning)
save and it will instantly show you what part you are working with.

The separate boxes..
--######################################################################
--This is the base black box
subtab={
{d="start",x=5.5,y=165.5},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=200,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=70},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-200,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=2,x=5,y=155,w=200,h=90,grad={{c=0x000000,a=1,p=0},{c=0x000000,a=1,p=1}},lw=1,sub=1,db=0,subtab=subtab})
--This is the gradient overlay (transparency)
subtab={
{d="start",x=5,y=165},
{d="arc_c",q=4,r=10,degs=90},
{d="rline",x=200,y=0},
{d="arc_c",q=1,r=10,degs=90},
{d="rline",x=0,y=70},
{d="arc_c",q=2,r=10,degs=90},
{d="rline",x=-200,y=0},
{d="arc_c",q=3,r=10,degs=90},
}
grec({g=5,gan=80,x=5,y=155,w=200,h=90,grad={{c=0x000000,a=0.3,p=0.0},{c=0xffffff,a=0.35,p=0.67},{c=0xffffff,a=0.35,p=0.69},{c=0xffffff,a=0.35,p=0.71},{c=0x000000,a=0.2,p=1}},lw=1,sub=1,db=0,subtab=subtab})
--this is the white separator
subtab={
{d="start",x=10,y=200},
{d="rline",x=180,y=0},
{d="rline",x=0,y=1.5},
{d="rline",x=-180,y=0},
}
grec({g=2,x=5,y=155,w=200,h=90,grad={{c=0x000000,a=0.4,p=0.0},{c=0xffffff,a=1,p=0.5},{c=0x000000,a=0.4,p=1}},lw=1,sub=1,db=0,subtab=subtab})

--######################################################################

I labeled above code to help out.
Just copy the base black box and paste it above the original one.
offset it by adding 5 to 10 to the x and y.
change the alpha (a=) to a 0.1-9 .
Title: Re: Conky Codes and Images
Post by: Sector11 on January 18, 2013, 11:37:07 PM
^ Not as easy as that ... up/down speed - eth0,1 wlan0, 1 ??
same as total up/down ..

Not on my system ... will come back later.  I have a fairly generic one that might just foot the bill.
Title: Interactive conky
Post by: falldown on January 19, 2013, 01:32:33 AM
Working on a template for another one of MrPeachy's amazing scripts..
(http://s7.postimage.org/i3s1n68ef/2013_01_18_1358558763_1440x900_scrot.jpg) (http://postimage.org/image/i3s1n68ef/)
This is how the conky will look with the info windows closed.
I just started this so this is what I have completed.

More to come.  ;D
Title: Re: Interactive conky
Post by: jedi on January 19, 2013, 02:00:00 AM
Quote from: falldown on January 19, 2013, 01:32:33 AM
Working on a template for another one of MrPeachy's amazing scripts..
(http://s7.postimage.org/i3s1n68ef/2013_01_18_1358558763_1440x900_scrot.jpg) (http://postimage.org/image/i3s1n68ef/)
This is how the conky will look with the info windows closed.
I just started this so this is what I have completed.

More to come.  ;D
Wringing my hands in anticipation!!!
Title: Re: Interactive conky
Post by: mrpeachy on January 19, 2013, 03:22:02 AM
Howdy Falldown!

Good to see you working on a new project, i'm sure it will be worth the wait

as for me... no time for conky or lua these days :(

Title: Re: Interactive conky
Post by: VastOne on January 19, 2013, 03:26:52 AM
Great to see you here mrpeachy!

Hopefully your schedule can lighten up some in the future..

Cheers!
Title: Re: Im Batman!
Post by: mrpeachy on January 19, 2013, 03:43:40 AM
Good day Sector11!
Title: Re: Interactive conky
Post by: mrpeachy on January 19, 2013, 03:44:24 AM
Thanks VastOne... probably not till the end of the semester!
Title: Re: Im Batman!
Post by: Sector11 on January 19, 2013, 03:52:11 AM
Quote from: mrpeachy on January 19, 2013, 03:43:40 AM
Good day Sector11!

And a good day to you mrpeachy.  Welcome to VSIDO and our little Conky "sub forum"
Really good to see you here.
Title: Re: Im Batman!
Post by: jedi on January 19, 2013, 05:38:40 AM
Quote from: mrpeachy on January 19, 2013, 03:43:40 AM
Good day Sector11!
Hey mrpeachy!  Good to see you here!  Sorry I don't have a quick scrot to post...  Conky, Conky, Conky....
Title: Re: Conky Codes and Images
Post by: Sector11 on January 19, 2013, 01:40:23 PM
^ ^ @ falldown OK here's a list ... I don't think there is a single thing in here that isn't generic and the list is probably bigger than you want BUT it's as complete as I can make it.  Your job now to pick and choose:

TEXT
machine
uptime or uptime_short
kernel
nodename
nodename_short
freq
freq_g

time --- in it's various forms ... check out ${time %X} that's excellent for what you want.
- - except my locale isn't here, Argentina, (22:28:56), it's Canada (10:28:26 PM) so I use: ${time %T}   ;D I gotta be different.
${time %T}

Time
====
%H Two digit representation of the hour in 24-hour format 00 through 23
%I Two digit representation of the hour in 12-hour format 01 through 12
%l   (lower-case 'L') Hour in 12-hour format, with a space preceeding single digits 1 through 12
%M Two digit representation of the minute 00 through 59
%p UPPER-CASE 'AM' or 'PM' based on the given time Example: AM for 00:31, PM for 22:23
%P lower-case 'am' or 'pm' based on the given time Example: am for 00:31, pm for 22:23
%r Same as "%I:%M:%S %p" Example: 09:34:17 PM for 21:34:17
%R Same as "%H:%M" Example: 00:35 for 12:35 AM, 16:44 for 4:44 PM
%S Two digit representation of the second 00 through 59
%T Same as "%H:%M:%S" Example: 21:34:17 for 09:34:17 PM
%X Preferred time representation based on locale, without the date Example: 03:59:16 or 15:59:16
%z Either the time zone offset from UTC or the abbreviation (depends on operating system) Example: -0500 or EST for Eastern Time
%Z The time zone offset/abbreviation option NOT given by %z (depends on operating system) Example: -0500 or EST for Eastern Time

Day
===
%a An abbreviated textual representation of the day Sun through Sat
%A A full textual representation of the day Sunday through Saturday
%d Two-digit day of the month (with leading zeros) 01 to 31
%e Day of the month, with a space preceding single digits 1 to 31
%j Day of the year, 3 digits with leading zeros 001 to 366
%u ISO-8601 numeric representation of the day of the week 1 (for Monday) though 7 (for Sunday)
%w Numeric representation of the day of the week 0 (for Sunday) through 6 (for Saturday)

Month
=====
%b Abbreviated month name, based on the locale Jan through Dec
%B Full month name, based on the locale January through December
%h Abbreviated month name, based on the locale (an alias of %b) Jan through Dec
%m Two digit representation of the month (with leading zeros) 01 to 12

Year
====
%y Two digit representation of the year Example: 09 for 2009, 79 for 1979
%Y Four digit representation for the year Example: 2038

Century
=======
%C Two digit representation of the century (year divided by 100, truncated to an integer) 19 for the 20th

Week
====
%g Two digit representation of the year going by ISO-8601:1988 standards (see Week: %V) Example: 09 for the week of January 6, 2009

%G The full four-digit version of %g Example: 2008 for the week of January 3, 2009

%U Week number of the given year, starting with the first Sunday as the first week
13 (for the 13th full week of the year)

%V ISO-8601:1988 week number of the given year, starting with the first week of the year with at least 4 weekdays, with Monday being the start of the week 01 through 53 (where 53 accounts for an overlapping week)

%W A numeric representation of the week of the year, starting with the first Monday as the first week 46 (for the 46th week of the year beginning with a Monday)

Time and Date Stamps
====================
%c Preferred date and time stamp based on local Example: Tue Feb 4 00:45:10 2009 for February 4, 2009 at 12:45:10 AM
%D Same as "%m/%d/%y" Example: 02/05/09 for February 5, 2009
%F Same as "%Y-%m-%d" (commonly used in database datestamps) Example: 2009-02-05 for February 5, 2009
%s Unix Epoch Time timestamp (same as the time() function) Example: 305815200 for September 10, 1979 08:40:00 AM
%x Preferred date representation based on locale, without the time Example: 02/05/09 for February 5, 2009

Miscellaneous
=============
%n A newline character ("\n") ---
%t A Tab character ("\t") ---
%% A literal percentage character ("%") ---


CPU
cpu cpu1 --- two safe bets
cpu cpu0 --- two safe bets

cpubar
cpugauge
cpugraph


desktop
desktop_name
desktop_number

memory
mem
membar
memeasyfree
memfree
memgauge
memgraph
memmax
memperc

swap
swap
swapbar
swapfree
swapmax
swapperc

file system
fs_bar
fs_bar_free
fs_free
fs_free_perc
fs_size
fs_type
fs_used
fs_used_perc

tcp_portmon --- this can be exausting is you wish.
I created a "FireWall Monitor" with this - conky later

tcp_portmon    port_begin port_end item (index)    

TCP port (both IPv6 and IPv4) monitor for specified local ports. Port numbers must be in the range 1 to 65535. Valid items are:

    count - Total number of connections in the range
    rip - Remote ip address
    rhost - Remote host name
    rport - Remote port number
    rservice - Remote service name from /etc/services
    lip - Local ip address
    lhost - Local host name
    lport - Local port number
    lservice - Local service name from /etc/services

The connection index provides you with access to each connection in the port monitor. The monitor will return information for index values from 0 to n-1 connections. Values higher than n-1 are simply ignored. For the "count" item, the connection index must be omitted. It is required for all other items.

Examples:

    ${tcp_portmon 6881 6999 count} - Displays the number of connections in the bittorrent port range
    ${tcp_portmon 22 22 rip 0} - Displays the remote host ip of the first sshd connection
    ${tcp_portmon 22 22 rip 9} - Displays the remote host ip of the tenth sshd connection
    ${tcp_portmon 1 1024 rhost 0} - Displays the remote host name of the first connection on a privileged port
    ${tcp_portmon 1 1024 rport 4} - Displays the remote host port of the fifth connection on a privileged port
    ${tcp_portmon 1 65535 lservice 14} - Displays the local service name of the fifteenth connection in the range of all ports

Note that port monitor variables which share the same port range actually refer to the same monitor, so many references to a single port range for different items and different indexes all use the same monitor internally. In other words, the program avoids creating redundant monitors.


top --- and it's varients

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", "mem", "mem_res",
        "mem_vsize", "time", "uid", "user", "io_perc", "io_read" and "io_write".
        There can be a max of 10 processes listed.


top_io
top_mem
top_time

tztime -> if you want to put various world times

user_names
user_number
user_terms
user_times


Hope that helps more than hinders.
Title: Re: Conky Codes and Images
Post by: falldown on January 19, 2013, 04:50:22 PM
PERFECT S11!!
Exactly what I was looking for.. a complete list and I knew you were the man to ask.  8)
Thank you S11.  :)
Title: Re: Interactive conky
Post by: falldown on January 19, 2013, 04:56:18 PM
Had to refresh the thread a few times to see if that was really you Peachy..
Thanks for coming by and saying Hi!!
Hope life is treating you well Sir.. and look forward to seeing you around.

I have about 6 unfinished interactive conkys now..  :( 
but I will finish them at some point.
Title: Re: Conky Codes and Images
Post by: Sector11 on January 19, 2013, 05:17:14 PM
^ You're welcome.  Looking forward to seeing what your do with it.

Any questions just ask.
Title: Re: Interactive conky
Post by: falldown on January 19, 2013, 06:15:24 PM
Here is the left side in action...
left-side interactive conky.mpeg (http://www.youtube.com/watch?v=umxt4Ed1Kfk#)
Title: Re: Interactive conky
Post by: VastOne on January 19, 2013, 06:59:08 PM
That is just awesome!   ;D
Title: Re: Interactive conky
Post by: falldown on January 19, 2013, 07:37:35 PM
Thank you VastOne.
I am working on making it more "Generic" so that it is easier to setup and maintain.
Title: Re: Conky Codes and Images
Post by: jedi on January 19, 2013, 08:28:51 PM
Wow Sector11, that is a lot of useful info!!!  You should create a thread or something called Conky variables and arguments at the top of these forums that is quick to get to for those of us with Conky addiction problems.   ::)  There's a lot in here I didn't even know that Conky would/could do!  Thanks for this though I know it was intended as a Jumping off point for falldowns great work...
Title: Re: Interactive conky
Post by: jedi on January 19, 2013, 08:35:19 PM
Falldown, all I can say is "THAT IS STUNNING"!!!!  Your work is an honor to ste** I mean *borrow*, and I can't wait for this one to be done!  I thought the last one I got from you was awesome but this, holy crap, this is way awesome!  When it's done/ready please let me know so I can have this beauty on my wonderful desktop that you've almost single-handedly created!  Thank-you in advance for this.

Also, big thanks and big Hello to mrpeachy.  I know it's his 'interactive lua' thats helped you get this tuned to perfection!!!
Title: Re: Interactive conky
Post by: falldown on January 19, 2013, 08:55:13 PM
Thanks for the kind words Jed.
The genius is Peachy's script.. my contribution is only the part that is seen.
Right now I am trying a few different themes.. so maybe at some point an interactive conky can be a conky option for VSIDO.
Title: Re: Interactive conky
Post by: jedi on January 19, 2013, 08:59:55 PM
The one in the video you made is perfection if you ask me!  I'd love to have one like it.  I'm just like S11 in that I can 'play' in others scripts, but am clueless to make one on my own.  Anyway, the one in the video looks great to me, and I'd love to have one just like it!!!  (hint hint hint)    ;D
Title: Re: New Look New Wall!!!
Post by: jedi on January 19, 2013, 09:23:13 PM
I can't remember, but I think the wallpaper came from jst_joe.  It's awesome!!!!  Conky on the left is the great one's (falldown) work, and the weather at top right is arclance's work.  The mail is courtesy of VastOne!!!

I'd like to take this time to say thanks to all the great artists at the VSIDO Community!  Your really making me look good when I post in other places!   :D  Please keep up the great work!  My specialty is plagiarizing all of you guy's work!!!  ;)

(http://en.zimagez.com/miniature/conky11.jpg) (http://en.zimagez.com/zimage/conky11.php)
Title: Re: Conky Codes and Images
Post by: Sector11 on January 19, 2013, 10:10:47 PM
I'm glad you like it Jed ... but all I did was start with a generic conky I have here and then went to one of three bookmarks that I have, no sense in recreating something that already exists and it kept up to date faster than I am aware at times: (the names are as they exist in my CPS+ bookmarks)

(http://t.imgbox.com/abxDngrC.jpg) (http://imgbox.com/abxDngrC)

Conky - Below TEXT - Variables (http://conky.sourceforge.net/variables.html)

The other two are also must for a true conky addict - if you don't have the three, you are not addicted.  OK, that's an opinion.

Conky - Above TEXT - Settings (http://conky.sourceforge.net/config_settings.html), and
Conky Lua API (http://conky.sourceforge.net/lua.html) - I don't use this much . YET!

falldown you seeing that last one?

Then I added one of my many text files: /media/5/Conky/Tips-Tricks-info/Time_2.txt, because it is handy an had some info that I thought falldown might like to use.

There are 114 "items" in that Tips-Tricks-Info directory, 7 of them are sib-directories.
Over time I think most of that info will be found right here.  A LOT of it isn't even up at CPS.
Title: Re: Conky Codes and Images
Post by: falldown on January 19, 2013, 10:29:30 PM
You are the man S11!  ;D

Most of my configs these days are through lua.. which use conky_parse.
I have yet to find a command that conky_parse cannot pull from conky.
Title: Re: Conky Codes and Images
Post by: Sector11 on January 19, 2013, 11:14:59 PM
^ Other than using a LUA script by someone else I have no idea.  I think that Lua API page came about in prep for conky v2 that is LUA based, so they say.  When that happens I'll retire and let you LUA geniuses  take over.

I'll be like our very own jedi,  copy/paste & display.  :D
Title: Re: New Look New Wall!!!
Post by: Sector11 on January 19, 2013, 11:34:51 PM
HEY!  The wallpaper came from me - finding it in the net, someplace, a long time ago, that was created by someone else.

All jst_joe did was create and add that really super cool reflecting:

vsido
ʌsıpo


... and one could have done that!

... well except me! :D  :D

Just kidding, joe did a great job.
Title: Re: Interactive conky
Post by: Sector11 on January 19, 2013, 11:40:19 PM
There is only one word that can accurately describe the math of mrpeachy + falldown = conky:

Supercalifragilisticexpialidocious
Title: Re: Lua codes and screenshots.
Post by: lwfitz on January 20, 2013, 09:18:27 AM
Finally got a little time to mess around with this....... maybe finish it up tomorrow

(http://ompldr.org/taDViZQ) (http://ompldr.org/vaDViZQ)
Title: Re: Conky Codes and Images
Post by: lwfitz on January 20, 2013, 09:20:28 AM


Heres what Im working on right now

(http://ompldr.org/taDViZA) (http://ompldr.org/vaDViZA)

(http://ompldr.org/taDViZQ) (http://ompldr.org/vaDViZQ)
Title: Re: Lua codes and screenshots.
Post by: jedi on January 20, 2013, 09:25:15 AM
Falldown, your directions are succinct and easily followed!  I have a dilemma involving the weather alert box.  Is there a way to make the box "grow" if the alerts end up being larger than the box can hold?  Hope that makes sense.  Here's a pic of what I'm trying to say;

(http://www.zimagez.com/miniature/screenshot-01202013-041501am.png) (http://www.zimagez.com/zimage/screenshot-01202013-041501am.php)

I'm not a coder obviously and don't know if this is even possible.  Is there a way for the Conky to 'detect' when the text reaches the bottom of the box, and makes the box increase in size to match?  Like a 'thinking' box for each section...  On the last.fm box which is the next box down, maybe do a wrap text function for the song playing if it's title goes to long???  Hey I'm new to this stuff and am not sure what can and can't be done...  Obviously if the boxes can be dynamically re-sized, and the text wrapped, this would 'fix' things.  I think...  Like I said, I don't know what is and is not possible with the coding...

None of this is urgent or worth dropping any of your current projects over, just thought I'd ask...  Your making some incredible stuff with Peachy's lua....  Hopefully the above makes sense...  As I said, I know nothing about code...

Jed
Title: Re: Lua codes and screenshots.
Post by: falldown on January 20, 2013, 06:42:25 PM
Jed the last fm is on the back burner for a bit. The feed sends it as is.. "artist"-"title".. not much I can do with that.
I to am not a coder at all.

The text box growing to fit text might be a possibility.
This is all in lua.. so I will see what I can find out about it.
Title: Re: Lua codes and screenshots.
Post by: falldown on January 20, 2013, 06:43:24 PM
Quote from: lwfitz on January 20, 2013, 09:18:27 AM
(http://ompldr.org/taDViZQ) (http://ompldr.org/vaDViZQ)
Looks good lwfitz!!
Title: Re: Conky Codes and Images
Post by: GrouchyGaijin on January 20, 2013, 07:10:09 PM
Hi Guys,

Sector_11 told me this is where all the cool Conky folks are hanging these days so I figured I'd swing by.

Below is a link to my desktop with it's five conkies.  Most of the stuff is running off of Mark's scripts.
The one really cool thing is that I set up DavMail to access my work Exchange account via Thunderbird on my Linux machine.  That works nicely with Mark's conkyEmail script.

http://i.imgbox.com/abjhGLuM.png
(http://i.imgbox.com/abjhGLuM.png)

Thank you,

GG
Title: Re: Conky Codes and Images
Post by: falldown on January 20, 2013, 07:21:22 PM
GG very nice setup you have there!!
Welcome to VSIDO!!.
If you like you can go on over to the introductions (http://vsido.org/index.php/board,17.0.html) thread and meet the community.

Most of the conky fanatics are roaming around here somewhere..
Looking forward to your setups.  ;D
Title: Re: Conky Codes and Images
Post by: Sector11 on January 20, 2013, 07:50:07 PM
Yea, I'm here.  I see the GrouchyGaijin has joined us.

Welcome friend!

I've known GG for a while now and never been able to figure out the Grouchy part.
The Gaijin kinda fits Mark's nick: kaivalagi, but I'm not saying

BTW, thumbnails are welcome here.
Title: Re: Interactive conky
Post by: falldown on January 20, 2013, 08:06:30 PM
First look at the right side conky with all windows closed..
(http://s7.postimage.org/mo3r5lzl3/2013_01_20_1358712098_1440x900_scrot.jpg) (http://postimage.org/image/mo3r5lzl3/)

Going to stick with this theme.
Still have more to do, but this is the general look of both conkys.
Title: Re: Interactive conky
Post by: VastOne on January 20, 2013, 08:09:20 PM
That is so EPIC!

Nice falldown!  ;D
Title: Re: Conky Codes and Images
Post by: VastOne on January 20, 2013, 08:12:23 PM
Welcome GrouchyGaijin!  Nice layout and design...

Thanks to Sector11 for getting you here!
Title: Re: Interactive conky
Post by: falldown on January 20, 2013, 08:33:06 PM
Thanks Sir!!  :)

Now to do the open window setup.  ;D
Title: Re: Conky Codes and Images
Post by: GrouchyGaijin on January 20, 2013, 08:57:10 PM
Quote from: falldown on January 20, 2013, 07:21:22 PM

If you like you can go on over to the introductions (http://vsido.org/index.php/board,17.0.html) thread and meet the community.


Done  :)
Title: Re: Interactive conky
Post by: falldown on January 21, 2013, 12:22:27 AM
Ok the right side system info is almost complete..
I have to admit this turned out really nice.
right side system info.mpeg (http://www.youtube.com/watch?v=u8rxdpE-Yb4#)
Title: Re: Interactive conky
Post by: VastOne on January 21, 2013, 12:25:49 AM
If you could somehow get GMB involved within that, I think I would buy it!

I know it can be done, but would require a lot of brain drain to get it done

Very Very nice work!
Title: Re: Interactive conky
Post by: falldown on January 21, 2013, 12:27:40 AM
^ I will see what I can do VastOne.
Title: Re: Interactive conky
Post by: falldown on January 21, 2013, 03:04:17 AM
Ok got something in the works for gmb.. but it will rely on gmb's controls widget..
or maybe ever call that as well. We shall see.  :)
Title: Re: Interactive conky
Post by: falldown on January 22, 2013, 02:46:58 AM
(http://s8.postimage.org/t223zsf2p/2013_01_21_1358822308_1440x900_scrot.jpg) (http://postimage.org/image/t223zsf2p/)

Working on some ugly script cleanup (mine of course) and a couple of hiccups in the GMB conky..
Very close to being done. 
Title: Re: Interactive conky
Post by: VastOne on January 22, 2013, 02:48:44 AM
Nice!!!  ;D

I am looking at my future desktop!

WOW, I am so glad you took this on falldown.  Thanks!
Title: Re: Interactive conky
Post by: falldown on January 22, 2013, 03:27:53 AM
Thank you.
I like how it looks.
Title: Re: Interactive conky
Post by: Sector11 on January 22, 2013, 04:11:23 AM
¡O ... M ... G!
Beautiful!
Are you going to share the code to all of that?
Title: Re: Conky Codes and Images
Post by: lwfitz on January 22, 2013, 05:17:56 AM
(http://ompldr.org/taDY3dw) (http://ompldr.org/vaDY3dw/2013-01-21--1358831458_1920x1077_scrot.png)
Title: Re: Interactive conky
Post by: mrpeachy on January 23, 2013, 05:50:59 AM
I don't think I can put it any better than sector11 has above!

Fabulous work as always falldown :D

...that was supposed to be a big smile... but it looks like its laughing! ... how about  ;D
Title: Re: Lua codes and screenshots.
Post by: mrpeachy on January 23, 2013, 06:16:53 AM
@ falldown

when drawing your base black box i see you are using this:

g=2
grad={{c=0x000000,a=1,p=0},{c=0x000000,a=1,p=1}}

since you only want a solid black fill
g=0
grad={{c=0x000000,a=1}}
might be more efficient
Title: Re: Interactive conky
Post by: falldown on January 23, 2013, 10:44:40 PM
Thanks Peachy, S11 and VastOne..
Means a lot coming from you gents!
Code will be available soon (clean up as Peachy stated)  ;D
Title: Re: Conky Codes and Images
Post by: lwfitz on January 24, 2013, 10:21:15 AM
(http://ompldr.org/taDdhYg) (http://ompldr.org/vaDdhYg/2013-01-24--1359019683_1918x1079_scrot.png)


conky_chrono
max_specials 10000
max_user_text 15000
background no
use_xft yes
xftfont sans:size=9
xftalpha 1
total_run_times 0
own_window yes
own_window_argb_visual yes
own_window_transparent yes
own_window_type normal
own_window_title conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 355 745
maximum_width 355
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_shade_color black
default_outline_color white
alignment middle_middle
gap_x 190
gap_y 0
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
text_buffer_size 100000
top_name_width 5
update_interval 1
default_color FFFFFF
temperature_unit fahrenheit
# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2
format_human_readable yes
short_units yes
update_interval 1
imlib_cache_size 0

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
temperature_unit Fahrenheit

####### Load Lua #########
lua_load ~/Conky/s11_clock.lua
lua_draw_hook_pre main

lua_load /home/luke/Conky/allcombined.lua

## lua funcions
## background ##################################################################
#${lua draw_bg {corner_radius,x_position,y_position,width,height,color,alpha,draw_type,line_width,outline_color,outline_alpha}}
#note for background: set width=0 - width will be conky window width, set height=0 - height will be conky window height
# draw_type: 1=fill, 2=outline(must specify line_width), 3=outline and fill (must specify line_width, outline_color and outline_alpha)
## gradient bars ###############################################################
#${lua gradbar {x_position,y_position,"conky_object",object_max_value,number_of_divisions,division_width,division_height,division_gap,bg_color,bg_alpha,start_color,start_alpha,mid_color,mid_alpha,end_color,end_alpha}}
## calendar ###############################################################
#${lua luacal {x_position,y_position,"title_font",title_fontsize,title_color,title_alpha,"dates_font",dates_fontsize,dates_color,dates_alpha,"highlight_font",highlight_fontsize,highlight_color,highlight_alpha,"spacer",colum_gap,title_gap,row_gap,start_day}
#note for calendar: start day... 0=sunday, 1=monday ... "spacer" can help align calendar with non fix width fonts
## textured background ###############################################################
#${lua tex_bg {corner_radius,x_position,y_position,width,height,"/path/to/texture.png"}}
## lua draw images ###############################################################
#${lua luaimage {x_position,y_position,width,height,"/path/to/image"}}
#note for images: set width=0 - width will be image width, set height=0 - height will be image height
## lua draw text ###############################################################
#${lua luatext {x_position,y_position,color,alpha,"font",fontsize,"justify"}}
#note for text: justify can be "r" = right, "c" = center, "l" = left
#${lua draw_bg {10,0,0,0,0,0x000000,0.3}}

##############################  End LUA  ###
${image ~/Conky/debian_horns.png -s 200x200 -p 85,75}
#${image ~/Conky/vsido_orb_blue.png -s 285x285 -p 25,10}
TEXT


${lua tex_bg {20,0,0,365,750,"/home/luke/Conky/brushed.png"}}${lua draw_bg {20,1,1,365,750,0x000000,1,2,1}}





















${font WhiteRabbit:size=13}${texeci 500 bash $HOME/Accuweather_Conky_USA_Images/acc_usa_images}${image $HOME/Accuweather_Conky_USA_Images/cc.png -p -5,338 -s 190x165}
${font WhiteRabbit:size=13}${goto 165}TEMP${alignr 3}${execpi 600 sed -n '4p' $HOME/Accuweather_Conky_USA_Images/curr_cond}°F (${execpi 600 sed -n '5p' $HOME/Accuweather_Conky_USA_Images/curr_cond}°F)
${goto 165}WIND${alignr 6}${execpi 600 sed -n '6p' $HOME/Accuweather_Conky_USA_Images/curr_cond} ${execpi 600 sed -n '14p' $HOME/Accuweather_Conky_USA_Images/curr_cond}
${goto 165}HUM${alignr 6}${execpi 600 sed -n '7p' $HOME/Accuweather_Conky_USA_Images/curr_cond}
#${goto 200}PRESS${alignr 3}${execpi 600 sed -n '8p' $HOME/Accuweather_Conky_USA_Images/curr_cond}
#${goto 200}CLOUD COVER${alignr 3}${execpi 600 sed -n '9p' $HOME/Accuweather_Conky_USA_Images/curr_cond}
#${goto 200}UV INDEX${alignr 10}${execpi 600 sed -n '10p' $HOME/Accuweather_Conky_USA_Images/curr_cond}
${goto 165}DEW POINT${alignr 6}${execpi 600 sed -n '11p' $HOME/Accuweather_Conky_USA_Images/curr_cond}
#${goto 200}CEILING${alignr 3}${execpi 600 sed -n '12p' $HOME/Accuweather_Conky_USA_Images/curr_cond}
#${goto 200}VISIB.${alignr 3}${execpi 600 sed -n '13p' $HOME/Accuweather_Conky_USA_Images/curr_cond}
${goto 165}SUNRISE${alignr 6}${execpi 600 sed -n '15p' $HOME/Accuweather_Conky_USA_Images/curr_cond}
${goto 165}SUNSET${alignr 6}${execpi 600 sed -n '16p' $HOME/Accuweather_Conky_USA_Images/curr_cond}


${font WhiteRabbit:size=13}${goto 20}${execpi 600 sed -n '6p' $HOME/Accuweather_Conky_USA_Images/tod_ton}${goto 140}${execpi 600 sed -n '11p' $HOME/Accuweather_Conky_USA_Images/tod_ton}${goto 255}${execpi 600 sed -n '16p' $HOME/Accuweather_Conky_USA_Images/tod_ton}

${font WhiteRabbit:size=10}${goto 100}${execpi 600 sed -n '9p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 210}${execpi 600 sed -n '14p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 330}${execpi 600 sed -n '19p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F
${font WhiteRabbit:size=10}${goto 100}${execpi 600 sed -n '10p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 210}${execpi 600 sed -n '15p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 330}${execpi 600 sed -n '20p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${image $HOME/Accuweather_Conky_USA_Images/7.png -p 20,477 -s 80x67}${image $HOME/Accuweather_Conky_USA_Images/12.png -p 135,477 -s 80x67}${image $HOME/Accuweather_Conky_USA_Images/17.png -p 255,477 -s 80x67}




${font WhiteRabbit:size=13}${goto 20}${execpi 600 sed -n '21p' $HOME/Accuweather_Conky_USA_Images/tod_ton}${goto 140}${execpi 600 sed -n '1p' $HOME/Accuweather_Conky_USA_Images/last_days}${goto 255}${execpi 600 sed -n '6p' $HOME/Accuweather_Conky_USA_Images/last_days}

${font WhiteRabbit:size=10}${goto 100}${execpi 600 sed -n '24p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 210}${execpi 600 sed -n '4p' $HOME/Accuweather_Conky_USA_Images/last_days}°F${goto 330}${execpi 600 sed -n '9p' $HOME/Accuweather_Conky_USA_Images/last_days}°F
${font WhiteRabbit:size=10}${goto 100}${execpi 600 sed -n '25p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 210}${execpi 600 sed -n '5p' $HOME/Accuweather_Conky_USA_Images/last_days}°F${goto 330}${execpi 600 sed -n '10p' $HOME/Accuweather_Conky_USA_Images/last_days}°F${image $HOME/Accuweather_Conky_USA_Images/22.png -p 20,573 -s 80x67}${image $HOME/Accuweather_Conky_USA_Images/N2.png -p 135,573 -s 80x67}${image $HOME/Accuweather_Conky_USA_Images/N7.png -p 255,573 -s 80x67}




${font WhiteRabbit:size=13}${goto 20}${execpi 600 sed -n '11p' $HOME/Accuweather_Conky_USA_Images/last_days}${goto 140}${execpi 600 sed -n '16p' $HOME/Accuweather_Conky_USA_Images/last_days}${goto 255}${execpi 600 sed -n '21p' $HOME/Accuweather_Conky_USA_Images/last_days}

${font WhiteRabbit:size=10}${goto 100}${execpi 600 sed -n '14p' $HOME/Accuweather_Conky_USA_Images/last_days}°F${goto 210}${execpi 600 sed -n '19p' $HOME/Accuweather_Conky_USA_Images/last_days}°F${goto 330}${execpi 600 sed -n '24p' $HOME/Accuweather_Conky_USA_Images/last_days}°F
${font WhiteRabbit:size=10}${goto 100}${execpi 600 sed -n '15p' $HOME/Accuweather_Conky_USA_Images/last_days}°F${goto 210}${execpi 600 sed -n '20p' $HOME/Accuweather_Conky_USA_Images/last_days}°F${goto 330}${execpi 600 sed -n '25p' $HOME/Accuweather_Conky_USA_Images/last_days}°F${image $HOME/Accuweather_Conky_USA_Images/N12.png -p 20,667 -s 80x67}${image $HOME/Accuweather_Conky_USA_Images/N17.png -p 135,667 -s 80x67}${image $HOME/Accuweather_Conky_USA_Images/N22.png -p 255,667 -s 80x67}


conky_system
max_specials 10000
max_user_text 15000
background no
use_xft yes
xftfont sans:size=9
xftalpha 1
total_run_times 0
own_window yes
own_window_argb_visual yes
own_window_transparent yes
own_window_type normal
own_window_title conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 250 525
maximum_width 250
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_shade_color black
default_outline_color white
alignment middle_left
gap_x 10
gap_y -10
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
text_buffer_size 100000
top_name_width 5
update_interval 1
default_color FFFFFF
temperature_unit fahrenheit


## Set the path to your script here.
lua_load /home/luke/Conky/allcombined.lua

## lua funcions
## background ##################################################################
#${lua draw_bg {corner_radius,x_position,y_position,width,height,color,alpha}}
#note for background: set width=0 - width will be conky window width, set height=0 - height will be conky window height
## gradient bars ###############################################################
#${lua gradbar {x_position,y_position,"conky_object",object_max_value,number_of_divisions,division_width,division_height,division_gap,bg_color,bg_alpha,start_color,start_alpha,mid_color,mid_alpha,end_color,end_alpha}}
## calendar ###############################################################
#${lua luacal {x_position,y_position,"title_font",title_fontsize,title_color,title_alpha,"dates_font",dates_fontsize,dates_color,dates_alpha,"highlight_font",highlight_fontsize,highlight_color,highlight_alpha,"spacer",colum_gap,title_gap,row_gap,start_day}
#note for calendar: start day... 0=sunday, 1=monday ... "spacer" can help align calendar with non fix width fonts
## textured background ###############################################################
#${lua tex_bg {corner_radius,x_position,y_position,width,height,"/path/to/texture.png"}}
## lua draw images ###############################################################
#${lua luaimage {x_position,y_position,width,height,"/path/to/image"}}
#note for images: set width=0 - width will be image width, set height=0 - height will be image height
## lua draw text ###############################################################
#${lua luatext {x_position,y_position,color,alpha,"font",fontsize,"justify"}}
# not for text: justify can be "r" = right, "c" = center, "l" = left

#${lua draw_bg {10,0,0,0,0,0x000000,0.5}}

TEXT
${lua tex_bg {20,0,0,260,970,"/home/luke/Conky/brushed.png"}}${lua draw_bg {20,1,1,258,970,0x000000,1,2,1}}${font OpenLogos:size=43} tJ^Jt${font}
${voffset 4}${font Sans:size=10}CPU Average ${lua gradbar {100,67,"${cpu cpu0}",100,33,2,10,1,0xFFFFFF,0.25,0xFFFFFF,1,0xFFFF00,1,0xFF0000,1}}${goto 220}${cpu cpu0}%       
#${font Sans:normal:size=10}${color1}k${voffset -1}${font}${color2} TEMP ${hwmon 1 temp 1}°C${lua gradbar {90,127,"${hwmon 1 temp 1}",100,50,2,10,1,0xFFFFFF,0.25,0x00FF00,1,0xFFFF00,1,0xFF0000,1}}
${font Sans:size=10}${voffset 1}CPU1 ${lua gradbar {50,82,"${cpu cpu1}",100,50,2,10,1,0xFFFFFF,0.25,0xFFFFFF,1,0xFFFF00,1,0xFF0000,1}}${goto 220}${cpu cpu1}%       
${font Sans:size=10}CPU2 ${lua gradbar {50,97,"${cpu cpu2}",100,50,2,10,1,0xFFFFFF,0.25,0xFFFFFF,1,0xFFFF00,1,0xFF0000,1}}${goto 220}${cpu cpu2}%       
${font Sans:size=10}CPU3 ${lua gradbar {50,112,"${cpu cpu3}",100,50,2,10,1,0xFFFFFF,0.25,0xFFFFFF,1,0xFFFF00,1,0xFF0000,1}}${goto 220}${cpu cpu3}%       
${font Sans:size=10}CPU4 ${lua gradbar {50,127,"${cpu cpu4}",100,50,2,10,1,0xFFFFFF,0.25,0xFFFFFF,1,0xFFFF00,1,0xFF0000,1}}${goto 220}${cpu cpu4}%       
${hr 2}
${font Sans:size=10}${voffset 10}RAM${goto 90}${mem}${goto 140} / ${memmax}
${lua gradbar {5,182,"${memperc}",100,65,2,10,1,0xFFFFFF,0.25,0xFFFFFF,1,0xFFFF00,1,0xFF0000,1}}${goto 220}${memperc}%
${font Sans:size=10}SWAP${goto 90}${swap}${goto 140} / ${swapmax}
${lua gradbar {5,213,"${swapperc}",100,65,2,10,1,0xFFFFFF,0.25,0xFFFFFF,1,0xFFFF00,1,0xFF0000,1}}${goto 220}${swapperc}%
${hr 2}
${font Sans:size=10}${voffset 10}/Root${goto 90}${fs_used /}${goto 140} / ${fs_size /}
${lua gradbar {5,267,"${fs_used_perc /}",100,65,2,10,1,0xFFFFFF,0.25,0xFFFFFF,1,0xFFFF00,1,0xFF0000,1}}${goto 220}${fs_used_perc /}%
${font Sans:size=10}/Home${goto 90}${fs_used  /home}${goto 140} / ${fs_size  /home}
${lua gradbar {5,298,"${fs_used_perc /home}",100,65,2,10,1,0xFFFFFF,0.25,0xFFFFFF,1,0xFFFF00,1,0xFF0000,1}}${goto 220}${fs_used_perc  /home}%
${font Sans:size=10}External${goto 90}${fs_used /media/External}${goto 140} / ${fs_size /media/External}
${lua gradbar {5,328,"${fs_used_perc /media/External}",100,65,2,10,1,0xFFFFFF,0.25,0xFFFFFF,1,0xFFFF00,1,0xFF0000,1}}${goto 220}${fs_used_perc /media/External}%
${font Sans:size=10}Software${goto 90}${fs_used /media/sdd5}${goto 140} / ${fs_size /media/sdd5}
${lua gradbar {5,358,"${fs_used_perc /media/sdd5}",100,65,2,10,1,0xFFFFFF,0.25,0xFFFFFF,1,0xFFFF00,1,0xFF0000,1}}${goto 220}${fs_used_perc /media/sdd5}%
${font Sans:size=10}Music${goto 90}${fs_used /media/sda5}${goto 140} / ${fs_size /media/sda5}
${lua gradbar {5,388,"${fs_used_perc /media/sda5}",100,65,2,10,1,0xFFFFFF,0.25,0xFFFFFF,1,0xFFFF00,1,0xFF0000,1}}${goto 220}${fs_used_perc /media/sda5}%
${font Sans:size=10}Videos${goto 90}${fs_used /media/sdd1}${goto 140} / ${fs_size /media/sdd1}
${lua gradbar {5,418,"${fs_used_perc /media/sdd1}",100,65,2,10,1,0xFFFFFF,0.25,0xFFFFFF,1,0xFFFF00,1,0xFF0000,1}}${goto 220}${fs_used_perc /media/sdd1}%
${font Sans:size=10}Storage${goto 90}${fs_used /media/storage}${goto 140} / ${fs_size /media/storage}
${lua gradbar {5,448,"${fs_used_perc /media/storage}",100,65,2,10,1,0xFFFFFF,0.25,0xFFFFFF,1,0xFFFF00,1,0xFF0000,1}}${goto 220}${fs_used_perc /media/storage}%
${hr 2}

${font Sans:size=10}CPU Temp
${lua gradbar {5,507,"${platform f71882fg.656 temp 1}",190,65,2,10,1,0xFFFFFF,0.25,0xFFFFFF,1,0xFFFF00,1,0xFF0000,1}}${goto 215}${platform f71882fg.656 temp 1}° F
${font Sans:size=10}System Temp
${lua gradbar {5,536,"${platform f71882fg.656 temp 2}",220,65,2,10,1,0xFFFFFF,0.25,0xFFFFFF,1,0xFFFF00,1,0xFF0000,1}}${goto 215}${platform f71882fg.656 temp 2}° F
${font Sans:size=10}GPU Temp
${lua gradbar {5,566,"${nvidia temp}",220,65,2,10,1,0xFFFFFF,0.25,0xFFFFFF,1,0xFFFF00,1,0xFF0000,1}}${goto 215}${nvidia temp}° F
${hr 2}
NAME ${alignr 5} PID    CPU  MEM
${top name 1} ${alignr 5} ${top pid 1} ${top cpu 1} ${top mem 1}
${top name 2} ${alignr 5} ${top pid 2} ${top cpu 2} ${top mem 2}
${top name 3} ${alignr 5} ${top pid 3} ${top cpu 3} ${top mem 3}
${top name 4} ${alignr 5} ${top pid 4} ${top cpu 4} ${top mem 4}
${top name 5} ${alignr 5} ${top pid 5} ${top cpu 5} ${top mem 5}
${top name 6} ${alignr 5} ${top pid 6} ${top cpu 6} ${top mem 6}
${top name 7} ${alignr 5} ${top pid 7} ${top cpu 7} ${top mem 7}
${top name 8} ${alignr 5} ${top pid 8} ${top cpu 8} ${top mem 8}
${hr 2}   
#${voffset 10}${goto 50}${font Sans:size=22}${time %I:%M %p}
#${lua luacal {100,425,"Sans",10,0x00FF00,1,"Sans",10,0xFFFFF0,1,"Mono",14,0x00FF00,1," ",20,18,16,0}}
#${goto 15}${font Sans:bold:size=12}${time %d}${font}
#${goto 15}${time %B}
#${goto 15}${time %Y}
#${voffset 40}${hr 2}
#${voffset 10}${font Sans:size=10}Connection Type ${goto 220}${gw_iface}
#I.P${goto 173}${addr eth0}
${voffset 8}Down Speed${goto 100}${downspeed eth0} ${goto 175}${voffset -8}${color yellow}${downspeedgraph eth0 20,75}${color}
${voffset 8}Up Speed${goto 100}${upspeed eth0} ${goto 175}${voffset -8}${color yellow}${upspeedgraph eth0 20,75}${color}
Downloads
Today:${alignr 10}${execi 1 vnstat -i eth0 | grep "today" | awk '{print $2 $3}'}
Week:${alignr 5}${execi 1 vnstat -i eth0 -w | grep "current week" | awk '{print $3 $4}'}
Month:${alignr 10}${execi 1 vnstat -i eth0 -m | grep "`date +"%b '%y"`" | awk '{print $3 $4}'}

Uploads
Today: ${alignr 10}${execi 1 vnstat -i eth0 | grep "today" | awk '{print $5 $6}'}
Week: ${alignr 5}${execi 1 vnstat -i eth0 -w | grep "current week" | awk '{print $6 $7}'}
Month: ${alignr 10}${execi 1 vnstat -i eth0 -m | grep "`date +"%b '%y"`" | awk '{print $6 $7}'}
${voffset 5}


allcombined.lua (by mrpeachy) edited so that draw_bg outlines the config
--[[ by mrpeachy -
combines background bar and calendar functions
]]
require 'cairo'
require 'imlib2'

function rgb_to_r_g_b(col_a)
return ((col_a[1] / 0x10000) % 0x100) / 255., ((col_a[1] / 0x100) % 0x100) / 255., (col_a[1] % 0x100) / 255., col_a[2]
end

function conky_gradbar(bartab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
local updates=tonumber(conky_parse('${updates}'))
if updates>5 then
--#########################################################################################################
--convert to table
local bartab=loadstring("return" .. bartab)()
local bar_startx=bartab[1]
local bar_starty=bartab[2]
local number=bartab[3]
local number=conky_parse(number)
local number_max=bartab[4]
local divisions=bartab[5]
local div_width=bartab[6]
local div_height=bartab[7]
local div_gap=bartab[8]
local bg_col=bartab[9]
local bg_alpha=bartab[10]
local st_col=bartab[11]
local st_alpha=bartab[12]
local mid_col=bartab[13]
local mid_alpha=bartab[14]
local end_col=bartab[15]
local end_alpha=bartab[16]
--color conversion
local br,bg,bb,ba=rgb_to_r_g_b({bg_col,bg_alpha})
local sr,sg,sb,sa=rgb_to_r_g_b({st_col,st_alpha})
local mr,mg,mb,ma=rgb_to_r_g_b({mid_col,mid_alpha})
local er,eg,eb,ea=rgb_to_r_g_b({end_col,end_alpha})
if number==nil then number=0 end
local number_divs=(number/number_max)*divisions
cairo_set_line_width (cr,div_width)
--gradient calculations
for i=1,divisions do
if i<(divisions/2) and i<=number_divs then
colr=((mr-sr)*(i/(divisions/2)))+sr
colg=((mg-sg)*(i/(divisions/2)))+sg
colb=((mb-sb)*(i/(divisions/2)))+sb
cola=((ma-sa)*(i/(divisions/2)))+sa
elseif i>=(divisions/2) and i<=number_divs then
colr=((er-mr)*((i-(divisions/2))/(divisions/2)))+mr
colg=((eg-mg)*((i-(divisions/2))/(divisions/2)))+mg
colb=((eb-mb)*((i-(divisions/2))/(divisions/2)))+mb
cola=((ea-ma)*((i-(divisions/2))/(divisions/2)))+ma
else
colr=br
colg=bg
colb=bb
cola=ba
end
cairo_set_source_rgba (cr,colr,colg,colb,cola)
cairo_move_to (cr,bar_startx+((div_width+div_gap)*i-1),bar_starty)
cairo_rel_line_to (cr,0,div_height)
cairo_stroke (cr)
end
--#########################################################################################################
end-- if updates>5
bartab=nil
colr=nil
colg=nil
colb=nil
cola=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_draw_bg(bgtab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--#########################################################################################################
--convert to table
local bgtab=loadstring("return" .. bgtab)()
local r=bgtab[1]
local x=bgtab[2]
local y=bgtab[3]
local w=bgtab[4]
local h=bgtab[5]
local color=bgtab[6]
local alpha=bgtab[7]
local draw=bgtab[8]
local lwidth=bgtab[9]
local olcolor=bgtab[10]
local olalpha=bgtab[11]
if w==0 then
w=tonumber(conky_window.width)
end
if h==0 then
h=tonumber(conky_window.height)
end
cairo_set_source_rgba (cr,rgb_to_r_g_b({color,alpha}))
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
--the drawing part---------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
if draw==1 then
cairo_fill (cr)
elseif draw==2 then
cairo_set_line_width (cr,lwidth)
cairo_stroke (cr)
elseif draw==3 then
cairo_fill_preserve (cr)
cairo_set_source_rgba (cr,rgb_to_r_g_b({olcolor,olalpha}))
cairo_set_line_width (cr,lwidth)
cairo_stroke (cr)
end
--#########################################################################################################
bgtab=nil
w=nil
h=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_luacal(caltab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--####################################################################################################
local caltab=loadstring("return" .. caltab)()
local cal_x=caltab[1]
local cal_y=caltab[2]
local tfont=caltab[3]
local tfontsize=caltab[4]
local tc=caltab[5]
local ta=caltab[6]
local bfont=caltab[7]
local bfontsize=caltab[8]
local bc=caltab[9]
local ba=caltab[10]
local hfont=caltab[11]
local hfontsize=caltab[12]
local hc=caltab[13]
local ha=caltab[14]
local spacer=caltab[15]
local gaph=caltab[16]
local gapt=caltab[17]
local gapl=caltab[18]
local sday=caltab[19]
--convert colors
--local font=string.gsub(font,"_"," ")
local tred,tgreen,tblue,talpha=rgb_to_r_g_b({tc,ta})
--main body text color
local bred,bgreen,bblue,balpha=rgb_to_r_g_b({bc,ba})
--highlight text color
local hred,hgreen,hblue,halpha=rgb_to_r_g_b({hc,ha})
--###################################################
--calendar calcs
local year=os.date("%G")
local today=tonumber(os.date("%d"))
local t1 = os.time( {    year=year,month=03,day=01,hour=00,min=0,sec=0} );
local t2 = os.time( {    year=year,month=02,day=01,hour=00,min=0,sec=0} );
local feb=(os.difftime(t1,t2))/(24*60*60)
local monthdays={ 31, feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
local day=tonumber(os.date("%w"))+1-sday
local day_num = today
local remainder=day_num % 7
local start_day=day-(day_num % 7)
if start_day<0 then start_day=7+start_day end     
local month=os.date("%m")
local mdays=monthdays[tonumber(month)]
local x=mdays+start_day
local dnum={}
local dnumh={}
if mdays+start_day<36 then
dlen=35
plen=29
else
dlen=42
plen=36
end
for i=1,dlen do
if i<=start_day then
dnum[i]="  "
else
dn=i-start_day
if dn=="nil" then dn=0 end
if dn<=9 then dn=(spacer .. dn) end
if i>x then dn="" end
dnum[i]=dn
dnumh[i]=dn
if dn==(spacer .. today) or dn==today then
dnum[i]=""
end
if dn==(spacer .. today) or dn==today then
dnumh[i]=dn
place=i
else dnumh[i]="  "
end
end
end--for
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
if tonumber(sday)==0 then
dys={"SU","MO","TU","WE","TH","FR","SA"}
else
dys={"MO","TU","WE","TH","FR","SA","SU"}
end
--draw calendar titles
for i=1,7 do
cairo_move_to (cr, cal_x+(gaph*(i-1)), cal_y)
cairo_show_text (cr, dys[i])
cairo_stroke (cr)
end
--draw calendar body
cairo_select_font_face (cr, bfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, bfontsize);
cairo_set_source_rgba (cr,bred,bgreen,bblue,balpha)
for i=1,plen,7 do
local fn=i
for i=fn,fn+6 do
cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
cairo_show_text (cr, dnum[i])
cairo_stroke (cr)
end
end
--highlight
cairo_select_font_face (cr, hfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, hfontsize);
cairo_set_source_rgba (cr,hred,hgreen,hblue,halpha)
for i=1,plen,7 do
local fn=i
for i=fn,fn+6 do
cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
cairo_show_text (cr, dnumh[i])
cairo_stroke (cr)
end
end
--#########################################################################################################
caltab=nil
dlen=nil
plen=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_luaimage(imtab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--#########################################################################################################
local imtab=loadstring("return" .. imtab)()
local im_x=imtab[1]
local im_y=imtab[2]
local im_w=imtab[3]
local im_h=imtab[4]
local file=imtab[5]
local show = imlib_load_image(file)
if show == nil then return end
imlib_context_set_image(show)
if tonumber(im_w)==0 then
width=imlib_image_get_width()
else
width=tonumber(im_w)
end
if tonumber(im_h)==0 then
height=imlib_image_get_height()
else
height=tonumber(im_h)
end
imlib_context_set_image(show)
local scaled=imlib_create_cropped_scaled_image(0, 0, imlib_image_get_width(), imlib_image_get_height(), width, height)
imlib_free_image()
imlib_context_set_image(scaled)
imlib_render_image_on_drawable(im_x, im_y)
imlib_free_image()
show=nil
--#########################################################################################################
imtab=nil
height=nil
width=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_tex_bg(textab)
local textab=loadstring("return" .. textab)()
local tex_file=textab[6]
local surface = cairo_image_surface_create_from_png(tostring(tex_file))
local cw,ch = conky_window.width, conky_window.height
local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, cw,ch)
local cr=cairo_create(cs)
--#########################################################################################################
--convert to table
local r=textab[1]
local x=textab[2]
local y=textab[3]
local w=textab[4]
local h=textab[5]
if w=="0" then
w=cw
end
if h=="0" then
h=ch
end
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
--the drawing part---------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_clip (cr)
cairo_new_path (cr);
--image part
cairo_set_source_surface (cr, surface, 0, 0)
cairo_paint (cr)
--#########################################################################################################
textab=nil
w=nil
h=nil
cairo_destroy(cr)
cairo_surface_destroy (cs)
cairo_surface_destroy (surface)
cr=nil
return ""
end-- end main function

function conky_luatext(txttab)--x,y,c,a,f,fs,txt,j ##################################################
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--#########################################################################################################
--convert to table
local txttab=loadstring("return" .. txttab)()
local x=txttab[1]
local y=txttab[2]
local c=txttab[3]
local a=txttab[4]
local f=txttab[5]
local fs=txttab[6]
local j=txttab[7]
local txt=txttab[8]
cairo_select_font_face (cr, f, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, fs)
local extents=cairo_text_extents_t:create()
cairo_text_extents(cr,txt,extents)
local wx=extents.x_advance
cairo_set_source_rgba (cr,rgb_to_r_g_b({c,a}))
if j=="l" then
cairo_move_to (cr,x,y)
elseif j=="c" then
cairo_move_to (cr,x-(wx/2),y)
elseif j=="r" then
cairo_move_to (cr,x-wx,y)
end
cairo_show_text (cr,txt)
cairo_stroke (cr)
--#########################################################################################################
txttab=nil
cairo_destroy(cr)
cairo_surface_destroy (cs)
cr=nil
return ""
end-- end main function


s11_clock.lua (by mrpeachy and Sector11)
--[[ multiple analogue clocks by mrpeachy - 18 Jun 2012
21 Jun 2012 - Chronograph modifications by Sector11
22 Jun 2012 - again with mrpeachy's help day names, numbers and month names
12 Nov 2012 - memory leak plugged - mrpeachy
14 Nov 2012 - Personnalisation - Didier-T (forum Ubuntu.fr)
26 Nov 2012 - The Clock - Sector11 (small version)

use in conkyrc

lua_load /path/Chronograph.lua
lua_draw_hook_pre main
TEXT

-- INDEX
-- ### CLOCK POSITION - AND DEFAULTS ###
-- ### SET BORDER OPTIONS FOR "CLOCKS" ### -- I don't know how to remove this - NOT NEEDED
--     See lines 39 to 41 for overall size changes
-- ### START DIAL B ### Day Names Dial ###
--     See Lines 84 - 87 and 131 for changes
-- ### START DIAL C ### Month Names Dial ###
--     See Lines 150 -153 and 198 for changes
-- ### START DIAL D ### Day Numbers Dial ###
--     See Lines 234 & 265 for  changes
-- ### START CLOCK A ###
--     See Lines  &  and 441 & 467 changes
-- MARKS AROUND CLOCK A -- Large Main 24 HR Clock
-- CLOCK A HOUR HAND
-- CLOCK A MINUTE HAND SETUP
-- CLOCK A SECOND HAND SETUP

NOTE:  Putting ### CLOCK A ### last insures that it's functions are written
       over the other dials.
]]

require 'cairo'
-- ### CLOCK POSITION - AND DEFAULTS ##########################################
local init={
center_x=178,
center_y=160,
radius=140,
lang="English", -- English French Greek Spanish
hour=12, -- 12 | 24
second=false, --true | false - Seconds: dots and numbers IF 12HR
line=false, -- true | false - Part Second Hand
color=0xFF0000, --color for day, day number and month IF NO SECOND HAND
alpha=1 --alpha for day, day number and month IF NO SECOND HAND
}

-- ONLY NEED ONE COPY OF THIS FUNCTION
function rgb_to_r_g_b(col,alp)
  return ((col / 0x10000) % 0x100) / 255, ((col / 0x100) % 0x100) / 255, (col % 0x100) / 255, alp
end
local colr, colg, colb, cola=rgb_to_r_g_b(init.color,init.alpha)

function conky_main()
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
cr = cairo_create(cs)
local extents=cairo_text_extents_t:create()
tolua.takeownership(extents)

-- ### CLOCK 12|24 HR SELECTOR ############################
local clock_type_A=init.hour
-- ############################ CLOCK 12|24 HR SELECTOR ###

-- ### SET BORDER OPTIONS FOR "CLOCKS" ####################
--local clock_border_width=0
-- set color and alpha for clock border
--local cbr,cbg,cbb,cba=1,1,1,1 -- full opaque white
-- gap from clock border to minute marks
local b_to_m=0
-- #################### SET BORDER OPTIONS FOR "CLOCKS" ###

-- ### START DIAL B ### Day Names Dial ####################
-- DIAL POSITION
local center_x=init.center_x
local center_y=init.center_y
local radius=22
-- FONT
cairo_select_font_face (cr, "CorporateMonoExtraBold", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 14)
-- TABLE OF TEXT -- in order
if init.lang == "English" then text_days={"Sun","Mon","Tue","Wed","Thr","Fri","Sat",} end
if init.lang == "French" then text_days={"dim","lun","mar","mer","jeu","ven","sam",} end
if init.lang == "Greek" then text_days={"ΔΕΥ","ΤΡΙ","ΤΕΤ","ΠΕΜ","ΠΑΡ","ΣΑΒ","ΚΥΡ",} end
if init.lang == "Spanish" then text_days={"dom","lun","mar","mie","jue","vie","sab",} end

local day_number=tonumber(os.date("%w"))
if init.handday == true then
  for i=1,7 do
-- work out points
    local point=(math.pi/180)*((360/7)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)   
  end
else
  for i=1,7 do -- working out points
    if day_number == i-1 then
      cairo_set_source_rgba (cr,0,1,1,0) -- active colour
    else
      cairo_set_source_rgba (cr,1,1,1,0.0) -- non-active day names
    end
    local point=(math.pi/180)*((360/7)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)
  end
-- INNER POINTS POSITION, radius smaller than text circle
  local radius=7
  for i=1,7 do
    if day_number == i-1 then
      cairo_set_source_rgba (cr,0,1,1,0) -- active colour
    else
      cairo_set_source_rgba (cr,1,1,1,0.0) -- non-active
    end
    local point=(math.pi/180)*((360/7)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_stroke (cr)
  end
end
-- ######################################### END DIAL B ###

-- ### START DIAL C ### Month Names Dial ##################
-- DIAL POSITION
local center_x=init.center_x --(+85)
local center_y=init.center_y
local radius=53
-- FONT
cairo_select_font_face (cr, "CorporateMonoExtraBold", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 14)
-- TABLE OF TEXT -- in order
if init.lang == "English" then text_days={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",} end
if init.lang == "French" then text_days={"jan","fév","mar","avr","mai","jui","jul","aôu","sep","oct","nov","déc",} end
if init.lang == "Greek" then text_days={"ΙΑΝ","ΦΕΒ","ΜΑΡ","ΑΠΡ","ΜΑΙ","ΙΟΥ","ΙΟΥ","ΑΥΓ","ΣΕΠ","ΟΚΤ","ΝΟΕ","ΔΕΚ",} end
if init.lang == "Spanish" then text_days={"ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",} end

local this_month=tonumber(os.date("%m"))
if init.handmonth == true then
  for i=1,12 do
-- OUTER POINTS POSTION FOR -- ### START DIAL D ## TEXT
    local point=(math.pi/180)*((360/12)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)
  end
else
  for i=1,12 do
    if this_month == i then
      cairo_set_source_rgba (cr,0,1,1,0) -- active month colour
    else
      cairo_set_source_rgba (cr,1,1,1,0.0) -- non-active month names
    end
-- OUTTER POINTS POSTION FOR TEXT
    local point=(math.pi/180)*((360/12)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)
  end
-- INNER POINTS POSITION, radius smaller than text circle
  local radius=38
  for i=1,12 do
    if this_month == i then
      cairo_set_source_rgba (cr,0,1,1,0) -- active colour
else
      cairo_set_source_rgba (cr,1,1,1,0.0) -- dots for non-active month names
    end
    local point=(math.pi/180)*((360/12)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_stroke (cr)
  end
end
-- ######################################### END DIAL C ###

-- ### START DIAL D ### Day Numbers Dial ##################
-- GET NUMBER OF DAYS IN CURRENT MONTH
-- calculate Feb, then set up table
year4num=os.date("%Y")
t1=os.time({year=year4num,month=03,day=01,hour=00,min=0,sec=0});
t2=os.time({year=year4num,month=02,day=01,hour=00,min=0,sec=0});
if init.hour == 12 then
  febdaynum=tonumber((os.difftime(t1,t2))/(12*60*60))
else
  febdaynum=tonumber((os.difftime(t1,t2))/(24*60*60))
end
-- MONTH TABLE
monthdays={31,febdaynum,31,30,31,30,31,31,30,31,30,31}
this_month=tonumber(os.date("%m"))
number_days=monthdays[this_month]
-- TEXT positioning
local center_x=init.center_x
local center_y=init.center_y
local radius=85
cairo_select_font_face (cr, "Liquid Crystal", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size (cr, 20)
local this_day=tonumber(os.date("%d"))
  for i=1,number_days do
-- OUTTER POINTS POSTION FOR TEXT
    local point=(math.pi/180)*((360/number_days)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
    --only print even numbers
    if math.mod(i, 2) == 0 and math.mod(this_day, 2)==0 then
    text=string.format("%02d",i) --formats numbers to double digits
    elseif math.mod(i, 2) ~= 0 and math.mod(this_day, 2)~=0 then
    text=string.format("%02d",i) --formats numbers to double digits
    else
    text=""
    end --odd even matching
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
if i==this_day then
     cairo_set_source_rgba (cr,0,1,1,0) -- active colour
else
cairo_set_source_rgba (cr,1,1,1,0) -- dim inactive numbers
end
     cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
     cairo_show_text (cr, text)
     cairo_stroke (cr)
  end
-- INNER POINTS POSITION, radius smaller than text circle
  local radius=70
  for i=1,number_days do
    local point=(math.pi/180)*((360/number_days)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
if i==this_day then
     cairo_set_source_rgba (cr,0,1,1,0) -- active colour
else
cairo_set_source_rgba (cr,1,1,1,0) -- dim the points
end
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_stroke (cr)
  end
-- ######################################### END DIAL D ###

-- ### START CLOCK A ######################################
-- SET MARKS ###
-- MARKS AROUND CLOCK A -- Large Main 24 HR Clock
local number_marks_A=init.hour
-- set mark length
local m_length_A=0 -- doesn't work but can't delete
-- set mark width
local m_width_A=0 -- doesn't work but can't delete
-- set mark line cap type
local m_cap=CAIRO_LINE_CAP_ROUND
-- set mark color and alpha,red blue green alpha
local mr,mg,mb,ma=1,1,1,0 -- opaque white -- doesn't work but can't delete
-- SETUP HOUR HANDS ###
-- CLOCK A HOUR HAND
hh_length_A=95
-- set hour hand width
hh_width_A=6
-- set hour hand line cap
hh_cap=CAIRO_LINE_CAP_ROUND
-- set hour hand color
-- hhr,hhg,hhb,hha=1,0,1,0 -- fully opaque white --doesn't work
-- SETUP MINUTE HANDS ###
-- CLOCK A MINUTE HAND SETUP
-- set length of minute hand
mh_length_A=115
-- set minute hand width
mh_width_A=6
-- set minute hand line cap
mh_cap=CAIRO_LINE_CAP_ROUND
-- set minute hand color
--mhr,mhg,mhb,mha=1,1,1,0.5 -- fully opaque white --doesn't work

-- SETUP SECOND HAND ###
-- CLOCK A SECOND HAND SETUP -- DOESN'T WORK - Why ???????????????????????????
-- set length of seconds hand -- yes I know it is commented out!
--sh_length_A=150
-- set hour hand width
--sh_width_A=2
-- set hour hand line cap
--sh_cap=CAIRO_LINE_CAP_ROUND
-- set seconds hand color
--shr,shg,shb,sha=1,0,0,1 -- fully opaque red

-- PART SECOND HAND
--position
--get seconds value
local seconds=tonumber(os.date("%S"))
--calculate rotation of second hand in degrees
if init.line == true then
  local arc=(math.pi/180)*((360/60)*seconds)
  --calculate point 1
  local radius1=100
  local x1=0+radius1*math.sin(arc)
  local y1=0-radius1*math.cos(arc)
  --calculate point 2
  local radius2=107
  local x2=0+radius2*math.sin(arc)
  local y2=0-radius2*math.cos(arc)
  --draw line connecting points
  cairo_move_to (cr, center_x+x1,center_y+y1)
  cairo_line_to (cr, center_x+x2, center_y+y2)
  cairo_set_source_rgba (cr,255/255,0/255,0/255,0) -- PART SECOND HAND
  cairo_stroke (cr)
end

-- CLOCK A ### 12 HR TIME ###
-- CLOCK SETTINGS
clock_radius=0 --does not work
clock_centerx=init.center_x -- centre of Clock hands
clock_centery=init.center_y -- centre of Clock hands
-- DRAWING CODE
-- DRAW MARKS
-- stuff that can be moved outside of the loop, needs only be set once
-- calculate end and start radius for marks
m_end_rad=clock_radius-b_to_m
m_start_rad=m_end_rad-m_length_A -- WHAT IS THIS??
-- set line cap type
cairo_set_line_cap  (cr, m_cap)
-- set line width
cairo_set_line_width (cr,m_width_A)
-- set color and alpha for marks
cairo_set_source_rgba (cr,mr,mg,mb,ma)
-- START LOOP FOR HOUR MARKS
for i=1,number_marks_A do
-- drawing code using the value of i to calculate degrees
-- calculate start point for 12/24 hour mark
radius=m_start_rad
point=(math.pi/180)*((i-1)*(360/number_marks_A))
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- set start point for line
cairo_move_to (cr,clock_centerx+x,clock_centery+y)
-- calculate end point for 12/24 hour mark
radius=m_end_rad
point=(math.pi/180)*((i-1)*(360/number_marks_A))
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- set path for line
cairo_line_to (cr,clock_centerx+x,clock_centery+y)
-- draw the line
cairo_stroke (cr)
end -- of for loop
-- HOUR MARKS -- ???????????????????????????????????????????????????????????????
-- TIME CALCULATIONS CLOCK A
if clock_type_A==12 then
hours=tonumber(os.date("%I"))
-- convert hours to seconds
h_to_s=hours*60*60
elseif clock_type_A==24 then
hours=tonumber(os.date("%H"))
-- convert hours to seconds
h_to_s=hours*60*60
end
minutes=tonumber(os.date("%M"))
-- convert minutes to seconds
m_to_s=minutes*60
-- get current seconds
seconds=tonumber(os.date("%S"))
-- DRAW HOUR HAND ###
-- get hours minutes seconds as just seconds
hsecs=h_to_s+m_to_s+seconds
-- calculate degrees for each second
hsec_degs=hsecs*(360/(60*60*clock_type_A)) -- use equation ~ eliminate decimals
-- set radius to calculate hand points
radius=hh_length_A
-- set start line coordinates, the center of the circle
cairo_move_to (cr,clock_centerx,clock_centery)
-- calculate coordinates for end of hour hand
point=(math.pi/180)*hsec_degs
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- describe the line we will draw
cairo_line_to (cr,clock_centerx+x,clock_centery+y)
-- set up line attributes and draw line
cairo_set_line_width (cr,hh_width_A)
cairo_set_source_rgba (cr,1,1,1,1) -- active colour Hour Hand ================
cairo_set_line_cap  (cr, hh_cap)
cairo_stroke (cr)
-- DRAW MINUTE HAND
-- get minutes and seconds just as seconds
msecs=m_to_s+seconds
-- calculate degrees for each second
msec_degs=msecs*0.1
-- set radius to calculate hand points
radius=mh_length_A
-- set start line coordinates, the center of the circle
cairo_move_to (cr,clock_centerx,clock_centery)
-- calculate coordinates for end of minute hand
point=(math.pi/180)*msec_degs
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- describe the line we will draw
cairo_line_to (cr,clock_centerx+x,clock_centery+y)
-- set up line attributes and draw line
cairo_set_line_width (cr,mh_width_A)
cairo_set_source_rgba (cr,1,1,1,1) -- active colour Minute Hand ==============
cairo_set_line_cap  (cr, mh_cap)
cairo_stroke (cr)
-- ### CLOCK A ###
local center_x=init.center_x -- Centre of the HR / Min Numbers
local center_y=init.center_y -- Centre of the HR / Min Numbers
local radius=init.radius -- 12/24 HR CLOCK Hours/Minutes radius -- seeline 42
cairo_select_font_face (cr, "WhiteRabbit", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size (cr, 25)
cairo_set_source_rgba (cr,1,1,1,1) -- HR Clock numbers
-- TABLE OF TEXT -- in order
if init.hour == 12 then
  text_days={"12","01","02","03","04","05","06","07","08","09","10","11",}
  for i=1,12 do
-- OUTTER POINTS POSTION FOR TEXT
    local point=(math.pi/180)*((360/12)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_set_source_rgba (cr,1,1,1,1)
    cairo_stroke (cr)
  end
-- INNER POINTS POSITION, radius smaller than text circle
  local radius=111 -- 12 HR Clock
  for i=1,12 do
    local point=(math.pi/180)*((360/12)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_set_source_rgba (cr,1,1,1,0)
    cairo_stroke (cr)
  end
end
if init.hour == 24 then
  text_days={"00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23",}
  for i=1,24 do
-- OUTTER POINTS POSTION FOR TEXT
    local point=(math.pi/180)*((360/24)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)
  end
-- INNER POINTS POSITION, radius smaller than text circle
  local radius=99 -- 24 HR Clock
  for i=1,24 do
    local point=(math.pi/180)*((360/24)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_set_source_rgba (cr,1,1,1,0)
    cairo_stroke (cr)
  end
end

-- ############################################################################
-- POSITION FOR TEXT HOUR NUMBERS
  if init.hour == 12 and init.second == true then
    text_days={"","01","02","03","04","","06","07","08","09","","11","12","13","14","","16","17","18","19","","21","22","23","24","","26","27","28","29","","31","32","33","34","","36","37","38","39","","41","42","43","44","","46","47","48","49","","51","52","53","54","","56","57","58","59","",}
-- INNER POINTS POSITION, radius smaller than text circle
    cairo_set_source_rgba (cr,1,1,1,.5) -- does not work -- settings moved
    cairo_select_font_face (cr, "WhiteRabbit", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    for i=1,60 do
      local radius=99 -- dots for seconds A Clock
      local point=(math.pi/180)*((360/60)*(i-1))
      local x=0+radius*(math.sin(point))
      local y=0-radius*(math.cos(point))
      if seconds == i-1 then
        cairo_set_source_rgba (cr,255/255,0/255,0/255,0) -- does not work - settings moved
      else
        if i-1 == 0 or i-1 == 5 or i-1 == 10 or i-1 == 15 or i-1 == 25 or i-1 == 30 or i-1 == 35 or i-1 == 40 or i-1 == 45 or i-1 == 50 or i-1 == 55 then
          cairo_set_source_rgba (cr,1,1,1,0) -- active colour
        else
          cairo_set_source_rgba (cr,1,1,1,0) -- dots for seconds A Clock
        end
      end
      cairo_arc (cr,center_x+x,center_y+y,1/2,0,2*math.pi)
      cairo_stroke (cr)
    end
    radius=radius-3
    cairo_set_font_size (cr, 9)
    for i=1,60 do
-- OUTTER POINTS POSTION FOR TEXT
      local point=(math.pi/180)*((360/60)*(i-1))
      local x=0+radius*(math.sin(point))
      local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
      local text=text_days[i]--gets text from table
      if seconds == tonumber(text) then
      cairo_set_source_rgba (cr,1,1,1,0) -- active colour
      else
        cairo_set_source_rgba (cr,1,1,1,0) -- seconds numbers
      end
      cairo_text_extents(cr,text,extents)
      local width=extents.width
      local height=extents.height
      cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
      cairo_show_text (cr, text)
      cairo_stroke (cr)
    end
  end
-- ############################################################################
cairo_stroke (cr)
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
end -- end main function


The weather script is by TeoBigusGeekus and you can get the full script along with the edited images by me  here (http://crunchbang.org/forums/viewtopic.php?id=19235)

The wallpaper can be found here (http://vsido.org/index.php/topic,53.msg1152.html#msg1152) and the conky background image by jst_joe (but resized) can be found here (http://ompldr.org/vaDdhbw/brushed.png)
Title: Re: Conky Codes and Images
Post by: Sector11 on January 24, 2013, 07:08:33 PM
@ lwfitz,  my wife just smacked me for looking that it!

She said I was not looking at the conky.   :D
Nice one though, all spiced up like that ... not like the plain jane conky I'm about to post.
Title: Re: Conky Codes and Images
Post by: Sector11 on January 24, 2013, 07:12:53 PM
My new default - no internet conky!

(http://t.imgbox.com/abg9JAVd.jpg) (http://imgbox.com/abg9JAVd)     (http://t.imgbox.com/abmiRTxe.jpg) (http://imgbox.com/abmiRTxe)
Little write up here! (http://vsido.org/index.php/topic,103.new.html#new)

~/.conkyrc
# killall conky && conky &

###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
own_window_colour gray
own_window_class Conky
own_window_title VSIDO Default Conky

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type normal
# own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
# own_window_argb_value 255

minimum_size 235 0     ## width, height
#maximum_width 160       ## width

gap_x 10 # left-right
gap_y 0 # up-down

alignment middle_right
###################################################  End Window Settings  ###
###  Font Settings  #########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
#xftfont Liberation Sans:size=15
xftfont Monofur:bold:size=13

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes

draw_shades no
default_shade_color black

draw_outline yes # amplifies text if yes
default_outline_color black

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
default_shade_color gray
default_outline_color black

default_color DCDCDC #220 220 220 Gainsboro
color0 8FBC8F #143 188 143 DarkSeaGreen
color1 778899 #119 136 153 LightSlateGray
color2 FF8C00 #255 140   0 DarkOrange
color3 7FFF00 #127 255   0 Chartreuse
color4 FFA07A #255 160 122 LightSalmon
color5 FFDEAD #255 222 173 NavajoWhite
color6 00BFFF #  0 191 255 DeepSkyBlue
color7 00FFFF #  0 255 255 Cyan
color8 FFFF00 #255 255   0 Yellow
color9 FF0000 #255   0   0 Red
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 1
# graph borders
draw_graph_borders yes
#default_graph_size 15 40
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################
# Boolean value, if true, Conky will be forked to background when started.
background yes

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none
0
# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 1028

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
# temperature_unit Fahrenheit

##############################################  End Miscellaneous Section  ###
### LUA ######################################################################
### draw-bg.lua ##############################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load /media/5/Conky/LUA/draw-bg.lua
#TEXT
# ${lua conky_draw_bg 125 0 0 0 0 0x000000 0.3}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
#--------------------------------
lua_load /media/5/Conky/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 20 0 0 0 0 0x000000 0.5
#lua_draw_hook_post draw_bg 20 0 0 0 0 0x000000 0.5
#
# TEXT
# ${lua conky_draw_bg 20 0 0 0 0 0x000000 0.3}
##
#
################################################################## End LUA ###


update_interval 1

TEXT
${lua conky_draw_bg 20 0 0 0 0 0x000000 0.3}\
${image /media/5/Conky/images/orbwallpaperblack.png -s 60x60 -p 0,0}\
${image /media/5/Conky/images/S11_128.png -s 60x60 -p 0,100}\
${alignr 5}${time %T}
${alignr 5}${time %x}
${alignr 5}${uptime_short}${font Monofur:bold:size=11}

${alignc}${kernel}
${hr}${font}
${alignc}${nodename}

${alignr 5}%  Used  ↓  | Total
Root ${fs_used_perc /}${alignr 5}${fs_used /} | ${fs_size /}
Home ${fs_used_perc /home}${alignr 5}${fs_used /home} | ${fs_size /home}
  RAM ${memperc}${alignr 5}${mem} | ${memmax}
Swap ${swapperc}${alignr 5}${swap} | ${swapmax}

CPU % in use ${alignr 5}Avg ${if_match ${cpu cpu0}<10}00${cpu cpu0}\
${else}${if_match ${cpu cpu0}<100}0${cpu cpu0}\
${else}${cpu cpu0}${endif}${endif}
${alignc}1 ${if_match ${cpu cpu1}<10}00${cpu cpu1}\
${else}${if_match ${cpu cpu1}<100}0${cpu cpu1}\
${else}${cpu cpu1}${endif}${endif}\
  2 ${if_match ${cpu cpu2}<10}00${cpu cpu2}\
${else}${if_match ${cpu cpu2}<100}0${cpu cpu2}\
${else}${cpu cpu2}${endif}${endif}\
  3 ${if_match ${cpu cpu3}<10}00${cpu cpu3}\
${else}${if_match ${cpu cpu3}<100}0${cpu cpu3}\
${else}${cpu cpu3}${endif}${endif}

CPU Fan${alignr 5}${platform f71882fg.2560 fan 1} rpm

Temperatures ${hr}
${alignc}CPU ${if_match ${platform f71882fg.2560 temp 1}<100} ${platform f71882fg.2560 temp 1}\
${else}${platform f71882fg.2560 temp 1}${endif}°\
     MB ${if_match ${platform f71882fg.2560 temp 2}<100} ${platform f71882fg.2560 temp 2}\
${else}${platform f71882fg.2560 temp 2}${endif}°
${alignc}GPU ${if_match ${nvidia temp}<100} ${nvidia temp}\
${else}${nvidia temp}${endif}°\
     HD ${if_match ${execi 5 hddtemp -n /dev/sda}<100} ${execi 5 hddtemp -n /dev/sda}\
${else}${execi 5 hddtemp -n /dev/sda}${endif}°

DISK Activity ${hr}
R${goto 40}${diskiograph_read /dev/sda 14,130 00ffff ff0000 5 -lt}${alignr 5}${diskio_read /dev/sda}
W${goto 40}${diskiograph_write /dev/sda 14,130 ff0000 00ffff 5 -lt}${alignr 5}${diskio_write /dev/sda}

NETWORK ${hr}
Dn${goto 40}${downspeedgraph eth0 14,130 00ffff ff0000 5 -lt}${alignr 5}${downspeedf eth0}
Up${goto 40}${upspeedgraph eth0 14,130 ff0000 00ffff 5 -lt}${alignr 5}${upspeedf eth0}


draw-bg.lua (with calendar)
--[[Background originally by londonali1010 (2009)
    ability to set any size for background mrpeachy 2011
    ability to set variables for bg in conkyrc dk75

  the change is that if you set width and/or height to 0
  then it assumes the width and/or height of the conky window

so:

Above and After TEXT  (requires a composite manager or it blinks!)

lua_load ~/wea_conky/draw_bg.lua
TEXT
${lua conky_draw_bg 10 0 0 0 0 0x000000 0.4}

OR Both above TEXT (no composite manager required - no blinking!)

lua_load ~/wea_conky/draw_bg.lua
lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.5
TEXT

Note
${lua conky_draw_bg 20 0 0 0 0 0x000000 0.4}
  See below:        1  2 3 4 5 6        7

${lua conky_draw_bg corner_radius x_position y_position width height color alpha}

covers the whole window and will change if you change the minimum_size setting

1 = 20             corner_radius
2 = 0             x_position
3 = 0             y_position
3 = 0             width
5 = 0             height
6 = 0x000000      color
7 = 0.4           alpha

######### calendar function ##################################################

then to use it, you activate the calendar function BELOW TEXT like this

${lua luacal {settings}}

#${lua luacal {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gh=,gt=,gv=,sd=}}
#    x=x position top left
#    y=y position top left
#    tf=title font, eg "mono" must be in quotes
#    tfs=title font size
#    tc=title color
#    ta=title alpha
#    bf=body font, eg "mono" must be in quotes
#    bfs=body font size
#    bc=body color
#    ba=body alpha
#    hf=highlight font, eg "mono" must be in quotes
#    hfs=highlight font size
#    hc=highlight color
#    ha=highlight alpha
#    sp=spacer, eg " " or sp="0"... 0,1 or 2 spaces can help with positioning of non-monospaced fonts

#    gt=gap from title to body
#    gh=gap horizontal between columns
#    gv=gap vertical between rows
#    sd=start day, 0=Sun, 1=Mon

#    hstyle = heading style, 0=just days, 1=date insert
#    tdf=title date font, eg "mono" must be in quotes
#    tdfs=title date font size
#    tdc=title date color
#    tda=title date alpha

# test line
-- ${lua luacal {x=10,y=100,tf="Purisa",tfs=24,tc=0xf67e16,ta=1,bf="First Order",bfs=26,bc=0xecd32a,ba=1,hf="Purisa",hfs=18,hc=0xf67e16,ha=1,sp=" ",gh=40,gt=25,gv=20,sd=0,hstyle=1,tdf="First Order",tdfs=28,tdc=0xff0000,tda=1}}


]]

require 'cairo'
local    cs, cr = nil
function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
function conky_draw_bg(r,x,y,w,h,color,alpha)
if conky_window == nil then return end
if cs == nil then cairo_surface_destroy(cs) end
if cr == nil then cairo_destroy(cr) end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
w=w
h=h
if w=="0" then w=tonumber(conky_window.width) end
if h=="0" then h=tonumber(conky_window.height) end
cairo_set_source_rgba (cr,rgb_to_r_g_b(color,alpha))
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
-----------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_fill (cr)
------------------------------------------------------------
cairo_surface_destroy(cs)
cairo_destroy(cr)
return ""
end
-- ###### calendar function ##################################################
function conky_luacal(caltab) -- {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gt=,gh=,gv=,sd=,hstyle=,tdf=,tdfs=,tdc=,tda=}
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--############################################################################
if caltab.x==nil then
caltab=loadstring("return" .. caltab)()
end
local cal_x=caltab.x
local cal_y=caltab.y
local tfont=caltab.tf or "mono"
local tfontsize=caltab.tfs or 12
local tc=caltab.tc or 0xffffff
local ta=caltab.ta or 1
local bfont=caltab.bf or "mono"
local bfontsize=caltab.bfs or 12
local bc=caltab.bc or 0xffffff
local ba=caltab.ba or 1
local hfont=caltab.hf or "mono"
local hfontsize=caltab.hfs or 12
local hc=caltab.hc or 0xff0000
local ha=caltab.ha or 1
local spacer=caltab.sp or " "
local gaph=caltab.gh or 20
local gapt=caltab.gt or 15
local gapl=caltab.gv or 15
local sday=caltab.sd or 0
local hstyle=caltab.hstyle or 0
--convert colors
--local font=string.gsub(font,"_"," ")
local tred,tgreen,tblue,talpha=rgb_to_r_g_b(tc,ta)
--main body text color
local bred,bgreen,bblue,balpha=rgb_to_r_g_b(bc,ba)
--highlight text color
local hred,hgreen,hblue,halpha=rgb_to_r_g_b(hc,ha)
--############################################################################
--calendar calcs
local year=os.date("%G")
local today=tonumber(os.date("%d"))
local t1 = os.time( {    year=year,month=03,day=01,hour=00,min=0,sec=0} );
local t2 = os.time( {    year=year,month=02,day=01,hour=00,min=0,sec=0} );
local feb=(os.difftime(t1,t2))/(24*60*60)
local monthdays={ 31, feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
local day=tonumber(os.date("%w"))+1-sday
local day_num = today
local remainder=day_num % 7
local start_day=day-(day_num % 7)
if start_day<0 then start_day=7+start_day end
local month=os.date("%m")
local mdays=monthdays[tonumber(month)]
local x=mdays+start_day
local dnum={}
local dnumh={}
if mdays+start_day<36 then
dlen=35
plen=29
else
dlen=42
plen=36
end
for i=1,dlen do
    if i<=start_day then
    dnum[i]="  "
    else
    dn=i-start_day
        if dn=="nil" then dn=0 end
        if dn<=9 then dn=(spacer .. dn) end
        if i>x then dn="" end
        dnum[i]=dn
        dnumh[i]=dn
        if dn==(spacer .. today) or dn==today then
        dnum[i]=""
        end
        if dn==(spacer .. today) or dn==today then
        dnumh[i]=dn
        place=i
        else dnumh[i]="  "
        end
    end
end--for
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
local extents=cairo_text_extents_t:create()
tolua.takeownership(extents)
if hstyle==0 then
    if tonumber(sday)==0 then
    dys={"SU","MO","TU","WE","TH","FR","SA"}
    else
    dys={"MO","TU","WE","TH","FR","SA","SU"}
    end
    --draw calendar titles
elseif hstyle==1 then
    if tonumber(sday)==0 then
    dys={"SU","MO"," ","  ","  ","FR","SA"}
    cairo_text_extents(cr,"MO",extents)
    local s=extents.x_advance+gaph
    local f=gaph*5
    local tdfont=caltab.tdf        or "mono"
    local tdfontsize=caltab.tdfs    or 12
    local tdc=caltab.tdc        or 0xffffff
    local tda=caltab.tda        or 1
    cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, tdfontsize);
    local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
    cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
    local insert=os.date("%b %y")
    cairo_text_extents(cr,insert,extents)
    local w=extents.x_advance
    cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
    cairo_show_text (cr,insert)
    cairo_stroke (cr)
    else
    dys={"MO","TU"," ","  ","  ","SA","SU"}
    cairo_text_extents(cr,"TU",extents)
    local s=extents.x_advance+gaph
    local f=gaph*5
    local tdfont=caltab.tdf        or "mono"
    local tdfontsize=caltab.tdfs    or 12
    local tdc=caltab.tdc        or 0xffffff
    local tda=caltab.tda        or 1
    cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, tdfontsize);
    local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
    cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
    local insert=os.date("%b %y")
    cairo_text_extents(cr,insert,extents)
    local w=extents.x_advance
    cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
    cairo_show_text (cr,insert)
    cairo_stroke (cr)
    end
end
--draw calendar titles
for i=1,7 do
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
cairo_move_to (cr, cal_x+(gaph*(i-1)), cal_y)
cairo_show_text (cr, dys[i])
cairo_stroke (cr)
end
--draw calendar body
cairo_select_font_face (cr, bfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, bfontsize);
cairo_set_source_rgba (cr,bred,bgreen,bblue,balpha)
for i=1,plen,7 do
local fn=i
    for i=fn,fn+6 do
    cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
    cairo_show_text (cr, dnum[i])
    cairo_stroke (cr)
    end
end
--highlight
cairo_select_font_face (cr, hfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, hfontsize);
cairo_set_source_rgba (cr,hred,hgreen,hblue,halpha)
for i=1,plen,7 do
local fn=i
    for i=fn,fn+6 do
    cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
    cairo_show_text (cr, dnumh[i])
    cairo_stroke (cr)
    end
end
--############################################################################
caltab=nil
dlen=nil
plen=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end
-- end main function #########################################################

Title: No Net Conky!
Post by: Sector11 on January 24, 2013, 07:13:28 PM
I had some time to kill today - I could not connect to the internet  :'(

So I played with a conky that needs no internet - yea, I see Network too!  My cable modem is still connected and I get little 'blips' from it on occasion.

This is what I did with my "default" ~/.conkyrc - the one that runs if I start a conky that doesn't exist, my fingers are terrible at spelling.  And now, if there is no internet.

(http://t.imgbox.com/abg9JAVd.jpg) (http://imgbox.com/abg9JAVd)     (http://t.imgbox.com/abmiRTxe.jpg) (http://imgbox.com/abmiRTxe)

Notice how VastOne is getting to me - the font is bigger!  To him I say:  :P

{can ya hear it?}   :D
Get the code here (http://vsido.org/index.php/topic,18.new.html#new)
Title: Re: No Net Conky!
Post by: dizzie on January 24, 2013, 07:59:39 PM
I like the lighthouse wallpaper :) Reminds me of home in my childhood :)
Title: Re: No Net Conky!
Post by: VastOne on January 24, 2013, 08:21:18 PM
Excellent work Sector11!  It fits you well!   ;D
Title: Re: No Net Conky!
Post by: Sector11 on January 24, 2013, 09:01:39 PM
@ dizzie - if you liked that one:
(http://t.imgbox.com/abjIYbPd.jpg) (http://imgbox.com/abjIYbPd)

@ VastOne - it's growing on me, see above.
Title: Re: No Net Conky!
Post by: jedi on January 24, 2013, 09:25:33 PM
Wow Sector11, reminds me of being in Bar Harbor down on the coast of Maine...  Very nice!
Title: Re: No Net Conky!
Post by: Sector11 on January 24, 2013, 11:08:54 PM
^ Yea, except today you could probably skate across the Bay of Fundy to Yarmouth.

Imagine stepping outside to that?  That's gotta be one very well built lighthouse!

Lost Internet again ... so I tweaked it a tad.

(http://t.imgbox.com/acoPdDnC.jpg) (http://imgbox.com/acoPdDnC)     (http://t.imgbox.com/absfNN3u.jpg) (http://imgbox.com/absfNN3u)

(http://t.imgbox.com/abqd31d5.jpg) (http://imgbox.com/abqd31d5)     (http://t.imgbox.com/adgT3Wmq.jpg) (http://imgbox.com/adgT3Wmq)

I think I like the black text white shadow more.  Probably because it is different!
Title: Re: Conky Codes and Images
Post by: lwfitz on January 25, 2013, 01:41:14 AM
@ Sector11

HAHAHA! Hit him again!  :D :D

And those arent plain at all! Looks great!
Title: Re: No Net Conky!
Post by: BoredOOMM on January 25, 2013, 02:01:58 AM
I don't remember the commands to hide the network if you are not connected.....  ::)

I was actually going to use this abandoned Russiky island  (http://vladivostok)lamp for my background with arched Dock at bottom and Conky in white on the right side....

http://media.englishrussia.com/112012/shkota2/shkota002-49.jpg (http://media.englishrussia.com/112012/shkota2/shkota002-49.jpg)

Don't you also miss the #! "Where in the World Thread" also?
Title: Re: Conky Codes and Images
Post by: Sector11 on January 25, 2013, 02:42:48 AM
Yea, they look nice, but other than the draw-bg.lua, just good old fashioned plain jane conky commands with some spacing tweaks.
Title: Re: No Net Conky!
Post by: dizzie on January 25, 2013, 02:48:14 AM
*Could you go to the lighthouse and get some things for me?*


Oh hell fucking no! Get your own shit, and bring a raincoat too (not that it will do much good)  ;D
Title: Re: No Net Conky!
Post by: Sector11 on January 25, 2013, 02:54:04 AM
Hi BoredOOMM, long time...

You mean this one:


if_up    (interface)
   if INTERFACE exists and is up, display everything between $if_up and the matching $endif



As long as my cable modem is plugged in, internet or not, it's considered "up".

Not sure what you are referring to with the Russiky island link. I see no lamp.  But that bottom link looks like an OLD lamp!

I don't recall the "Where in the World Thread", but Carmen Santiago lives next door.  :D
Title: First Conky
Post by: Xtreme on January 25, 2013, 03:34:17 AM
Well this is my first attempt at getting conky going on VSIDO. (most of the code taken from examples on xfce look - just modified to my system)  Think it looks ok, just have to figure how to add music integration now :P

(http://t.imgbox.com/adqOp8d2.jpg) (http://imgbox.com/adqOp8d2)
Title: Re: First Conky
Post by: VastOne on January 25, 2013, 03:39:38 AM
Xtreme, welcome to the Conky Masters Club!

That is EPIC... well done sir!   8)

BTW, I have a How To somewhere around here called 18 Music Apps for Conky...

I am sure you might spot it in the How To's
Title: Re: First Conky
Post by: Sector11 on January 25, 2013, 05:52:05 AM
Xtreme, you have my first conky beat 3 ways to Sunday.

Oh wait, first on VSIDO.  Still ... nice one!

VastOne is shy: 18 Music Apps for Conky (http://vsido.org/index.php/topic,7.0.html)
Title: Re: First Conky
Post by: Xtreme on January 25, 2013, 06:11:32 AM
Oh yeah that tutorial led to bad things.  Song covers are popping up great but then I realized that out of several thousand songs a lot of them have no album covers >.<

Just spent the last few hours using GMB to download artwork lol.
Title: Re: First Conky
Post by: VastOne on January 25, 2013, 06:25:54 AM
Excellent choice... Conky is great for adding music and album art for those who want to but GMB has so many options and oh by the way it is a great music app too!
Title: Re: No Net Conky!
Post by: BoredOOMM on January 25, 2013, 06:29:54 AM
Sector11,  the light is abandoned.

The thread on #! I think was started by pvsage (that NARROWS it down, eh?  :P)
Title: Re: No Net Conky!
Post by: BoredOOMM on January 25, 2013, 06:37:50 AM
Buggers!  I missed there is no edit button.

Sector11, I thought the Conky Masters had a setting where the Network is hidden unless the network is up. Maybe it was a lua script.... 

Here is the last network I saved in Pastebin on 28 Oct 11.

${font StyleBats:size=10}${color2}4${font Droid Sans Mono:size=8}${color3} SWAP${goto 95}${swap}${goto 133}/ ${swapmax}${alignr}${swapperc}%
${font Droid Sans Mono:bold:size=8.25}${color4}Communications  ${color8}${hr 2}
${font PizzaDudeBullets:size=9.5}${color2}T${font Droid Sans Mono:size=8}${color3} Down${alignr}${downspeed wlan0}
${font PizzaDudeBullets:size=9.5}${color2}N${font Droid Sans Mono:size=8}${color3} Up${alignr}${upspeed wlan0}
${font PizzaDudeBullets:size=9.5}${color2}T${font Droid Sans Mono:size=8}${color3} Downloaded${alignr}${totaldown wlan0}
${font PizzaDudeBullets:size=9.5}${color2}N${font Droid Sans Mono:size=8}${color3} Uploaded${alignr}${totalup wlan0}
${voffset 4}${font Sans:bold:size=8.25}${color4}${wireless_essid wlan0}${color8}${hr 2}
${goto 80}${font Droid Sans:size=38}${color4}${time %H:%M:%S}${font}
${font}${color3
Title: Re: No Net Conky!
Post by: Sector11 on January 25, 2013, 11:26:53 AM
@ BoredOOMM take a look a couple of posts up.  :D

if_up   ;)

Title: Re: No Net Conky!
Post by: BoredOOMM on January 25, 2013, 07:13:14 PM
@ Sector11

Conky is like a drug and I confess to TWAS posting last night.

:D







*Typing Without Adequate Sleep
Title: Re: No Net Conky!
Post by: Sector11 on January 25, 2013, 08:49:14 PM
TWAS I like that, you nead TWAC*

Twas the night with  Coffee, but all through the house
Not a keyboard was stirring, not even a mouse.
The coder were thinking, the monitor was bare,
In hopes that a Conky soon would be there.




*Typing With Adequate Coffee
Title: Re: Too Blue
Post by: jedi on January 26, 2013, 06:47:44 AM
new look...

(http://en.zimagez.com/miniature/weechatdesktop0.png) (http://en.zimagez.com/zimage/weechatdesktop0.php)
Title: Re: Too Blue
Post by: Sector11 on January 26, 2013, 05:05:00 PM
blue hoo hooie!   8)

NICE!

You need a blue, blue, blue suede shoes theme now.   :D
Title: Re: Conky Codes and Images
Post by: lwfitz on January 26, 2013, 08:11:31 PM
Ok think Im done for now.......

(http://s9.postimage.org/ld30snnuz/2013_01_26_1359230602_3840x1080_scrot.jpg) (http://postimage.org/image/ld30snnuz/)
Title: This'll do me for a while!!!
Post by: jedi on January 27, 2013, 12:47:59 AM
I like the theme here so much that I've tried to get my desktop as close to it as possible!  ???
Theme: http://www.deviantart.com/morelikethis/276436515#/d4rpdfd (http://www.deviantart.com/morelikethis/276436515#/d4rpdfd)
Wallpaper: ???  Who knows, somewhere on the internet...
Conky:  Originaly, I think, McLovin's Bars.  Someone here is inadvertently giving me credit when I deserve none!
Weather: v9000 with Sector11's template modded a little by me...
Icon theme: http://www.deviantart.com/morelikethis/276436515#/d2pdw32 (http://www.deviantart.com/morelikethis/276436515#/d2pdw32)  using the AwOkenDark set...
And last but certainly not least, VastOne's invaluable contribution via the GMB music layouts!!!  It's what is showing the 'now playing' in the lower right hand corner...

(http://en.zimagez.com/miniature/omgdarktheme0.png) (http://en.zimagez.com/zimage/omgdarktheme0.php)

So you can see the wall better...

(http://en.zimagez.com/miniature/omgdarkthemebare.png) (http://en.zimagez.com/zimage/omgdarkthemebare.php)
Title: Re: This'll do me for a while!!!
Post by: Sector11 on January 27, 2013, 12:59:20 AM
Nice, the top link isn't working, but what you have I like.

Blue and Black is a nice combo.
Title: Re: This'll do me for a while!!!
Post by: jedi on January 27, 2013, 01:00:55 AM
Fixed...
Title: Re: This'll do me for a while!!!
Post by: Sector11 on January 27, 2013, 01:03:57 AM
I see, see my post above.

You're doing some really nice stuff ... and to think I had to drag you kicking and screaming all the way to VSIDO....

I think it went something like this: "psst ... you're already using it!"   :D

Title: Re: Interactive conky
Post by: falldown on January 27, 2013, 01:09:18 AM
Here is the interactive conky MINUS the Gmusicbrowser..
(The gmb is not replacing the album art with each new song)

http://dl.dropbox.com/u/60081679/lua.tar.gz (http://dl.dropbox.com/u/60081679/lua.tar.gz)

Just load it up as you would the v9000.

here is a conky_start if needed
#!/bin/bash

conky -c ~/lua/.conkyrcr &
sleep 2 &
conky -c ~/lua/.conkyrcl
Title: Re: Interactive conky
Post by: Sector11 on January 27, 2013, 01:19:07 AM
Thank you - tomorrow I play.
Title: Re: Interactive conky
Post by: jedi on January 27, 2013, 04:17:56 AM
Quote from: falldown on January 27, 2013, 01:09:18 AM
Here is the interactive conky.
Just load it up as you would the v9000.
Falldown, this is some beautiful work!  The colors match my desktop perfectly!!!  Everything works as it should, (had to change the Net settings as I have wireless which is easy stuff) however, if I click on them nothing happens.  I'm using Xfce.  When I go into the .lua code and edit the first 4 or 5 lines replacing the 0 with a 1, save and voila, the boxes are open. (obvious difference between 0 and 1 eh?)  I get the following in a terminal on start of the Conky's;

abstlx: 1655 abstly: 5 winNum: 13134456
abstlx: 5 abstly: 5 winNum: 13134492
abstlx: 1655 abstly: 5 winNum: 13134456
abstlx: 5 abstly: 5 winNum: 13134492
abstlx: 5 abstly: 5 winNum: 13134492
abstlx: 1655 abstly: 5 winNum: 13134456
abstlx: 5 abstly: 5 winNum: 13134492
abstlx: 1655 abstly: 5 winNum: 13134456
abstlx: 5 abstly: 5 winNum: 13134492
abstlx: 1655 abstly: 5 winNum: 13134456

Not an error per se, but like I said no clicking works!  (that sounds kind of comical to me, no ah click click work!)  I'm sure I'm just doing something wrong...

Weather process works fine, with no errors, and the above only happens when first starting the Conkys.  Kind of wishing for an error so I could figure it out, but noooo...  :'(
Here's a scrot of what I have.  Term output in bottom left corner of scrot...
(http://en.zimagez.com/miniature/falldownlandr.png) (http://en.zimagez.com/zimage/falldownlandr.php)

I love how it "blends" in with my desktop!!!
Oh yeah, the icons folder in your lua directory for the net icons and such.  Not with the archive...
Title: Re: This'll do me for a while!!!
Post by: jedi on January 27, 2013, 04:34:23 AM
^hehehehe
Indeed I was, thanks to you!!!  Been the best "Distro Hop" I ever made!!!  Thanks for the compliments, means a lot coming from you!
Title: Re: Interactive conky
Post by: jedi on January 27, 2013, 09:43:16 AM
Funny thing is falldown it's working perfectly in OB!!!  Everything!!!!  Guess I'll stick with OB.  Like it better anyway!   ;D
Title: Interactive Lua Conky's in action!
Post by: jedi on January 27, 2013, 10:35:58 AM
Special thanks to falldown for this!

With the interactive Lua Conky's closed;
(http://en.zimagez.com/miniature/obclosedconkys.png) (http://en.zimagez.com/zimage/obclosedconkys.php)

With the interactive Lua Conky's opened;
(http://en.zimagez.com/miniature/obopenconkys.png) (http://en.zimagez.com/zimage/obopenconkys.php)

Also a special thank-you to mrpeachy for creating the interactive lua that falldown so graciously worked on to get this working so wonderfully!!!
We are a truly blessed Community here at VSIDO, to have such great artists, and coders, who are so happy to share their work in the true spirit of FOSS!
Title: Re: Interactive conky
Post by: jedi on January 27, 2013, 10:37:45 AM
Special thanks to falldown for this!

With the interactive Lua Conky's closed;
(http://en.zimagez.com/miniature/obclosedconkys.png) (http://en.zimagez.com/zimage/obclosedconkys.php)

With the interactive Lua Conky's opened;
(http://en.zimagez.com/miniature/obopenconkys.png) (http://en.zimagez.com/zimage/obopenconkys.php)

Also a special thank-you to mrpeachy for creating the interactive lua that falldown so graciously worked on to get this working so wonderfully!!!
We are a truly blessed Community here at VSIDO, to have such great artists, and coders, who are so happy to share their work in the true spirit of FOSS!
Title: Re: Interactive conky
Post by: falldown on January 27, 2013, 03:39:21 PM
Jed most likely it is an
own_window_type
in the conkyrc.. I have been using OB of late.

Not all WM are created equal!  ???
Title: Re: Interactive conky
Post by: falldown on January 27, 2013, 03:42:44 PM
Quote from: jedi on January 27, 2013, 04:17:56 AM

abstlx: 1655 abstly: 5 winNum: 13134456
abstlx: 5 abstly: 5 winNum: 13134492
abstlx: 1655 abstly: 5 winNum: 13134456
abstlx: 5 abstly: 5 winNum: 13134492
abstlx: 5 abstly: 5 winNum: 13134492
abstlx: 1655 abstly: 5 winNum: 13134456
abstlx: 5 abstly: 5 winNum: 13134492
abstlx: 1655 abstly: 5 winNum: 13134456
abstlx: 5 abstly: 5 winNum: 13134492
abstlx: 1655 abstly: 5 winNum: 13134456

and this is just the click function "print"
Title: Re: Interactive conky
Post by: falldown on January 27, 2013, 03:53:38 PM
And one more thing..
extract these images and add just the images to your lua folder
http://dl.dropbox.com/u/60081679/extra.tar.gz (http://dl.dropbox.com/u/60081679/extra.tar.gz)
Might need to change some paths.
Title: Re: Interactive Lua Conky's in action!
Post by: falldown on January 27, 2013, 03:56:29 PM
Looks very cool Jed  8)
Title: Re: Interactive Lua Conky's in action!
Post by: VastOne on January 27, 2013, 04:26:25 PM
Nice work jedi!
Title: Re: Interactive conky
Post by: Sector11 on January 27, 2013, 06:19:49 PM
OH YEA!!!

(http://t.imgbox.com/abkERq80.jpg) (http://imgbox.com/abkERq80)
Hobbs: "That's awesome!"

(http://t.imgbox.com/abcIsIgT.jpg) (http://imgbox.com/abcIsIgT)
Calvin: "No, that's falldown!

I only have one temp for my Processor an AMD Athlon II X3 - so since a GPU is a Processor ...  :D

When I'm finished with that section it will read:


             Processors
Athlon II   45°C       3.21GHz
CPU 1      6%
[***                          ]
CPU 2      6%
[***                          ]
CPU 2      6%
[***                          ]
CPU 0      6%
[***                          ]
GPU        44°C        586MHz
[***                          ]




Missing two images (that I know of)  ::)
/home/falldown/lua/icons/cpu.png
/home/falldown/lua/icons/download.png


I agree with Hobbs & Calvin!
Title: Re: Interactive conky
Post by: falldown on January 27, 2013, 08:51:39 PM
Very cool S11!!
You can delete the cpu and download entries if you like. It is leftover data from previous template.  :)
Title: Re: Interactive conky
Post by: Sector11 on January 27, 2013, 09:51:18 PM
OK, that explains why there is no error message concerning them.

Very nice work falldown.

You have the Calvin-n-Hobbs Seal of Approval!   :D
Title: Conky in i3!
Post by: jedi on January 28, 2013, 05:13:28 PM
Look at that!  Conky works in i3!  Thanks dizzie...  Is i3 a monster in the making?  ???

(http://en.zimagez.com/miniature/2013-01-28-1208561920x1080scrot.png) (http://en.zimagez.com/zimage/2013-01-28-1208561920x1080scrot.php)
Title: Re: Conky in i3!
Post by: dizzie on January 28, 2013, 07:42:11 PM
Very, Jedi :)


(http://en.zimagez.com/miniature/2013-01-28-1428161920x1080scrot.png) (http://en.zimagez.com/zimage/2013-01-28-1428161920x1080scrot.php)
Title: Re: Interactive conky
Post by: jedi on January 29, 2013, 05:58:30 AM
I'm hooked, what can I say....  ???

With the Conky's closed;

(http://en.zimagez.com/miniature/interactiveclosed.png) (http://en.zimagez.com/zimage/interactiveclosed.php)

With the Conky's opened;

(http://en.zimagez.com/miniature/interactiveopen.png) (http://en.zimagez.com/zimage/interactiveopen.php)

Added a little this, couple graphics here and there, and this is what I ended up with...
Title: Re: Interactive conky
Post by: falldown on January 29, 2013, 04:00:21 PM
Very nice Jed.
Title: Re: Interactive conky
Post by: falldown on February 01, 2013, 06:12:28 AM
##SNEAK PEEK##
Working on a new interactive panel conky
(http://t.imgbox.com/abeLyYzf.jpg) (http://imgbox.com/abeLyYzf)
Title: Re: Interactive conky
Post by: VastOne on February 01, 2013, 06:21:12 AM
Awesome work from all of you...


I cannot wait for the rest falldown!  8)
Title: Re: Interactive conky
Post by: Sector11 on February 01, 2013, 11:10:51 AM
@ jedi - those are some nice tweaks.

@ falldown - I agree with VastOne - with your interactive conkys it's like waiting for Santa - the anticipation is a burning desire.
Title: Re: Interactive conky
Post by: jedi on February 01, 2013, 12:20:36 PM
falldown, we all know mrpeachy's wonderful work with lua!  That said, (and I hope mrpeachy doesn't take offense) the work you've been doing here for all of us at VSIDO has been exemplary!
Your work not only enhances our desktops, it shows that at VSIDO we truly have some superb talent!  Your artistry in the backgrounds you've been making is also quite apparent and truly stunning!  In working with gimp, I know personally that creating the glass effect to look as good as you make it look is no small task, and shows some very 'mad' skills on your part.
Thank-you for all the wonderful work your doing for us and freely sharing with our community!  Your a very talented man!
Title: Re: Interactive conky
Post by: Sector11 on February 01, 2013, 01:59:20 PM
{standing}

CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP
CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP
CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP
CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP
CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP CLAP


{sitting}
Title: Re: Interactive conky
Post by: falldown on February 01, 2013, 03:22:47 PM
Quote from: Theodore "Beaver" CleaverGee Wally, that's swell.

But really guys.. Thank you.  :)
I have fun doing this stuff.
Title: Re: Interactive conky
Post by: Sector11 on February 01, 2013, 04:52:03 PM
Obviously, and we all benefit.

Just the same way as people tell me about my conkys.   ::)

I gotta make a new one ... or two ...  ???
Title: Re: Interactive conky
Post by: falldown on February 01, 2013, 10:50:42 PM
Ok.. now I know the direction that I want to go with this panel.
What I have completed thus far.
closed..
(http://t.imgbox.com/acuFvG53.jpg) (http://imgbox.com/acuFvG53)
opened..
(http://t.imgbox.com/abcgTfjx.jpg) (http://imgbox.com/abcgTfjx)
and here is desktop view..
(http://t.imgbox.com/abmTEZjs.jpg) (http://imgbox.com/abmTEZjs)

Things to do..
2 more buttons
user friendly conky_objects  (cause this would work as a default conky)  ;)
and a lighter version for darker backgrounds.
Title: Re: Interactive conky
Post by: Sector11 on February 02, 2013, 12:13:41 AM
You know, that would make one hell of a default conky!

Beautiful
Title: Re: Interactive conky
Post by: VastOne on February 02, 2013, 12:15:05 AM
When finished I will make it so!
Title: Re: Interactive conky
Post by: Sector11 on February 02, 2013, 01:18:47 AM
I dare say it will be the absolute best 'distro default conky' bar none!

Conky Hall of Fame

1. falldown - creator of the "Best Disto Default Conky" for his work on the VSIDO default conky!
Title: Re: Interactive conky
Post by: omns on February 02, 2013, 02:47:18 AM
You know, I'm not a conky fan at all but that is pretty sweet. It might even tempt me back to using it.

Lovely work falldown :)
Title: Re: Interactive conky
Post by: VastOne on February 02, 2013, 02:48:07 AM
^ That is a compliment.. well said!
Title: Re: Interactive conky
Post by: falldown on February 02, 2013, 04:05:58 AM
Well thanks to all.. and all thanks go to Peachy's Interactive Script.
He is the architect and I am merely the painter. 
Title: Re: Interactive conky
Post by: falldown on February 02, 2013, 08:47:31 PM
Average screen resolution is higher then 1024x768 according to the several different sites I checked out today.. And we know that the web doesn't lie.  :-X

So with that in mind.. The conky is right at 1130px width (with all buttons open)
(http://t.imgbox.com/acb6BIXU.jpg) (http://imgbox.com/acb6BIXU)

Just curious if 1130px wide is an acceptable width.?.     
Title: Re: Interactive conky
Post by: Sector11 on February 02, 2013, 09:09:46 PM
falldown was wondering:


Just curious if 1130px wide is an acceptable width?



Well, it's less than my 1280x1024 screen and I think I have the smallest one here.

It's 'an acceptable width' IMHO!

I'll have to move my email conky but that's easy.
(http://t.imgbox.com/abbicv3Q.jpg) (http://imgbox.com/abbicv3Q)
Title: Re: Interactive conky
Post by: falldown on February 02, 2013, 11:01:54 PM
Thanks for the feedback S11.

Made some on/off buttons..
off..
(http://t.imgbox.com/abnv1DFG.jpg) (http://imgbox.com/abnv1DFG)
on..
(http://t.imgbox.com/acuGoK0J.jpg) (http://imgbox.com/acuGoK0J)
Title: Re: Interactive conky
Post by: VastOne on February 02, 2013, 11:17:06 PM
Very Nice falldown!  I am so looking forward to the end product!  :P
Title: Re: Interactive conky
Post by: jedi on February 03, 2013, 02:05:46 AM
Can't wait for it to be done!  I'll take it now!!!!  Just kidding, still using the two you just finished!  Your a busy man falldown, and the work is exemplary!!!!
Title: Re: Interactive conky
Post by: Sector11 on February 03, 2013, 12:06:20 PM
@ falldown - feedback is easy, you're doing the hard stuff.

But you're like me ... a labour of love isn't labour.

Oh nice buttons!      black V for off blue V for on?
{stop with the darned suggestions let him finish}
Looking great ... I'm like jedi ... "Is it finished yet?", with VastOne's panting  :P
Title: Remember when ...
Post by: Sector11 on February 03, 2013, 05:06:25 PM
Remember when text conkys with lines ( | - _ ) and + were popular.

Well while doing some house cleaning in /media/5/conky I came across a couple.  One was HUGE and I just broke it up into two as it wasn't finished and looked HORRIBLE!

However, once I took the conkyForecast section out of it and popped it into it's own conky .... well you be the judge ...

(http://t.imgbox.com/abib1TPK.jpg) (http://imgbox.com/abib1TPK)

Everything to the left of the weather is one conky ... and not a single ${voffset} in the box.

Now another one I found was 'basically' what you see on the extreme left.  I did some quik editing and changed the font to my favourite mono font today: monofur.

I changed the | _ - and + for the ASCII stuff:


╔ ═ ╦ ═ ╗   ┌ ─ ┬ ─ ┐

║   ║   ║   │   │   │

╠ ═ ╬ ═ ╣   ├ ─ ┼ ─ ┤

║   ║   ║   │   │   │

╚ ═ ╩ ═ ╝   └ ─ ┴ ─ ┘

╔═╦═╗   ┌─┬─┐
║ ║ ║   │ │ │
╠═╬═╣   ├─┼─┤
║ ║ ║   │ │ │
╚═╩═╝   └─┴─┘



and I'm really impressed with how monofur used those:  8)

(http://t.imgbox.com/adsgGSmx.jpg) (http://imgbox.com/adsgGSmx)
An old style
with a new look!
Title: Re: Remember when ...
Post by: VastOne on February 03, 2013, 05:18:37 PM
Very impressive Sector11!  Nice of you to find and share these golden oldies..  :P
Title: Re: Remember when ...
Post by: Sector11 on February 03, 2013, 07:05:50 PM
The way things are going conky like that will be under glass in a Conky Museum really soon ... and I'll be beside it.   :D  :D
Quote" ... and over here we have Sector11's avatar.  He was coding a new conky back in 2013 and hit the wrong key sequence and deleted himself!"

What was a real surprise was the conkyForecast part.  It has a really large .template file and it still worked.

I do like the "old style new look" though and might develop something else from that!
Title: Re: Remember when ...
Post by: jedi on February 03, 2013, 09:59:53 PM
An Old Look!  Wow, I gotta say, I really like the looks of that!  Well done Sector11... ;D
Title: Re: Remember when ...
Post by: Sector11 on February 03, 2013, 10:37:01 PM
I {cough cough} borrowed the idea from a conky I saw a long time ago, and it was an old conky then. My first one was 1/2 the size of the left "panel" in the first post.  Probably around the time of conky v1.6.  No images back then and a lot fewer conky commands to contend with.

It just grew over time ... I'd play with it, add to it and then got abandoned as I moved on to other conkys.  Was nice bit of nostalgia tweaking them today.
Title: Re: Lua codes and screenshots.
Post by: Sector11 on February 04, 2013, 11:32:36 PM
OH falldown!

You made it to Conky PitStip -=AGAIN=-
Take a look: Featured (http://conky.pitstop.free.fr/wiki/index.php5?title=Featured) and the first in the 2013 Gallery (http://conky.pitstop.free.fr/wiki/index.php5?title=Gallery_2013_%281%29)   8)
Title: Re: Lua codes and screenshots.
Post by: falldown on February 05, 2013, 12:31:48 AM
Very  8) S11.. Thank you.  ;D
Title: Re: Interactive conky
Post by: falldown on February 05, 2013, 12:54:05 AM
I started over with the default conky.
I decided to use Peachy's button_script.lua .
I also changed it all around to where the panel stays top center. (the windows open left/right from center button)

closed/off
(http://t.imgbox.com/addfVyll.jpg) (http://imgbox.com/addfVyll)

opened/on
(http://t.imgbox.com/adkCEwKM.jpg) (http://imgbox.com/adkCEwKM)

almost done.
Title: Re: Interactive conky
Post by: Sector11 on February 05, 2013, 02:11:40 AM
Just a thought but why not leave that last box empty and see what other people add in there.

The Fill in the Box Contest.

Is it still under 1280 wide fully open?
Title: Re: Interactive conky
Post by: falldown on February 05, 2013, 03:28:09 AM
S11 it is still at 1130px.
I'm almost done with the last box.  :)
Title: Re: Conky Codes and Images
Post by: lwfitz on February 05, 2013, 09:28:39 AM
Made a few changes.......... but as always still using mrpeachys allcombined.lua

(http://en.zimagez.com/miniature/2013-02-05--13600556391924x1079scrot.png) (http://en.zimagez.com/zimage/2013-02-05--13600556391924x1079scrot.php)
Title: Re: Interactive conky
Post by: Sector11 on February 05, 2013, 11:22:23 AM
There goes the contest.   :D  :D  :D
Title: Re: Conky Codes and Images
Post by: falldown on February 05, 2013, 03:27:07 PM
Very nice lwfitz!!
I don't like pony cars, but that is one sweet color scheme.  8)
Title: Re: Interactive conky
Post by: falldown on February 05, 2013, 09:45:10 PM
Panel in action..

Default interactive conky panel (http://www.youtube.com/watch?v=Le55BS3edYs#ws)

Now to clean it up and get it all together.

EDIT: Any feedback is welcome.
Title: Re: Interactive conky
Post by: VastOne on February 05, 2013, 10:20:00 PM
Incredible work and look!  I will grab the files as soon as you post it and work it in as the default

Well done falldown!
Title: Re: Interactive conky
Post by: Sector11 on February 05, 2013, 10:25:50 PM
That is really nice falldown.  Very impressive.
Title: Re: Interactive conky
Post by: falldown on February 05, 2013, 10:33:31 PM
Thank you!

All conky_objects are "generic" so it should work on most every system.
I still need to test it against different background colors.

Opened it uses 1.50% cpu. Pretty darn good.
Title: Re: Interactive conky
Post by: dizzie on February 05, 2013, 10:40:48 PM
Shut up and take my money  ???
This is amazing stuff falldown! Very very nice :)
Title: Re: Interactive conky
Post by: jedi on February 06, 2013, 02:07:29 AM
As usual, WOW!!!  My soon to be default Conky looks almost done!  Awesome work falldown!
Title: Re: Conky Codes and Images
Post by: lwfitz on February 06, 2013, 10:04:05 AM
Thanks buddy  8)


??? ??? ???
Quote from: falldownI don't like pony cars
:'( :'( :'(
Title: Re: Conky Codes and Images
Post by: lwfitz on February 09, 2013, 09:13:32 AM
Always making changes  ;D

(http://en.zimagez.com/miniature/2013-02-09--13604009621918x1079scrot.png) (http://en.zimagez.com/zimage/2013-02-09--13604009621918x1079scrot.php)
Title: Re: Conky Codes and Images
Post by: lwfitz on February 11, 2013, 09:22:04 AM
(http://en.zimagez.com/miniature/2013-02-11--13605739911910x1079scrot.png) (http://en.zimagez.com/zimage/2013-02-11--13605739911910x1079scrot.php)
Title: Re: Interactive conky
Post by: falldown on February 12, 2013, 05:19:15 PM
Sorry that I have not posted on this panel for awhile, but I have hit a roadblock with one significant area..
Lua for some strange reason does not recognize "~/" as "/home/username". So I am thinking that all paths should be in our root directory. Which makes sense considering all other theming files are stored there.     
Title: Re: Interactive conky
Post by: dizzie on February 12, 2013, 06:19:22 PM
Quote from: falldown on February 12, 2013, 05:19:15 PM
Sorry that I have not posted on this panel for awhile, but I have hit a roadblock with one significant area..
Lua for some strange reason does not recognize "~/" as "/home/username". So I am thinking that all paths should be in our root directory. Which makes sense considering all other theming files are stored there.   

Try use $HOME (yes with caps)
Title: Re: Interactive conky
Post by: falldown on February 12, 2013, 06:28:34 PM
Hmmm.. that is a no go dizzie. lua is being a jerk.  ;D
Title: Re: Interactive conky
Post by: dizzie on February 12, 2013, 07:46:53 PM
http://www.lua.org/manual/5.0/manual.html (http://www.lua.org/manual/5.0/manual.html)

:D
Title: Re: Conky Codes and Images
Post by: lwfitz on February 14, 2013, 09:38:50 AM
(http://en.zimagez.com/miniature/2013-02-14--13608344321918x1078scrot.png) (http://en.zimagez.com/zimage/2013-02-14--13608344321918x1078scrot.php)


You can find the config here (https://www.dropbox.com/s/z7lyx8hpzdt038v/Conky_Joker.tar.gz)

And the wallpaper here (http://en.zimagez.com/zimage/zzzzzzzzzzzzzz6.php)
Title: Re: Interactive conky
Post by: Sector11 on February 15, 2013, 04:59:08 PM
@ falldown ...

Dizzie's link:  Under 5.3 - String Manipulation just above Pattern I see:

Here are some examples:

   x = string.gsub("hello world", "(%w+)", "%1 %1")
   --> x="hello hello world world"

   x = string.gsub("hello world", "(%w+)", "%1 %1", 1)
   --> x="hello hello world"

   x = string.gsub("hello world from Lua", "(%w+)%s*(%w+)", "%2 %1")
   --> x="world hello Lua from"

   x = string.gsub("home = $HOME, user = $USER", "%$(%w+)", os.getenv)
   --> x="home = /home/roberto, user = roberto"

   x = string.gsub("4+5 = $return 4+5$", "%$(.-)%$", function (s)
         return loadstring(s)()
       end)
   --> x="4+5 = 9"

   local t = {name="lua", version="5.0"}
   x = string.gsub("$name_$version.tar.gz", "%$(%w+)", function (v)
         return t[v]
       end)
   --> x="lua_5.0.tar.gz"


Will that help?
Title: Standard CPU and MB variable
Post by: VastOne on February 17, 2013, 01:21:59 AM
Isn't there a standard CPU temp and MB temp Conky variable that works across all systems?  I thought we had discussed this and made it the default but I must have lost it along the way.

I want to standardize the conky's so that the kernel, uptime, cpu%, mem%, CPU temp MB Temp HD Temp and NET are consistent on every install
Title: Re: Standard CPU and MB variable
Post by: jedi on February 17, 2013, 04:18:53 AM
MB & CPU temps will differ by manufacturer.  Also, some laptops don't have the same sensors.  I don't think (assumption) that SSD drives have internal temp sensors.  (the last two I've had did not)  The NET part will be dependent on eth0 or wlan0, so not all the same there either.  I think the 'safe' across-the-board settings will probably be the Kernel, Uptime, CPU%, Mem% and Time and Date.  I also think this is one of those "Sector11" Conky questions!  But here's my two coppers anyway!
Title: Re: Standard CPU and MB variable
Post by: VastOne on February 17, 2013, 04:28:34 AM
I realize that Jedi.  I probably should have asked this...

Didn't we come up with a conky default that did not include CPU and MB temperatures...

My bad
Title: Re: Standard CPU and MB variable
Post by: Sector11 on February 17, 2013, 12:12:05 PM
I came up with a few. That have since had temps added.

My new default - no internet conky! (http://vsido.org/index.php/topic,18.msg1244.html#msg1244) which started without temps or fan speed as well.

and the dark one here: Dark or Light wallpapers with different tint2 (http://vsido.org/index.php/topic,25.msg51.html#msg51) although the idea here wasn't the conkys so much as the changing backgrounds.

falldown asked me about a set of "Generic" system info commands for conky that would work with every install, so I came up with a list (http://vsido.org/index.php/topic,18.msg762.html#msg762)

The one temp I thought that might be safe not longer is - hddtemp for /dev/sda because of SDD
Network connections are not safe ... ethX wlanX ppaX (or something like that).

So a basic conky to show system info from the list I made for falldown.
Title: Re: Standard CPU and MB variable
Post by: Sector11 on February 17, 2013, 05:43:22 PM
And it doesn't have to be that dull either:
(http://t.imgbox.com/aci92Drx.jpg) (http://imgbox.com/aci92Drx)
A few formatting tricks - a mono font (highly recommended) and it can look nice, clean or a bit more complex.

It's all about options!
Title: Re: Standard CPU and MB variable
Post by: dizzie on February 17, 2013, 05:53:02 PM
^ loves simplicity


*dizzie approves*


;D
Title: Re: Standard CPU and MB variable
Post by: Sector11 on February 17, 2013, 07:17:17 PM
I've been playing with it ... try this:

(http://t.imgbox.com/abg78FiP.jpg) (http://imgbox.com/abg78FiP)

# killall conky && conky -c /media/5/Conky/S11_Disk_Activity-2.conky &
###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
own_window_class Conky
own_window_title Disk Activity

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type override
# own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#own_window_argb_value 150

minimum_size 270 0 #225 ## width, height
maximum_width 270 ## width, usually a good idea to equal minimum width

gap_x 10 ### left &right
gap_y 10 ### up & down

alignment tl
####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont monofur:bold:size=12
#xftfont WenQuanYi Micro Hei Mono:size=8

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes

draw_shades yes #### <<<<<<------------------To see it easier on light screens.
#default_shade_color black

draw_outline no #### <<<<<<---------------- Amplifies text if yes
default_outline_color black

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
default_shade_color 000000
default_outline_color 000000

#default_color 000000 #  0   0   0 Black
default_color DCDCDC #220 220 220 Gainsboro
color0 ffe595 #Teo Gold
color1 778899 #LightSlateGrey
color2 FF8C00 #Darkorange
color3 7FFF00 #Chartreuse
color4 FFA07A #LightSalmon
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 00FFFF #Cyan #48D1CC #MediumTurquoise
color8 FFFF00 #Yellow
color9 FF0000 #Red  #A52A2A #DarkRed
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes #no
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################

# Boolean value, if true, Conky will be forked to background when started.
background no

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 256

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

## default bar size
default_bar_size 200 20

## Width for $top name value (defaults to 15 characters).
top_name_width 8

## Specify a default width and height for graphs.
## Example: 'default_graph_size 0 25'. This is particularly useful for execgraph
## and execigraph as they do not take size arguments
## default_graph_size 220 100

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load /media/5/Conky/LUA/dra2w-bg.lua
#TEXT
#${lua conky_draw_bg 10 0 0 0 0 0x000000 0.6}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
lua_load /media/5/Conky/LUA/draw-bg.lua
lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.1
### mount.lua ##################################################################
#
##instructions
##load script
##lua_load ~/path_to/mounted.lua
#lua_load /media/5/Conky/LUA/mounted.lua
## first lua command below text:
## ${lua get_mounted_data interval}, where interval is a number.  This starts data gathering
## to get output:
## ${lua mount partition_number data_type}, where partition number is a number
## data_type can be
## total - shows total number of partitions mounted, requires a partition_number also, use 1, could be used in an if_match
## fsys - shows filesystem
## size - shows space used in appropriate units
## free - shows free space in appropriate units
## use% - shows % used
## mount - shows mountpoint
#######################################################  End LUA Settings  ###

#digiThe all important - How often conky refreshes.
# If you have a "Crey" try: 0.2 - smokin' - but watch the CPU useage go UP!
update_interval 1 # in seconds

# stuff after 'TEXT' will be formatted on screen
TEXT
${alignc}${time %x}
${time %X}${alignr 15}${uptime_short}

${alignc}Hosted by: ${nodename}
${alignc}${color}${kernel}
${goto 10}${diskiograph_read 50,250 FFFF00 BBFF00 -t -l}${goto 10}${diskiograph_write 50,250 0000FF FF0000 -t -l}${goto 10}${color6}${cpubar cpu4 50,250}${color}\
${voffset -35}${goto 80}SDA: R: ${diskio_read /dev/sda}
${goto 80}     W: ${diskio_write /dev/sda}
${voffset 5}${goto 60}${color1}${fs_bar /}${color}
${voffset -30}/Root   ${fs_size /}${goto 170}Used${goto 220}${fs_used_perc /}%
${goto 60}${color1}${fs_bar_free /}${color}
${voffset -30}${goto 170}Free${goto 220}${fs_free_perc /}%
${goto 60}${color1}${fs_bar /home}${color}
${voffset -30}/Home   ${fs_size /home}${goto 170}Used${goto 220}${fs_used_perc /home}%
${goto 60}${color1}${fs_bar_free /home}${color}
${voffset -30}${goto 170}Free${goto 220}${fs_free_perc /home}%${font monofur:pixelsize=3}

${font}${goto 60}${color1}${cpubar cpu1}${goto 60}${cpugraph cpu1 -t 20,200 FF0000 FFFF00}${color}
${voffset -30}${goto 10}CPU1${goto 70}${freq_g} GHz${goto 220}${color}${if_match ${cpu cpu1}<10}  ${cpu cpu1}\
${else}${if_match ${cpu cpu1}<100} ${cpu cpu1}\
${else}${cpu cpu1}${endif}${endif}%${font monofur:pixelsize=3}

${font}${goto 60}${color1}${cpubar cpu0}${goto 60}${cpugraph cpu0 -t 20,200 FF0000 FFFF00}${color}
${voffset -30}${goto 10}CPU0${goto 70}${freq} MHz${goto 220}${color}${if_match ${cpu cpu0}<10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0}<100} ${cpu cpu0}\
${else}${cpu cpu0}${endif}${endif}%${font monofur:pixelsize=20}
${font}RAM: ${mem}/${memmax}${alignr 5}Swap: ${swap}/${swapmax}
SDA: Read: ${diskio_read /dev/sda}${goto 160}Write: ${diskio_write /dev/sda}

Memory ${color5}${hr}${color}
${goto 10}${color1}${membar 50,260}${color6}${goto 10}${memgraph 50,260 00BFFF FF0000}${goto 10}${color}${memgauge 50,260}${color}
${voffset -55}  ${color5}Total ${memmax} ${goto 150}In Use    ${mem}
  Free  ${memfree}${goto 150}Free Easy ${memeasyfree}${color}

Name${goto 120}PID    CPU     MEM
${color5}${stippled_hr 2}${color}
${top name 1}   ${top pid 1} ${top cpu 1}  ${top mem 1}
${top name 2}   ${top pid 2} ${top cpu 2}  ${top mem 2}
${top name 3}   ${top pid 3} ${top cpu 3}  ${top mem 3}
${top name 5}   ${top pid 5} ${top cpu 5}  ${top mem 5}
${top name 6}   ${top pid 6} ${top cpu 6}  ${top mem 6}
${top name 7}   ${top pid 7} ${top cpu 7}  ${top mem 7}
${top name 8}   ${top pid 8} ${top cpu 8}  ${top mem 8}
${top name 9}   ${top pid 9} ${top cpu 9}  ${top mem 9}
${color9}${hr}${color}
${goto 40}${color5}open ports: ${tcp_portmon 1 65535 count}
${goto 40}IP${alignr 5}DPORT${color}
${goto 40}${tcp_portmon 1 65535 rip  0}${alignr 1}${tcp_portmon 1 65535 rport  0}
${tcp_portmon 1 65535 rhost 0}
${goto 40}${tcp_portmon 1 65535 rip  1}${alignr 1}${tcp_portmon 1 65535 rport  1}
${tcp_portmon 1 65535 rhost 1}
${goto 40}${tcp_portmon 1 65535 rip  2}${alignr 1}${tcp_portmon 1 65535 rport  2}
${tcp_portmon 1 65535 rhost 2}
${goto 40}${tcp_portmon 1 65535 rip  3}${alignr 1}${tcp_portmon 1 65535 rport  3}
${tcp_portmon 1 65535 rhost 3}
${goto 40}${tcp_portmon 1 65535 rip  4}${alignr 1}${tcp_portmon 1 65535 rport  4}
${tcp_portmon 1 65535 rhost 4}
${goto 40}${tcp_portmon 1 65535 rip  5}${alignr 1}${tcp_portmon 1 65535 rport  5}
${tcp_portmon 1 65535 rhost 5}


NOTE:  it is setup for monofur font.
Comment these out if you don't use the LUA background - or change path  if you do.
lua_load /media/5/Conky/LUA/draw-bg.lua
lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.1


And just so you know, I don't have a CPU4 - I just want the box to be a different colour.
Title: Re: Conky Codes and Images
Post by: lwfitz on February 18, 2013, 08:29:01 AM
(http://en.zimagez.com/miniature/2013-02-18--13611751051918x1079scrot.png) (http://en.zimagez.com/zimage/2013-02-18--13611751051918x1079scrot.php)

conky_weather2

### Thanks to everyone at the VSIDO Forums #####
### Thanks to TeoBigusGeekus for the accuweather script #####
### Accuweather images edited by lwfitz ####
### allcombined.lua written by mrpeachy ####
### clock background image by Doruletz ####
max_specials 10000
max_user_text 15000
background no
use_xft yes
xftfont sans:size=9
xftalpha 1
total_run_times 0
own_window yes
own_window_argb_visual yes
own_window_transparent yes
own_window_type normal
own_window_title conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 375 1020
maximum_width 375
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_shade_color black
default_outline_color white
alignment top_left
gap_x 15
gap_y 20
no_buffers yes
uppercase no
cpu_avg_samples 6
override_utf8_locale yes
text_buffer_size 100000
top_name_width 5
update_interval 1
default_color FFFFFF
temperature_unit fahrenheit
# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2
format_human_readable yes
short_units yes
update_interval 1
imlib_cache_size 0

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
temperature_unit Fahrenheit

----------------------------

################### LUA #######################################

lua_load ~/Conky/allcombined_2.lua


## lua funcions
## background ##################################################################
#${lua draw_bg {corner_radius,x_position,y_position,width,height,color,alpha,draw_type,line_width,outline_color,outline_alpha}}
#note for background: set width=0 - width will be conky window width, set height=0 - height will be conky window height
# draw_type: 1=fill, 2=outline(must specify line_width), 3=outline and fill (must specify line_width, outline_color and outline_alpha)
## gradient bars ###############################################################
#${lua gradbar {x_position,y_position,"conky_object",object_max_value,number_of_divisions,division_width,division_height,division_gap,bg_color,bg_alpha,start_color,start_alpha,mid_color,mid_alpha,end_color,end_alpha}}
## calendar ###############################################################
#${lua luacal {x_position,y_position,"title_font",title_fontsize,title_color,title_alpha,"dates_font",dates_fontsize,dates_color,dates_alpha,"highlight_font",highlight_fontsize,highlight_color,highlight_alpha,"spacer",colum_gap,title_gap,row_gap,start_day}
#note for calendar: start day... 0=sunday, 1=monday ... "spacer" can help align calendar with non fix width fonts
## textured background ###############################################################
#${lua tex_bg {corner_radius,x_position,y_position,width,height,"/path/to/texture.png"}}
## lua draw images ###############################################################
#${lua luaimage {x_position,y_position,width,height,"/path/to/image"}}
#note for images: set width=0 - width will be image width, set height=0 - height will be image height
## lua draw text ###############################################################
#${lua luatext {x_position,y_position,color,alpha,"font",fontsize,"justify"}}
#note for text: justify can be "r" = right, "c" = center, "l" = left
#${lua draw_bg {10,0,0,0,0,0x000000,0.3}}

##############################  End LUA  ###
TEXT
${image $HOME/Conky/Clock-Flip.png -p 85,-5 -s 100x110}${image $HOME/Conky/Clock-Flip.png -p 185,-5 -s 100x110}
#########################################################################################################
# (RO) TIME
${font Helvetica LT Std :style=bold:size=58}${color 737373}${goto 100}${time %H}${goto 175}${goto 200}${color 737373}${time %M}${font}${color}
#########################################################################################################

# LOCATION (CITY NAMES) #

${voffset -10}${goto 85}${font Bitstream Vera Sans Mono:style=Bold:size=24:locale=ro}Monrovia,CA${font}${color}

#${lua tex_bg {20,4,20,365,540,"/home/luke/Conky/brushed.png"}}
${lua draw_bg {20,8,23,365,1020,0x737373,.15,2,8}}${voffset -10}${font WhiteRabbit:size=15}${goto 30}Temp ${goto 288}Feels${voffset 10}
${font WhiteRabbit:size=20}${goto 25}${execpi 600 sed -n '4p' $HOME/Accuweather_Conky_USA_Images/curr_cond}°F ${goto 286}${execpi 600 sed -n '5p' $HOME/Accuweather_Conky_USA_Images/curr_cond}°F
${font WhiteRabbit:size=11}${texeci 500 bash $HOME/Accuweather_Conky_USA_Images/acc_usa_images}${image $HOME/Accuweather_Conky_USA_Images/cc.png -p 75,118 -s 240x225}




${font WhiteRabbit:size=15}${goto 30}Dawn ${goto 285}Dusk
${voffset 10}${font WhiteRabbit:size=17}${goto 15}${execpi 600 sed -n '15p' $HOME/Accuweather_Conky_USA_Images/curr_cond}${goto 262}${execpi 600 sed -n '16p' $HOME/Accuweather_Conky_USA_Images/curr_cond}${voffset -10}

${font WhiteRabbit:size=13}${goto 30}${execpi 600 sed -n '6p' $HOME/Accuweather_Conky_USA_Images/tod_ton}${goto 145}${execpi 600 sed -n '11p' $HOME/Accuweather_Conky_USA_Images/tod_ton}${goto 265}${execpi 600 sed -n '16p' $HOME/Accuweather_Conky_USA_Images/tod_ton}

${font WhiteRabbit:size=10}${goto 100}${execpi 600 sed -n '9p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 215}${execpi 600 sed -n '14p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 330}${execpi 600 sed -n '19p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F
${voffset 5}${font WhiteRabbit:size=10}${goto 100}${execpi 600 sed -n '10p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 215}${execpi 600 sed -n '15p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 330}${execpi 600 sed -n '20p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${image $HOME/Accuweather_Conky_USA_Images/7.png -p 20,318 -s 80x67}${image $HOME/Accuweather_Conky_USA_Images/12.png -p 138,318 -s 80x67}${image $HOME/Accuweather_Conky_USA_Images/17.png -p 256,318 -s 80x67}${voffset -5}



${font WhiteRabbit:size=13}${goto 30}${execpi 600 sed -n '21p' $HOME/Accuweather_Conky_USA_Images/tod_ton}${goto 145}${execpi 600 sed -n '1p' $HOME/Accuweather_Conky_USA_Images/last_days}${goto 265}${execpi 600 sed -n '6p' $HOME/Accuweather_Conky_USA_Images/last_days}

${font WhiteRabbit:size=10}${goto 100}${execpi 600 sed -n '24p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 215}${execpi 600 sed -n '4p' $HOME/Accuweather_Conky_USA_Images/last_days}°F${goto 330}${execpi 600 sed -n '9p' $HOME/Accuweather_Conky_USA_Images/last_days}°F
${voffset 5}${font WhiteRabbit:size=10}${goto 100}${execpi 600 sed -n '25p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 215}${execpi 600 sed -n '5p' $HOME/Accuweather_Conky_USA_Images/last_days}°F${goto 330}${execpi 600 sed -n '10p' $HOME/Accuweather_Conky_USA_Images/last_days}°F${image $HOME/Accuweather_Conky_USA_Images/22.png -p 20,405 -s 80x67}${image $HOME/Accuweather_Conky_USA_Images/N2.png -p 138,405 -s 80x67}${image $HOME/Accuweather_Conky_USA_Images/N7.png -p 256,405 -s 80x67}${voffset -5}
#
#
#
#${font WhiteRabbit:size=13}${goto 30}${execpi 600 sed -n '11p' $HOME/Accuweather_Conky_USA_Images/last_days}${goto 145}${execpi 600 sed -n '16p' $HOME/Accuweather_Conky_USA_Images/last_days}${goto 265}${execpi 600 sed -n '21p' $HOME/Accuweather_Conky_USA_Images/last_days}
#
#${font WhiteRabbit:size=10}${goto 100}${execpi 600 sed -n '14p' $HOME/Accuweather_Conky_USA_Images/last_days}°F${goto 215}${execpi 600 sed -n '19p' $HOME/Accuweather_Conky_USA_Images/last_days}°F${goto 330}${execpi 600 sed -n '24p' $HOME/Accuweather_Conky_USA_Images/last_days}°F
#${voffset 5}${font WhiteRabbit:size=10}${goto 100}${execpi 600 sed -n '15p' $HOME/Accuweather_Conky_USA_Images/last_days}°F${goto 215}${execpi 600 sed -n '20p' $HOME/Accuweather_Conky_USA_Images/last_days}°F${goto 330}${execpi 600 sed -n '25p' $HOME/Accuweather_Conky_USA_Images/last_days}°F${image $HOME/Accuweather_Conky_USA_Images/N12.png -p 20,492 -s 80x67}${image $HOME/Accuweather_Conky_USA_Images/N17.png -p 138,492 -s 80x67}${image $HOME/Accuweather_Conky_USA_Images/N22.png -p 256,492 -s 80x67}${voffset -5}


${color 737373}${goto 15}${cpubar 1,350 cpu0}${color}

${font WhiteRabbit:size=25}${goto 80}Now Playing





${color 737373}${goto 15}${cpubar 1,350 cpu0}${color}
${image ~/Conky/grey_bar2.png -s 50x90 -p 168,660}
${voffset -30}${goto 15}${font WhiteRabbit:size=13}CPU1${goto 65}${cpu cpu1}%${goto 110}CPU2 ${cpu cpu2}%${goto 207}${font WhiteRabbit:size=20}Memory ${alignr 22}${memperc}%
${goto 15}${font WhiteRabbit:size=13}CPU3${goto 65}${cpu cpu3}%${goto 110}CPU4 ${cpu cpu4}%${voffset 20}${goto 207}${font WhiteRabbit:size=20}Swap ${alignr 22}${swapperc}%${voffset -20}
${goto 15}${font WhiteRabbit:size=13}CPU5${goto 65}${cpu cpu5}%${goto 110}CPU6 ${cpu cpu6}%

${color 737373}${goto 15}${cpubar 1,350 cpu0}${color}

#${font WhiteRabbit:size=25}${goto 125}Storage
${goto 15}${font WhiteRabbit:size=13}/Root${goto 130}${fs_used /}${goto 180} / ${fs_size /} ${alignr 25}${fs_used_perc /}%
${voffset 8}${goto 15}${font WhiteRabbit:size=13}/Home${goto 130}${fs_used /home}${goto 180} / ${fs_size /home} ${alignr 25}${fs_used_perc /home}%
${voffset 8}${goto 15}${font WhiteRabbit:size=13}Backup${goto 130}${fs_used /media/storage}${goto 180} / ${fs_size /media/storage} ${alignr 25}${fs_used_perc /media/storage}%
${voffset 8}${goto 15}${font WhiteRabbit:size=13}Music${goto 130}${fs_used /media/sde6}${goto 180} / ${fs_size /media/sde6} ${alignr 25}${fs_used_perc /media/sde6}%
${voffset 8}${goto 15}${font WhiteRabbit:size=13}External${goto 130}${fs_used /media/sde5}${goto 180} / ${fs_size /media/sde5} ${alignr 25}${fs_used_perc /media/sde5}%
${voffset 8}${goto 15}${font WhiteRabbit:size=13}Videos${goto 130}${fs_used /media/sdc1}${goto 180} / ${fs_size /media/sdc1} ${alignr 25}${fs_used_perc /media/sdc1}%
${voffset 8}${goto 15}${font WhiteRabbit:size=13}Software${goto 130}${fs_used /media/sdb1}${goto 180} / ${fs_size /media/sdb1} ${alignr 25}${fs_used_perc /media/sdb1}%
#${voffset 8}${goto 15}${font WhiteRabbit:size=13}/Home${goto 130}${fs_used /home}${goto 180} / ${fs_size /home} ${alignr 25}${fs_used_perc /home}%

${color 737373}${goto 15}${cpubar 1,350 cpu0}${color}

${goto 15}${voffset -3}Down Speed${goto 175}${downspeed eth0} ${goto 275}${voffset -8}${downspeedgraph eth0 20,75 99CCFF 000099}${color}
${goto 15}${voffset 8}Up Speed${goto 175}${upspeed eth0} ${goto 275}${voffset -8}${upspeedgraph eth0 20,75 99CCFF 000099}${color}


allcombined_2.lua

--[[ by mrpeachy -
combines background bar and calendar functions
]]
require 'cairo'
require 'imlib2'

function rgb_to_r_g_b(col_a)
return ((col_a[1] / 0x10000) % 0x100) / 255., ((col_a[1] / 0x100) % 0x100) / 255., (col_a[1] % 0x100) / 255., col_a[2]
end

function conky_gradbar(bartab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
local updates=tonumber(conky_parse('${updates}'))
if updates>5 then
--#########################################################################################################
--convert to table
local bartab=loadstring("return" .. bartab)()
local bar_startx=bartab[1]
local bar_starty=bartab[2]
local number=bartab[3]
local number=conky_parse(number)
local number_max=bartab[4]
local divisions=bartab[5]
local div_width=bartab[6]
local div_height=bartab[7]
local div_gap=bartab[8]
local bg_col=bartab[9]
local bg_alpha=bartab[10]
local st_col=bartab[11]
local st_alpha=bartab[12]
local mid_col=bartab[13]
local mid_alpha=bartab[14]
local end_col=bartab[15]
local end_alpha=bartab[16]
--color conversion
local br,bg,bb,ba=rgb_to_r_g_b({bg_col,bg_alpha})
local sr,sg,sb,sa=rgb_to_r_g_b({st_col,st_alpha})
local mr,mg,mb,ma=rgb_to_r_g_b({mid_col,mid_alpha})
local er,eg,eb,ea=rgb_to_r_g_b({end_col,end_alpha})
if number==nil then number=0 end
local number_divs=(number/number_max)*divisions
cairo_set_line_width (cr,div_width)
--gradient calculations
for i=1,divisions do
if i<(divisions/2) and i<=number_divs then
colr=((mr-sr)*(i/(divisions/2)))+sr
colg=((mg-sg)*(i/(divisions/2)))+sg
colb=((mb-sb)*(i/(divisions/2)))+sb
cola=((ma-sa)*(i/(divisions/2)))+sa
elseif i>=(divisions/2) and i<=number_divs then
colr=((er-mr)*((i-(divisions/2))/(divisions/2)))+mr
colg=((eg-mg)*((i-(divisions/2))/(divisions/2)))+mg
colb=((eb-mb)*((i-(divisions/2))/(divisions/2)))+mb
cola=((ea-ma)*((i-(divisions/2))/(divisions/2)))+ma
else
colr=br
colg=bg
colb=bb
cola=ba
end
cairo_set_source_rgba (cr,colr,colg,colb,cola)
cairo_move_to (cr,bar_startx+((div_width+div_gap)*i-1),bar_starty)
cairo_rel_line_to (cr,0,div_height)
cairo_stroke (cr)
end
--#########################################################################################################
end-- if updates>5
bartab=nil
colr=nil
colg=nil
colb=nil
cola=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_draw_bg(bgtab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--#########################################################################################################
--convert to table
local bgtab=loadstring("return" .. bgtab)()
local r=bgtab[1]
local x=bgtab[2]
local y=bgtab[3]
local w=bgtab[4]
local h=bgtab[5]
local color=bgtab[6]
local alpha=bgtab[7]
if w==0 then
w=tonumber(conky_window.width)
end
if h==0 then
h=tonumber(conky_window.height)
end
cairo_set_source_rgba (cr,rgb_to_r_g_b({color,alpha}))
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
--the drawing part---------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_fill (cr)
--#########################################################################################################
bgtab=nil
w=nil
h=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_luacal(caltab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--####################################################################################################
local caltab=loadstring("return" .. caltab)()
local cal_x=caltab[1]
local cal_y=caltab[2]
local tfont=caltab[3]
local tfontsize=caltab[4]
local tc=caltab[5]
local ta=caltab[6]
local bfont=caltab[7]
local bfontsize=caltab[8]
local bc=caltab[9]
local ba=caltab[10]
local hfont=caltab[11]
local hfontsize=caltab[12]
local hc=caltab[13]
local ha=caltab[14]
local spacer=caltab[15]
local gaph=caltab[16]
local gapt=caltab[17]
local gapl=caltab[18]
local sday=caltab[19]
--convert colors
--local font=string.gsub(font,"_"," ")
local tred,tgreen,tblue,talpha=rgb_to_r_g_b({tc,ta})
--main body text color
local bred,bgreen,bblue,balpha=rgb_to_r_g_b({bc,ba})
--highlight text color
local hred,hgreen,hblue,halpha=rgb_to_r_g_b({hc,ha})
--###################################################
--calendar calcs
local year=os.date("%G")
local today=tonumber(os.date("%d"))
local t1 = os.time( {    year=year,month=03,day=01,hour=00,min=0,sec=0} );
local t2 = os.time( {    year=year,month=02,day=01,hour=00,min=0,sec=0} );
local feb=(os.difftime(t1,t2))/(24*60*60)
local monthdays={ 31, feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
local day=tonumber(os.date("%w"))+1-sday
local day_num = today
local remainder=day_num % 7
local start_day=day-(day_num % 7)
if start_day<0 then start_day=7+start_day end     
local month=os.date("%m")
local mdays=monthdays[tonumber(month)]
local x=mdays+start_day
local dnum={}
local dnumh={}
if mdays+start_day<36 then
dlen=35
plen=29
else
dlen=42
plen=36
end
for i=1,dlen do
if i<=start_day then
dnum[i]="  "
else
dn=i-start_day
if dn=="nil" then dn=0 end
if dn<=9 then dn=(spacer .. dn) end
if i>x then dn="" end
dnum[i]=dn
dnumh[i]=dn
if dn==(spacer .. today) or dn==today then
dnum[i]=""
end
if dn==(spacer .. today) or dn==today then
dnumh[i]=dn
place=i
else dnumh[i]="  "
end
end
end--for
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
if tonumber(sday)==0 then
dys={"SU","MO","TU","WE","TH","FR","SA"}
else
dys={"MO","TU","WE","TH","FR","SA","SU"}
end
--draw calendar titles
for i=1,7 do
cairo_move_to (cr, cal_x+(gaph*(i-1)), cal_y)
cairo_show_text (cr, dys[i])
cairo_stroke (cr)
end
--draw calendar body
cairo_select_font_face (cr, bfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, bfontsize);
cairo_set_source_rgba (cr,bred,bgreen,bblue,balpha)
for i=1,plen,7 do
local fn=i
for i=fn,fn+6 do
cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
cairo_show_text (cr, dnum[i])
cairo_stroke (cr)
end
end
--highlight
cairo_select_font_face (cr, hfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, hfontsize);
cairo_set_source_rgba (cr,hred,hgreen,hblue,halpha)
for i=1,plen,7 do
local fn=i
for i=fn,fn+6 do
cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
cairo_show_text (cr, dnumh[i])
cairo_stroke (cr)
end
end
--#########################################################################################################
caltab=nil
dlen=nil
plen=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_luaimage(imtab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--#########################################################################################################
local imtab=loadstring("return" .. imtab)()
local im_x=imtab[1]
local im_y=imtab[2]
local im_w=imtab[3]
local im_h=imtab[4]
local file=imtab[5]
local show = imlib_load_image(file)
if show == nil then return end
imlib_context_set_image(show)
if tonumber(im_w)==0 then
width=imlib_image_get_width()
else
width=tonumber(im_w)
end
if tonumber(im_h)==0 then
height=imlib_image_get_height()
else
height=tonumber(im_h)
end
imlib_context_set_image(show)
local scaled=imlib_create_cropped_scaled_image(0, 0, imlib_image_get_width(), imlib_image_get_height(), width, height)
imlib_free_image()
imlib_context_set_image(scaled)
imlib_render_image_on_drawable(im_x, im_y)
imlib_free_image()
show=nil
--#########################################################################################################
imtab=nil
height=nil
width=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_tex_bg(textab)
local textab=loadstring("return" .. textab)()
local tex_file=textab[6]
local surface = cairo_image_surface_create_from_png(tostring(tex_file))
local cw,ch = conky_window.width, conky_window.height
local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, cw,ch)
local cr=cairo_create(cs)
--#########################################################################################################
--convert to table
local r=textab[1]
local x=textab[2]
local y=textab[3]
local w=textab[4]
local h=textab[5]
if w=="0" then
w=cw
end
if h=="0" then
h=ch
end
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
--the drawing part---------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_clip (cr)
cairo_new_path (cr);
--image part
cairo_set_source_surface (cr, surface, 0, 0)
cairo_paint (cr)
--#########################################################################################################
textab=nil
w=nil
h=nil
cairo_destroy(cr)
cairo_surface_destroy (cs)
cairo_surface_destroy (surface)
cr=nil
return ""
end-- end main function

function conky_luatext(txttab)--x,y,c,a,f,fs,txt,j ##################################################
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--#########################################################################################################
--convert to table
local txttab=loadstring("return" .. txttab)()
local x=txttab[1]
local y=txttab[2]
local c=txttab[3]
local a=txttab[4]
local f=txttab[5]
local fs=txttab[6]
local j=txttab[7]
local txt=txttab[8]
cairo_select_font_face (cr, f, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, fs)
local extents=cairo_text_extents_t:create()
cairo_text_extents(cr,txt,extents)
local wx=extents.x_advance
cairo_set_source_rgba (cr,rgb_to_r_g_b({c,a}))
if j=="l" then
cairo_move_to (cr,x,y)
elseif j=="c" then
cairo_move_to (cr,x-(wx/2),y)
elseif j=="r" then
cairo_move_to (cr,x-wx,y)
end
cairo_show_text (cr,txt)
cairo_stroke (cr)
--#########################################################################################################
txttab=nil
cairo_destroy(cr)
cairo_surface_destroy (cs)
cr=nil
return ""
end-- end main function


Teos weather accuweather script w/ my edited images and the clock background
image can be found here (https://www.dropbox.com/s/0kx5xnxon852x0p/conky_grey.tar.gz)

The wallpaper can be found here (http://vsido.org/index.php/topic,53.msg2472.html#msg2472)
Title: Re: Conky Codes and Images
Post by: jedi on February 18, 2013, 08:34:23 PM
lwfitz, I like!!!  ;D
Title: Re: Conky Codes and Images
Post by: VastOne on February 18, 2013, 09:57:49 PM
Very nice lwfitz...   :)
Title: Re: Conky Codes and Images
Post by: lwfitz on February 19, 2013, 05:39:36 AM
Thanks guys  ;D
Title: Re: Remember when ...
Post by: McLovin on February 22, 2013, 04:22:11 AM
You know, that give me an idea of some things that I may be able to do with some of my setups, lets see what I can come up with teehee
Title: Re: Remember when ...
Post by: Sector11 on February 22, 2013, 04:36:35 PM
And yet another trip down memory lane.
- no voffsets like the original


(http://t.imgbox.com/adm0oSbx.jpg) (http://imgbox.com/adm0oSbx)




   From these, to this ->   


(http://t.imgbox.com/advj3TbN.jpg) (http://imgbox.com/advj3TbN)
Fonts:
Title: Re: Remember when ...
Post by: vrkalak on February 23, 2013, 03:09:04 AM
I know I have one of those 'old' Conky +--+-- Scripts on an external hard-drive somewhere.  :P

Gives me an excuse to look for it.
Title: OPC's and MOPS
Post by: Sector11 on February 24, 2013, 03:05:49 PM
OPC use to mean Other People's Cigarettes, now it means Other Peoples Conkys, add that with MPOS (Modifying Other People's Stuff) and it can be quite interesting.

Personally for me these are kinda small but would sit well on a netbook I suppose - later I think I'll take that HUD2 and make it larger.
(http://t.imgbox.com/adtkneuw.jpg) (http://imgbox.com/adtkneuw)

* clock_conky.tar.gz - on the top left (obvious)
* conky_HUD.tar.gz - bottom middle
* conky_HUD2.tar.gz - bottom left
Title: Re: OPC's and MOPS
Post by: VastOne on February 24, 2013, 11:17:50 PM
Excellent thread Sector11!  8)

And that scrot and setup is a perfect example of a great OPC... I really like the Age of VSIDO
Title: Re: OPC's and MOPS
Post by: Sector11 on February 25, 2013, 01:03:27 AM
Yea but the OPC isn't the main thing it's the MOPS.  The clock in the top left came from another LUA script that had a bunch of rings (not the HUDs shown).  First time I tried it was a miserable failure, I missed some code.  OOPS! After getting it working it was personalized as shown.

The HUD (bottom middle) is modified from the original as well and then I took the clock and added it to the HUD to create something new on the bottom left.

The "Age of VSIDO" came from a screenshot of a B rated movie that never even made that on the scale of ratings.  Made on a shoestring, from penny loafers, budget and actors that took one lesson and failed that.  Worst movie I've seen in years!  But I rather like the screenshot  :D
Title: Re: OPC's and MOPS
Post by: jedi on February 25, 2013, 02:32:18 AM
Sector11, you truly are a "Conky Master"!   ;D
Title: Re: Conky Codes and Images
Post by: jedi on February 25, 2013, 07:53:58 AM
An old sidebar Conky I found in my local Conky archive...

(http://www.zimagez.com/miniature/screenshot-02252013-024647am.png) (http://www.zimagez.com/zimage/screenshot-02252013-024647am.php)

the conkyrc_sidebar;

## Conky Cairo Sidebar         ##
## by jpope                    ##
## version 1.0.2011.09.30      ##
##                             ##
#################################
# . Conky settings . #
background no
update_interval 1
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale yes
double_buffer yes
no_buffers yes
text_buffer_size 2048
imlib_cache_size 0
imlib_cache_flush_interval 60
max_specials 1024
max_user_text 1024
#temperature_unit fahrenheit

# . Window specifications . #
own_window yes
own_window_type desktop
own_window_argb_visual yes
own_window_argb_value 0
own_window_hints undecorated,sticky,skip_taskbar,skip_pager,below
own_window_title ConkySidebar
own_window_class ConkySidebar
border_inner_margin 0
border_outer_margin 0
minimum_size 568 568
maximum_width 180
alignment top_right #Choices are: top_left, top_right, top_middle, bottom_left, bottom_right, bottom_middle, middle_left, middle_middle,
middle_right
gap_x 8
gap_y 16

# . Graphics settings . #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

# . Text settings . #
use_xft yes
xftfont droid sans:size=8
xftalpha 0
use_spacer left
uppercase no

# . Color settings . #
default_color ffffff

# . Lua Load . #
lua_load ~/conky/sidebar.lua
lua_draw_hook_pre widgets

TEXT
${execi 3600 aptitude search '~U' | wc -l | tail > ~/conky/upd}


The sidebar.lua;

--[[ CairoSideBar by jpope
    Most work here done by other conky masters with some slight modifications. ;)
    v1.0.2011.09.30
]]

--[[
Conky Widgets by londonali1010 (2009)

This script is meant to be a "shell" to hold a suite of widgets for use in Conky.

To configure:
+ Copy the widget's code block (will be framed by --(( WIDGET NAME )) and --(( END WIDGET NAME )), with "[" instead of "(") somewhere between
"require 'cairo'" and "function conky_widgets()", ensuring not to paste into another widget's code block
+ To call the widget, add the following between "cr = cairo_create(cs)" and "cairo_destroy(cr)" at the end of the script:
NAME_OF_FUNCTION(cr, OPTIONS)
+ Replace OPTIONS with the options for your widget (should be specified in the widget's code block)

Call this script in Conky using the following before TEXT (assuming you save this script to ~/scripts/conky_widgets.lua):
lua_load ~/scripts/conky_widgets.lua
lua_draw_hook_pre widgets

Changelog:
+ v1.1 -- Simplified calls to widgets by implementing a global drawing surface, and included imlib2 by default (03.11.2009)
+ v1.0 -- Original release (17.10.2009)
]]

require 'cairo'
require 'imlib2'

usrhome = os.getenv("HOME")

--[[ USER OPTIONS ]]

clockface=3

color01=0x000000        --original 0x909090
color02=0xFFFFFF        --original 0xFFFFFF
color03=0xFF0000        --original 0xFF0000
color04=0x606060        --original 0x707070

--[[ END USER OPTIONS ]]
   
--[[ ROUNDED RECTANGLE WIDGET ]]
--[[ v1.0 by londonali1010 (2009) ]]
--[[ Options (x0, y0, width, height, radius, colour, alpha):
"x0" and "y0" are the coordinates (in pixels) of the top left of the rectangle, relative to the top left of the Conky window.
"width" and "height" are the width and height of the rectangle, respectively.
"radius" is the rounding radius of the corners, in pixels.
"colour" is the colour of the rectangle, in format 0xRRGGBB.
"alpha" is the transparency of the rectangle, from 0.0 (transparent) -> 1.0 (opaque) ]]

function round_rect(x0, y0, w, h, r, colour, alpha)
local function rgb_to_r_g_b(colour, alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

    local updates=conky_parse('${updates}')
    update_num=tonumber(updates)
    if update_num>5 then

cairo_move_to(cr, x0, y0)
cairo_rel_move_to(cr, r, 0)
cairo_rel_line_to(cr, w-2*r, 0)
cairo_rel_curve_to(cr, r, 0, r, 0, r, r)
cairo_rel_line_to(cr, 0, h-2*r)
cairo_rel_curve_to(cr, 0, r, 0, r, -r, r)
cairo_rel_line_to(cr, -(w-2*r), 0)
cairo_rel_curve_to(cr, -r, 0, -r, 0, -r, -r)
cairo_rel_line_to(cr, 0, -(h-2*r))
cairo_rel_curve_to(cr, 0, -r, 0, -r, r, -r)
cairo_close_path(cr)

cairo_set_source_rgba(cr, rgb_to_r_g_b(colour, alpha))
cairo_fill(cr)
    end
end

--[[ END ROUNDED RECTANGLE WIDGET ]]

--[[ PRINT TEXT ]]
--[[ jpope 2011.09.30 ]]
--[[ based on SHINY CALENDAR PAGE WIDGET v1.0 by londonali1010 (2009) ]]
--[[ Options (xcc, ycc, size, bg_colour, fg_colour, alpha)
-- "xcc" and "ycc" are the x and y coordinates of the centre of the widget, in pixels, relative to the top left of the Conky window.
-- "size" is the width of the widget (which is square).
-- "bg_colour" is the colour, in format 0xRRGGBB, of the widget's background.
-- "fg_colour" is the colour of the widget's text.
-- "alpha" is the opacity (0.0 -> 1.0) of the widget. ]]

function printtext(xcc, ycc, size, bgc, fgc, alpha)
local function rgb_to_r_g_b(colour, alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

    local updates=conky_parse('${updates}')
    update_num=tonumber(updates)
    if update_num>5 then

local function set_font_sizes()
day_size = 1.0
date_size = 1.0
month_size = 1.0
var_size = 1.0
data_size = 1.0

local extents = cairo_text_extents_t:create()
cairo_select_font_face(cr, "Droid Sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL)
cairo_set_font_size(cr, day_size)
cairo_text_extents(cr, day, extents)
local w = math.abs(extents.width)
local h = math.abs(extents.y_bearing)
local scale_w = 0.8*size / w
local scale_h = 0.1*size / h
local scale
if scale_w < scale_h then scale = scale_w else scale = scale_h end
day_size = scale * day_size

cairo_set_font_size(cr, date_size)
cairo_text_extents(cr, date, extents)
w = math.abs(extents.width)
h = math.abs(extents.y_bearing)
scale_w = 0.6*size / w
scale_h = 0.6*size / h
if scale_w < scale_h then scale = scale_w else scale = scale_h end
date_size = scale * date_size

cairo_set_font_size(cr, month_size)
cairo_text_extents(cr, month, extents)
w = math.abs(extents.width)
h = math.abs(extents.y_bearing)
scale_w = 0.8*size / w
scale_h = 0.1*size / h
if scale_w < scale_h then scale = scale_w else scale = scale_h end
month_size = scale * month_size

cairo_set_font_size(cr, var_size)
cairo_text_extents(cr, var, extents)
w = math.abs(extents.width)
h = math.abs(extents.y_bearing)
scale_w = 0.9*size / w
scale_h = 0.09*size / h
if scale_w < scale_h then scale = scale_w else scale = scale_h end
var_size = scale * var_size

cairo_set_font_size(cr, data_size)
cairo_text_extents(cr, data, extents)
w = math.abs(extents.width)
h = math.abs(extents.y_bearing)
scale_w = 0.9*size / w
scale_h = 0.06*size / h
if scale_w < scale_h then scale = scale_w else scale = scale_h end
data_size = scale * data_size

return day_size, date_size, month_size, var_size, data_size
end

local function draw_text()
local extents = cairo_text_extents_t:create()
cairo_set_source_rgba(cr, rgb_to_r_g_b(fgc, alpha))

cairo_set_font_size(cr, day_size)
cairo_text_extents(cr, day, extents)
cairo_move_to(cr, x0 + size/2 - extents.x_advance/2, y0 + 0.35*size)
cairo_show_text(cr, day)

cairo_set_font_size(cr, date_size)
cairo_text_extents(cr, date, extents)
cairo_move_to(cr, x0 + size/2 - extents.x_advance/2, y0 + 0.5*size - extents.y_bearing/2)
cairo_show_text(cr, date)

cairo_set_font_size(cr, month_size)
cairo_text_extents(cr, month, extents)
cairo_move_to(cr, x0 + size/2 - extents.x_advance/2, y0 + 0.70*size)
cairo_show_text(cr, month)

var = "CPU"
cairo_set_font_size(cr, var_size)
cairo_text_extents(cr, var, extents)
cairo_move_to(cr, x0 + size/2 - extents.x_advance/2, y0 + 0.95*size)
cairo_show_text(cr, var)

data = conky_parse('${cpu cpu0}%')
cairo_set_font_size(cr, data_size)
cairo_text_extents(cr, data, extents)
cairo_move_to(cr, x0 + size/2 - extents.x_advance/2, y0 + 1.02*size)
cairo_show_text(cr, data)

data = conky_parse('${hwmon temp 3}C')
cairo_set_font_size(cr, data_size)
cairo_text_extents(cr, data, extents)
cairo_move_to(cr, x0 + size/2 - extents.x_advance/2 - 2, y0 + 1.09*size)
cairo_show_text(cr, data)

var = "MEM"
cairo_set_font_size(cr, var_size)
cairo_text_extents(cr, var, extents)
cairo_move_to(cr, x0 + size/2 - extents.x_advance/2, y0 + 1.2*size)
cairo_show_text(cr, var)

data = conky_parse('${memperc}%')
cairo_set_font_size(cr, data_size)
cairo_text_extents(cr, data, extents)
cairo_move_to(cr, x0 + size/2 - extents.x_advance/2, y0 + 1.27*size)
cairo_show_text(cr, data)

data = conky_parse('${mem}')
cairo_set_font_size(cr, data_size)
cairo_text_extents(cr, data, extents)
cairo_move_to(cr, x0 + size/2 - extents.x_advance/2 - 2, y0 + 1.34*size)
cairo_show_text(cr, data)

var = "Battery"
cairo_set_font_size(cr, var_size)
cairo_text_extents(cr, var, extents)
cairo_move_to(cr, x0 + size/2 - extents.x_advance/2, y0 + 1.57*size)
cairo_show_text(cr, var)

data = conky_parse('${battery_percent BAT1}%')
cairo_set_font_size(cr, data_size)
cairo_text_extents(cr, data, extents)
cairo_move_to(cr, x0 + size/2 - extents.x_advance/2, y0 + 1.64*size)
cairo_show_text(cr, data)

data = conky_parse('${battery_time BAT1}')
cairo_set_font_size(cr, data_size)
cairo_text_extents(cr, data, extents)
cairo_move_to(cr, x0 + size/2 - extents.x_advance/2, y0 + 1.71*size)
cairo_show_text(cr, data)

var = "Wireless"
cairo_set_font_size(cr, var_size)
cairo_text_extents(cr, var, extents)
cairo_move_to(cr, x0 + size/2 - extents.x_advance/2, y0 + 1.82*size)
cairo_show_text(cr, var)

data = conky_parse('${wireless_link_qual_perc wlan0}%')
cairo_set_font_size(cr, data_size)
cairo_text_extents(cr, data, extents)
cairo_move_to(cr, x0 + size/2 - extents.x_advance/2 - 2, y0 + 1.89*size)
cairo_show_text(cr, data)

data = conky_parse('u:${upspeed wlan0}|d:${downspeed wlan0}')
cairo_set_font_size(cr, data_size)
cairo_text_extents(cr, data, extents)
cairo_move_to(cr, x0 + size/2 - extents.x_advance/2, y0 + 1.96*size)
cairo_show_text(cr, data)

var = "VSIDO XFCE"
cairo_set_font_size(cr, var_size)
cairo_text_extents(cr, var, extents)
cairo_move_to(cr, x0 + size/2 - extents.x_advance/2, y0 + 2.19*size)
cairo_show_text(cr, var)

data = conky_parse("Updates: ${execi 1 cat ~/conky/upd}")
cairo_set_font_size(cr, data_size)
cairo_text_extents(cr, data, extents)
cairo_move_to(cr, x0 + size/2 - extents.x_advance/2, y0 + 2.26*size)
cairo_show_text(cr, data)

cairo_select_font_face(cr, "OpenLogos", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL)
var = "J"
cairo_set_font_size(cr, var_size*2)
cairo_text_extents(cr, var, extents)
cairo_move_to(cr, x0 + size/2 - extents.x_advance/2, y0 + 2.44*size)
cairo_show_text(cr, var)
end

x0, y0 = xcc - size/2, ycc - size/2
day = os.date("%A")
date = os.date("%d")
month = os.date("%B")

day_size, date_size, month_size = set_font_sizes()
draw_text(day_size, date_size, month_size)
    end
end

--[[ END PRINT TEXT ]]

--[[ GUAGE CLOCK WIDGET VERSION 2 ]]
--[[ Options (xc, yc, size, rpt, clr, alp, hrt, mst, thck):
    "xc" and "yc" are the x and y coordinates of the centre of the clock, in pixels, relative to the top left of the Conky window
    "size" is the total size of the widget, in pixels
    "rpt" is the number of times to repeat the clock hands
    "clr" = color
    "alp" = alpha
    "hrt" is the amount of space between the repeating hands for the hours
    "mst" is the number of space between the repeating hands for seconds & minutes
    "thck" is the starting thickness ]]

function guage_clockv2(cr, xc, yc, size, rpt, clr, clr2, alp, hrt, mst, thck)
    local function rgb_to_r_g_b(colour,alpha)
        return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
    end
    local updates=conky_parse('${updates}')
    update_num=tonumber(updates)
    if update_num>5 then
        local offset = 0
        local clock_r = (size - 2 * offset) / (2 * 1.25)
        show_seconds=true
        -- Grab time
        local hours=os.date("%I")
        local mins=os.date("%M")
        local secs=os.date("%S")
        secs_arc=(2*math.pi/60)*secs
        mins_arc=(2*math.pi/60)*mins--+secs_arc/60
        hours_arc=(2*math.pi/12)*hours+mins_arc/12
        -- Background
            lp=0
            mark=(2*math.pi)/12
            repeat
                xss=xc+0.80*clock_r*math.sin(mark+mark*lp)
                yss=yc-0.80*clock_r*math.cos(mark+mark*lp)
                xs=xc+1.04*clock_r*math.sin(mark+mark*lp)
                ys=yc-1.04*clock_r*math.cos(mark+mark*lp)
                cairo_move_to(cr,xss,yss)
                cairo_line_to(cr,xs,ys)
                tck=thck
                cairo_set_line_width(cr,tck)
                cairo_set_source_rgba(cr,rgb_to_r_g_b(clr,(alp*0.1)))
                cairo_stroke(cr)
                lp = lp + 1
            until lp >= 12
            lp=0
            mark=(2*math.pi)/60
            repeat
                xss=xc+0.84*clock_r*math.sin(mark+mark*lp)
                yss=yc-0.84*clock_r*math.cos(mark+mark*lp)
                xs=xc+1*clock_r*math.sin(mark+mark*lp)
                ys=yc-1*clock_r*math.cos(mark+mark*lp)
                cairo_move_to(cr,xss,yss)
                cairo_line_to(cr,xs,ys)
                tck=thck
                cairo_set_line_width(cr,tck)
                cairo_set_source_rgba(cr,rgb_to_r_g_b(clr,(alp*0.1)))
                cairo_stroke(cr)
                lp = lp + 1
            until lp >= 60
        -- Draw hour hand
        th=2*math.pi/hrt
            xhs=xc+0*clock_r*math.sin(hours_arc-th)
            yhs=yc-0*clock_r*math.cos(hours_arc-th)
            xh=xc+0.70*clock_r*math.sin(hours_arc-th)
            yh=yc-0.70*clock_r*math.cos(hours_arc-th)
            cairo_move_to(cr,xhs,yhs)
            cairo_line_to(cr,xh,yh)
            cairo_set_line_cap(cr,CAIRO_LINE_CAP_ROUND)
            cairo_set_line_width(cr,thck+thck*0.5)
            al=alp*0.5
            cairo_set_source_rgba(cr,rgb_to_r_g_b(clr,(al)))
            cairo_stroke(cr)
        -- Draw minute hand
        tm=(2*math.pi)/mst
            xms=xc+0*clock_r*math.sin(mins_arc-tm)
            yms=yc-0*clock_r*math.cos(mins_arc-tm)
            xm=xc+0.95*clock_r*math.sin(mins_arc-tm)
            ym=yc-0.95*clock_r*math.cos(mins_arc-tm)
            cairo_move_to(cr,xms,yms)
            cairo_line_to(cr,xm,ym)
            tk=thck/2
            cairo_set_line_width(cr,tk)
            cairo_set_source_rgba(cr,rgb_to_r_g_b(clr,(alp)))
            cairo_stroke(cr)
        -- Draw seconds hand
        if show_seconds then
            ts=(2*math.pi)/mst
                xss=xc+0*clock_r*math.sin(secs_arc-ts)
                yss=yc-0*clock_r*math.cos(secs_arc-ts)
                xs=xc+1.05*clock_r*math.sin(secs_arc-ts)
                ys=yc-1.05*clock_r*math.cos(secs_arc-ts)
                cairo_move_to(cr,xss,yss)
                cairo_line_to(cr,xs,ys)
                tck=thck/3
                cairo_set_line_width(cr,tck)
                cairo_set_source_rgba(cr,rgb_to_r_g_b(clr2,(alp)))
                cairo_stroke(cr)
        end
    end
end
--[[ END GUAGE CLOCK WIDGET VERSION 2 ]]

--[[ RING WIDGET ]]
--[[ v1.1 by londonali1010 (2009) ]]
--[[ Options (name, arg, max, bg_colour, bg_alpha, fg_colour, fg_alpha, xc, yc, radius, thickness, start_angle, end_angle):
"name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'.
"arg" is the argument to the stat type, e.g. if in Conky you would write ${cpu cpu0}, 'cpu0' would be the argument. If you would not
use an argument in the Conky variable, use ''.
"max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100.
"bg_colour" is the colour of the base ring.
"bg_alpha" is the alpha value of the base ring.
"fg_colour" is the colour of the indicator part of the ring.
"fg_alpha" is the alpha value of the indicator part of the ring.
"x" and "y" are the x and y coordinates of the centre of the ring, relative to the top left corner of the Conky window.
"radius" is the radius of the ring.
"thickness" is the thickness of the ring, centred around the radius.
"start_angle" is the starting angle of the ring, in degrees, clockwise from top. Value can be either positive or negative.
"end_angle" is the ending angle of the ring, in degrees, clockwise from top. Value can be either positive or negative, but must be
larger (e.g. more clockwise) than start_angle. ]]

function ring(name, arg, max, bgc, bga, fgc, fga, xc, yc, r, t, sa, ea)
local function rgb_to_r_g_b(colour, alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

local function draw_ring(pct)
local angle_0 = sa * (2 * math.pi/360) - math.pi/2
local angle_f = ea * (2 * math.pi/360) - math.pi/2
local pct_arc = pct * (angle_f - angle_0)

-- Draw background ring

cairo_arc(cr, xc, yc, r, angle_0, angle_f)
cairo_set_source_rgba(cr, rgb_to_r_g_b(bgc, bga))
cairo_set_line_width(cr, t)
cairo_stroke(cr)

-- Draw indicator ring

cairo_arc(cr, xc, yc, r, angle_0, angle_0 + pct_arc)
cairo_set_source_rgba(cr, rgb_to_r_g_b(fgc, fga))
cairo_stroke(cr)
end

local function setup_ring()
local str = ''
local value = 0

str = string.format('${%s %s}', name, arg)
str = conky_parse(str)

value = tonumber(str)
if value == nil then value = 0 end
pct = value/max

draw_ring(pct)
end

local updates = conky_parse('${updates}')
update_num = tonumber(updates)

if update_num > 5 then setup_ring() end
end

--[[ END RING WIDGET ]]

--[[ RING (COUNTER-CLOCKWISE) WIDGET ]]
--[[ v1.1 by londonali1010 (2009) ]]
--[[ Options (name, arg, max, bg_colour, bg_alpha, fg_colour, fg_alpha, xc, yc, radius, thickness, start_angle, end_angle):
"name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'.
"arg" is the argument to the stat type, e.g. if in Conky you would write ${cpu cpu0}, 'cpu0' would be the argument. If you would not
use an argument in the Conky variable, use ''.
"max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100.
"bg_colour" is the colour of the base ring.
"bg_alpha" is the alpha value of the base ring.
"fg_colour" is the colour of the indicator part of the ring.
"fg_alpha" is the alpha value of the indicator part of the ring.
"x" and "y" are the x and y coordinates of the centre of the ring, relative to the top left corner of the Conky window.
"radius" is the radius of the ring.
"thickness" is the thickness of the ring, centred around the radius.
"start_angle" is the starting angle of the ring, in degrees, counter-clockwise from top. Value can be either positive or negative.
"end_angle" is the ending angle of the ring, in degrees, counter-clockwise from top. Value can be either positive or negative, but must
be larger (e.g. more counter-clockwise) than start_angle. ]]

function ring_ccw(name, arg, max, bgc, bga, fgc, fga, xc, yc, r, t, sa, ea)
local function rgb_to_r_g_b(colour, alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

local function draw_ring(pct)
local angle_0 = sa * (2 * math.pi/360) - math.pi/2
local angle_f = ea * (2 * math.pi/360) - math.pi/2
local pct_arc = pct * (angle_f - angle_0)

-- Draw background ring

cairo_arc_negative(cr, xc, yc, r, angle_0, angle_f)
cairo_set_source_rgba(cr, rgb_to_r_g_b(bgc, bga))
cairo_set_line_width(cr, t)
cairo_stroke(cr)

-- Draw indicator ring

cairo_arc_negative(cr, xc, yc, r, angle_0, angle_0 - pct_arc)
cairo_set_source_rgba(cr, rgb_to_r_g_b(fgc, fga))
cairo_stroke(cr)
end

local function setup_ring()
local str = ''
local value = 0

str = string.format('${%s %s}', name, arg)
str = conky_parse(str)

value = tonumber(str)
if value == nil then value = 0 end
pct = value/max

draw_ring(pct)
end

local updates = conky_parse('${updates}')
update_num = tonumber(updates)

if update_num > 5 then setup_ring() end
end

--[[ END RING (COUNTER-CLOCKWISE) WIDGET ]]

function conky_widgets()
   
if conky_window == nil then return end

    if cs == nil or cairo_xlib_surface_get_width(cs) ~= conky_window.width or cairo_xlib_surface_get_height(cs) ~= conky_window.height then
        if cs then cairo_surface_destroy(cs) end
        cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width,
conky_window.height)
    end
    if cr then cairo_destroy(cr) end

    cr = cairo_create(cs)

round_rect(0, 0, 180, 568, 5, color01, 0.3)
round_rect(5, 5, 170, 170, 10, color01, 0.3)--(x0, y0, width, height, radius, colour, alpha)
round_rect(10, 10, 160, 160, 20, color04, 0.3)
round_rect(5, 180, 170, 100, 10, color01, 0.3)
round_rect(10, 185, 160, 90, 20, color04, 0.3)
round_rect(5, 285, 170, 100, 10, color01, 0.3)
round_rect(10, 290, 160, 90, 20, color04, 0.3)
round_rect(5, 390, 170, 100, 10, color01, 0.3)
round_rect(10, 395, 160, 90, 20, color04, 0.3)
round_rect(5, 495, 170, 68, 10, color01, 0.3)
round_rect(10, 500, 160, 58, 20, color04, 0.3)
guage_clockv2(cr, 90, 90, 170, 1, color02, color03, 0.98, 1, 1, 2)
printtext(90, 230, 170, color01, color02, 0.5)
    cairo_destroy(cr)
    cr = cairo_create(cs)
ring('cpu', 'cpu0', 100, color01, 0.1, color02, 0.2, 10, 336, 37, 5, 0, 180)
ring_ccw('memperc', '', 100, color01, 0.1, color02, 0.2, 170, 336, 37, 5, 0, 180)
ring('battery_percent', 'BAT1', 100, color01, 0.1, color02, 0.2, 10, 441, 37, 5, 0, 180)
ring_ccw('wireless_link_qual_perc', 'wlan0', 100, color01, 0.1, color02, 0.2, 170, 441, 37, 5, 0, 180)
    cairo_destroy(cr)
    cr = nil
end

function conky_cairo_cleanup()
    cairo_surface_destroy(cs)
    cs = nil
end


Cheers
Title: Re: OPC's and MOPS
Post by: Sector11 on February 25, 2013, 01:36:14 PM
Thank you Grasshopper.    ;)
Title: Re: Conky Codes and Images
Post by: Sector11 on February 25, 2013, 01:42:47 PM
I gotta get more active in here.  Some really nice stuff going on.

Let me create something new first.   8)
Title: Re: Conky Codes and Images
Post by: jedi on February 25, 2013, 10:03:09 PM
After a lot of tweaking and a little help from the master, Sector11, finally got it how I want it.  Credits to McLovin for the bargraph.lua used in the left hand Conky, and to mrpeachy, for his mounted.lua, and also on the right side his v9000 weather script.  Bottom right credits to VastOne, for the gmail parser and the awesome GMB Layouts!  And thanks also to jst_joe, for getting rid of the green and replacing it with blue, in my favorite wallpaper!  You'll need some fonts as well...  Google is your friend!

(http://en.zimagez.com/miniature/finalconky1.png) (http://en.zimagez.com/zimage/finalconky1.php)

system conky;


######################
# - Conky settings - #
# -Based on a conky- #
# -by McLovins Bars- #
######################

background no
update_interval 1
cpu_avg_samples 2
total_run_times 0
override_utf8_locale yes

double_buffer yes
#no_buffers yes

text_buffer_size 10240
imlib_cache_size 10240

minimum_size 300 1080
maximum_width 300

gap_x 15
gap_y 5
#####################
# - Text settings - #
#####################
use_xft yes
xftfont Santana:size=10
xftalpha .8

uppercase no

# Text alignment, other possible values are commented
#alignment middle_left
#alignment middle_middle
#alignment middle_right
#alignment top_middle
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right
#alignment bottom_middle

######################
# - Color settings - #
######################
color0 c3c3c3 #mid gray
color1 FF0000 #red
color2 A4FFA4 #light green
color3 007EFF #bright blue
color4 E3E3E3 #very light gray
color5 c6771a #an orange shade
color6 CA8718 #a dust like color
color7 FFE500 #a darker yellow color
color8 C3FF00 #lime green
color9 227992 #bars-blue #another blue 48a3fd
default_color c3c3c3
default_shade_color gray
default_outline_color black
#############################
# - Window specifications - #
#############################
own_window yes
own_window_transparent yes
own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_class conky-semi
own_window_title clicky
#own_window_argb_visual yes
#own_window_argb_value 255

border_inner_margin 0
border_outer_margin 0

#########################
# - Graphics settings - #
#########################
draw_shades no
draw_outline no
draw_borders no
stippled_borders 0
draw_graph_borders no

####
## Load Lua for bargraphs (required)
## Set the path to your script here.
#
#lua_load ~/conky/draw-bg.lua
lua_load ~/conky/bargraph.lua
lua_draw_hook_pre main_bars
lua_load ~/conky/LUA/mounted.lua
TEXT
${lua get_mounted_data 3}#${lua conky_draw_bg 10 0 0 0 0 0x363636 0.4}
#${alignc}SYSTEM
${goto 6}${voffset 4}${color 547EC8}${font xspiralmental:size=14}G${color}${font}${voffset -4}${goto 32}Distro:${alignr}${execi 2600 cat /etc/issue.net}-VSIDO
${goto 6}${voffset 4}${color 547EC8}${font xspiralmental:size=14}Z${color}${font}${voffset -4}${goto 32}Kernel:${alignr}${kernel} (${execi 3600 uname -m})
${goto 6}${voffset 4}${color 547EC8}${font StyleBats:size=14}o${color}${font}${voffset -4}${goto 32}Uptime:${alignr}${uptime}
${goto 6}${voffset 4}${color 547EC8}${font StyleBats:size=16}q${color}${font}${voffset -4}${goto 32}Processes:${alignr}${processes} ($running_processes running)
#${goto 6}${voffset 5}${font PizzaDude Bullets:size=14}J${font}${voffset -4}${goto 32}${voffset -4}Security updates: ${goto 285}${execi 600 /usr/lib/update-notifier/apt-check 2>&1 |cut -d ';' -f 1}
#${goto 32}Normal updates: ${goto 285}${execi 600 /usr/lib/update-notifier/apt-check 2>&1 |cut -d ';' -f 2}
${color 547EC8}${hr}${color}
${goto 6}${color 951C1C}${font Weather:size=22}x${color}${font}${goto 32}${voffset -2}Motherboard Temp: ${alignr}${hwmon temp 1}º C${font}
${goto 6}${color 951C1C}${font Weather:size=22}x${color}${font}${goto 32}${voffset -2}CPU Socket Temp: ${alignr}${hwmon temp 2}º C${font}
#${goto 6}${color 547EC8}${font PizzaDude Bullets:size=16}e${color}${font}${goto 32}${voffset -2}Physical CPU Temp: ${alignr}${hwmon temp 3}º C${font}
${color 547EC8}${hr}${color}
${goto 46}${color 547EC8}${font Poky:size=14}P${color}${voffset}${font}${voffset -4}${goto 28}${alignc}${execi 1000 cat /proc/cpuinfo | egrep -m 'model name' | sed -e 's/model name.*: //' | cut -c41-47} ${exec cat /proc/cpuinfo | egrep -m 1 'model name' | sed -e 's/model name.*: //' | cut -c1-5} ${exec cat /proc/cpuinfo | egrep -m 1 'model name' | sed -e 's/model name.*: //' | cut -c10-13}-${exec cat /proc/cpuinfo | egrep -m 1 'model name' | sed -e 's/model name.*: //' | cut -c19-20} ${exec cat /proc/cpuinfo | egrep -m 1 'model name' | sed -e 's/model name.*: //' | cut -c28-49}
${goto 70}${color 951C1C}${font Weather:size=22}x${color}${font}${voffset -4}${goto 85}Physical CPU Temp: ${alignr}${goto 200}${hwmon temp 3}º C${font}
${alignc}Avg Usage of Quad Core CPU: ${cpu cpu0}%
${alignc}Load:  ${loadavg}
${goto 83}${color 951C1C}${font Weather:size=22}x${color}${font}${goto 32}${voffset -4}${alignc}Core 1 Temp: ${execi 10 sensors | grep "Core 1" | cut -d "+" -f2 | cut -c1-2}º C
${goto 6}${color 547EC8}${font Poky:size=14}P${color}${font}${voffset -4}${goto 28}CPU1: ${freq_g 1}Gh ${alignr}${cpu cpu1}%
${goto 6}${color 547EC8}${font Poky:size=14}P${color}${font}${voffset -4}${goto 28}CPU2: ${freq_g 2}Gh ${alignr}${cpu cpu2}%
${goto 83}${color 951C1C}${font Weather:size=22}x${color}${font}${goto 32}${voffset -4}${alignc}Core 2 Temp: ${execi 10 sensors | grep "Core 2" | cut -d "+" -f2 | cut -c1-2}º C
${goto 6}${color 547EC8}${font Poky:size=14}P${color}${font}${voffset -4}${goto 28}CPU3: ${freq_g 3}Gh ${alignr}${cpu cpu3}%
${goto 6}${color 547EC8}${font Poky:size=14}P${color}${font}${voffset -4}${goto 28}CPU4: ${freq_g 4}Gh ${alignr}${cpu cpu4}%
${goto 83}${color 951C1C}${font Weather:size=22}x${color}${font}${goto 32}${voffset -4}${alignc}Core 3 Temp: ${execi 10 sensors | grep "Core 3" | cut -d "+" -f2 | cut -c1-2}º C
${goto 6}${color 547EC8}${font Poky:size=14}P${color}${font}${voffset -4}${goto 28}CPU5: ${freq_g 5}Gh ${alignr}${cpu cpu5}%
${goto 6}${color 547EC8}${font Poky:size=14}P${color}${font}${voffset -4}${goto 28}CPU6: ${freq_g 6}Gh ${alignr}${cpu cpu6}%
${goto 83}${color 951C1C}${font Weather:size=22}x${color}${font}${goto 32}${voffset -4}${alignc}Core 4 Temp: ${execi 10 sensors | grep "Core 0" | cut -d "+" -f2 | cut -c1-2}º C
${goto 6}${color 547EC8}${font Poky:size=14}P${color}${font}${voffset -4}${goto 28}CPU7: ${freq_g 7}Gh ${alignr}${cpu cpu7}%
${goto 6}${color 547EC8}${font Poky:size=14}P${color}${font}${voffset -4}${goto 28}CPU8: ${freq_g 8}Gh ${alignr}${cpu cpu8}%

${goto 66}${voffset 4}${color 547EC8}${font Poky:size=14}M${color}${font}${voffset -8}${goto 32}${alignc}Used RAM: ${mem}${voffset -4}
${voffset 4}${goto 32}${alignc}Total RAM: ${memmax}
${voffset}${goto 32}${alignc}Swap:  ${swap} ${color}/ ${color}${swapmax}

${goto 7.5}${voffset 4}${color 547EC8}${font Poky:size=15}a${color}${font}${goto 32}${voffset -10}Highest:${goto 153}CPU${alignr}RAM
${goto 32}${voffset -5.5}${color 547EC8}${hr}${color}
${voffset -1}${goto 32}${top name 1} ${goto 150}${top cpu 1}${alignr }${top mem 1}
${voffset -1}${goto 32}${top name 2} ${goto 150}${top cpu 2}${alignr }${top mem 2}
${voffset -1}${goto 32}${top name 3} ${goto 150}${top cpu 3}${alignr }${top mem 3}
${voffset -1}${goto 32}${top name 4} ${goto 150}${top cpu 4}${alignr }${top mem 4}

#${voffset -1}${alignc}   SSD
FSYS${color} = ${lua mount 1 total}${goto 100}${color8}SIZE${goto 150}${color7}FREE${goto 200}${color1}USED${goto 255}${color}MOUNT
${voffset -5} ${color 547EC8}${stippled_hr 5 1}${color}
${color6}${lua mount 1 fsys 9}${goto 100}${color8}${lua mount 1 size}${goto 150}${color7}${lua mount 1 free}${goto 200}${color1}${lua mount 1 use%}${goto 260}${color}${lua mount 1 mount}
${color6}${lua mount 2 fsys 9}${goto 100}${color8}${lua mount 2 size}${goto 150}${color7}${lua mount 2 free}${goto 200}${color1}${lua mount 2 use%}${goto 260}${color}${lua mount 2 mount}
${color6}${lua mount 3 fsys 9}${goto 100}${color8}${lua mount 3 size}${goto 150}${color7}${lua mount 3 free}${goto 200}${color1}${lua mount 3 use%}${goto 260}${color}${lua mount 3 mount}
${color6}${lua mount 4 fsys 9}${goto 100}${color8}${lua mount 4 size}${goto 150}${color7}${lua mount 4 free}${goto 200}${color1}${lua mount 4 use%}${goto 260}${color}${lua mount 4 mount}
${goto 3}${color 547EC8}${font Martin Vogel's Symbols:size=20}h${color}${font}${voffset -4}${goto 32}Disk I/O: ${diskio}${alignr}${voffset -10}${diskiograph 18,160 00D7FF FF452A -l -t}

${alignc}  NETWORK      ${alignr}${gw_iface} ${voffset -3}
${color 547EC8}${font PizzaDude Bullets:size=16}M${color}${font}${goto 32}${voffset -4}Upload Speed: ${upspeedf wlan0}${font}${alignr}Total: ${totalup wlan0}
${color 547EC8}${font PizzaDude Bullets:size=16}S${color}${font}${goto 32}${voffset -4}Download Speed: ${downspeedf wlan0}${font}${goto 32}${alignr}Total: ${totaldown wlan0}

${color 547EC8}${font Poky:size=16}w${color}${font}${goto 32}${voffset -20}Router IP: ${alignr}${gw_ip}
${goto 32}Local IP:  ${alignr}${addr wlan0}
${goto 32}Public IP: ${alignr}${execi 300 wget -q -O - checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'}
${goto 32}Signal : ${alignr}${wireless_link_qual_perc wlan0}%

${color 547EC8}${font Poky:size=19}Q${color}${font}${goto 32}${voffset -9}Battery${alignr}${battery_percent BAT1}%
${alignc}${battery_time BAT1}
${color 547EC8}${stippled_hr 5 1}${color}
${color 547EC8}${font Poky:size=16}q${color}${font}${goto 32}${voffset -4}Updates${execpi 3600 ~/conky/header.sh}
${color 547EC8}${hr}${color}
${alignc}${color 547EC8}Live:  ${color}${execpi 900 conkyEmail --servertype=POP --servername=pop3.live.com --ssl --username=youremail --password=yourpassword --mailinfo=0}
${alignc}${color 547EC8}Hotmail:  ${color}${execpi 900 conkyEmail --servertype=POP --servername=pop3.live.com --ssl --username=youremail --password=yourpassword --mailinfo=0}



mounted.lua


--[[partitions for conky by mrpeachy

##instructions
##load script
lua_load ~/lua/mounted.lua
## first lua command below text:
## ${lua get_mounted_data interval}, where interval is a number.  This starts data gathering
## to get output:
## ${lua mount partition_number data_type text_length}, where partition number is a number
## text_length is optional, lets you specify the max number of characters the function returns. only affects fsys and mount data options
## data_type can be
## total - shows total number of partitions mounted, requires a partition_number also, use 1, could be used in an if_match
## fsys - shows filesystem
## size - shows space used in appropriate units
## free - shows free space in appropriate units
## use% - shows % used
## mount - shows mountpoint

TEXT
CPU %: ${cpu cpu0} ${lua get_mounted_data 10}
TOTAL PARTITIONS MOUNTED: ${lua mount 1 total}
FSYS${goto 100}SIZE${goto 200}USED%${goto 300}MOUNT
${lua mount 1 fsys}${goto 100}${lua mount 1 size}${goto 200}${lua mount 1 use%}${goto 300}${lua mount 1 mount 10}
${lua mount 2 fsys}${goto 100}${lua mount 2 size}${goto 200}${lua mount 2 use%}${goto 300}${lua mount 2 mount 10}
${lua mount 3 fsys}${goto 100}${lua mount 3 size}${goto 200}${lua mount 3 use%}${goto 300}${lua mount 3 mount 10}
${lua mount 4 fsys}${goto 100}${lua mount 4 size}${goto 200}${lua mount 4 use%}${goto 300}${lua mount 4 mount 10}

]]

conky_start=1
function conky_get_mounted_data(interval)
local updates=tonumber(conky_parse("${updates}"))
timer=(updates % interval)
if timer==0 or conky_start==1 then
fsys={}
size={}
used={}
avail={}
uperc={}
mount={}
local file = io.popen("df -h")
for line in file:lines() do
if string.find(line,"/dev/")~=nil then
local s,f,fs=string.find(line,"^([%d%a%p]*)%s")
table.insert(fsys,fs)
local s,f,sz=string.find(line,"%s*([%d%a%p]*)%s",f)
table.insert(size,sz)
local s,f,us=string.find(line,"%s*([%d%a%p]*)%s",f)
table.insert(used,us)
local s,f,av=string.find(line,"%s*([%d%a%p]*)%s",f)
table.insert(avail,av)
local s,f,up=string.find(line,"%s*([%d%a%p]*)%s",f)
table.insert(uperc,up)
local s,f,mn=string.find(line,"%s*([%d%a%p]*)%s*$",f)
table.insert(mount,mn)
end
end
file:close()
conky_start=nil
end--timed section
return ""
end

function conky_mount(n,d,c)--n=partition_number,d=data_type,c=number of characters to return
d=tostring(d)
n=tonumber(n)
c=tonumber(c) or 0
if d=="total" then
data=#fsys or 1
elseif d=="fsys" then
data=fsys[n] or ""
if c~=0 then
data=string.sub(data,1,c) or ""
end
elseif d=="size" then
data=size[n] or ""
elseif d=="used" then
data=used[n] or ""
elseif d=="free" then
data=avail[n] or ""
elseif d=="use%" then
data=uperc[n] or ""
elseif d=="mount" then
data=mount[n] or ""
if c~=0 then
data=string.sub(data,1,c) or ""
end
else
data="check data type"
end
return data
end--end main function


bargraph.lua


--[[ BARGRAPH WIDGET
To call the script in a conky, use, before TEXT
lua_load /path/to/the/script/bargraph.lua
lua_draw_hook_pre main_rings
        and add one line (blank or not) after TEXT


Parameters are :
3 parameters are mandatory
name - the name of the conky variable to display, for example for {$cpu cpu0}, just write name="cpu"
arg - the argument of the above variable, for example for {$cpu cpu0}, just write arg="cpu0"
  arg can be a numerical value if name=""
max - the maximum value the above variable can reach, for example, for {$cpu cpu0}, just write max=100

Optional parameters:
x,y - coordinates of the starting point of the bar, default = middle of the conky window
cap - end of cap line, ossibles values are r,b,s (for round, butt, square), default="b"
  http://www.cairographics.org/samples/set_line_cap/
angle - angle of rotation of the bar in degress, default = 0 (i.e. a vertical bar)
  set to 90 for an horizontal bar
skew_x - skew bar around x axis, default = 0
skew_y - skew bar around y axis, default = 0
blocks  - number of blocks to display for a bar (values >0) , default= 10
height - height of a block, default=10 pixels
width - width of a block, default=20 pixels
space - space between 2 blocks, default=2 pixels
angle_bar - this angle is used to draw a bar on a circular way (ok, this is no more a bar !) default=0
radius - for cicular bars, internal radius, default=0
  with radius, parameter width has no more effect.

Colours below are defined into braces {colour in hexadecimal, alpha}
fg_colour - colour of a block ON, default= {0x00FF00,1}
bg_colour - colour of a block OFF, default = {0x00FF00,0.5}
alarm - threshold, values after this threshold will use alarm_colour colour , default=max
alarm_colour - colour of a block greater than alarm, default=fg_colour
smooth - (true or false), create a gradient from fg_colour to bg_colour, default=false
mid_colour - colours to add to gradient, with this syntax {position into the gradient (0 to1), colour hexa, alpha}
  for example, this table {{0.25,0xff0000,1},{0.5,0x00ff00,1},{0.75,0x0000ff,1}} will add
  3 colurs to gradient created by fg_colour and alarm_colour, default=no mid_colour
led_effect - add LED effects to each block, default=no led_effect
  if smooth=true, led_effect is not used
  possibles values : "r","a","e" for radial, parallelel, perdendicular to the bar (just try!)
  led_effect has to be used with theses colours :
fg_led - middle colour of a block ON, default = fg_colour
bg_led - middle colour of a block OFF, default = bg_colour
alarm_led - middle colour of a block > ALARM,  default = alarm_colour

reflection parameters, not avaimable for circular bars
reflection_alpha    - add a reflection effect (values from 0 to 1) default = 0 = no reflection
                      other values = starting opacity
reflection_scale    - scale of the reflection (default = 1 = height of text)
reflection_length   - length of reflection, define where the opacity will be set to zero
  calues from 0 to 1, default =1
reflection - position of reflection, relative to a vertical bar, default="b"
  possibles values are : "b","t","l","r" for bottom, top, left, right
draw_me     - if set to false, text is not drawn (default = true or 1)
              it can be used with a conky string, if the string returns 1, the text is drawn :
              example : "${if_empty ${wireless_essid wlan0}}${else}1$endif",
]]

require 'cairo'

----------------START OF PARAMETERS ----------
function conky_main_bars()
local bars_settings={
{ --[ Graph for MOBO Temp ]--
name="hwmon temp 1",
arg="hwmon temp 1",
max=100,
alarm=100,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=35,
x=158, y=106,
height=2,width=10,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU Socket Temp ]--
name="hwmon temp 2",
arg="hwmon temp 2",
max=100,
alarm=100,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=35,
x=158, y=133,
height=2,width=10,
angle=90,
led_effect="e",
space=1,
cap="r",
},
--[[ { --[ Graph for Physical CPU Temp ]--
name="hwmon temp 3",
arg="hwmon temp 3",
max=100,
alarm=100,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=35,
x=158, y=133,
height=2,width=10,
angle=90,
led_effect="e",
space=1,
cap="r",
},
]] { --[ Graph for CPU1 Left ]--
name="cpu",
arg="cpu1",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},--color was 2a95b4
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=187, y=275,
height=3,width=7,
angle=273,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU1 Right ]--
name="cpu",
arg="cpu1",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=185, y=268,
height=3,width=7,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU2 Left]--
name="cpu",
arg="cpu2",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=187, y=292,
height=3,width=7,
angle=270,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU2 Right]--
name="cpu",
arg="cpu2",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=185, y=285,
height=3,width=7,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU3 Left ]--
name="cpu",
arg="cpu3",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=187, y=337,
height=3,width=7,
angle=270,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU3 Right ]--
name="cpu",
arg="cpu3",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=185, y=330,
height=3,width=7,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU4 Left ]--
name="cpu",
arg="cpu4",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=187, y=356,
height=3,width=7,
angle=270,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU4 Right ]--
name="cpu",
arg="cpu4",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=185, y=349,
height=3,width=7,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU5 Left ]--
name="cpu",
arg="cpu5",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=187, y=401,
height=3,width=7,
angle=270,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU5 Right ]--
name="cpu",
arg="cpu5",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=185, y=394,
height=3,width=7,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU6 Left ]--
name="cpu",
arg="cpu6",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=187, y=420,
height=3,width=7,
angle=270,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU6 Right ]--
name="cpu",
arg="cpu6",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=185, y=413,
height=3,width=7,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU7 Left ]--
name="cpu",
arg="cpu7",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=187, y=466,
height=3,width=7,
angle=270,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU7 Right ]--
name="cpu",
arg="cpu7",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=185, y=459,
height=3,width=7,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU8 Left ]--
name="cpu",
arg="cpu8",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=187, y=485,
height=3,width=7,
angle=270,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU8 Right ]--
name="cpu",
arg="cpu8",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=185, y=478,
height=3,width=7,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for Memory ]--
name="memperc",
arg="",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
x=63,y=550,
blocks=89,
space=0,
height=2,width=12,
angle=90,
led_effect="e",
cap="r",
},
--[[ { --[ Graph for Root ]--
name="fs_used_perc",
arg="/",
max=100,
alarm=75,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=92,
x=65, y=500,
height=2,width=10,
angle=90,
led_effect="e",
space=0,
cap="r",
},
{ --[ Graph for Home ]--
name="fs_used_perc",
arg="/home",
max=100,
alarm=75,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=92,
x=65, y=557,
height=2,width=10,
angle=90,
led_effect="e",
space=0,
cap="r",
},
]] { --[ Graph for WiFi Signal strength ]--
name="wireless_link_qual_perc",
arg="wlan0",
max=100,
alarm=100,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=62,
x=78, y=880,
height=2,width=10,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for Battery power ]--
name="battery_percent",
arg="BAT1",
max=100,
alarm=100,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=60,
x=80, y=916,
height=2,width=10,
angle=90,
led_effect="e",
space=1,
cap="r",
},
}
-----------END OF PARAMETERS--------------


   
if conky_window == nil then return end

local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)

cr = cairo_create(cs)   
--prevent segmentation error when reading cpu state
    if tonumber(conky_parse('${updates}'))>3 then
        for i in pairs(bars_settings) do
       
        draw_multi_bar_graph(bars_settings[i])
       
        end
    end
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil

end



function draw_multi_bar_graph(t)
cairo_save(cr)
--check values
if t.draw_me == true then t.draw_me = nil end
if t.draw_me ~= nil and conky_parse(tostring(t.draw_me)) ~= "1" then return end
if t.name==nil and t.arg==nil then
print ("No input values ... use parameters 'name' with 'arg' or only parameter 'arg' ")
return
end
if t.max==nil then
print ("No maximum value defined, use 'max'")
return
end
if t.name==nil then t.name="" end
if t.arg==nil then t.arg="" end

--set default values
if t.x == nil then t.x = conky_window.width/2 end
if t.y == nil then t.y = conky_window.height/2 end
if t.blocks == nil then t.blocks=10 end
if t.height == nil then t.height=10 end
if t.angle == nil then t.angle=0 end
t.angle = t.angle*math.pi/180
--line cap style
if t.cap==nil then t.cap = "b" end
local cap="b"
for i,v in ipairs({"s","r","b"}) do
if v==t.cap then cap=v end
end
local delta=0
if t.cap=="r" or t.cap=="s" then delta = t.height end
if cap=="s" then cap = CAIRO_LINE_CAP_SQUARE
elseif cap=="r" then
cap = CAIRO_LINE_CAP_ROUND
elseif cap=="b" then
cap = CAIRO_LINE_CAP_BUTT
end
--end line cap style
--if t.led_effect == nil then t.led_effect="r" end
if t.width == nil then t.width=20 end
if t.space == nil then t.space=2 end
if t.radius == nil then t.radius=0 end
if t.angle_bar == nil then t.angle_bar=0 end
t.angle_bar = t.angle_bar*math.pi/360 --halt angle

--colours
if t.bg_colour == nil then t.bg_colour = {0x00FF00,0.5} end
if #t.bg_colour~=2 then t.bg_colour = {0x00FF00,0.5} end
if t.fg_colour == nil then t.fg_colour = {0x00FF00,1} end
if #t.fg_colour~=2 then t.fg_colour = {0x00FF00,1} end
if t.alarm_colour == nil then t.alarm_colour = t.fg_colour end
if #t.alarm_colour~=2 then t.alarm_colour = t.fg_colour end

if t.mid_colour ~= nil then
for i=1, #t.mid_colour do   
    if #t.mid_colour[i]~=3 then
    print ("error in mid_color table")
    t.mid_colour[i]={1,0xFFFFFF,1}
    end
end
    end
   
if t.bg_led ~= nil and #t.bg_led~=2 then t.bg_led = t.bg_colour end
if t.fg_led ~= nil and #t.fg_led~=2 then t.fg_led = t.fg_colour end
if t.alarm_led~= nil and #t.alarm_led~=2 then t.alarm_led = t.fg_led end

if t.led_effect~=nil then
if t.bg_led == nil then t.bg_led = t.bg_colour end
if t.fg_led == nil then t.fg_led = t.fg_colour end
if t.alarm_led == nil  then t.alarm_led = t.fg_led end
end


if t.alarm==nil then t.alarm = t.max end --0.8*t.max end
if t.smooth == nil then t.smooth = false end

if t.skew_x == nil then
t.skew_x=0
else
t.skew_x = math.pi*t.skew_x/180
end
if t.skew_y == nil then
t.skew_y=0
else
t.skew_y = math.pi*t.skew_y/180
end

if t.reflection_alpha==nil then t.reflection_alpha=0 end
if t.reflection_length==nil then t.reflection_length=1 end
if t.reflection_scale==nil then t.reflection_scale=1 end

--end of default values


local function rgb_to_r_g_b(col_a)
return ((col_a[1] / 0x10000) % 0x100) / 255., ((col_a[1] / 0x100) % 0x100) / 255., (col_a[1] % 0x100) / 255., col_a[2]
end


--functions used to create patterns

local function create_smooth_linear_gradient(x0,y0,x1,y1)
local pat = cairo_pattern_create_linear (x0,y0,x1,y1)
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(t.fg_colour))
cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(t.alarm_colour))
if t.mid_colour ~=nil then
for i=1, #t.mid_colour do
cairo_pattern_add_color_stop_rgba (pat, t.mid_colour[i][1], rgb_to_r_g_b({t.mid_colour[i][2],t.mid_colour[i][3]}))
end
end
return pat
end

local function create_smooth_radial_gradient(x0,y0,r0,x1,y1,r1)
local pat =  cairo_pattern_create_radial (x0,y0,r0,x1,y1,r1)
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(t.fg_colour))
cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(t.alarm_colour))
if t.mid_colour ~=nil then
for i=1, #t.mid_colour do
cairo_pattern_add_color_stop_rgba (pat, t.mid_colour[i][1], rgb_to_r_g_b({t.mid_colour[i][2],t.mid_colour[i][3]}))
end
end
return pat
end

local function create_led_linear_gradient(x0,y0,x1,y1,col_alp,col_led)
local pat = cairo_pattern_create_linear (x0,y0,x1,y1) ---delta, 0,delta+ t.width,0)
cairo_pattern_add_color_stop_rgba (pat, 0.0, rgb_to_r_g_b(col_alp))
cairo_pattern_add_color_stop_rgba (pat, 0.5, rgb_to_r_g_b(col_led))
cairo_pattern_add_color_stop_rgba (pat, 1.0, rgb_to_r_g_b(col_alp))
return pat
end

local function create_led_radial_gradient(x0,y0,r0,x1,y1,r1,col_alp,col_led,mode)
local pat = cairo_pattern_create_radial (x0,y0,r0,x1,y1,r1)
if mode==3 then
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(col_alp))
cairo_pattern_add_color_stop_rgba (pat, 0.5, rgb_to_r_g_b(col_led))
cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(col_alp))
else
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(col_led))
cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(col_alp))
end
return pat
end






local function draw_single_bar()
--this fucntion is used for bars with a single block (blocks=1) but
--the drawing is cut in 3 blocks : value/alarm/background
--not zvzimzblr for circular bar
local function create_pattern(col_alp,col_led,bg)
local pat

if not t.smooth then
if t.led_effect=="e" then
pat = create_led_linear_gradient (-delta, 0,delta+ t.width,0,col_alp,col_led)
elseif t.led_effect=="a" then
pat = create_led_linear_gradient (t.width/2, 0,t.width/2,-t.height,col_alp,col_led)
elseif  t.led_effect=="r" then
pat = create_led_radial_gradient (t.width/2, -t.height/2, 0, t.width/2,-t.height/2,t.height/1.5,col_alp,col_led,2)
else
pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(col_alp))
end
else
if bg then
pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(t.bg_colour))
else
pat = create_smooth_linear_gradient(t.width/2, 0, t.width/2,-t.height)
end
end
return pat
end

local y1=-t.height*pct/100
local y2,y3
if pct>(100*t.alarm/t.max) then
y1 = -t.height*t.alarm/100
y2 = -t.height*pct/100
if t.smooth then y1=y2 end
end

if t.angle_bar==0 then

--block for fg value
local pat = create_pattern(t.fg_colour,t.fg_led,false)
cairo_set_source(cr,pat)
cairo_rectangle(cr,0,0,t.width,y1)
cairo_fill(cr)
cairo_pattern_destroy(pat)

-- block for alarm value
if not t.smooth and y2 ~=nil then
pat = create_pattern(t.alarm_colour,t.alarm_led,false)
cairo_set_source(cr,pat)
cairo_rectangle(cr,0,y1,t.width,y2-y1)
cairo_fill(cr)
y3=y2
cairo_pattern_destroy(pat)
else
y2,y3=y1,y1
end
-- block for bg value
cairo_rectangle(cr,0,y2,t.width,-t.height-y3)
pat = create_pattern(t.bg_colour,t.bg_led,true)
cairo_set_source(cr,pat)
cairo_pattern_destroy(pat)
cairo_fill(cr)
end
end  --end single bar






local function draw_multi_bar()
--function used for bars with 2 or more blocks
for pt = 1,t.blocks do
--set block y
local y1 = -(pt-1)*(t.height+t.space)
local light_on=false

--set colors
local col_alp = t.bg_colour
local col_led = t.bg_led
if pct>=(100/t.blocks) or pct>0 then --ligth on or not the block
if pct>=(pcb*(pt-1))  then
light_on = true
col_alp = t.fg_colour
col_led = t.fg_led
if pct>=(100*t.alarm/t.max) and (pcb*pt)>(100*t.alarm/t.max) then
col_alp = t.alarm_colour
col_led = t.alarm_led
end
end
end

--set colors
--have to try to create gradients outside the loop ?
local pat

if not t.smooth then
if t.angle_bar==0 then
if t.led_effect=="e" then
pat = create_led_linear_gradient (-delta, 0,delta+ t.width,0,col_alp,col_led)
elseif t.led_effect=="a" then
pat = create_led_linear_gradient (t.width/2, -t.height/2+y1,t.width/2,0+t.height/2+y1,col_alp,col_led)
elseif  t.led_effect=="r" then
pat = create_led_radial_gradient (t.width/2, y1, 0, t.width/2,y1,t.width/1.5,col_alp,col_led,2)
else
pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(col_alp))
end
else
if t.led_effect=="a"  then
pat = create_led_radial_gradient (0, 0, t.radius+(t.height+t.space)*(pt-1),
0, 0, t.radius+(t.height+t.space)*(pt),
col_alp,col_led,3)
else
pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(col_alp))
end

end
else

if light_on then
if t.angle_bar==0 then
pat = create_smooth_linear_gradient(t.width/2, t.height/2, t.width/2,-(t.blocks-0.5)*(t.height+t.space))
else
pat = create_smooth_radial_gradient(0, 0, (t.height+t.space),  0,0,(t.blocks+1)*(t.height+t.space),2)
end
else
pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(t.bg_colour))
end
end
cairo_set_source (cr, pat)
cairo_pattern_destroy(pat)

--draw a block
if t.angle_bar==0 then
cairo_move_to(cr,0,y1)
cairo_line_to(cr,t.width,y1)
else
cairo_arc( cr,0,0,
t.radius+(t.height+t.space)*(pt)-t.height/2,
-t.angle_bar -math.pi/2 ,
t.angle_bar -math.pi/2)
end
cairo_stroke(cr)
end
end




local function setup_bar_graph()
--function used to retrieve the value to display and to set the cairo structure
if t.blocks ~=1 then t.y=t.y-t.height/2 end

local value = 0
if t.name ~="" then
value = tonumber(conky_parse(string.format('${%s %s}', t.name, t.arg)))
--$to_bytes doesn't work when value has a decimal point,
--https://garage.maemo.org/plugins/ggit/browse.php/?p=monky;a=commitdiff;h=174c256c81a027a2ea406f5f37dc036fac0a524b;hp=d75e2db5ed3fc788fb8514121f67316ac3e5f29f
--http://sourceforge.net/tracker/index.php?func=detail&aid=3000865&group_id=143975&atid=757310
--conky bug?
--value = (conky_parse(string.format('${%s %s}', t.name, t.arg)))
--if string.match(value,"%w") then
-- value = conky_parse(string.format('${to_bytes %s}',value))
--end
else
value = tonumber(t.arg)
end

if value==nil then value =0 end

pct = 100*value/t.max
pcb = 100/t.blocks

cairo_set_line_width (cr, t.height)
cairo_set_line_cap  (cr, cap)
cairo_translate(cr,t.x,t.y)
cairo_rotate(cr,t.angle)

local matrix0 = cairo_matrix_t:create()
tolua.takeownership(matrix0)
cairo_matrix_init (matrix0, 1,t.skew_y,t.skew_x,1,0,0)
cairo_transform(cr,matrix0)



--call the drawing function for blocks
if t.blocks==1 and t.angle_bar==0 then
draw_single_bar()
if t.reflection=="t" or t.reflection=="b" then cairo_translate(cr,0,-t.height) end
else
draw_multi_bar()
end

--dot for reminder
--[[
if t.blocks ~=1 then
cairo_set_source_rgba(cr,1,0,0,1)
cairo_arc(cr,0,t.height/2,3,0,2*math.pi)
cairo_fill(cr)
else
cairo_set_source_rgba(cr,1,0,0,1)
cairo_arc(cr,0,0,3,0,2*math.pi)
cairo_fill(cr)
end]]

--call the drawing function for reflection and prepare the mask used
if t.reflection_alpha>0 and t.angle_bar==0 then
local pat2
local matrix1 = cairo_matrix_t:create()
tolua.takeownership(matrix1)
if t.angle_bar==0 then
pts={-delta/2,(t.height+t.space)/2,t.width+delta,-(t.height+t.space)*(t.blocks)}
if t.reflection=="t" then
cairo_matrix_init (matrix1,1,0,0,-t.reflection_scale,0,-(t.height+t.space)*(t.blocks-0.5)*2*(t.reflection_scale+1)/2)
pat2 = cairo_pattern_create_linear (t.width/2,-(t.height+t.space)*(t.blocks),t.width/2,(t.height+t.space)/2)
elseif t.reflection=="r" then
cairo_matrix_init (matrix1,-t.reflection_scale,0,0,1,delta+2*t.width,0)
pat2 = cairo_pattern_create_linear (delta/2+t.width,0,-delta/2,0)
elseif t.reflection=="l" then
cairo_matrix_init (matrix1,-t.reflection_scale,0,0,1,-delta,0)
pat2 = cairo_pattern_create_linear (-delta/2,0,delta/2+t.width,-0)
else --bottom
cairo_matrix_init (matrix1,1,0,0,-1*t.reflection_scale,0,(t.height+t.space)*(t.reflection_scale+1)/2)
pat2 = cairo_pattern_create_linear (t.width/2,(t.height+t.space)/2,t.width/2,-(t.height+t.space)*(t.blocks))
end
end
cairo_transform(cr,matrix1)

if t.blocks==1 and t.angle_bar==0 then
draw_single_bar()
cairo_translate(cr,0,-t.height/2)
else
draw_multi_bar()
end


cairo_set_line_width(cr,0.01)
cairo_pattern_add_color_stop_rgba (pat2, 0,0,0,0,1-t.reflection_alpha)
cairo_pattern_add_color_stop_rgba (pat2, t.reflection_length,0,0,0,1)
if t.angle_bar==0 then
cairo_rectangle(cr,pts[1],pts[2],pts[3],pts[4])
end
cairo_clip_preserve(cr)
cairo_set_operator(cr,CAIRO_OPERATOR_CLEAR)
cairo_stroke(cr)
cairo_mask(cr,pat2)
cairo_pattern_destroy(pat2)
cairo_set_operator(cr,CAIRO_OPERATOR_OVER)

end --reflection
pct,pcb=nil
end --setup_bar_graph()

--start here !
setup_bar_graph()
cairo_restore(cr)
end



header.sh

#!/bin/sh
# conkyheader.sh
# by Crinos512
# Usage:
#  ${execp ~/conky/Manuel318/conkyheader.sh}
#OSVer=""`lsb_release -i | cut -f 2| tr "[:upper:]" "[:lower:]"`" ( "`lsb_release -r | cut -f 2`" )"
#WMVer=`Xfwm --version`
Updates=`aptitude search "~U" | wc -l | tail`
#Conky=`\{conky_version\}}`

#echo "\${voffset -20}\${font Diamond Fantasy:style=Bold:pixelsize=20}\${alignc}\${color}\$nodename\${font}"
#echo "\${font Liberation Sans:style=Bold:pixelsize=11}\${alignc}~ \$kernel \$machine ~"
#echo "\${alignc}~ $OSVer ~ $WMVer ~"
echo "\${alignr} $Updates System Updates"
#echo "\${alignc}~ $Conky  ~"
#echo "\${alignc}~ Uptime: \$uptime_short ~\${color}\${font}"
#echo "\${voffset 0}  \${color}( Conky \${conky_version}\${alignr}\${exec conkyForecast -V} )\${color}   "
#echo "\${font Diamond Fantasy:style=Bold:pixelsize=14}\${offset 10}NUM: \${exec xset q | grep Num |awk '{print " "\$8}'}\${alignr}CAPS \${exec xset q | grep Caps |awk '{print " "\$4}'}\${font}   "
exit 0
Title: Re: Conky Codes and Images
Post by: lwfitz on February 26, 2013, 08:02:53 AM
Wow! That looks awesome Jedi!
Title: Re: Conky Codes and Images
Post by: lwfitz on February 26, 2013, 08:24:21 AM
Ok heres my new one

(http://en.zimagez.com/miniature/2013-02-25--13618653211919x1079scrot.png) (http://en.zimagez.com/zimage/2013-02-25--13618653211919x1079scrot.php)

Im now giving a ${voffset} AHEAD warning for Sector11  :D

Teos weather script to go along with conky_weather2 can be found here (http://crunchbang.org/forums/viewtopic.php?id=19235)
Im using the Accuweather_Conky_USA_Images script w/ my edited images (included in the images download)

All the images can be found here  (https://www.dropbox.com/s/sz64hupkdrak3jc/conky_horizontal.tar.gz)


conky_system
max_specials 10000
max_user_text 15000
background no
use_xft yes
xftfont sans:size=9
xftalpha 1
total_run_times 0
own_window yes
own_window_argb_visual no
own_window_transparent yes
own_window_type desktop
own_window_title conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 1825 100
maximum_width 1825
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_shade_color black
default_outline_color white
alignment tl
gap_x 57
gap_y -10
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
text_buffer_size 100000
top_name_width 5
update_interval 1
default_color FFFFFF
temperature_unit fahrenheit

TEXT
${image /home/luke/Conky/amd_fx.png -s 75x75 -p 15,20}${image /home/luke/Conky/thermometer.png -s 68x83 -p 275,20}${image /home/luke/Conky/vengance.png -s 185x55 -p 365,35}${image /home/luke/Conky/ssd.png -s 90x65 -p 725,30}${image /home/luke/Conky/nvidia.png -s 70x75 -p 1340,27}${image /home/luke/Conky/router.png -s 90x65 -p 1500,25}

${voffset 8}${font WhiteRabbit:size=12}${goto 110}CPU1 ${goto 155}${cpu cpu1}% ${goto 200}CPU2 ${goto 245}${cpu cpu2}%
${voffset 5}${goto 110}CPU3 ${goto 155}${cpu cpu3}% ${goto 200}CPU4 ${goto 245}${cpu cpu4}%${voffset 6}${goto 335}${hwmon 3 temp 1}F${voffset -9}${goto 530}${mem}${goto 600} /${memmax}${voffset 12}${goto 850}/root${voffset -7}${goto 920}${fs_used /}${goto 1000} -Used${goto 1090}${voffset 7}/home${voffset -7}${goto 1165}${fs_used /home} ${goto 1242} -Used ${voffset 5}${goto 1425}${nvidia temp}F${voffset -5}${goto 1630}Download ${goto 1730}${downspeed eth0}
${voffset 3}${goto 110}CPU5 ${goto 155}${cpu cpu5}% ${goto 200}CPU6 ${goto 245}${cpu cpu6}%${voffset -3}${goto 530}${swap}${goto 600} /${swapmax}${voffset 3} ${font WhiteRabbit:size=18}${voffset -7}${font WhiteRabbit:size=12}${goto 920}${fs_size /}${goto 1000} -Total${voffset 2}${font WhiteRabbit:size=12}${goto 1165}${fs_size /home} ${goto 1242} -Total ${goto 1630}Upload ${goto 1730}${upspeed eth0}


conky_drives
max_specials 10000
max_user_text 15000
background no
use_xft yes
xftfont sans:size=9
xftalpha 1
total_run_times 0
own_window yes
own_window_argb_visual no
own_window_transparent yes
own_window_type normal
own_window_title conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 165 225
maximum_width 165
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_shade_color black
default_outline_color white
alignment middle_left
gap_x 10
gap_y 150
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
text_buffer_size 100000
top_name_width 5
update_interval 1
default_color FFFFFF
temperature_unit fahrenheit
short_units yes

TEXT
${image /home/luke/Conky/drive.png -s 40x45 -p 2,10}
${font WhiteRabbit:size=14}${goto 50}Software
${voffset 3}${font WhiteRabbit:size=12}${goto 50}${fs_used /media/sdb1} ${goto 108}/${fs_size /media/sdb1}${voffset -3}

${image /home/luke/Conky/drive.png -s 40x45 -p 2,65}
${font WhiteRabbit:size=14}${goto 50}External
${voffset 3}${font WhiteRabbit:size=12}${goto 50}${fs_used /media/sde5} ${goto 108}/${fs_size /media/sde5}${voffset -3}

${image /home/luke/Conky/drive.png -s 40x45 -p 2,120}
${font WhiteRabbit:size=14}${goto 50}Music
${voffset 3}${font WhiteRabbit:size=12}${goto 50}${fs_used /media/sde6} ${goto 108}/${fs_size /media/sde6}${voffset -3}

${image /home/luke/Conky/drive.png -s 40x45 -p 2,177}
${font WhiteRabbit:size=14}${goto 50}Storage
${voffset 3}${font WhiteRabbit:size=12}${goto 50}${fs_used /media/storage} ${goto 108}/${fs_size /media/storage}${voffset -3}

${image /home/luke/Conky/drive.png -s 40x45 -p 2,233}
${font WhiteRabbit:size=14}${goto 50}Videos
${voffset 3}${font WhiteRabbit:size=12}${goto 50}${fs_used /media/sdc1} ${goto 108}/${fs_size /media/sdc1}


conky_weather2
max_specials 10000
max_user_text 15000
background no
use_xft yes
xftfont sans:size=9
xftalpha 1
total_run_times 0
own_window yes
own_window_argb_visual no
own_window_transparent yes
own_window_type normal
own_window_title conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 350 360
maximum_width 350
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_shade_color black
default_outline_color white
alignment bottom_left
gap_x 10
gap_y 10
no_buffers yes
uppercase no
cpu_avg_samples 6
override_utf8_locale yes
text_buffer_size 100000
top_name_width 5
update_interval 1
default_color FFFFFF
temperature_unit fahrenheit
# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2
format_human_readable yes
short_units yes
update_interval 1
imlib_cache_size 0

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
temperature_unit Fahrenheit

TEXT


${font WhiteRabbit:size=15}${goto 30}Temp ${goto 288}Feels${voffset 10}
${font WhiteRabbit:size=20}${goto 25}${execpi 600 sed -n '4p' $HOME/Accuweather_Conky_USA_Images/curr_cond}°F ${goto 286}${execpi 600 sed -n '5p' $HOME/Accuweather_Conky_USA_Images/curr_cond}°F
${font WhiteRabbit:size=11}${texeci 500 bash $HOME/Accuweather_Conky_USA_Images/acc_usa_images}${image $HOME/Accuweather_Conky_USA_Images/cc.png -p 75,10 -s 240x225}




${font WhiteRabbit:size=15}${goto 30}Dawn ${goto 285}Dusk
${voffset 10}${font WhiteRabbit:size=17}${goto 15}${execpi 600 sed -n '15p' $HOME/Accuweather_Conky_USA_Images/curr_cond}${goto 262}${execpi 600 sed -n '16p' $HOME/Accuweather_Conky_USA_Images/curr_cond}${voffset -10}

${font WhiteRabbit:size=13}${goto 30}${execpi 600 sed -n '6p' $HOME/Accuweather_Conky_USA_Images/tod_ton}${goto 145}${execpi 600 sed -n '11p' $HOME/Accuweather_Conky_USA_Images/tod_ton}${goto 265}${execpi 600 sed -n '16p' $HOME/Accuweather_Conky_USA_Images/tod_ton}

${font WhiteRabbit:size=10}${goto 100}${execpi 600 sed -n '9p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 215}${execpi 600 sed -n '14p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 330}${execpi 600 sed -n '19p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F
${voffset 5}${font WhiteRabbit:size=10}${goto 100}${execpi 600 sed -n '10p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 215}${execpi 600 sed -n '15p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 330}${execpi 600 sed -n '20p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${image $HOME/Accuweather_Conky_USA_Images/7.png -p 20,212 -s 80x67}${image $HOME/Accuweather_Conky_USA_Images/12.png -p 138,212 -s 80x67}${image $HOME/Accuweather_Conky_USA_Images/17.png -p 256,212 -s 80x67}${voffset -5}



${font WhiteRabbit:size=13}${goto 30}${execpi 600 sed -n '21p' $HOME/Accuweather_Conky_USA_Images/tod_ton}${goto 145}${execpi 600 sed -n '1p' $HOME/Accuweather_Conky_USA_Images/last_days}${goto 265}${execpi 600 sed -n '6p' $HOME/Accuweather_Conky_USA_Images/last_days}

${font WhiteRabbit:size=10}${goto 100}${execpi 600 sed -n '24p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 215}${execpi 600 sed -n '4p' $HOME/Accuweather_Conky_USA_Images/last_days}°F${goto 330}${execpi 600 sed -n '9p' $HOME/Accuweather_Conky_USA_Images/last_days}°F
${voffset 5}${font WhiteRabbit:size=10}${goto 100}${execpi 600 sed -n '25p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 215}${execpi 600 sed -n '5p' $HOME/Accuweather_Conky_USA_Images/last_days}°F${goto 330}${execpi 600 sed -n '10p' $HOME/Accuweather_Conky_USA_Images/last_days}°F${image $HOME/Accuweather_Conky_USA_Images/22.png -p 20,299 -s 80x67}${image $HOME/Accuweather_Conky_USA_Images/N2.png -p 138,299 -s 80x67}${image $HOME/Accuweather_Conky_USA_Images/N7.png -p 256,299 -s 80x67}${voffset -5}


conky_clock
max_specials 10000
max_user_text 15000
background no
use_xft yes
xftfont sans:size=9
xftalpha 1
total_run_times 0
own_window yes
own_window_argb_visual no
own_window_transparent yes
own_window_type normal
own_window_title conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 275 250
maximum_width 275
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_shade_color black
default_outline_color white
alignment middle_middle
gap_x 140
gap_y 250
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
text_buffer_size 100000
top_name_width 5
update_interval 1
default_color FFFFFF
temperature_unit fahrenheit

#### Load Lua #####
lua_load ~/Conky/chrono.lua
lua_draw_hook_pre main


TEXT
${image /home/luke/Conky/ClockFace.png -s 225x225 -p 0,0}


chrono.lua
--[[ multiple analogue clocks by mrpeachy - 18 Jun 2012
21 Jun 2012 - Chronograph modifications by Sector11
22 Jun 2012 - again with mrpeachy's help day names, numbers and month names
12 Nov 2012 - memory leak plugged - mrpeachy
14 Nov 2012 - Personnalisation - Didier-T (forum Ubuntu.fr)
26 Nov 2012 - The Clock - Sector11 (small version)

use in conkyrc

lua_load /path/Chronograph.lua
lua_draw_hook_pre main
TEXT

-- INDEX
-- ### CLOCK POSITION - AND DEFAULTS ###
-- ### SET BORDER OPTIONS FOR "CLOCKS" ### -- I don't know how to remove this - NOT NEEDED
--     See lines 39 to 41 for overall size changes
-- ### START DIAL B ### Day Names Dial ###
--     See Lines 84 - 87 and 131 for changes
-- ### START DIAL C ### Month Names Dial ###
--     See Lines 150 -153 and 198 for changes
-- ### START DIAL D ### Day Numbers Dial ###
--     See Lines 234 & 265 for  changes
-- ### START CLOCK A ###
--     See Lines  &  and 441 & 467 changes
-- MARKS AROUND CLOCK A -- Large Main 24 HR Clock
-- CLOCK A HOUR HAND
-- CLOCK A MINUTE HAND SETUP
-- CLOCK A SECOND HAND SETUP

NOTE:  Putting ### CLOCK A ### last insures that it's functions are written
       over the other dials.
]]

require 'cairo'
-- ### CLOCK POSITION - AND DEFAULTS ##########################################
local init={
center_x=117,
center_y=112,
radius=80,
lang="English", -- English French Greek Spanish
hour=12, -- 12 | 24
second=true, --true | false - Seconds: dots and numbers IF 12HR
line=true, -- true | false - Part Second Hand
color=0xFF0000, --color for day, day number and month IF NO SECOND HAND
alpha=1 --alpha for day, day number and month IF NO SECOND HAND
}

-- ONLY NEED ONE COPY OF THIS FUNCTION
function rgb_to_r_g_b(col,alp)
  return ((col / 0x10000) % 0x100) / 255, ((col / 0x100) % 0x100) / 255, (col % 0x100) / 255, alp
end
local colr, colg, colb, cola=rgb_to_r_g_b(init.color,init.alpha)

function conky_main()
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
cr = cairo_create(cs)
local extents=cairo_text_extents_t:create()
tolua.takeownership(extents)

-- ### CLOCK 12|24 HR SELECTOR ############################
local clock_type_A=init.hour
-- ############################ CLOCK 12|24 HR SELECTOR ###

-- ### SET BORDER OPTIONS FOR "CLOCKS" ####################
--local clock_border_width=0
-- set color and alpha for clock border
--local cbr,cbg,cbb,cba=1,1,1,1 -- full opaque white
-- gap from clock border to minute marks
local b_to_m=0
-- #################### SET BORDER OPTIONS FOR "CLOCKS" ###

-- ### START DIAL B ### Day Names Dial ####################
-- DIAL POSITION
local center_x=init.center_x
local center_y=init.center_y
local radius=22
-- FONT
cairo_select_font_face (cr, "CorporateMonoExtraBold", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 14)
-- TABLE OF TEXT -- in order
if init.lang == "English" then text_days={"Sun","Mon","Tue","Wed","Thr","Fri","Sat",} end
if init.lang == "French" then text_days={"dim","lun","mar","mer","jeu","ven","sam",} end
if init.lang == "Greek" then text_days={"ΔΕΥ","ΤΡΙ","ΤΕΤ","ΠΕΜ","ΠΑΡ","ΣΑΒ","ΚΥΡ",} end
if init.lang == "Spanish" then text_days={"dom","lun","mar","mie","jue","vie","sab",} end

local day_number=tonumber(os.date("%w"))
if init.handday == true then
  for i=1,7 do
-- work out points
    local point=(math.pi/180)*((360/7)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)   
  end
else
  for i=1,7 do -- working out points
    if day_number == i-1 then
      cairo_set_source_rgba (cr,0,1,1,0) -- active colour
    else
      cairo_set_source_rgba (cr,1,1,1,0.0) -- non-active day names
    end
    local point=(math.pi/180)*((360/7)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)
  end
-- INNER POINTS POSITION, radius smaller than text circle
  local radius=7
  for i=1,7 do
    if day_number == i-1 then
      cairo_set_source_rgba (cr,0,1,1,0) -- active colour
    else
      cairo_set_source_rgba (cr,1,1,1,0.0) -- non-active
    end
    local point=(math.pi/180)*((360/7)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_stroke (cr)
  end
end
-- ######################################### END DIAL B ###

-- ### START DIAL C ### Month Names Dial ##################
-- DIAL POSITION
local center_x=init.center_x --(+85)
local center_y=init.center_y
local radius=53
-- FONT
cairo_select_font_face (cr, "CorporateMonoExtraBold", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 14)
-- TABLE OF TEXT -- in order
if init.lang == "English" then text_days={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",} end
if init.lang == "French" then text_days={"jan","fév","mar","avr","mai","jui","jul","aôu","sep","oct","nov","déc",} end
if init.lang == "Greek" then text_days={"ΙΑΝ","ΦΕΒ","ΜΑΡ","ΑΠΡ","ΜΑΙ","ΙΟΥ","ΙΟΥ","ΑΥΓ","ΣΕΠ","ΟΚΤ","ΝΟΕ","ΔΕΚ",} end
if init.lang == "Spanish" then text_days={"ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",} end

local this_month=tonumber(os.date("%m"))
if init.handmonth == true then
  for i=1,12 do
-- OUTER POINTS POSTION FOR -- ### START DIAL D ## TEXT
    local point=(math.pi/180)*((360/12)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)
  end
else
  for i=1,12 do
    if this_month == i then
      cairo_set_source_rgba (cr,0,1,1,0) -- active month colour
    else
      cairo_set_source_rgba (cr,1,1,1,0.0) -- non-active month names
    end
-- OUTTER POINTS POSTION FOR TEXT
    local point=(math.pi/180)*((360/12)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)
  end
-- INNER POINTS POSITION, radius smaller than text circle
  local radius=38
  for i=1,12 do
    if this_month == i then
      cairo_set_source_rgba (cr,0,1,1,0) -- active colour
else
      cairo_set_source_rgba (cr,1,1,1,0.0) -- dots for non-active month names
    end
    local point=(math.pi/180)*((360/12)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_stroke (cr)
  end
end
-- ######################################### END DIAL C ###

-- ### START DIAL D ### Day Numbers Dial ##################
-- GET NUMBER OF DAYS IN CURRENT MONTH
-- calculate Feb, then set up table
year4num=os.date("%Y")
t1=os.time({year=year4num,month=03,day=01,hour=00,min=0,sec=0});
t2=os.time({year=year4num,month=02,day=01,hour=00,min=0,sec=0});
if init.hour == 12 then
  febdaynum=tonumber((os.difftime(t1,t2))/(12*60*60))
else
  febdaynum=tonumber((os.difftime(t1,t2))/(24*60*60))
end
-- MONTH TABLE
monthdays={31,febdaynum,31,30,31,30,31,31,30,31,30,31}
this_month=tonumber(os.date("%m"))
number_days=monthdays[this_month]
-- TEXT positioning
local center_x=init.center_x
local center_y=init.center_y
local radius=85
cairo_select_font_face (cr, "Liquid Crystal", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size (cr, 20)
local this_day=tonumber(os.date("%d"))
  for i=1,number_days do
-- OUTTER POINTS POSTION FOR TEXT
    local point=(math.pi/180)*((360/number_days)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
    --only print even numbers
    if math.mod(i, 2) == 0 and math.mod(this_day, 2)==0 then
    text=string.format("%02d",i) --formats numbers to double digits
    elseif math.mod(i, 2) ~= 0 and math.mod(this_day, 2)~=0 then
    text=string.format("%02d",i) --formats numbers to double digits
    else
    text=""
    end --odd even matching
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
if i==this_day then
     cairo_set_source_rgba (cr,0,1,1,0) -- active colour
else
cairo_set_source_rgba (cr,1,1,1,0) -- dim inactive numbers
end
     cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
     cairo_show_text (cr, text)
     cairo_stroke (cr)
  end
-- INNER POINTS POSITION, radius smaller than text circle
  local radius=70
  for i=1,number_days do
    local point=(math.pi/180)*((360/number_days)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
if i==this_day then
     cairo_set_source_rgba (cr,0,1,1,0) -- active colour
else
cairo_set_source_rgba (cr,0,0,1,.0) -- dim the points
end
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_stroke (cr)
  end
-- ######################################### END DIAL D ###

-- ### START CLOCK A ######################################
-- SET MARKS ###
-- MARKS AROUND CLOCK A -- Large Main 24 HR Clock
local number_marks_A=init.hour
-- set mark length
local m_length_A=0 -- doesn't work but can't delete
-- set mark width
local m_width_A=0 -- doesn't work but can't delete
-- set mark line cap type
local m_cap=CAIRO_LINE_CAP_ROUND
-- set mark color and alpha,red blue green alpha
local mr,mg,mb,ma=1,1,1,0 -- opaque white -- doesn't work but can't delete
-- SETUP HOUR HANDS ###
-- CLOCK A HOUR HAND
hh_length_A=65
-- set hour hand width
hh_width_A=4
-- set hour hand line cap
hh_cap=CAIRO_LINE_CAP_ROUND
-- set hour hand color
-- hhr,hhg,hhb,hha=1,0,1,0 -- fully opaque white --doesn't work
-- SETUP MINUTE HANDS ###
-- CLOCK A MINUTE HAND SETUP
-- set length of minute hand
mh_length_A=85
-- set minute hand width
mh_width_A=4
-- set minute hand line cap
mh_cap=CAIRO_LINE_CAP_ROUND
-- set minute hand color
--mhr,mhg,mhb,mha=1,1,1,0.5 -- fully opaque white --doesn't work

-- SETUP SECOND HAND ###
-- CLOCK A SECOND HAND SETUP -- DOESN'T WORK - Why ???????????????????????????
-- set length of seconds hand -- yes I know it is commented out!
--sh_length_A=150
-- set hour hand width
--sh_width_A=2
-- set hour hand line cap
--sh_cap=CAIRO_LINE_CAP_ROUND
-- set seconds hand color
--shr,shg,shb,sha=1,0,0,1 -- fully opaque red

-- PART SECOND HAND
--position
--get seconds value
local seconds=tonumber(os.date("%S"))
--calculate rotation of second hand in degrees
if init.line == true then
  local arc=(math.pi/180)*((360/60)*seconds)
  --calculate point 1
  local radius1=100
  local x1=0+radius1*math.sin(arc)
  local y1=0-radius1*math.cos(arc)
  --calculate point 2
  local radius2=107
  local x2=0+radius2*math.sin(arc)
  local y2=0-radius2*math.cos(arc)
  --draw line connecting points
  cairo_move_to (cr, center_x+x1,center_y+y1)
  cairo_line_to (cr, center_x+x2, center_y+y2)
  cairo_set_source_rgba (cr,255/255,255/255,255/255,1) -- PART SECOND HAND
  cairo_stroke (cr)
end

-- CLOCK A ### 12 HR TIME ###
-- CLOCK SETTINGS
clock_radius=0 --does not work
clock_centerx=init.center_x -- centre of Clock hands
clock_centery=init.center_y -- centre of Clock hands
-- DRAWING CODE
-- DRAW MARKS
-- stuff that can be moved outside of the loop, needs only be set once
-- calculate end and start radius for marks
m_end_rad=clock_radius-b_to_m
m_start_rad=m_end_rad-m_length_A -- WHAT IS THIS??
-- set line cap type
cairo_set_line_cap  (cr, m_cap)
-- set line width
cairo_set_line_width (cr,m_width_A)
-- set color and alpha for marks
cairo_set_source_rgba (cr,mr,mg,mb,ma)
-- START LOOP FOR HOUR MARKS
for i=1,number_marks_A do
-- drawing code using the value of i to calculate degrees
-- calculate start point for 12/24 hour mark
radius=m_start_rad
point=(math.pi/180)*((i-1)*(360/number_marks_A))
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- set start point for line
cairo_move_to (cr,clock_centerx+x,clock_centery+y)
-- calculate end point for 12/24 hour mark
radius=m_end_rad
point=(math.pi/180)*((i-1)*(360/number_marks_A))
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- set path for line
cairo_line_to (cr,clock_centerx+x,clock_centery+y)
-- draw the line
cairo_stroke (cr)
end -- of for loop
-- HOUR MARKS -- ???????????????????????????????????????????????????????????????
-- TIME CALCULATIONS CLOCK A
if clock_type_A==12 then
hours=tonumber(os.date("%I"))
-- convert hours to seconds
h_to_s=hours*60*60
elseif clock_type_A==24 then
hours=tonumber(os.date("%H"))
-- convert hours to seconds
h_to_s=hours*60*60
end
minutes=tonumber(os.date("%M"))
-- convert minutes to seconds
m_to_s=minutes*60
-- get current seconds
seconds=tonumber(os.date("%S"))
-- DRAW HOUR HAND ###
-- get hours minutes seconds as just seconds
hsecs=h_to_s+m_to_s+seconds
-- calculate degrees for each second
hsec_degs=hsecs*(360/(60*60*clock_type_A)) -- use equation ~ eliminate decimals
-- set radius to calculate hand points
radius=hh_length_A
-- set start line coordinates, the center of the circle
cairo_move_to (cr,clock_centerx,clock_centery)
-- calculate coordinates for end of hour hand
point=(math.pi/180)*hsec_degs
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- describe the line we will draw
cairo_line_to (cr,clock_centerx+x,clock_centery+y)
-- set up line attributes and draw line
cairo_set_line_width (cr,hh_width_A)
cairo_set_source_rgba (cr,1,1,1,.75) -- active colour Hour Hand ================
cairo_set_line_cap  (cr, hh_cap)
cairo_stroke (cr)
-- DRAW MINUTE HAND
-- get minutes and seconds just as seconds
msecs=m_to_s+seconds
-- calculate degrees for each second
msec_degs=msecs*0.1
-- set radius to calculate hand points
radius=mh_length_A
-- set start line coordinates, the center of the circle
cairo_move_to (cr,clock_centerx,clock_centery)
-- calculate coordinates for end of minute hand
point=(math.pi/180)*msec_degs
x=0+radius*(math.sin(point))
y=0-radius*(math.cos(point))
-- describe the line we will draw
cairo_line_to (cr,clock_centerx+x,clock_centery+y)
-- set up line attributes and draw line
cairo_set_line_width (cr,mh_width_A)
cairo_set_source_rgba (cr,1,1,1,.75) -- active colour Minute Hand ==============
cairo_set_line_cap  (cr, mh_cap)
cairo_stroke (cr)
-- ### CLOCK A ###
local center_x=init.center_x -- Centre of the HR / Min Numbers
local center_y=init.center_y -- Centre of the HR / Min Numbers
local radius=init.radius -- 12/24 HR CLOCK Hours/Minutes radius -- seeline 42
cairo_select_font_face (cr, "WhiteRabbit", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size (cr, 25)
cairo_set_source_rgba (cr,1,1,1,0) -- HR Clock numbers
-- TABLE OF TEXT -- in order
if init.hour == 12 then
  text_days={"12","01","02","03","04","05","06","07","08","09","10","11",}
  for i=1,12 do
-- OUTTER POINTS POSTION FOR TEXT
    local point=(math.pi/180)*((360/12)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_set_source_rgba (cr,1,1,1,0)
    cairo_stroke (cr)
  end
-- INNER POINTS POSITION, radius smaller than text circle
  local radius=111 -- 12 HR Clock
  for i=1,12 do
    local point=(math.pi/180)*((360/12)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_set_source_rgba (cr,1,1,1,0)
    cairo_stroke (cr)
  end
end
if init.hour == 24 then
  text_days={"00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23",}
  for i=1,24 do
-- OUTTER POINTS POSTION FOR TEXT
    local point=(math.pi/180)*((360/24)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
    local text=text_days[i]--gets text from table
    cairo_text_extents(cr,text,extents)
    local width=extents.width
    local height=extents.height
    cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
    cairo_show_text (cr, text)
    cairo_stroke (cr)
  end
-- INNER POINTS POSITION, radius smaller than text circle
  local radius=99 -- 24 HR Clock
  for i=1,24 do
    local point=(math.pi/180)*((360/24)*(i-1))
    local x=0+radius*(math.sin(point))
    local y=0-radius*(math.cos(point))
    cairo_arc (cr,center_x+x,center_y+y,1,0,2*math.pi)
    cairo_set_source_rgba (cr,1,1,1,0)
    cairo_stroke (cr)
  end
end

-- ############################################################################
-- POSITION FOR TEXT HOUR NUMBERS
  if init.hour == 12 and init.second == true then
    text_days={"","01","02","03","04","","06","07","08","09","","11","12","13","14","","16","17","18","19","","21","22","23","24","","26","27","28","29","","31","32","33","34","","36","37","38","39","","41","42","43","44","","46","47","48","49","","51","52","53","54","","56","57","58","59","",}
-- INNER POINTS POSITION, radius smaller than text circle
    cairo_set_source_rgba (cr,1,1,1,.5) -- does not work -- settings moved
    cairo_select_font_face (cr, "WhiteRabbit", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    for i=1,60 do
      local radius=99 -- dots for seconds A Clock
      local point=(math.pi/180)*((360/60)*(i-1))
      local x=0+radius*(math.sin(point))
      local y=0-radius*(math.cos(point))
      if seconds == i-1 then
        cairo_set_source_rgba (cr,255/255,0/255,0/255,0) -- does not work - settings moved
      else
        if i-1 == 0 or i-1 == 5 or i-1 == 10 or i-1 == 15 or i-1 == 25 or i-1 == 30 or i-1 == 35 or i-1 == 40 or i-1 == 45 or i-1 == 50 or i-1 == 55 then
          cairo_set_source_rgba (cr,1,1,1,0) -- active colour
        else
          cairo_set_source_rgba (cr,1,1,1,0) -- dots for seconds A Clock
        end
      end
      cairo_arc (cr,center_x+x,center_y+y,1/2,0,2*math.pi)
      cairo_stroke (cr)
    end
    radius=radius-3
    cairo_set_font_size (cr, 9)
    for i=1,60 do
-- OUTTER POINTS POSTION FOR TEXT
      local point=(math.pi/180)*((360/60)*(i-1))
      local x=0+radius*(math.sin(point))
      local y=0-radius*(math.cos(point))
-- CALCULATE CENTRE OF TEXT
      local text=text_days[i]--gets text from table
      if seconds == tonumber(text) then
      cairo_set_source_rgba (cr,1,1,1,0) -- active colour
      else
        cairo_set_source_rgba (cr,1,1,1,0) -- seconds numbers
      end
      cairo_text_extents(cr,text,extents)
      local width=extents.width
      local height=extents.height
      cairo_move_to(cr,center_x+x-(width/2),center_y+y+(height/2))
      cairo_show_text (cr, text)
      cairo_stroke (cr)
    end
  end
-- ############################################################################
cairo_stroke (cr)
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
end -- end main function
Title: Re: Conky Codes and Images
Post by: Sector11 on February 26, 2013, 10:56:47 AM
lwfitz said: Im now giving a ${voffset} AHEAD warning for Sector11  :D


I haven't got a clue what you are talking about   ::)

Hey don't get me wrong ${voffset} has it's place and in some cases is unavoidable.  All I like to do is point out how it can cause conky windows to grow.  In some cases it's not so apparent, in others noticeable and annoying.

Something doesn't seem right about this though: s11_clock.lua  - - makes it look like I wrote the lua code when I didn't.  Did I use that name somewhere?  If I did my error and I apologize to mrpeachy that wrote the code.   But damn that whole setup looks N·I·C·E
Title: Re: Conky Codes and Images
Post by: lwfitz on February 27, 2013, 09:04:31 AM
You are absolutely correct about the name on s11_clock.lua, that is my mistake and I apologize to mrpeachy also.
I got it from one of your posts and I named it that so I could differentiate between it and others. Ill edit my posted config.

Oh and thank you Sector11! Glad you like it!
Title: Re: Conky Codes and Images
Post by: Sector11 on February 27, 2013, 03:59:17 PM
What can I say.  It's "modified by me" but it looks good how you have it.  ;D
Title: Re: Conky Codes and Images
Post by: McLovin on March 01, 2013, 07:08:19 AM
Mt latest Conky setup, a modified version of mr.peacheys clock, a modified version of Sector11s v9000, and some slightly modified configs from my library, still have a bit of work to do on it, will post all the codes once it's finished, but it's bed time now, so without further ado here it is

(http://t.imgbox.com/abjgyuNU.jpg) (http://imgbox.com/abjgyuNU) 

let me know what you think
Title: Re: Conky Codes and Images
Post by: Sector11 on March 01, 2013, 12:26:52 PM
WOW!  That's McAwesome
Title: Re: Conky Codes and Images
Post by: VastOne on March 01, 2013, 03:56:27 PM
Wow!  I agree with Sector11, very nicely McDone!  ;D
Title: Re: Conky Codes and Images
Post by: McLovin on March 01, 2013, 04:28:55 PM
I really need to change my McName lol
Title: Re: Conky Codes and Images
Post by: Sector11 on March 01, 2013, 05:35:25 PM
Tell us you first name is Donald and we'll McKing ya.
Oh no - not Stephen. :D
Title: Re: Conky Codes and Images
Post by: Sector11 on March 01, 2013, 11:19:53 PM
My version of the "HUD-week-2 combo"

(http://t.imgbox.com/adgUuCNN.jpg) (http://imgbox.com/adgUuCNN)
This shows:

I won't include the VSIDO orb that can be any image you want really - it's here for the grabbing.  :D

S11_HUD3.conky
# killall conky && conky -c /media/5/Conky/S11_HUD3.conky &
###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,sticky,below,skip_taskbar,skip_pager
#own_window_colour black
own_window_class Conky
own_window_title HUD 3

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type override
#own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#own_window_argb_value 200

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

minimum_size 250 910 ## width, height
maximum_width 250  ## width

gap_x 10 # left-right
gap_y 10 # up-down

alignment top_left
###################################################  End Window Settings  ###
###  Font Settings  #########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont Monofur:bold:size=10

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 0
# Force UTF8? requires XFT ###
override_utf8_locale yes

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
draw_shades no # amplifies text if yes
default_shade_color black

draw_outline no # amplifies text if yes
default_outline_color black

default_color DCDCDC #220 220 220 Gainsboro
color0 8FBC8F #143 188 143 DarkSeaGreen
color1 778899 #119 136 153 LightSlateGray
color2 FF8C00 #255 140   0 DarkOrange
color3 7FFF00 #127 255   0 Chartreuse
color4 FFA07A #255 160 122 LightSalmon
color5 FFDEAD #255 222 173 NavajoWhite
color6 00BFFF #  0 191 255 DeepSkyBlue
color7 00FFFF #  0 255 255 Cyan
color8 FFFF00 #255 255   0 Yellow
color9 B22222 #178  34  34 FireBrick
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 0
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes
#default_graph_size 15 40
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################

# Boolean value, if true, Conky will be forked to background when started.
background no

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 510

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load ~/Conky/LUA/draw-bg.lua
#TEXT
#${lua conky_draw_bg 10 0 0 0 0 0x000000 0.6}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
lua_load ~/Conky/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 15 0 0 0 0 0x000000 0.2
#
lua_load /media/5/Conky/LUA/HUD3.lua
lua_draw_hook_post main
#
#######################################################  End LUA Settings  ###
# The all important - How often conky refreshes.
# If you have a "Crey" try: 0.2 - smokin' - but watch the CPU useage go UP!
update_interval 1


TEXT
${lua conky_draw_bg 10 0 0 0 0 0x000000 0.3}\
${image /media/5/Conky/images/VSIDO_ORB_black.png -p 82,45 -s 75x75}\
${image /media/5/Conky/images/4.250.374_2.png -p 0,200 -s 250x374}\
${color7}CPU Fan${alignr 5}${platform f71882fg.2560 fan 1} rpm
${color6}Freq${alignr 5}${freq_g} GHz
${color7}Temp${alignr 5}${platform f71882fg.2560 temp 1}°

${color6}Mobo${alignr 5}${platform f71882fg.2560 temp 2}°

${color7}SDA ${alignr 5}${platform f71882fg.2560 temp 2}°

${color6}GPU ${alignr 5}${nvidia temp}°
${color7}Freq${alignr 5}${nvidia gpufreq} MHz${color}
${color6}Mem${alignr 5}${nvidia memfreq} MHz${color}

${goto 60}${execpi 600 /media/5/Conky/scripts/week-2.sh}\
${voffset -4}${goto 5}${font Digital tech:size=25}${color7}${time %a}${goto 190}${time %b}${color}\
${font digitalk:bold:size=13}${goto 65}${color8}${time %C}${goto 165}${time %y}${color}${font}



${goto 50}${color}MEM${goto 125}${color}SDA
${goto 120}/ &${goto 165}${color}CPU
${goto 120}/h${goto 160}${color}% ${color6}Nº${goto 197}1${goto 207}2${goto 217}3${goto 227}${color8}A${color}${font monofur:pixelsize=24}
${font}  /${goto 40}${color5}${fs_size /}${goto 100}${color9}${fs_used /}${goto 160}${color6}${fs_free /}${color}${font monofur:pixelsize=27}
${font}  /h${goto 40}${color5}${fs_size /home}${goto 100}${color9}${fs_used /home}${goto 160}${color6}${fs_free /home}${color}${font monofur:pixelsize=28}
${font}  m/5${goto 40}${color5}${fs_size /media/5}${goto 100}${color9}${fs_used /media/5}${goto 160}${color6}${fs_free /media/5}${color}${font monofur:pixelsize=28}
${font}  m/6${goto 40}${color5}${fs_size /media/6}${goto 100}${color9}${fs_used /media/6}${goto 160}${color6}${fs_free /media/6}${color}${font monofur:pixelsize=28}
${font}  m/7${goto 40}${color5}${fs_size /media/7}${goto 100}${color9}${fs_used /media/7}${goto 160}${color6}${fs_free /media/7}${color}${font monofur:pixelsize=27}
${font}  ext${goto 40}${color5}${if_mounted /media/disk}\
${fs_size /media/disk}${goto 100}${color9}${fs_used /media/disk}\
${goto 160}${color6}${fs_free /media/disk}\
${image /media/5/Conky/images/4-blue.png -p 213,494}\
${else}${goto 90}Not Mounted${endif}${color}${font monofur:pixelsize=27.5}
${font}  usb${goto 40}${color5}${if_mounted /media/VSIDO_LiveCD}\
${fs_size /media/VSIDO_LiveCD}${goto 100}${color9}${fs_used /media/VSIDO_LiveCD}\
${goto 160}${color6}25${fs_free /media/VSIDO_LiveCD}\
${image /media/5/Conky/images/4-blue.png -p 213,534}\
${else}${goto 90}Not Mounted${endif}${color}

${alignc}${kernel}

${color6}Processes ${color}${running_processes} of${processes} ${color7}${hr}${color}
Load${goto 70}${loadavg 1}${goto 140}${loadavg 2}${alignr 5}${loadavg 3}

${color6}RAM ${color}${memmax} ${color7}${hr}${color}
${alignc}Used ${memperc}% for ${mem}
Buffered ${buffers}${alignr 5}Cached ${cached}

${color6}DISK Activity ${color7}${hr}${color}
${font Monofur:bold:size=13}R${goto 40}${diskiograph_read /dev/sda 14,130 00ffff ff0000 5 -lt}${alignr 5}${diskio_read /dev/sda}
W${goto 40}${diskiograph_write /dev/sda 14,130 ff0000 00ffff 5 -lt}${alignr 5}${diskio_write /dev/sda}${font}

${color6}NETWORK ${color7}${hr}${color}
${font Monofur:bold:size=13}Dn${goto 40}${downspeedgraph eth0 14,130 00ffff ff0000 5 -lt}${alignr 5}${downspeedf eth0}
Up${goto 40}${upspeedgraph eth0 14,130 ff0000 00ffff 5 -lt}${alignr 5}${upspeedf eth0}
${font}${color0}       Down      Up         Total${font monofur:pixelsize=16}
${font}${color}${time %b %y}${goto 50}${color6}${execi 300 vnstat -m | grep "`date +"%b %y"`" | awk '{print $3 $4}'}${goto 125}${color7}${execi 300 vnstat -m | grep "`date +"%b %y"`" | awk '{print $6 $7}'}${goto 200}${color}${execi 300 vnstat -m | grep "`date +"%b %y"`" | awk '{print $9 $10}'}${font monofur:pixelsize=16}
${font}${color}${exec date | awk '{print $3" "$2}'}${goto 50}${color6}${execi 300 vnstat | grep "today" | awk '{print $2 $3}'}${goto 125}${color7}${execi 300 vnstat | grep "today" | awk '{print $5 $6}'}${goto 200}${color}${execi 300 vnstat | grep "today" | awk '{print $8 $9}'}
${exec date --date="-1 day" | awk '{print $3" "$2}'}${goto 50}${color6}${execi 300 vnstat | grep "yesterday" | awk '{print $2 $3}'}${goto 125}${color7}${execi 300 vnstat | grep "yesterday" | awk '{print $5 $6}'}${goto 200}${color}${execi 300 vnstat | grep "yesterday" | awk '{print $8 $9}'}
${color}Last 7${goto 50}${color6}${execi 300 vnstat -w | grep "last 7 days" | awk '{print $4 $5}'}${goto 125}${color7}${execi 300 vnstat -w | grep "last 7 days" | awk '{print $7 $8}'}${goto 200}${color}${execi 300 vnstat -w | grep "last 7 days" | awk '{print $10 $11}'}


HUD3.lua
--==============================================================================
--  Origianl by: SLK
--  license : Distributed under the terms of GNU GPL version 2 or later
--  modified by Sector11 - Feb 2013
--==============================================================================

require 'cairo'

--------------------------------------------------------------------------------
--                                                                    gauge DATA
gauge = {
{
    name='cpu',                    arg='cpu0',                  max_value=100,
    x=170,                         y=270, --180,150
    graph_radius=60,
    graph_thickness=5,
    graph_start_angle=0,
    graph_unit_angle=0.9,          graph_unit_thickness=0.9,
    graph_bg_colour=0xFFFF00,      graph_bg_alpha=0.3,
    graph_fg_colour=0xFFFF00,      graph_fg_alpha=0.0,
    hand_fg_colour=0xFFFF00,       hand_fg_alpha=1.0,
    txt_radius=60, -- yellow
    txt_weight=1,                  txt_size=10.0,
    txt_fg_colour=0xFFFF00,        txt_fg_alpha=0.8,
    graduation_radius=30,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0xFFFF00, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.3,
},
{
    name='cpu',                    arg='cpu1',                  max_value=100,
    x=170,                         y=270, --180,150
    graph_radius=50,
    graph_thickness=5,
    graph_start_angle=0,
    graph_unit_angle=0.9,          graph_unit_thickness=0.9,
    graph_bg_colour=0x00BFFF,      graph_bg_alpha=0.3,
    graph_fg_colour=0x00BFFF,      graph_fg_alpha=0.0,
    hand_fg_colour=0x00BFFF,       hand_fg_alpha=1.0,
    txt_radius=50, -- green
    txt_weight=1,                  txt_size=10.0,
    txt_fg_colour=0x00BFFF,        txt_fg_alpha=0.8,
    graduation_radius=55,
    graduation_thickness=5,        graduation_mark_thickness=2,
    graduation_unit_angle=27,
    graduation_fg_colour=0x00BFFF, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.3,
},
{
    name='cpu',                    arg='cpu2',                  max_value=100,
    x=170,                         y=270, --180,150
    graph_radius=40,
    graph_thickness=5,
    graph_start_angle=0,
    graph_unit_angle=0.9,          graph_unit_thickness=0.9,
    graph_bg_colour=0x00BFFF,      graph_bg_alpha=0.3,
    graph_fg_colour=0x00BFFF,      graph_fg_alpha=0.0,
    hand_fg_colour=0x00BFFF,       hand_fg_alpha=1.0,
    txt_radius=40,
    txt_weight=1,                  txt_size=10.0,
    txt_fg_colour=0x00BFFF,        txt_fg_alpha=0.8,
    graduation_radius=30,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0x00BFFF, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.3,
},
{
    name='cpu',                    arg='cpu3',                  max_value=100,
    x=170,                         y=270, --180,150
    graph_radius=30,
    graph_thickness=5,
    graph_start_angle=0,
    graph_unit_angle=0.9,          graph_unit_thickness=0.9,
    graph_bg_colour=0x00BFFF,      graph_bg_alpha=0.3,
    graph_fg_colour=0x00BFFF,      graph_fg_alpha=0.0,
    hand_fg_colour=0x00BFFF,       hand_fg_alpha=1.0,
    txt_radius=30,
    txt_weight=1,                  txt_size=10.0,
    txt_fg_colour=0x00BFFF,        txt_fg_alpha=0.8,
    graduation_radius=35,
    graduation_thickness=5,        graduation_mark_thickness=2,
    graduation_unit_angle=27,
    graduation_fg_colour=0x00BFFF, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.3,
},
{
    name='memperc',                arg='',                      max_value=100,
    x=60,                          y=245, --40,115
    graph_radius=34,
    graph_thickness=5,
    graph_start_angle=180,
    graph_unit_angle=2,            graph_unit_thickness=2,
    graph_bg_colour=0x00BFFF,      graph_bg_alpha=0.3,
    graph_fg_colour=0x00BFFF,      graph_fg_alpha=0.0,
    hand_fg_colour=0x00BFFF,       hand_fg_alpha=1.0,
    txt_radius=20,
    txt_weight=1,                  txt_size=10.0,
    txt_fg_colour=0x00BFFF,        txt_fg_alpha=0.8,
    graduation_radius=24,
    graduation_thickness=6,        graduation_mark_thickness=2,
    graduation_unit_angle=10,
    graduation_fg_colour=0x00BFFF, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=10.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.5,
},
{
    name='fs_used_perc',           arg='/',                     max_value=100,
    x=130,                         y=250, --120,70
    graph_radius=25, --40,
    graph_thickness=4,
    graph_start_angle=210,
    graph_unit_angle=2,            graph_unit_thickness=2,
    graph_bg_colour=0x00BFFF,      graph_bg_alpha=0.3,
    graph_fg_colour=0x00BFFF,      graph_fg_alpha=0.0,
    hand_fg_colour=0x00BFFF,       hand_fg_alpha=1.0,
    txt_radius=17, --32,
    txt_weight=1,                  txt_size=10.0,
    txt_fg_colour=0xffffff,        txt_fg_alpha=1.0,
    graduation_radius=31, --46,
    graduation_thickness=0,        graduation_mark_thickness=2,
    graduation_unit_angle=20,
    graduation_fg_colour=0x00BFFF, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.5,
},
{
    name='fs_used_perc',           arg='/home/',                max_value=100,
    x=130,                         y=250, --120,70
    graph_radius=35, --50,
    graph_thickness=8,
    graph_start_angle=210,
    graph_unit_angle=2,            graph_unit_thickness=2,
    graph_bg_colour=0x00BFFF,      graph_bg_alpha=0.3,
    graph_fg_colour=0x00BFFF,      graph_fg_alpha=0.0,
    hand_fg_colour=0x00BFFF,       hand_fg_alpha=1.0,
    txt_radius=50, --65,
    txt_weight=1,                  txt_size=10.0,
    txt_fg_colour=0xffffff,        txt_fg_alpha=1.0,
    graduation_radius=43, --58,
    graduation_thickness=4,        graduation_mark_thickness=2,
    graduation_unit_angle=20,
    graduation_fg_colour=0x00BFFF, graduation_fg_alpha=0.6,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.5,
},
}
-------------------------------------------------------------------------------
--                                                                 rgb_to_r_g_b
-- converts color in hexa to decimal
--
function rgb_to_r_g_b(colour, alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

-------------------------------------------------------------------------------
--                                                            angle_to_position
-- convert degree to rad and rotate (0 degree is top/north)
--
function angle_to_position(start_angle, current_angle)
    local pos = current_angle + start_angle
    return ( ( pos * (2 * math.pi / 360) ) - (math.pi / 2) )
end

-------------------------------------------------------------------------------
--                                                              draw_gauge_ring
-- displays gauges
--
function draw_gauge_ring(display, data, value)
    local max_value = data['max_value']
    local x, y = data['x'], data['y']
    local graph_radius = data['graph_radius']
    local graph_thickness, graph_unit_thickness = data['graph_thickness'], data['graph_unit_thickness']
    local graph_start_angle = data['graph_start_angle']
    local graph_unit_angle = data['graph_unit_angle']
    local graph_bg_colour, graph_bg_alpha = data['graph_bg_colour'], data['graph_bg_alpha']
    local graph_fg_colour, graph_fg_alpha = data['graph_fg_colour'], data['graph_fg_alpha']
    local hand_fg_colour, hand_fg_alpha = data['hand_fg_colour'], data['hand_fg_alpha']
    local graph_end_angle = (max_value * graph_unit_angle) % 360

    -- background ring
    cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, 0), angle_to_position(graph_start_angle, graph_end_angle))
    cairo_set_source_rgba(display, rgb_to_r_g_b(graph_bg_colour, graph_bg_alpha))
    cairo_set_line_width(display, graph_thickness)
    cairo_stroke(display)

    -- arc of value
    local val = (value or 0) % (max_value +1)
    local start_arc = 0
    local stop_arc = 0
    local i = 1
    while i <= val do
        start_arc = (graph_unit_angle * i) - graph_unit_thickness
        stop_arc = (graph_unit_angle * i)
        cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
        cairo_set_source_rgba(display, rgb_to_r_g_b(graph_fg_colour, graph_fg_alpha))
        cairo_stroke(display)
        i = i + 1
    end
    local angle = start_arc

    -- hand
    start_arc = (graph_unit_angle * val) - (graph_unit_thickness * 2)
    stop_arc = (graph_unit_angle * val)
    cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
    cairo_set_source_rgba(display, rgb_to_r_g_b(hand_fg_colour, hand_fg_alpha))
    cairo_stroke(display)

    -- graduations marks
    local graduation_radius = data['graduation_radius']
    local graduation_thickness, graduation_mark_thickness = data['graduation_thickness'], data['graduation_mark_thickness']
    local graduation_unit_angle = data['graduation_unit_angle']
    local graduation_fg_colour, graduation_fg_alpha = data['graduation_fg_colour'], data['graduation_fg_alpha']
    if graduation_radius > 0 and graduation_thickness > 0 and graduation_unit_angle > 0 then
        local nb_graduation = graph_end_angle / graduation_unit_angle
        local i = 0
        while i < nb_graduation do
            cairo_set_line_width(display, graduation_thickness)
            start_arc = (graduation_unit_angle * i) - (graduation_mark_thickness / 2)
            stop_arc = (graduation_unit_angle * i) + (graduation_mark_thickness / 2)
            cairo_arc(display, x, y, graduation_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
            cairo_set_source_rgba(display,rgb_to_r_g_b(graduation_fg_colour,graduation_fg_alpha))
            cairo_stroke(display)
            cairo_set_line_width(display, graph_thickness)
            i = i + 1
        end
    end

    -- text
    local txt_radius = data['txt_radius']
    local txt_weight, txt_size = data['txt_weight'], data['txt_size']
    local txt_fg_colour, txt_fg_alpha = data['txt_fg_colour'], data['txt_fg_alpha']
    local movex = txt_radius * math.cos(angle_to_position(graph_start_angle, angle))
    local movey = txt_radius * math.sin(angle_to_position(graph_start_angle, angle))
    cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, txt_weight)
    cairo_set_font_size (display, txt_size)
    cairo_set_source_rgba (display, rgb_to_r_g_b(txt_fg_colour, txt_fg_alpha))
    cairo_move_to (display, x + movex - (txt_size / 2), y + movey + 3)
    cairo_show_text (display, value)
    cairo_stroke (display)

    -- caption
    local caption = data['caption']
    local caption_weight, caption_size = data['caption_weight'], data['caption_size']
    local caption_fg_colour, caption_fg_alpha = data['caption_fg_colour'], data['caption_fg_alpha']
    local tox = graph_radius * (math.cos((graph_start_angle * 2 * math.pi / 360)-(math.pi/2)))
    local toy = graph_radius * (math.sin((graph_start_angle * 2 * math.pi / 360)-(math.pi/2)))
    cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, caption_weight);
    cairo_set_font_size (display, caption_size)
    cairo_set_source_rgba (display, rgb_to_r_g_b(caption_fg_colour, caption_fg_alpha))
    cairo_move_to (display, x + tox + 5, y + toy + 1)
    -- bad hack but not enough time !
    if graph_start_angle < 105 then
        cairo_move_to (display, x + tox - 30, y + toy + 1)
    end
    cairo_show_text (display, caption)
    cairo_stroke (display)
end

-------------------------------------------------------------------------------
--                                                               go_gauge_rings
-- loads data and displays gauges
--
function go_gauge_rings(display)
    local function load_gauge_rings(display, data)
        local str, value = '', 0
        str = string.format('${%s %s}',data['name'], data['arg'])
        str = conky_parse(str)
        value = tonumber(str)
        draw_gauge_ring(display, data, value)
    end

    for i in pairs(gauge) do
        load_gauge_rings(display, gauge[i])
    end
end


--------------------------------------------------------------------------------
--                                                                    clock DATA
-- HOURS
clock_h = {
    {
    name='time',                   arg='%H',                    max_value=12,
    x=120,                          y=85,
    graph_radius=62, --58, --53,
    graph_thickness=3,
    graph_unit_angle=30,           graph_unit_thickness=30,
    graph_bg_colour=0x00BFFF,      graph_bg_alpha=0.0,
    graph_fg_colour=0x00BFFF,      graph_fg_alpha=0.3,
    txt_radius=70, --39, --34,
    txt_weight=1,                  txt_size=15.0,
    txt_fg_colour=0xFFDEAD,        txt_fg_alpha=1.0,
    graduation_radius=58, --53,
    graduation_thickness=6,        graduation_mark_thickness=2,
    graduation_unit_angle=30,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    },
}
-- MINUTES
clock_m = {
    {
    name='time',                   arg='%M',                    max_value=60,
    x=120,                          y=85,
    graph_radius=58, --62, --57,
    graph_thickness=2,
    graph_unit_angle=6,            graph_unit_thickness=6,
    graph_bg_colour=0x00BFFF,      graph_bg_alpha=0.2,
    graph_fg_colour=0x00BFFF,      graph_fg_alpha=0.7,
    txt_radius=47, --39, --70, --65,
    txt_weight=1,                  txt_size=15.0,
    txt_fg_colour=0xFFDEAD,        txt_fg_alpha=1.0,
    graduation_radius=62, --57,
    graduation_thickness=0,        graduation_mark_thickness=2,
    graduation_unit_angle=30,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    },
}
-- SECONDS
clock_s = {
    {
    name='time',                   arg='%S',                    max_value=60,
    x=120,                          y=85,
    graph_radius=55, --50,
    graph_thickness=2,
    graph_unit_angle=6,            graph_unit_thickness=2,
    graph_bg_colour=0xFFDEAD,      graph_bg_alpha=0.0,
    graph_fg_colour=0xFFDEAD,      graph_fg_alpha=0.7,
    txt_radius=47, --42,
    txt_weight=0,                  txt_size=8.0,
    txt_fg_colour=0xFFDEAD,        txt_fg_alpha=1.0,
    graduation_radius=0,
    graduation_thickness=0,        graduation_mark_thickness=0,
    graduation_unit_angle=0,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.0,
    },
}

--------------------------------------------------------------------------------
--                                                                 rgb_to_r_g_b
-- converts color in hexa to decimal
--
function rgb_to_r_g_b(colour, alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

-------------------------------------------------------------------------------
--                                                            angle_to_position
-- convert degree to rad and rotate (0 degree is top/north)
--
function angle_to_position(start_angle, current_angle)
    local pos = current_angle + start_angle
    return ( ( pos * (2 * math.pi / 360) ) - (math.pi / 2) )
end

-------------------------------------------------------------------------------
--                                                              draw_clock_ring
-- displays clock
--
function draw_clock_ring(display, data, value)
    local max_value = data['max_value']
    local x, y = data['x'], data['y']
    local graph_radius = data['graph_radius']
    local graph_thickness, graph_unit_thickness = data['graph_thickness'], data['graph_unit_thickness']
    local graph_unit_angle = data['graph_unit_angle']
    local graph_bg_colour, graph_bg_alpha = data['graph_bg_colour'], data['graph_bg_alpha']
    local graph_fg_colour, graph_fg_alpha = data['graph_fg_colour'], data['graph_fg_alpha']

    -- background ring
    cairo_arc(display, x, y, graph_radius, 0, 2 * math.pi)
    cairo_set_source_rgba(display, rgb_to_r_g_b(graph_bg_colour, graph_bg_alpha))
    cairo_set_line_width(display, graph_thickness)
    cairo_stroke(display)

    -- arc of value
    local val = (value % max_value)
    local i = 1
    while i <= val do
        cairo_arc(display, x, y, graph_radius,(  ((graph_unit_angle * i) - graph_unit_thickness)*(2*math.pi/360)  )-(math.pi/2),((graph_unit_angle * i) * (2*math.pi/360))-(math.pi/2))
        cairo_set_source_rgba(display,rgb_to_r_g_b(graph_fg_colour,graph_fg_alpha))
        cairo_stroke(display)
        i = i + 1
    end
    local angle = (graph_unit_angle * i) - graph_unit_thickness

    -- graduations marks
    local graduation_radius = data['graduation_radius']
    local graduation_thickness, graduation_mark_thickness = data['graduation_thickness'], data['graduation_mark_thickness']
    local graduation_unit_angle = data['graduation_unit_angle']
    local graduation_fg_colour, graduation_fg_alpha = data['graduation_fg_colour'], data['graduation_fg_alpha']
    if graduation_radius > 0 and graduation_thickness > 0 and graduation_unit_angle > 0 then
        local nb_graduation = 360 / graduation_unit_angle
        local i = 1
        while i <= nb_graduation do
            cairo_set_line_width(display, graduation_thickness)
            cairo_arc(display, x, y, graduation_radius, (((graduation_unit_angle * i)-(graduation_mark_thickness/2))*(2*math.pi/360))-(math.pi/2),(((graduation_unit_angle * i)+(graduation_mark_thickness/2))*(2*math.pi/360))-(math.pi/2))
            cairo_set_source_rgba(display,rgb_to_r_g_b(graduation_fg_colour,graduation_fg_alpha))
            cairo_stroke(display)
            cairo_set_line_width(display, graph_thickness)
            i = i + 1
        end
    end

    -- text
    local txt_radius = data['txt_radius']
    local txt_weight, txt_size = data['txt_weight'], data['txt_size']
    local txt_fg_colour, txt_fg_alpha = data['txt_fg_colour'], data['txt_fg_alpha']
    local movex = txt_radius * (math.cos((angle * 2 * math.pi / 360)-(math.pi/2)))
    local movey = txt_radius * (math.sin((angle * 2 * math.pi / 360)-(math.pi/2)))
    cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, txt_weight);
    cairo_set_font_size (display, txt_size);
    cairo_set_source_rgba (display, rgb_to_r_g_b(txt_fg_colour, txt_fg_alpha));
    cairo_move_to (display, x + movex - (txt_size / 2), y + movey + 3);
    cairo_show_text (display, value);
    cairo_stroke (display);
end

-------------------------------------------------------------------------------
--                                                               go_clock_rings
-- loads data and displays clock
--
function go_clock_rings(display)
    local function load_clock_rings(display, data)
        local str, value = '', 0
        str = string.format('${%s %s}',data['name'], data['arg'])
        str = conky_parse(str)
        value = tonumber(str)
        draw_clock_ring(display, data, value)
    end

    for i in pairs(clock_h) do
        load_clock_rings(display, clock_h[i])
    end
    for i in pairs(clock_m) do
        load_clock_rings(display, clock_m[i])
    end
    for i in pairs(clock_s) do
        load_clock_rings(display, clock_s[i])
    end
end


-------------------------------------------------------------------------------
--                                                                         MAIN
function conky_main()
    if conky_window == nil then
        return
    end

    local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
    local display = cairo_create(cs)

    local updates = conky_parse('${updates}')
    update_num = tonumber(updates)

    if update_num > 5 then
        go_gauge_rings(display)
        go_clock_rings(display)
    end

    cairo_surface_destroy(cs)
    cairo_destroy(display)
end



week-2.sh
#!/bin/bash
# By: mobilediesel

font=("\${voffset -10}\${font digitalk:size=4}" "\${voffset -0}\${font digitalk:size=8}" "\${voffset -0}\${font digitalk:size=12}" "\${voffset -3}\${font digitalk:size=30}\${color 00FFFF}" "\${voffset -15}\${font digitalk:size=12}" "\${voffset -4}\${font digitalk:size=7}" "\${voffset -2}\${font digitalk:size=4}")
color=("" "" "" "\${color}" "" "" "")

for i in $(seq -3 3); do
echo -n "${font[$[i+3]]}$(date '+%d' -d "$i days")${color[3]}\${offset 3}"
done


And because I am using it and it has a calendar by mrpeachy: draw-bg.lua
--[[Background originally by londonali1010 (2009)
    ability to set any size for background mrpeachy 2011
    ability to set variables for bg in conkyrc dk75

  the change is that if you set width and/or height to 0
  then it assumes the width and/or height of the conky window

so:

Above and After TEXT  (requires a composite manager or it blinks!)

lua_load ~/wea_conky/draw_bg.lua
TEXT
${lua conky_draw_bg 10 0 0 0 0 0x000000 0.4}

OR Both above TEXT (no composite manager required - no blinking!)

lua_load ~/wea_conky/draw_bg.lua
lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.5
TEXT

Note
${lua conky_draw_bg 20 0 0 0 0 0x000000 0.4}
  See below:        1  2 3 4 5 6        7

${lua conky_draw_bg corner_radius x_position y_position width height color alpha}

covers the whole window and will change if you change the minimum_size setting

1 = 20             corner_radius
2 = 0             x_position
3 = 0             y_position
3 = 0             width
5 = 0             height
6 = 0x000000      color
7 = 0.4           alpha

######### calendar function ##################################################

then to use it, you activate the calendar function BELOW TEXT like this

${lua luacal {settings}}

#${lua luacal {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gh=,gt=,gv=,sd=}}
#    x=x position top left
#    y=y position top left
#    tf=title font, eg "mono" must be in quotes
#    tfs=title font size
#    tc=title color
#    ta=title alpha
#    bf=body font, eg "mono" must be in quotes
#    bfs=body font size
#    bc=body color
#    ba=body alpha
#    hf=highlight font, eg "mono" must be in quotes
#    hfs=highlight font size
#    hc=highlight color
#    ha=highlight alpha
#    sp=spacer, eg " " or sp="0"... 0,1 or 2 spaces can help with positioning of non-monospaced fonts

#    gt=gap from title to body
#    gh=gap horizontal between columns
#    gv=gap vertical between rows
#    sd=start day, 0=Sun, 1=Mon

#    hstyle = heading style, 0=just days, 1=date insert
#    tdf=title date font, eg "mono" must be in quotes
#    tdfs=title date font size
#    tdc=title date color
#    tda=title date alpha

# test line
-- ${lua luacal {x=10,y=100,tf="Purisa",tfs=24,tc=0xf67e16,ta=1,bf="First Order",bfs=26,bc=0xecd32a,ba=1,hf="Purisa",hfs=18,hc=0xf67e16,ha=1,sp=" ",gh=40,gt=25,gv=20,sd=0,hstyle=1,tdf="First Order",tdfs=28,tdc=0xff0000,tda=1}}


]]

require 'cairo'
local    cs, cr = nil
function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
function conky_draw_bg(r,x,y,w,h,color,alpha)
if conky_window == nil then return end
if cs == nil then cairo_surface_destroy(cs) end
if cr == nil then cairo_destroy(cr) end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
w=w
h=h
if w=="0" then w=tonumber(conky_window.width) end
if h=="0" then h=tonumber(conky_window.height) end
cairo_set_source_rgba (cr,rgb_to_r_g_b(color,alpha))
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
-----------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_fill (cr)
------------------------------------------------------------
cairo_surface_destroy(cs)
cairo_destroy(cr)
return ""
end
-- ###### calendar function ##################################################
function conky_luacal(caltab) -- {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gt=,gh=,gv=,sd=,hstyle=,tdf=,tdfs=,tdc=,tda=}
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--############################################################################
if caltab.x==nil then
caltab=loadstring("return" .. caltab)()
end
local cal_x=caltab.x
local cal_y=caltab.y
local tfont=caltab.tf or "mono"
local tfontsize=caltab.tfs or 12
local tc=caltab.tc or 0xffffff
local ta=caltab.ta or 1
local bfont=caltab.bf or "mono"
local bfontsize=caltab.bfs or 12
local bc=caltab.bc or 0xffffff
local ba=caltab.ba or 1
local hfont=caltab.hf or "mono"
local hfontsize=caltab.hfs or 12
local hc=caltab.hc or 0xff0000
local ha=caltab.ha or 1
local spacer=caltab.sp or " "
local gaph=caltab.gh or 20
local gapt=caltab.gt or 15
local gapl=caltab.gv or 15
local sday=caltab.sd or 0
local hstyle=caltab.hstyle or 0
--convert colors
--local font=string.gsub(font,"_"," ")
local tred,tgreen,tblue,talpha=rgb_to_r_g_b(tc,ta)
--main body text color
local bred,bgreen,bblue,balpha=rgb_to_r_g_b(bc,ba)
--highlight text color
local hred,hgreen,hblue,halpha=rgb_to_r_g_b(hc,ha)
--############################################################################
--calendar calcs
local year=os.date("%G")
local today=tonumber(os.date("%d"))
local t1 = os.time( {    year=year,month=03,day=01,hour=00,min=0,sec=0} );
local t2 = os.time( {    year=year,month=02,day=01,hour=00,min=0,sec=0} );
local feb=(os.difftime(t1,t2))/(24*60*60)
local monthdays={ 31, feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
local day=tonumber(os.date("%w"))+1-sday
local day_num = today
local remainder=day_num % 7
local start_day=day-(day_num % 7)
if start_day<0 then start_day=7+start_day end
local month=os.date("%m")
local mdays=monthdays[tonumber(month)]
local x=mdays+start_day
local dnum={}
local dnumh={}
if mdays+start_day<36 then
dlen=35
plen=29
else
dlen=42
plen=36
end
for i=1,dlen do
    if i<=start_day then
    dnum[i]="  "
    else
    dn=i-start_day
        if dn=="nil" then dn=0 end
        if dn<=9 then dn=(spacer .. dn) end
        if i>x then dn="" end
        dnum[i]=dn
        dnumh[i]=dn
        if dn==(spacer .. today) or dn==today then
        dnum[i]=""
        end
        if dn==(spacer .. today) or dn==today then
        dnumh[i]=dn
        place=i
        else dnumh[i]="  "
        end
    end
end--for
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
local extents=cairo_text_extents_t:create()
tolua.takeownership(extents)
if hstyle==0 then
    if tonumber(sday)==0 then
    dys={"SU","MO","TU","WE","TH","FR","SA"}
    else
    dys={"MO","TU","WE","TH","FR","SA","SU"}
    end
    --draw calendar titles
elseif hstyle==1 then
    if tonumber(sday)==0 then
    dys={"SU","MO"," ","  ","  ","FR","SA"}
    cairo_text_extents(cr,"MO",extents)
    local s=extents.x_advance+gaph
    local f=gaph*5
    local tdfont=caltab.tdf        or "mono"
    local tdfontsize=caltab.tdfs    or 12
    local tdc=caltab.tdc        or 0xffffff
    local tda=caltab.tda        or 1
    cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, tdfontsize);
    local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
    cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
    local insert=os.date("%b %y")
    cairo_text_extents(cr,insert,extents)
    local w=extents.x_advance
    cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
    cairo_show_text (cr,insert)
    cairo_stroke (cr)
    else
    dys={"MO","TU"," ","  ","  ","SA","SU"}
    cairo_text_extents(cr,"TU",extents)
    local s=extents.x_advance+gaph
    local f=gaph*5
    local tdfont=caltab.tdf        or "mono"
    local tdfontsize=caltab.tdfs    or 12
    local tdc=caltab.tdc        or 0xffffff
    local tda=caltab.tda        or 1
    cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, tdfontsize);
    local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
    cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
    local insert=os.date("%b %y")
    cairo_text_extents(cr,insert,extents)
    local w=extents.x_advance
    cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
    cairo_show_text (cr,insert)
    cairo_stroke (cr)
    end
end
--draw calendar titles
for i=1,7 do
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
cairo_move_to (cr, cal_x+(gaph*(i-1)), cal_y)
cairo_show_text (cr, dys[i])
cairo_stroke (cr)
end
--draw calendar body
cairo_select_font_face (cr, bfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, bfontsize);
cairo_set_source_rgba (cr,bred,bgreen,bblue,balpha)
for i=1,plen,7 do
local fn=i
    for i=fn,fn+6 do
    cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
    cairo_show_text (cr, dnum[i])
    cairo_stroke (cr)
    end
end
--highlight
cairo_select_font_face (cr, hfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, hfontsize);
cairo_set_source_rgba (cr,hred,hgreen,hblue,halpha)
for i=1,plen,7 do
local fn=i
    for i=fn,fn+6 do
    cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
    cairo_show_text (cr, dnumh[i])
    cairo_stroke (cr)
    end
end
--############################################################################
caltab=nil
dlen=nil
plen=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end
-- end main function #########################################################


The stack of harddrives: (http://t.imgbox.com/acuHXn4N.jpg) (http://imgbox.com/acuHXn4N)
And links to the blue (http://i.imgbox.com/abbuLvtH.png) and red (http://i.imgbox.com/aco6ETnV.png)  lights.  I include the red although I don't use it.

Well, OK, since you insist - falldown's VSIDO_ORB_black.png (http://i.imgbox.com/aduZVtYH.png)
Title: Re: Conky Codes and Images
Post by: McLovin on March 02, 2013, 05:42:26 AM
@Sector11
I'm so stealing that HDD setup, and I'm gonna use it for my system and my servers, you do such good work for me, thank you, but no, you're not gonna get paid for it, I'm poor.
Title: Re: Conky Codes and Images
Post by: lwfitz on March 02, 2013, 06:56:19 AM
@ McLovin

Holy crap thats awesome! Freakin love that wallpaper!


@ Sector11

Im stealing doing research with that hdd setup right now!

Title: Re: Conky Codes and Images
Post by: Sector11 on March 02, 2013, 02:18:51 PM
@ McLovin

- Your words put a smile on my face - trust me, that is McPayment enough.
Besides, I doubt you are a poor as I am.  :D

@ lwfitz

Yea everyone coming up with these awesome widescreen walls that I can't use.  :(

But they do look supercalifragilisticexpialidocious - and some of yours are in that group as well, so take a bow.

Also there is a huge difference between stealing and C4'ing a conky.

It does me good to know my conkys - or even parts of - have been C4'd.   8)

Historical reference to CCCC from a text file I have here...
Quotevrkalak wrote:

    ^ paolo . . . very nice.

    When it comes to designing your own Conky (or the OS for that matter) . . . you build what works for you.

    What matters is that 'you' like it and it does what 'you' want it to do or look like.

    And with GNU/Linux and Open Source . . . there is no such thing as 'stealing' tongue

    Hopefully, everything we do with the program/application only makes it better and easier for someone else to configure and add to.

    lol  just don't play with your Conky, too much ... it'll make you go blind

=====
Agree 100% I saw it said once that it was CCCC - not sure what it means but it was something like (if not) Co-operative Collective Conky Community  - I just call it "Cloned"

EDIT: I went looking, the quote comes from londonali1010:

londonali1010 wrote:
    The Collaborative Creative Conky Community

=====
arpinux wrote:
    The Collaborative Creative Conky Community
    la Communauté Coopérante Créatrice de Conky  <<<<<<--- CCCC works in french too  ;D

=====
proxess wrote:
    A Comunidade Criativa Colaborativa de Conky
    Works in Portuguese too!

=====
And I do believe Spanish as well: La Colaboración de la Comunidad Creativa de Conky

Commonly referred to as: Your conky has been C4'd

And I'd like to add that conky is like disto-hopping, once you've got the bug there is no stopping without the aid of a "1100 Step Program"

Can I play with my conky until I needed glasse?

=====
paolo wrote:
and also in italian is CCCC !
La Comunità Cooperativa Creatrice di Conky
Title: ${tcp_portmon} - connection help
Post by: Sector11 on March 02, 2013, 03:26:39 PM
@ anyone with a server
Or anyone else understanding ports better than I

When downloading something; wouldn't that be "Incoming Traffic"
When watching a movie online; wouldn't that be "Incoming Traffic"


I was watching a movie online and downloading a file, I saw nothing in "Incoming"

(http://t.imgbox.com/aczI1w3S.jpg) (http://imgbox.com/aczI1w3S)



Variable         Arguments () = optional

tcp_portmon      port_begin port_end item (index)



Explanation:

TCP port (both IPv6 and IPv4) monitor for specified local ports. Port numbers must be in the range 1 to 65535. Valid items are:

    count - Total number of connections in the range
    rip - Remote ip address
    rhost - Remote host name
    rport - Remote port number
    rservice - Remote service name from /etc/services
    lip - Local ip address
    lhost - Local host name
    lport - Local port number
    lservice - Local service name from /etc/services

The connection index provides you with access to each connection in the port monitor. The monitor will return information for index values from 0 to n-1 connections. Values higher than n-1 are simply ignored. For the "count" item, the connection index must be omitted. It is required for all other items.

Examples:

    ${tcp_portmon 6881 6999 count} - Displays the number of connections in the bittorrent port range
    ${tcp_portmon 22 22 rip 0} - Displays the remote host ip of the first sshd connection
    ${tcp_portmon 22 22 rip 9} - Displays the remote host ip of the tenth sshd connection
    ${tcp_portmon 1 1024 rhost 0} - Displays the remote host name of the first connection on a privileged port
    ${tcp_portmon 1 1024 rport 4} - Displays the remote host port of the fifth connection on a privileged port
    ${tcp_portmon 1 65535 lservice 14} - Displays the local service name of the fifteenth connection in the range of all ports

Note that port monitor variables which share the same port range actually refer to the same monitor, so many references to a single port range for different items and different indexes all use the same monitor internally. In other words, the program avoids creating redundant monitors.




S11_Connections.conky
# To use #! in a conky use: ${exec echo '#!'}
# conky -c /media/5/Conky/S11_Connections.conky &
# Original by: Habitual

###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

own_window_type normal
own_window_transparent yes
own_window_hints skip_taskbar,skip_pager
own_window_class Conky
own_window_title Connections

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type override
# own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#own_window_argb_value 150

minimum_size 600 190 # width, height
maximum_width 600 # width

gap_x 0 ### left &right
gap_y 50 ### up & down

alignment tm
####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont monofur:bold:size=10

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes

## see: Color Settings for colours ##
draw_shades yes #### <-- To see it easier on light screens.
draw_outline no #### <-- Amplifies text if yes


uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
default_shade_color 000000
default_outline_color 000000

#default_color 000000 #  0   0   0 Black
default_color DCDCDC #220 220 220 Gainsboro
color0 FFE595 #Teo Gold
color1 778899 #LightSlateGrey
color2 FF8C00 #Darkorange
color3 7FFF00 #Chartreuse
color4 FFA07A #LightSalmon
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 00FFFF #Cyan #48D1CC #MediumTurquoise
color8 FFFF00 #Yellow
color9 FF0000 #Red  #A52A2A #DarkRed
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 10
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes #no
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################

# Boolean value, if true, Conky will be forked to background when started.
background no

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 256

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

## default bar size
default_bar_size 200 20

## Width for $top name value (defaults to 15 characters).
top_name_width 8

## Specify a default width and height for graphs.
## Example: 'default_graph_size 0 25'. This is particularly useful for execgraph
## and execigraph as they do not take size arguments
## default_graph_size 220 100

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load /media/5/Conky/LUA/dra2w-bg.lua
#TEXT
#${lua conky_draw_bg 10 0 0 0 0 0x000000 0.6}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
lua_load /media/5/Conky/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 0 0 0 0 0 0x000000 0.5
### mount.lua ##################################################################
#
##instructions
##load script
##lua_load ~/path_to/mounted.lua
#lua_load /media/5/Conky/LUA/mounted.lua
## first lua command below text:
## ${lua get_mounted_data interval}, where interval is a number.  This starts data gathering
## to get output:
## ${lua mount partition_number data_type}, where partition number is a number
## data_type can be
## total - shows total number of partitions mounted, requires a partition_number also, use 1, could be used in an if_match
## fsys - shows filesystem
## size - shows space used in appropriate units
## free - shows free space in appropriate units
## use% - shows % used
## mount - shows mountpoint
#######################################################  End LUA Settings  ###

#digiThe all important - How often conky refreshes.
# If you have a "Crey" try: 0.2 - smokin' - but watch the CPU useage go UP!
update_interval 1 # in seconds

# stuff after 'TEXT' will be formatted on screen

TEXT
${lua conky_draw_bg 10 0 0 0 0 0x000000 0.5}\
${color5}IP (${color}${addr eth0}${color5})${image /media/5/Conky/images/deep_skyblue_1.png -p 14,56 -s 55x1}\
${goto 150}${color5}Down: ${color}${downspeedf eth0}${image /media/5/Conky/images/deep_skyblue_1.png -p 310,56 -s 60x1}\
${goto 240}${color5}Inbound: ${color}${tcp_portmon 1 32767 count}${image /media/5/Conky/images/deep_skyblue_1.png -p 415,56 -s 34x1}\
${goto 330}| ${color5}Up: ${color}${upspeedf eth0}${image /media/5/Conky/images/deep_skyblue_1.png -p 470,56 -s 34x1}\
${goto 430}${color5}Outbound: ${color}${tcp_portmon 32768 65535 count}${image /media/5/Conky/images/deep_skyblue_1.png -p 525,56 -s 39x1}\
${goto 530}${color5}Total: ${color}${tcp_portmon 1 65535 count}${color}
${color6}${hr}${color}
${color5}${goto 480}Local${goto 535}Remote
  Hostname${goto 320}Remote IP ${goto 425}Proto${goto 480}Port${goto 535}Port${color}

${color5}1 ${color}${tcp_portmon 1 65535 rhost 0}${goto 320}${tcp_portmon 1 65535 rip 0}${goto 428}${tcp_portmon 1 65535 rservice 0}${goto 478}${tcp_portmon 1 65535 lport 0}${goto 535}${tcp_portmon 1 65535 rport 0}
${color5}2 ${color}${tcp_portmon 1 65535 rhost 1}${goto 320}${tcp_portmon 1 65535 rip 1}${goto 428}${tcp_portmon 1 65535 rservice 1}${goto 478}${tcp_portmon 1 65535 lport 1}${goto 535}${tcp_portmon 1 65535 rport 1}
${color5}3 ${color}${tcp_portmon 1 65535 rhost 2}${goto 320}${tcp_portmon 1 65535 rip 2}${goto 428}${tcp_portmon 1 65535 rservice 2}${goto 478}${tcp_portmon 1 65535 lport 2}${goto 535}${tcp_portmon 1 65535 rport 2}
${color5}4 ${color}${tcp_portmon 1 65535 rhost 3}${goto 320}${tcp_portmon 1 65535 rip 3}${goto 428}${tcp_portmon 1 65535 rservice 3}${goto 478}${tcp_portmon 1 65535 lport 3}${goto 535}${tcp_portmon 1 65535 rport 3}
${color5}5 ${color}${tcp_portmon 1 65535 rhost 4}${goto 320}${tcp_portmon 1 65535 rip 4}${goto 428}${tcp_portmon 1 65535 rservice 4}${goto 478}${tcp_portmon 1 65535 lport 4}${goto 535}${tcp_portmon 1 65535 rport 4}
${color5}6 ${color}${tcp_portmon 1 65535 rhost 5}${goto 320}${tcp_portmon 1 65535 rip 5}${goto 428}${tcp_portmon 1 65535 rservice 5}${goto 478}${tcp_portmon 1 65535 lport 5}${goto 535}${tcp_portmon 1 65535 rport 5}
${color5}7 ${color}${tcp_portmon 1 65535 rhost 6}${goto 320}${tcp_portmon 1 65535 rip 6}${goto 428}${tcp_portmon 1 65535 rservice 6}${goto 478}${tcp_portmon 1 65535 lport 6}${goto 535}${tcp_portmon 1 65535 rport 6}
${color5}8 ${color}${tcp_portmon 1 65535 rhost 7}${goto 320}${tcp_portmon 1 65535 rip 7}${goto 428}${tcp_portmon 1 65535 rservice 7}${goto 478}${tcp_portmon 1 65535 lport 7}${goto 535}${tcp_portmon 1 65535 rport 7}
${color5}9 ${color}${tcp_portmon 1 65535 rhost 8}${goto 320}${tcp_portmon 1 65535 rip 8}${goto 428}${tcp_portmon 1 65535 rservice 8}${goto 478}${tcp_portmon 1 65535 lport 8}${goto 535}${tcp_portmon 1 65535 rport 8}
${color5}0 ${color}${tcp_portmon 1 65535 rhost 9}${goto 320}${tcp_portmon 1 65535 rip 9}${goto 428}${tcp_portmon 1 65535 rservice 9}${goto 478}${tcp_portmon 1 65535 lport 9}${goto 535}${tcp_portmon 1 65535 rport 9}

${color6}Port(s)${alignr}Connections${color}
Inbound: ${tcp_portmon 1 32767 count}  Outbound: ${tcp_portmon 32768 61000 count}${alignr}ALL: ${tcp_portmon 1 65535 count}

${color6}Inbound Connection ${alignr} Local Service/Port$color

${color5}1 ${color}${tcp_portmon 1 32767 lhost 0} ${alignr} ${tcp_portmon 1 32767 lservice 0}
${color5}2 ${color}${tcp_portmon 1 32767 lhost 1} ${alignr} ${tcp_portmon 1 32767 lservice 1}
${color5}3 ${color}${tcp_portmon 1 32767 lhost 2} ${alignr} ${tcp_portmon 1 32767 lservice 2}
${color5}4 ${color}${tcp_portmon 1 32767 lhost 3} ${alignr} ${tcp_portmon 1 32767 lservice 3}
${color5}5 ${color}${tcp_portmon 1 32767 lhost 4} ${alignr} ${tcp_portmon 1 32767 lservice 4}
${color5}6 ${color}${tcp_portmon 1 32767 lhost 5} ${alignr} ${tcp_portmon 1 32767 lservice 5}
${color5}7 ${color}${tcp_portmon 1 32767 lhost 6} ${alignr} ${tcp_portmon 1 32767 lservice 6}
${color5}8 ${color}${tcp_portmon 1 32767 lhost 7} ${alignr} ${tcp_portmon 1 32767 lservice 7}
${color5}9 ${color}${tcp_portmon 1 32767 lhost 8} ${alignr} ${tcp_portmon 1 32767 lservice 8}
${color5}0 ${color}${tcp_portmon 1 32767 lhost 9} ${alignr} ${tcp_portmon 1 32767 lservice 9}

${color6}Outbound Connection ${alignr} Remote Service/Port$color
${color5}1 ${color}${tcp_portmon 32768 61000 lhost 0} ${alignr} ${tcp_portmon 32768 61000 rservice 0}
${color5}2 ${color}${tcp_portmon 32768 61000 lhost 1} ${alignr} ${tcp_portmon 32768 61000 rservice 1}
${color5}3 ${color}${tcp_portmon 32768 61000 lhost 2} ${alignr} ${tcp_portmon 32768 61000 rservice 2}
${color5}4 ${color}${tcp_portmon 32768 61000 lhost 3} ${alignr} ${tcp_portmon 32768 61000 rservice 3}
${color5}5 ${color}${tcp_portmon 32768 61000 lhost 4} ${alignr} ${tcp_portmon 32768 61000 rservice 4}
${color5}6 ${color}${tcp_portmon 32768 61000 lhost 5} ${alignr} ${tcp_portmon 32768 61000 rservice 5}
${color5}7 ${color}${tcp_portmon 32768 61000 lhost 6} ${alignr} ${tcp_portmon 32768 61000 rservice 6}
${color5}8 ${color}${tcp_portmon 32768 61000 lhost 7} ${alignr} ${tcp_portmon 32768 61000 rservice 7}
${color5}9 ${color}${tcp_portmon 32768 61000 lhost 8} ${alignr} ${tcp_portmon 32768 61000 rservice 8}
${color5}0 ${color}${tcp_portmon 32768 61000 lhost 9} ${alignr} ${tcp_portmon 32768 61000 rservice 9}


NOTE:  I cannot remember where I got the incoming - outgoing port numbers from:
Title: Re: ${tcp_portmon} - connection help
Post by: VastOne on March 02, 2013, 07:51:14 PM
I am curious about this setting, as to why it is needed.  Does it just break down by port what is downloading?

I use the upspeedgraph and downspeedgraph ... I am aware that I could also add in the speed in numbers, but for me the graphs are very clear and always consistent.  By that I mean, if it is a full blown upload and/or download, the graphs show what is happening pretty clearly
Title: Re: ${tcp_portmon} - connection help
Post by: Sector11 on March 02, 2013, 10:26:50 PM
However many years back that I picked up the tip that ports 1 to 32767 inbound  and ports 32768 to 61000 were outbound I have played with this conky, adding to it, changing it and never really understanding what it did other than it was showing actual connections on the net.  Running this conky and opening a new web page really opened my eyes ... for a short while each page has multiple connections, and once the "bots" (I'm guessing here) get what they want, the links drop off.

I have no idea what ports "62001 to 65535" represent.

I'm trying to figure out if it can be separated between downloading (inbound) and uploading (outbound) as I was lead to believe and what are those ports on the end are for?  ( 62001 to 65535 )

Or is it like the command says: 'remote' and 'local' and that's it?

I'm working on a version at the moment that has 25 "remote" and "local" connections showing, and at times it's not enough.  So I'm just curious to know what's what is all.  This is definitely not one of your average run of the mill conkys but a specialized one monitoring the computers ports.

Most conkys have net stuff usually have the graph as you have (I do as well) or a combo of:
upspeed, upspeedf, upspeedgraph
downspeed downspeedf downspeedgraph
totaldown or totalup - not good for 32 bit.

Some interesting reading.
  1.  List of TCP and UDP port numbers (http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers)
  2.  Service Name and Transport Protocol Port Number Registry (http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml) WARNING: Huge
  3. TCP and UDP Ports Explained (http://www.bleepingcomputer.com/tutorials/tcp-and-udp-ports-explained/) - conky doesn't do "udp ports" - Interesting read.
  4. there are more  :)

So basically this is a fact finding mission.

The latest version just
after opening new tab here
(http://t.imgbox.com/adxZw9fY.jpg) (http://imgbox.com/adxZw9fY)

And the graphs - they don't
say "where" the info is
going to or coming from
(http://t.imgbox.com/acbYwqCW.jpg) (http://imgbox.com/acbYwqCW)
just that it's busy
out there
Title: Re: ${tcp_portmon} - connection help
Post by: Sector11 on March 02, 2013, 10:29:32 PM
When I close the conky I see:
sector11 @ sector11
02 Mar 13 | 19:14:41 ~
         $ Conky: desktop window (260) is root window
Conky: window type - normal
Conky: drawing to created window (0x3a00001)
Conky: drawing to double buffer
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
      after 375382 requests (375375 known processed) with 0 events remaining.

[1]+  Exit 1                  conky -c /media/5/Conky/S11_Connections.conky
sector11 @ sector11
02 Mar 13 | 19:28:08 ~
         $


So I have to figure out what causes that as well.
Title: Re: Conky Codes and Images
Post by: lwfitz on March 05, 2013, 11:58:13 PM
HAHAHAHA! Thats great! I read this right as  was "C4'ing" a Sector11 masterpiece
Title: Re: Conky Codes and Images
Post by: jedi on March 08, 2013, 07:05:47 AM
Done for a little while.  (I can beat this Conky addiction, I just know I can)  One question for Sector11, on the wonderful Right Vertical Weather template, would it be possible to get the two "yellow_1.png" images from you?  You just keep making this Conky stuff easier and easier Sector11...

(http://www.zimagez.com/miniature/screenshot-03082013-020227am.png) (http://www.zimagez.com/zimage/screenshot-03082013-020227am.php)

If anyone wants configs, don't hesitate to ask...  Too tired to post them right now or do any more geeking tonight!  I'll jump on tomorrow and post them since this is the scrot/config board...

the horizontal conky;


# killall conky && conky -c /media/5/Conky/S11_VSIDO.conkyrc &
# Original by: VastOne on VSIDO

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# fiddle with window
use_spacer right

# Use Xft?
use_xft yes
xftfont Monofur:bold:size=12
xftalpha 1.0
# text_buffer_size 256

# Update interval in seconds
update_interval 1

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

own_window yes
own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_transparent yes
# own_window_argb_visual yes
own_window_class Conky

# Stippled borders?
stippled_borders 0

# border margins
border_inner_margin 5

# border width
border_width 0

# Default colors and also border colors
default_color 00BFFF #  0 191 255   DeepSkyBlue
color0 FFDEAD #255 222 173   NavajoWhite
color1 7FFF00 #127 255   0   Chartreuse
color2 778899 #119 136 153   LightSlateGray
color3 A5A7B7 #255 140   0   BlueGreyLight
color4 F0FFFF #240 255 255   Azure
color5 FFDEAD #255 222 173   NavajoWhite
color6 7B68EE #123 104 238   MediumSlateBlue
color7 00FFFF #  0 255 255   Cyan
color8 FFFF00 #255 255   0   Yellow
color9 FF0000 #255   0   0   Red

#default_shade_color black
#default_outline_color grey
own_window_colour 000000

# Text alignment, other possible values are commented
#alignment top_middle
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 10
gap_y 20

minimum_size 1310 0  ## width, height
#maximum_width 1000     ## width


# 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

# Shortens units to a single character (kiB->k, GiB->G, etc.). Default is off (no).
short_units yes

# Forces Conky not to cache images
imlib_cache_size 0

#lua_load /home/jed/conky/draw-bg.lua
#lua_draw_hook_pre draw_bg 10 0 0 0 0 0x2B4287 0.2
#
TEXT
#${lua conky_draw_bg 10 0 20 0 80 0x0A111F 0.6}\

${color5}  JedsDesk logged into ${color3}${execi 2600 cat /etc/issue.net}-VSIDO-1_2 ${color1}Success! ${color5}Kernel Currently in use - ${color3}${kernel}, ${color5}System Online for ${color3}${uptime}, ${color5}Current Mem use${color3}${if_match ${memperc}<10} ${memperc}${else}${if_match ${memperc}<100}${memperc}${else}${memperc}${endif}${endif}% ${color5}or ${color3}(${mem}/${memmax}), ${color5}Avg Quad Core Usage: ${color3}${cpu cpu0}% ${color5}Avg Load: ${color3}${loadavg},
${color5}  Socket Temp (all temps Celsius):${color9}${hwmon temp 3}${color}${font} Core 1 Temp: ${color9}${execi 10 sensors | grep "Core 1" | cut -d "+" -f2 | cut -c1-2}º ${color5}CPU1: ${color3}${freq_g 1}Gh ${cpu cpu1}% ${color5}CPU2: ${color3}${freq_g 2}Gh ${cpu cpu2}% ${color}Core 2 Temp: ${color9}${execi 10 sensors | grep "Core 2" | cut -d "+" -f2 | cut -c1-2}º ${color5}CPU3: ${color3}${freq_g 3}Gh ${cpu cpu3}% ${color5}CPU4: ${color3}${freq_g 4}Gh ${cpu cpu4}% ${color}Core 3 Temp: ${color9}${execi 10 sensors | grep "Core 3" | cut -d "+" -f2 | cut -c1-2}º ${color5}CPU5: ${color3}${freq_g 5}Gh ${cpu cpu5}% ${color5}CPU6:${color3} ${freq_g 6}Gh ${cpu cpu6}% ${color}Core 4 Temp: ${color9}${execi 10 sensors | grep "Core 0" | cut -d "+" -f2 | cut -c1-2}º ${color5}CPU7: ${color3}${freq_g 7}Gh ${cpu cpu7}% ${color5}CPU8: ${color3}${freq_g 8}Gh ${cpu cpu8}%\

${color5}  Internal Laptop Temp:${color9}${hwmon temp 1} ${color5}Motherboard Temp:${color9}${hwmon temp 2} ${color5}Network Status:${color7}(System Online)${color1} Dn:${color3}${downspeed wlan0} ${color7}Up:${color3}${upspeed wlan0}${color5} Wireless Signal${color3} ${wireless_link_qual_perc wlan0}${color5}Battery ${color3}${battery_percent BAT1}% ${battery_time BAT1}  ${color5}jedsdesk: ${color3}${execi 90 conkyEmail --servertype=POP --servername=mail.yourmailserver.com --ssl --username=yours --password=drowssapton --mailinfo=0}${color5} live: ${color3}${execi 900 conkyEmail --servertype=POP --servername=pop3.live.com --ssl --username=yours@live.com --password=drowssapton --mailinfo=0}${color5} hotmail: ${color3}${execi 900 conkyEmail --servertype=POP --servername=pop3.live.com --ssl --username=yours@hotmail.com --password=drowssapton --mailinfo=0}


the weather is v9000 with one of the masters (Sector11) templates;

S11_V9_R-template.lua (only modified for 12 hour time format)


--[[
The latest script is a lua only weather script. aka: v9000
http://crunchbanglinux.org/forums/topic/16100/weather-in-conky/

the file:
http://dl.dropbox.com/u/19008369/current%20v9000/v9000.tar.gz

mrppeachys LUA Tutorial
http://crunchbanglinux.org/forums/topic/17246/how-to-using-lua-scripts-in-conky/
]]
_G.weather_script = function()--#### DO NOT EDIT THIS LINE ##############
--these tables hold the coordinates for each repeat do not edit #########
top_left_x_coordinate={}--###############################################
top_left_y_coordinate={}--###############################################
--#######################################################################
--SET DEFAULTS ##########################################################
--set defaults do not localise these defaults if you use a seperate display script
-- default_font="CorporateMonoExtraBold"--font must be in quotes
-- default_font_size=10
default_font="monofur"--font must be in quotes
default_font_size=12
default_color=0xffffff--white
default_alpha=1--fully opaque
default_image_width=20
default_image_height=20
-- ## New Options ###
default_face="bold"
-- "normal" for normal/normal
-- "bold" for normal/bold
-- "italic" for italic/normal
-- "bolditalic" for italic/bold
--END OF DEFAULTS #######################################################
--START OF WEATHER CODE -- START OF WEATHER CODE -- START OF WEATHER CODE
datay=15 -- ↑↓
datayh=55
datayf=75
datayy=13 --datay+(datayy*1)

imgyh=165
imgyf=190
imgyy=39 -- imgy+(imgyy*1)



out({c=0x00FFFF,a=1,x=12,y=15,txt="PQI"})
-- today is
out({c=0x00FFFF,a=1,x=5,y=28,txt=forecast_day_short[1]})
out({c=0x00FFFF,a=1,x=35,y=datay+datayy,txt=forecast_date[1]})
-- out({c=0x00FFFF,,a=1,x=6,y=50,txt="cpu:"..conky_parse("${cpu}")})

out({c=0xF0FFFF,a=1,x=5,y=datay+(datayy*2),txt=low_temp[1]})
out({c=0xFF8C00,a=1,x=30,y=datay+(datayy*2),txt=high_temp[1]})
  image({x=5,y=45,h=45,w=45,file=weather_icon[1]})
--image({x=5,y=45,h=45,w=45,file="/media/5/Conky/images/red+x.png"})

out({c=0xFFDEAD,a=1,x=15,y=datay+(datayy*7),txt="NOW"})
out({c=0xF0FFFF,a=1,x=7,y=datay+(datayy*8),txt=now["temp"]})
out({c=0xFFDEAD,a=1,x=30,y=datay+(datayy*8),txt=now["feels_like"]})
image({x=5,y=120,h=45,w=45,file=now["weather_icon"]})
--image({x=5,y=120,h=45,w=45,file="/media/5/Conky/images/red+x.png"})

out({c=0x00FFFF,a=1,x=5,y=datay+(datayy*12.5),txt="B.P."})
out({c=0xF0FFFF,a=1,x=5,y=datay+(datayy*13.4),txt=now["pressure_mb"]})
out({c=0x00FFFF,a=1,x=5,y=datay+(datayy*14.5),txt="Hum"})
out({c=0xF0FFFF,a=1,x=30,y=datay+(datayy*14.5),txt=now["humidity"].."%"})
out({c=0x00FFFF,a=1,x=5,y=datay+(datayy*15.5),txt="DP"})
out({c=0xF0FFFF,a=1,x=30,y=datay+(datayy*15.5),txt=now["dew_point"].."°"})
out({c=0x00FFFF,a=1,x=5,y=datay+(datayy*16.5),txt="UV"})
out({c=0xF0FFFF,a=1,x=30,y=datay+(datayy*16.5),txt=uv_index_num[1]})
out({c=0xF0FFFF,a=1,x=5,y=datay+(datayy*17.5),txt=uv_index_txt[1]})

-- yellow line
--image({w=45,h=1,x=5,y=datayh+(datayy*15),file="/media/5/Conky/images/yellow_1.png"})
out({c=0xFFDEAD,a=1,x=10,y=datayh+(datayy*16),txt="3 HRS"})
-- 3 hour output
-- 1st hour
out({c=0x00FFFF,a=1,x=11,y=datayh+(datayy*17),txt=now["fc_hour1_time"].."  "..now["fc_hour1_ampm"]})
image({x=25,y=imgyh+(imgyy*3),file=now["fc_hour1_wicon"]})
--image({x=25,y=imgyh+(imgyy*3),file="/media/5/Conky/images/red+x.png"})
out({c=0xF0FFFF,a=1,x=5,y=datayh+(datayy*18.5),txt=now["fc_hour1_temp"]})

-- 2nd hour
out({c=0x00FFFF,a=1,x=11,y=datayh+(datayy*20),txt=now["fc_hour2_time"].."  "..now["fc_hour2_ampm"]})
image({x=25,y=imgyh+(imgyy*4),file=now["fc_hour2_wicon"]})
--image({x=25,y=imgyh+(imgyy*4),file="/media/5/Conky/images/red+x.png"})
out({c=0xF0FFFF,a=1,x=5,y=datayh+(datayy*21.5),txt=now["fc_hour2_temp"]})

-- 3rd hour
out({c=0x00FFFF,a=1,x=11,y=datayh+(datayy*23),txt=now["fc_hour3_time"].."  "..now["fc_hour3_ampm"]})
image({x=25,y=imgyh+(imgyy*5),file=now["fc_hour3_wicon"]})
--image({x=25,y=imgyh+(imgyy*5),file="/media/5/Conky/images/red+x.png"})
out({c=0xF0FFFF,a=1,x=5,y=datayh+(datayy*24.5),txt=now["fc_hour3_temp"]})

-- start of forcast days
-- yellow line
--image({w=45,h=1,x=5,y=datayf+(datayy*24.5),file="/media/5/Conky/images/yellow_1.png"})

out({c=0xFFDEAD,a=1,x=10,y=datayf+(datayy*25.5),txt="9 DAY"})
out({c=0x00FFFF,a=1,x=5,y=datayf+(datayy*26.5),txt=forecast_day_short[2]})
out({c=0x00FFFF,a=1,x=35,y=datayf+(datayy*26.5),txt=forecast_date[2]})
image({x=25,y=imgyf+(imgyy*6),file=weather_icon[2]})
--image({x=25,y=imgyf+(imgyy*6),file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=5,y=datayf+(datayy*27.5),txt=high_temp[2]})
out({c=0xF0FFFF,a=1,x=5,y=datayf+(datayy*28.5),txt=low_temp[2]})

out({c=0x00FFFF,a=1,x=5,y=datayf+(datayy*29.5),txt=forecast_day_short[3]})
out({c=0x00FFFF,a=1,x=35,y=datayf+(datayy*29.5),txt=forecast_date[3]})
image({x=25,y=imgyf+(imgyy*7),file=weather_icon[3]})
--image({x=25,y=imgyf+(imgyy*7),file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=5,y=datayf+(datayy*30.5),txt=high_temp[3]})
out({c=0xF0FFFF,a=1,x=5,y=datayf+(datayy*31.5),txt=low_temp[3]})

out({c=0x00FFFF,a=1,x=5,y=datayf+(datayy*32.5),txt=forecast_day_short[4]})
out({c=0x00FFFF,a=1,x=35,y=datayf+(datayy*32.5),txt=forecast_date[4]})
image({x=25,y=imgyf+(imgyy*8),file=weather_icon[4]})
--image({x=25,y=imgyf+(imgyy*8),file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=5,y=datayf+(datayy*33.5),txt=high_temp[4]})
out({c=0xF0FFFF,a=1,x=5,y=datayf+(datayy*34.5),txt=low_temp[4]})

out({c=0x00FFFF,a=1,x=5,y=datayf+(datayy*35.5),txt=forecast_day_short[5]})
out({c=0x00FFFF,a=1,x=35,y=datayf+(datayy*35.5),txt=forecast_date[5]})
image({x=25,y=imgyf+(imgyy*9),file=weather_icon[5]})
--image({x=25,y=imgyf+(imgyy*9),file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=5,y=datayf+(datayy*36.5),txt=high_temp[5]})
out({c=0xF0FFFF,a=1,x=5,y=datayf+(datayy*37.5),txt=low_temp[5]})

out({c=0x00FFFF,a=1,x=5,y=datayf+(datayy*38.5),txt=forecast_day_short[6]})
out({c=0x00FFFF,a=1,x=35,y=datayf+(datayy*38.5),txt=forecast_date[6]})
image({x=25,y=imgyf+(imgyy*10),file=weather_icon[6]})
--image({x=25,y=imgyf+(imgyy*10),file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=5,y=datayf+(datayy*39.5),txt=high_temp[6]})
out({c=0xF0FFFF,a=1,x=5,y=datayf+(datayy*40.5),txt=low_temp[6]})

out({c=0x00FFFF,a=1,x=5,y=datayf+(datayy*41.5),txt=forecast_day_short[7]})
out({c=0x00FFFF,a=1,x=35,y=datayf+(datayy*41.5),txt=forecast_date[7]})
image({x=25,y=imgyf+(imgyy*11),file=weather_icon[7]})
--image({x=25,y=imgyf+(imgyy*11),file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=5,y=datayf+(datayy*42.5),txt=high_temp[7]})
out({c=0xF0FFFF,a=1,x=5,y=datayf+(datayy*43.5),txt=low_temp[7]})

out({c=0x00FFFF,a=1,x=5,y=datayf+(datayy*44.5),txt=forecast_day_short[8]})
out({c=0x00FFFF,a=1,x=35,y=datayf+(datayy*44.5),txt=forecast_date[8]})
image({x=25,y=imgyf+(imgyy*12),file=weather_icon[8]})
--image({x=25,y=imgyf+(imgyy*12),file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=5,y=datayf+(datayy*45.5),txt=high_temp[8]})
out({c=0xF0FFFF,a=1,x=5,y=datayf+(datayy*46.5),txt=low_temp[8]})

out({c=0x00FFFF,a=1,x=5,y=datayf+(datayy*47.5),txt=forecast_day_short[9]})
out({c=0x00FFFF,a=1,x=35,y=datayf+(datayy*47.5),txt=forecast_date[9]})
image({x=25,y=imgyf+(imgyy*13),file=weather_icon[9]})
--image({x=25,y=imgyf+(imgyy*13),file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=5,y=datayf+(datayy*48.5),txt=high_temp[9]})
out({c=0xF0FFFF,a=1,x=5,y=datayf+(datayy*49.5),txt=low_temp[9]})

out({c=0x00FFFF,a=1,x=5,y=datayf+(datayy*50.5),txt=forecast_day_short[10]})
out({c=0x00FFFF,a=1,x=35,y=datayf+(datayy*50.5),txt=forecast_date[10]})
image({x=25,y=imgyf+(imgyy*14),file=weather_icon[10]})
--image({x=25,y=imgyf+(imgyy*14),file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=5,y=datayf+(datayy*51.5),txt=high_temp[10]})
out({c=0xF0FFFF,a=1,x=5,y=datayf+(datayy*52.5),txt=low_temp[10]})



-- yellow line
--image({w=45,h=1,x=5,y=550,file="/media/5/Conky/images/yellow_1.png"})

--########################################################################################
--END OF WEATHER CODE ----END OF WEATHER CODE ----END OF WEATHER CODE ---
--#######################################################################
end--of weather_display function do not edit this line ##################
--#######################################################################
Title: Re: Conky Codes and Images
Post by: VastOne on March 08, 2013, 03:45:54 PM
Very nice jedi!

On another note ... Where in the World is Sector11 lately?
Title: Re: Conky Codes and Images
Post by: lwfitz on March 08, 2013, 07:16:53 PM
Good question VastOne.......... Imm email him and make sure everythings ok........ Also falldown has disappeared.
Title: Re: Conky Codes and Images
Post by: Sector11 on March 08, 2013, 08:11:25 PM
@ jedi


would it be possible to get the two "yellow_1.png" images from you?  You just keep making this Conky stuff easier and easier Sector11...


I do my best ....

Two?  Why two?

Open GIMP,
- make an image - say 10x10
- solid colour: yellow
- reduce to 1x1 pixels
- "export" as yellow_1.png and you have it.

You can call that image up as many times as you need.

OR ... you could get a whole bunch of ready made ones here: 1_pixel_images.tar.gz (http://dl.dropbox.com/u/16070765/Other_Stuff/1_pixel_images.tar.gz)

Which includes:
Title: Re: Conky Codes and Images
Post by: jedi on March 08, 2013, 08:50:40 PM
Thanks Sector11...  Do you think it crossed my feeble mind to go into Gimp and do it on my own?  Of course not.  Thanks for your efforts!  ;D
Title: Re: Conky Codes and Images
Post by: Sector11 on March 08, 2013, 09:16:24 PM
@ jedi

A does what A does
B does what B does
...
Jedi does what Jedi does
...
lwfitz does horrible avatars  ::)
...
S11 does what S11 does
T does what T does
U does what U does
V1 does what V1 does
...
Z just copies and pastes what everyone else does.

... and together we can do it all.

I think you get the idea.   8)
Title: Re: Conky Codes and Images
Post by: Sector11 on March 08, 2013, 09:27:16 PM
A new look with some old stuff redone.
(http://t.imgbox.com/abeJi7Y2.jpg) (http://imgbox.com/abeJi7Y2)
I like it.

But my wife missed her weather
(http://t.imgbox.com/ads6g91E.jpg) (http://imgbox.com/ads6g91E)
so I put it in a window for her.
Title: Re: Conky Codes and Images
Post by: lwfitz on March 08, 2013, 11:55:49 PM
All this talk of my avatar just means that you guys actually love it  :D
Title: Re: Conky Codes and Images
Post by: Sector11 on March 09, 2013, 01:06:57 AM
... see that's where you are wrong.

What we do admire is your persistence to display the ugliest, most distasteful, avatars out there with such a devil may care attitude.

Says a lot about you, "Hey, this is me, I don't complain about your avatar do I?"  8)

:D  :D
Title: Re: Conky Codes and Images
Post by: jedi on March 09, 2013, 03:58:30 AM
And at lwfitz regarding the avatar;  It looked like a d&^K to me and I was just hoping it was the Car-Wash dudes getting what he deserved for prancing around in public that way!  Now that I know it's a tongue, I am OK with it.  :D ??? :D (if it really is a tongue, I have my suspicions)  :D
Title: Re: Conky Codes and Images
Post by: lwfitz on March 09, 2013, 08:22:16 PM
@ Sector11 and jedi.......

:D :D :D :D :D

Sector - Trust me I have edited myself   ;D  Kinda scary how well you know me though  :P

jedi - LMAO! Dude I never even thought it looked like that until you mentioned it! It was much more clear before I shrunk it down  :D

I mean..... Im sick but not that sick!  :D ;D
Title: Re: Conky Codes and Images
Post by: VastOne on March 09, 2013, 08:41:39 PM
^ What the hell do you think I was asking about it????   ???

Title: Re: Conky Codes and Images
Post by: Sector11 on March 10, 2013, 07:57:15 PM
  Donno - ham on rye maybe?  :D

Come to think about it ... that avatar gives a whole mew meaning to: pickled tongue!
Y U K !

Title: v9000 weather - a default template
Post by: Sector11 on March 10, 2013, 07:59:18 PM
mrpeachy's v9000 script comes with a sample template: s11template.lua.

I wonder who did that.   ::)

Anyway it uses the font Digital-7 that just doesn't work well today - anywhere - no idea why as seen here:
(http://t.imgbox.com/adt56sJJ.jpg) (http://imgbox.com/adt56sJJ)

Sooooooooooooo a tweaking I did go ... and got carried away, it went from 5 days to 10 days and the default font was changed to monofur.

Here it is under construction - I gotta find or make a "Conky Under Construction" wallpaper:
(http://t.imgbox.com/adzqZDZo.jpg) (http://imgbox.com/adzqZDZo)

Notice the 250°, 240° and 240° for the Next 3 Hours.

That's to cover spacing for things like "-25°" or "101°" (F) we'd be in trouble if it was °C

And the finished template in action:
(http://t.imgbox.com/abqfCIoq.jpg) (http://imgbox.com/abqfCIoq)

Changes in spacing (see above) came about because of the new mono font: monofur. I like it, others don't.

The new s11template.lua
--[[
The latest script is a lua only weather script. aka: v9000
http://crunchbanglinux.org/forums/topic/16100/weather-in-conky/

the file:
http://dl.dropbox.com/u/19008369/v9000.tar.gz

mrppeachys LUA Tutorial
http://crunchbanglinux.org/forums/topic/17246/how-to-using-lua-scripts-in-conky/

The "red+x.png" and "cyan_1.png" images, with others are available here:
http://tiny.cc/gbuqtw - 1_pixel_images.tar.gz (3.3KB)

]]
_G.weather_script = function()--#### DO NOT EDIT THIS LINE ##############
--these tables hold the coordinates for each repeat do not edit #########
top_left_x_coordinate={}--###############################################
top_left_y_coordinate={}--###############################################
--#######################################################################
--SET DEFAULTS ##########################################################
--set defaults do not localise these defaults if you use a seperate display script
default_font="Monofur"--font must be in quotes
default_font_size=14
default_color=0xffffff--white
default_alpha=1--fully opaque
default_image_width=50
default_image_height=50
--END OF DEFAULTS #######################################################
--START OF WEATHER CODE -- START OF WEATHER CODE -- START OF WEATHER CODE
out({c=0x00BFFF,a=1,x=10,y=15,txt=now["date"].." "..now["month_short"].." "..now["year"].." @ "..now["time"]})
image({x=10,y=20,h=70,w=70,file=now["weather_icon"]})
--  image({x=10,y=20,h=70,w=70,file="/media/5/Conky/images/red+x.png"})
-- Temp / FeelsLike & CONDITIONS TEXT
out({c=0x48D1CC,a=1,f="DS-Digital",fs=50,x=80,y=60,txt=now["temp"]})
out({c=0x00BFFF,a=1,f="DS-Digital",fs=50,x=140,y=60,txt=now["feels_like"]})
out({c=0xA4FFA4,a=1,x=81,y=72,txt="Temp     WC·HI"})
-- WC = Wind Chill · HI = Heat Index
out({c=0x48D1CC,a=1,f="Zekton",fs=18,x=10,y=105,txt=now["conditions"]})
image({x=205,y=110,h=60,w=60,file=now["wind_icon"]})
--  image({x=205,y=110,h=60,w=60,file="/media/5/Conky/images/red+x.png"})
image({x=205,y=200,h=50,w=50,file=moon_icon[1]})
--  image({x=205,y=200,h=60,w=60,file="/media/5/Conky/images/red+x.png"})

-- data titles
--    data output
datay=110   -- y=datay or
datayy=15   -- y=datay+(datayy*1) use 1 or more

out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*1),txt="Today's Hi·Lo:"})
   out({c=0xFF8C00,a=1,x=115,y=datay+(datayy*1),txt=high_temp[1].."°"})
   out({c=0x48D1CC,a=1,x=150,y=datay+(datayy*1),txt=low_temp[1].."°"})
out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*2),txt="Wind:"})
   out({c=0x48D1CC,a=1,x=60,y=datay+(datayy*2),txt=now["wind_km"]})
   out({c=0x48D1CC,a=1,x=120,y=datay+(datayy*2),txt=now["wind_nesw"]})
   out({c=0xFAFAEC,a=1,x=150,y=datay+(datayy*2),txt="@"})
   out({c=0x48D1CC,a=1,x=165,y=datay+(datayy*2),txt=now["wind_deg"]})
out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*3),txt="Hum:"})
   out({c=0x48D1CC,a=1,x=60,y=datay+(datayy*3),txt=now["humidity"].."%"})
out({c=0xFAFAEC,a=1,x=110,y=datay+(datayy*3),txt="DP:"})
   out({c=0x48D1CC,a=1,x=145,y=datay+(datayy*3),txt=now["dew_point"].."°"})
out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*4),txt="Bar:"})
   out({c=0x48D1CC,a=1,x=60,y=datay+(datayy*4),txt=now["pressure_mb"]})
out({c=0xFAFAEC,a=1,x=110,y=datay+(datayy*4),txt="Vis:"})
   out({c=0x48D1CC,a=1,x=145,y=datay+(datayy*4),txt=now["visibility"]})
out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*5),txt="Ceil:"})
   out({c=0x48D1CC,a=1,x=60,y=datay+(datayy*5),txt=now["ceiling"]})
out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*6),txt="Precip:"})
   out({c=0x48D1CC,a=1,x=60,y=datay+(datayy*6),txt=precipitation[1].."%"})
out({c=0xFAFAEC,a=1,x=110,y=datay+(datayy*6),txt="Cloud:"})
   out({c=0x48D1CC,a=1,x=155,y=datay+(datayy*6),txt=cloud_cover[1].."%"})
out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*7),txt="UV:"})
   out({c=0x48D1CC,a=1,x=60,y=datay+(datayy*7),txt=uv_index_num[1]})
   out({c=0x48D1CC,a=1,x=110,y=datay+(datayy*7),txt=uv_index_txt[1]})
out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*8),txt="Sun:"})
   out({c=0xFAFAEC,a=1,x=60,y=datay+(datayy*8),txt=sun_rise_24[1]})
   out({c=0x48D1CC,a=1,x=120,y=datay+(datayy*8),txt=sun_set_24[1]})
out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*9),txt="Moon:"})
   out({c=0xFAFAEC,a=1,x=60,y=datay+(datayy*9),txt=moon_rise_24[1]})
   out({c=0x48D1CC,a=1,x=120,y=datay+(datayy*9),txt=moon_set_24[1]})
out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*10),txt="Phase:"})
   out({c=0x48D1CC,a=1,x=60,y=datay+(datayy*10),txt=moon_phase[1]})

-- line
image({x=205,y=5,w=1,h=90,file="/media/5/Conky/images/cyan_1.png"})
-- 3 hour output
out({c=0x48D1CC,a=1,x=265,y=15,txt="Next 3 Hours"})
-- 1st hour
image({w=45,h=45,x=220,y=32,file=now["fc_hour1_wicon"]})
--  image({w=45,h=45,x=220,y=32,file="/media/5/Conky/images/red+x.png"})
out({c=0xA4FFA4,a=1,x=225,y=30,txt=now["fc_hour1_time_24"]..":00"})
out({a=1,x=228,y=90,txt=now["fc_hour1_temp"] .."°"})
-- 2nd hour
image({w=45,h=45,x=280,y=32,file=now["fc_hour2_wicon"]})
--  image({w=45,h=45,x=280,y=32,file="/media/5/Conky/images/red+x.png"})
out({c=0xA4FFA4,a=1,x=285,y=30,txt=now["fc_hour2_time_24"]..":00"})
out({a=1,x=290,y=90,txt=now["fc_hour2_temp"] .."°"})
-- 3rd hour
image({w=45,h=45,x=340,y=32,file=now["fc_hour3_wicon"]})
--  image({w=45,h=45,x=340,y=32,file="/media/5/Conky/images/red+x.png"})
out({c=0xA4FFA4,a=1,x=345,y=30,txt=now["fc_hour3_time_24"]..":00"})
out({a=1,x=352,y=90,txt=now["fc_hour3_temp"] .."°"})
-- line
image({x=205,y=95,w=190,h=1,file="/media/5/Conky/images/cyan_1.png"})
-- line
image({x=5,y=270,w=390,h=1,file="/media/5/Conky/images/cyan_1.png"})

--start or weather forecast table section
--set start forecast day
start_day=1
--set total forecast days you want to display
number_of_days=10
topy=15
topyy=135 -- topy+(topyy*1)
topx=285
topxx=137.5
--set coordinates for top lef corners for each repeat

top_left_x_coordinate[1],top_left_y_coordinate[1] =topx ,150

top_left_x_coordinate[2],top_left_y_coordinate[2] =10 ,290
   top_left_x_coordinate[3],top_left_y_coordinate[3] =10+(topxx*1) ,290
top_left_x_coordinate[4],top_left_y_coordinate[4] =10+(topxx*2) ,290

top_left_x_coordinate[5],top_left_y_coordinate[5] =10 ,440
   top_left_x_coordinate[6],top_left_y_coordinate[6] =10+(topxx*1) ,440
top_left_x_coordinate[7],top_left_y_coordinate[7] =10+(topxx*2) ,440

top_left_x_coordinate[8],top_left_y_coordinate[8] =10 ,590
   top_left_x_coordinate[9],top_left_y_coordinate[9]   =10+(topxx*1) ,590
top_left_x_coordinate[10],top_left_y_coordinate[10] =10+(topxx*2) ,590
--########################################################################################
for i=start_day,number_of_days-(start_day-1) do --start of day repeat, do not edit #######
tlx=top_left_x_coordinate[i] --sets top left x position for each repeat ##################
tly=top_left_y_coordinate[i] --sets top left y position for each repeat ##################
--########################################################################################
out({c=0xA4FFA4,a=1,x=tlx,y=tly,txt=forecast_day_short[i].."  "..forecast_date[i].."  "..forecast_month_short[i]})
image({x=tlx+40,y=tly+2,h=45,w=45,file=weather_icon[i]})
--  image({x=tlx+40,y=tly+2,h=45,w=45,file="/media/5/Conky/images/red+x.png"})
out({c=0xFF8C00,a=1,x=tlx+0,y=tly+20,txt=high_temp[i].."°"})
out({c=0x48D1CC,a=1,x=tlx+0,y=tly+35,txt=low_temp[i].."°"})
out({c=0x48D1CC,a=1,x=tlx,y=tly+60,txt=conditions_short[i]})

out({c=0xFAFAEC,a=1,x=tlx,y=tly+80,txt="P: "..precipitation[i].."%"})
out({c=0xFAFAEC,a=1,x=tlx+60,y=tly+80,txt="H: "..humidity[i].."%"})
out({c=0xFAFAEC,a=1,x=tlx,y=tly+95,txt="S: "..sun_rise_24[i]})
  out({c=0x48D1CC,a=1,x=tlx+73,y=tly+95,txt=sun_set_24[i]})
out({c=0xFAFAEC,a=1,x=tlx,y=tly+110,txt="M: "..moon_rise_24[i]})
  out({c=0x48D1CC,a=1,x=tlx+73,y=tly+110,txt=moon_set_24[i]})
--########################################################################################
end--of forecast repeat section ##########################################################
--########################################################################################
--END OF WEATHER CODE ----END OF WEATHER CODE ----END OF WEATHER CODE ---
--#######################################################################
end--of weather_display function do not edit this line ##################
--#######################################################################


EDIT:  RE: I gotta find or make a "Conky Under Construction"  - I did, here! (http://vsido.org/index.php/topic,53.msg3060.html#msg3060)
Title: Re: v9000 weather - a default template
Post by: lwfitz on March 10, 2013, 08:18:04 PM
Very nice! I have been using Teos weather scripts for the last year or so and am finally looking at mrpeachys v9000. Thanks for this.
Title: Re: Conky Codes and Images
Post by: lwfitz on March 10, 2013, 08:20:47 PM
@ VastOne

:DWhat was the question again? I think that brain cell is on vacation....... Oh yeah, LMAO, ok Im changing my avatar now cuz it does look like that and causing me mental pain  ???
Title: Re: v9000 weather - a default template
Post by: VastOne on March 10, 2013, 08:33:43 PM
Nice one Sector11!

@lwfitz, I see the avatar just keeps getting better and better!
Title: Re: v9000 weather - a default template
Post by: Sector11 on March 10, 2013, 09:52:06 PM
@ lwfitz

You're welcome.  I've used Teo's, mrpeachy's and Mark's.  My wife is using a combo of mrpeachy's v9000 and Mark's conkyForecast.

conkyForecast gets "day numbers" and the "hours of daylight"

So v9000 displays: Mon
conkyForcast displays: 11  and 12:28 <<-- daylight HH:MM
(http://t.imgbox.com/achZ38hz.jpg) (http://imgbox.com/achZ38hz)

And with a helper app; conkyForecast-SunsetSunriseCountdown.py (conkyForecast must be running) and conky's ${if_match} statment during the day you can have:

Sunset in 00:31:55
             and after sundown the line will switch to:
Sunrise in 11:14:32

10 Mar 13 | 18:47:42 ~
         $ conkyForecast-SunsetSunriseCountdown
00:30:16

10 Mar 13 | 18:47:43 ~
         $ conkyForecast-SunsetSunriseCountdown
00:30:16

10 Mar 13 | 18:47:43 ~
         $ conkyForecast-SunsetSunriseCountdown
00:30:15

10 Mar 13 | 18:47:44 ~
         $ conkyForecast-SunsetSunriseCountdown
00:30:14

10 Mar 13 | 18:47:45 ~
         $ conkyForecast-SunsetSunriseCountdown
00:30:14

10 Mar 13 | 18:47:45 ~
         $


I think I'm probably the only person that ever used that ... or at least only one of a handful.

In fact in the image that 00:45:14 you see is just that.


@ VastOne - thanks!  I do what I do  :)
Title: Re: v9000 weather - a default template
Post by: lwfitz on March 10, 2013, 10:58:17 PM
I actually never even thought to mix the scripts...... thats a great idea!
Title: Re: v9000 weather - a default template
Post by: Sector11 on March 10, 2013, 11:38:08 PM
@ lwfitz - Somethings you think of - somethings I think of.   ;)

I wanted to get all three in there but after cF and v9000 were maxed out Teo's script couldn't add anything new.  :(

I started with conkyForecast since it does a day and night forecast, and gets the images for both.  cF does the "sun" nice SR, SS and DL - but no Moonrise or Moonset, plus that other little sunrise-set countdown app I mentioned - enter v9000 and the moon stuff is added.

Makes for a nice combo.
Do you want the files?
Title: Re: v9000 weather - a default template
Post by: lwfitz on March 11, 2013, 12:00:03 AM
Yeah Id love them thanks! Itll give me something to work on tonight  8)
Title: Re: v9000 weather - a default template
Post by: Sector11 on March 11, 2013, 12:27:50 AM
@ IT! lwfitz

Here you go.  The S12 conkyForecastv9000 Combo (http://vsido.org/index.php/topic,246.new.html#new)

I'm S11, my wife is S12 - Everyone wave at S12  :D
Title: Re: v9000 weather - a default template
Post by: lwfitz on March 11, 2013, 05:43:25 AM
HI S12  ;D

(http://en.zimagez.com/miniature/waving0.gif) (http://en.zimagez.com/zimage/waving0.php)
Title: Re: v9000 weather - a default template
Post by: Sector11 on March 11, 2013, 11:03:35 AM
Funny - and thanks ... from S12 too.

She smiled a big one!
Title: Re: v9000 weather - a default template
Post by: jedi on March 11, 2013, 11:54:33 AM
@Sector11, on your recommends a while back, I checked out the 'monofur' font and have been using it ever since in some stuff.  Also, I think that everytime I've used mrpeachy's v9000 weather script, it has been with one of several (many?) "default Sector11" templates!   ;D
Title: Re: v9000 weather - a default template
Post by: Sector11 on March 11, 2013, 01:40:11 PM
For some things in conky a mono font is a "blessing" not a must but it sure makes things easier to space properly.

Most mono fonts are "boring" and some lie, "i"'s are narrower than other letters or the numbers with the font aren't "mono"  so .... why do they call them mono? ???

monofur - it's all "mono" and has a certain style and class that makes it different. And while that's an opinion, I'm the one doing the writing here.  ;)

Not only that, it accepts every strange character my keyboard can toss at it.   ??? That' a big plus in MHO.  AND I like the looks of it.

(http://t.imgbox.com/acolTJAi.jpg) (http://imgbox.com/acolTJAi)
And that's not including the accented letters: á â ä â ŵ ẅ blah blah ...

I even use it as a system font ... it took a day or so to get use to but it looks nice with headers and menus ... especially in OB.
(http://t.imgbox.com/adhsEhBK.jpg) (http://imgbox.com/adhsEhBK)


As for the v9000 templates ...
  I have flooded the market with a whole bunch of mine ... so it stands to reason that someone somewhere has to be using at least one.

Kinda like a shotgun ...
  Blast away with enough shells and sooner or later a few pellets will hit something.  :D :D
Title: Re: v9000 weather - a default template
Post by: jedi on March 11, 2013, 02:59:11 PM
Ok, so that looks pretty awesome actually.  Never considered it for a system font... ???  Not sure why since I like it so much.  Gonna see how I like it as the sys font on mine...
Now we gotta talk about that VERY COOL menu showing the WEATHER!!!  How's that done?  Trade secret?  That just might replace having it on the screen in the form of Conky...  (well, maybe not 'replace')
Title: Battery Monitor
Post by: sevensage on March 11, 2013, 04:50:56 PM
Hi guys - sorry to come to you with this I have tried finding a solution / reply within the bang forums but without success. I picked up a script (from wcs) and it was working perfectly. It has a python script to warn of low battery levels and a bash script executed once levels get too low to suspend. One fine morning when booting up my netbook it started up and went into suspend mode once the battery monitor in conky loaded. I cannot for the life of me figure what is triggering this behavior, it's not the end of the world if I disable the suspend portion of it but it was working perfectly at first. Anyhoo I'm going to lay down the code and the scripts, if you guys suspect what the culprit may be, I'd really appreciate a heads up.

conky bit

BAT ${if_existing /sys/class/power_supply/AC0/online 0}${if_match ${battery_percent BAT1} <= 20}${if_match ${battery_percent BAT1} <= 17}${if_match ${battery_percent BAT1} <= 15}${color red}${exec /home/mini/.scripts/pm-suspend}$else${color red}${execi 60 /home/mini/.scripts/criticalbat.py}$endif$else${color orange}${execi 120 /home/mini/.scripts/lowbat.py}$endif$endif$endif${battery_percent BAT1}%$color


bash bit

#!/bin/bash
gksu /usr/sbin/pm-suspend


python bits
lowbat

#!/usr/bin/env python2
import pynotify
pynotify.init("foo")
pynotify.Notification("Power warning", "Battery capacity is low.", "battery-low").show()


criticalbat

#!/usr/bin/env python2
import pynotify
pynotify.init("foo")
pynotify.Notification("POWER WARNING!", "Battery capacity is critically low!", "battery-caution").show()



cheers
Title: Re: v9000 weather - a default template
Post by: Sector11 on March 11, 2013, 06:18:59 PM
@ jedi

OK, second time ... I had started this ... and Iceweasel locked up!  Very very ODD!

Yea, if it can be said that a font can be sexy, then monofur is the sexiest font of the mono fonts.   8)



Yes, it's a trade secret and it will cost you €36,000,000.00
WOW!  That was fast, and in my Numberd Swiss Account too!  ???

OK since you paid up front it's an old pipmenu I found on the ARCH forums years ago.

/home/sector11/.config/openbox/scripts/yweather.py
#!/usr/bin/python

import urllib
from xml.etree.cElementTree import parse
from datetime import datetime, timedelta
import os
from os.path import join
from sys import argv
try:
    import cPickle as pickle
except ImportError:
    import pickle

#Usage: yweather.py AYXX0001 Celsius

if len(argv) != 3:
    raise Exception('Usage: yweather.py zip_code units. zip_code is your city code in Yahoo Weather, units can be Celsius or Fahrenheit.')
else:
    zip_code = argv[1]
    if argv[2] == 'Fahrenheit' or argv[2] == 'fahrenheit':
        units = 'f'
    else:
        units = 'c'



CACHE_HOURS = 1

#http://weather.yahooapis.com/forecastrss
WEATHER_URL = 'http://xml.weather.yahoo.com/forecastrss?p=%s&u=%s'
WEATHER_NS = 'http://xml.weather.yahoo.com/ns/rss/1.0'

def weather_for_zip(zip_code, units):
    url = WEATHER_URL % (zip_code, units)
    rss = parse(urllib.urlopen(url)).getroot()
    forecasts = []
    for element in rss.findall('channel/item/{%s}forecast' % WEATHER_NS):
        forecasts.append(dict(element.items()))
    ycondition = rss.find('channel/item/{%s}condition' % WEATHER_NS)
    return {
        'current_condition': dict(ycondition.items()),
        'forecasts': forecasts,
        'title': rss.findtext('channel/title'),
        'pubDate': rss.findtext('channel/item/pubDate'), #rss.findtext('channel/lastBuildDate'),
        'location': dict(rss.find('channel/{%s}location' % WEATHER_NS).items()),
        'wind': dict(rss.find('channel/{%s}wind' % WEATHER_NS).items()),
        'atmosphere': dict(rss.find('channel/{%s}atmosphere' % WEATHER_NS).items()),
        'astronomy': dict(rss.find('channel/{%s}astronomy' % WEATHER_NS).items()),
        'units': dict(rss.find('channel/{%s}units' % WEATHER_NS).items())
    }

def print_openbox_pipe_menu(weather):
    print '<openbox_pipe_menu>'
    print '<separator label="%s %s" />' % (weather['location']['city'],weather['pubDate'])
    print '<separator label="Current conditions" />'
    print '<item label="Weather: %s" />' % weather['current_condition']['text']
    print '<item label="Temperature: %s %s" />' % ( weather['current_condition']['temp'],
                                          weather['units']['temperature'] )
    print '<item label="Humidity: %s%%" />' % weather['atmosphere']['humidity']
    print '<item label="Visibility: %s %s" />' % ( weather['atmosphere']['visibility'],
                                          weather['units']['distance'] )
   
    #pressure: steady (0), rising (1), or falling (2)
    if weather['atmosphere']['rising'] == 0:
        pressure_state = 'steady'
    elif weather['atmosphere']['rising'] == 1:
        pressure_state = 'rising'
    else:
        pressure_state = 'falling'
    print '<item label="Pressure: %s %s (%s)" />' % ( weather['atmosphere']['pressure'],
                                          weather['units']['pressure'], pressure_state )
    print '<item label="Wind chill: %s %s" />' % ( weather['wind']['chill'],
                                          weather['units']['temperature'] )
    print '<item label="Wind direction: %s degrees" />' % weather['wind']['direction']
    print '<item label="Wind speed: %s %s" />' % ( weather['wind']['speed'],
                                          weather['units']['speed'] )
    print '<item label="Sunrise: %s" />' % weather['astronomy']['sunrise']
    print '<item label="Sunset: %s" />' % weather['astronomy']['sunset']
    for forecast in weather['forecasts']:
        print '<separator label="Forecast: %s" />' % forecast['day']
        print '<item label="Weather: %s" />' % forecast['text']
        print '<item label="Min temperature: %s %s" />' % ( forecast['low'],
                                                weather['units']['temperature'] )
        print '<item label="Max temperature: %s %s" />' % ( forecast['high'],
                                                weather['units']['temperature'] )
    print '</openbox_pipe_menu>'

cache_file = join(os.getenv("HOME"), '.yweather.cache')

try:
    f = open(cache_file,'rb')
    cache = pickle.load(f)
    f.close()
except IOError:
    cache = None

if cache == None or (zip_code, units) not in cache or (
        cache[(zip_code, units)]['date'] + timedelta(hours=CACHE_HOURS) < datetime.utcnow()):
    # The cache is outdated
    weather = weather_for_zip(zip_code, units)
    if cache == None:
        cache = dict()
    cache[(zip_code, units)] = {'date': datetime.utcnow(), 'weather': weather}
   
    #Save the data in the cache
    try:
        f = open(cache_file, 'wb')
        cache = pickle.dump(cache, f, -1)
        f.close()
    except IOError:
        raise
else:
    weather = cache[(zip_code, units)]['weather']

print_openbox_pipe_menu(weather)


You have to edit the "menu.xml" in a text editor, the graphical app doesn't do it.

Each entry also need a unique "id=" so the script can tell the difference.

Two for BuenosAires:
<menu execute="python ~/.config/openbox/scripts/yweather.py ARDF0127 Celsius" id="pipe-weather-bsas1" label="Buenos Aires"/>
<menu execute="python ~/.config/openbox/scripts/yweather.py ARBA0009 Celsius" id="pipe-weather-bsas2" label="Ezeiza"/>


The codes: ARDF0127 & ARBA0009 are the same you'd find at weather.com for your city of choice.
Notice the distince "id=" codes.

Santa's House is really in Alert, Nunavut (http://upload.wikimedia.org/wikipedia/commons/0/0c/Une_partie_de_l%27h%C3%A9misph%C3%A8re_nord_de_la_Terre_avec_la_banquise%2C_nuage%2C_%C3%A9toile_et_localisation_de_la_station_m%C3%A9t%C3%A9o_en_Alert.jpg), the worlds most northerly populated point year round (http://en.wikipedia.org/wiki/Alert,_Nunavut).

(http://t.imgbox.com/acoRZKYa.jpg) (http://imgbox.com/acoRZKYa)
Been there, Done that
Wore out the tee-shirt
So I can't prove it!

Any questions just ask.

Title: Re: Battery Monitor
Post by: sevensage on March 12, 2013, 08:01:20 PM
Well after a couple of weeks of wondering where I went wrong somewhere along the way I created a bash script pointing to pm-suspend (no idea why) the original was calling the command directly

exec /usr/sbin/pm-suspend

so the whole thing  looks like so

BAT ${if_existing /sys/class/power_supply/AC0/online 0}${if_match ${battery_percent BAT1} <= 20}${if_match ${battery_percent BAT1} <= 17}${if_match ${battery_percent BAT1} <= 15}${color red}${exec /usr/sbin/pm-suspend}$else${color red}${execi 60 /home/mini/.scripts/criticalbat.py}$endif$else${color


feeling sheepish, thanks
Title: Re: v9000 weather - a default template
Post by: lwfitz on March 16, 2013, 08:28:11 AM
Quote from: Sector11 on March 11, 2013, 11:03:35 AM
Funny - and thanks ... from S12 too.

She smiled a big one!


;D

And thanks for those, Im a little low and just getting to it  ::)
Title: Single line Conky with Gmail support
Post by: VastOne on March 18, 2013, 07:04:58 PM
Since Google made the lame decision to end Google Reader, I had no need for 2 conky's anymore and set out on a quest to create a Gmail space on the single line top conky

Here is the .conkyrc - Take note to change both YOURGMAILUSERNAME and YOURPASSWORD

# .conkyrc - Edited from various examples across the 'net
# Used by VastOne on #!

# Create own window instead of using desktop (required in nautilus)
#own_window yes
#own_window_type normal
#own_window_transparent no
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# fiddle with window
# use_spacer right

# Use Xft?
use_xft yes
xftfont Liberation Sans:size=16
xftalpha 0.9
text_buffer_size 2048

# Update interval in seconds
update_interval 1

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Minimum size of text area
#minimum_size 1024 0
#maximum_width 1024

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no
own_window_argb_visual no
own_window_type panel
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window yes
own_window_transparent yes
own_window_class conky

# Stippled borders?
stippled_borders 0

# border margins
# border_margin 0

# border width
border_width 1

# Default colors and also border colors
#default_color grey
#color2=white
#color3=grey
#default_shade_color black
#default_outline_color grey
own_window_colour 000000

# Text alignment, other possible values are commented
#alignment top_middle
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 0
gap_y 5
minimum_size 1700 29
maximum_width 1700
# Subtract file system buffers from used memory?
no_buffers yes

# set to yes if you want all text to be in uppercase
uppercase no

imlib_cache_size 0 

# 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 none

#lua_load ~/Conky/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.3
#
TEXT
${image /home/vastone/images/vsidoorb.png -s 31x31 -p 1,-1}       ${color 7D8C93}Kernel${color 55688A} $kernel ${color 7D8C93} Uptime ${color lime green}${uptime_short} ${color 7D8C93} CPU ${color 55688A}${cpu cpu0}%  ${color 7D8C93}MEM ${color 55688A}${memperc}% ${mem} / ${memmax} ${color 7D8C93} CPU ${color 55688A}${platform it87.552 temp 2}° ${color 7D8C93} MB ${color 55688A}${platform it87.552 temp 1}° ${color 7D8C93}GPU ${color 55688A}${nvidia temp}° ${color 7D8C93}HD${color 55688A} ${execi 5 hddtemp -n /dev/sda}° ${color 7D8C93}NET${color 55688A}  ${voffset 3}${downspeedgraph eth0 14,100 000000 ff0000}  ${upspeedgraph eth0 14,100 000000 00ff00} ${voffset -11} ${color 55688A} ${time %I:%M}${time %P}  ${color 7D8C93}Gmail ${color lime green} ${execi 60 ~/.scripts/gmail.sh YOURGMAILUSERNAME YOURPASSWORD} ${offset -192} ${voffset 18}  ${color 55688A} ${time %a %b %d %Y}


Here is the bash file needed to run it ... in my conkyrc I run it from ~/.scripts  ... Wherever you save it to, make the change to the path in the .conkyrc and also make the file executable

gmail.sh

#!/bin/bash

wget -q -O - [url]https://mail.google.com/mail/feed/atom[/url] --http-user="$1"@gmail.com --http-password="$2" - | grep fullcount | sed 's/[^0-9]//g'

exit


Screenshot

(http://www.zimagez.com/miniature/screenshot-03182013-020242pm.php) (http://www.zimagez.com/zimage/screenshot-03182013-020242pm.php)

Here is the same setup with the default .conkyrc from a VSIDO install - Take note to change both YOURGMAILUSERNAME and YOURPASSWORD

# .conkyrc - Edited from various examples across the 'net
# Used by VastOne on #!

# Create own window instead of using desktop (required in nautilus)
#own_window yes
#own_window_type normal
#own_window_transparent no
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# fiddle with window
use_spacer right

# Use Xft?
use_xft yes
xftfont liberation sans:size=13
xftalpha 0.9
text_buffer_size 2048

# Update interval in seconds
update_interval 1

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Minimum size of text area
#minimum_size 1024 0
#maximum_width 1024

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no
own_window_argb_visual yes
own_window_type panel
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window yes
own_window_transparent yes
own_window_class conky-semi

# Stippled borders?
stippled_borders 0

# border margins
# border_margin 0

# border width
border_width 1

# Default colors and also border colors
#default_color grey
#color2=white
#color3=grey
#default_shade_color black
#default_outline_color grey
own_window_colour 000000

# Text alignment, other possible values are commented
#alignment top_middle
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 0
gap_y 5
minimum_size 1700 29
maximum_width 1700
# 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 none

# lua_load ~/Conky/LUA/draw-bg.lua
# lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.3
#
TEXT
${image $HOME/images/vsidoorb.png -s 34x34 -p 1,-1}       ${color 73AEB4}Kernel${color 7D8C93} $kernel ${color 73AEB4} Uptime ${color lime green}${uptime_short} ${color 73AEB4} CPU ${color 7D8C93}${cpu cpu0}%  ${color 73AEB4}MEM ${color 7D8C93}${memperc}% ${mem} / ${memmax} ${color 73AEB4} HD ${color 7D8C93} ${execi 5 hddtemp -n /dev/sda}° ${color 73AEB4}NET${color 7D8C93}  ${voffset 1}${downspeedgraph eth0 12,70 000000 ff0000}  ${upspeedgraph eth0 12,70 000000 00ff00} ${color 7D8C93} Gmail ${color lime green} ${execi 10 ~/.scripts/gmail.sh YOURGMAILUSERNAME YOURPASSWORD}


Screenshot

(http://www.zimagez.com/miniature/screenshot-03182013-022509pm.php) (http://www.zimagez.com/zimage/screenshot-03182013-022509pm.php)
Title: Re: Battery Monitor
Post by: Sector11 on March 19, 2013, 12:57:40 PM
I just saw this ... however not having a "battery" means I couldn't have helped anyway.

BUT ... just wanted you to know I wasn't ignoring ya - I would have at least used Google to try to help.
Title: Re: Conky Codes and Images
Post by: lwfitz on March 22, 2013, 06:31:26 AM
Heres the config for my new one

(http://en.zimagez.com/miniature/screenshot-03212013-113006pm.png) (http://en.zimagez.com/zimage/screenshot-03212013-113006pm.php)

conky_system
max_specials 10000
max_user_text 15000
background no
use_xft yes
xftfont sans:size=9
xftalpha 1
total_run_times 0
own_window yes
own_window_argb_visual no
own_window_transparent yes
own_window_type desktop
own_window_title conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 275 1000
maximum_width 275
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_shade_color black
default_outline_color white
alignment tl
gap_x 15
gap_y 45
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
text_buffer_size 100000
top_name_width 5
update_interval 1
default_color FFFFFF
temperature_unit fahrenheit
short_units yes

### LUA Load ###
lua_load /home/luke/Conky/allcombined_2.lua

## lua funcions
## background ##################################################################
#${lua draw_bg {corner_radius,x_position,y_position,width,height,color,alpha,draw_type,line_width,outline_color,outline_alpha}}
#note for background: set width=0 - width will be conky window width, set height=0 - height will be conky window height
# draw_type: 1=fill, 2=outline(must specify line_width), 3=outline and fill (must specify line_width, outline_color and outline_alpha)
## gradient bars ###############################################################
#${lua gradbar {x_position,y_position,"conky_object",object_max_value,number_of_divisions,division_width,division_height,division_gap,bg_color,bg_alpha,start_color,start_alpha,mid_color,mid_alpha,end_color,end_alpha}}
## calendar ###############################################################
#${lua luacal {x_position,y_position,"title_font",title_fontsize,title_color,title_alpha,"dates_font",dates_fontsize,dates_color,dates_alpha,"highlight_font",highlight_fontsize,highlight_color,highlight_alpha,"spacer",colum_gap,title_gap,row_gap,start_day}
#note for calendar: start day... 0=sunday, 1=monday ... "spacer" can help align calendar with non fix width fonts
## textured background ###############################################################
#${lua tex_bg {corner_radius,x_position,y_position,width,height,"/path/to/texture.png"}}
## lua draw images ###############################################################
#${lua luaimage {x_position,y_position,width,height,"/path/to/image"}}
#note for images: set width=0 - width will be image width, set height=0 - height will be image height
## lua draw text ###############################################################
#${lua luatext {x_position,y_position,color,alpha,"font",fontsize,"justify"}}
#note for text: justify can be "r" = right, "c" = center, "l" = left
#${lua draw_bg {10,0,0,0,0,0x000000,0.3}}

TEXT
${image /home/luke/Conky/CPU.png -s 150x75 -p 65,5}${lua draw_bg {25,0,0,0,0,0x000000,0.3}}




${goto 5}${font Pseudo APL:Bold:size=14} Core1${goto 90}${cpu cpu1}${font SansMono:Bold:size=11}%${goto 150}Core2${goto 235}${cpu cpu2}${font SansMono:Bold:size=11}%
${goto 5}${font Pseudo APL:Bold:size=14} Core3${goto 90}${cpu cpu3}${font SansMono:Bold:size=11}%${goto 150}Core4${goto 235}${cpu cpu4}${font SansMono:Bold:size=11}%
${goto 5}${font Pseudo APL:Bold:size=14} Core5${goto 90}${cpu cpu5}${font SansMono:Bold:size=11}%${goto 150}Core6${goto 235}${cpu cpu6}${font SansMono:Bold:size=11}%
#${goto 15}${cpubar cpu0 30,245}
${lua gradbar {15,143,"${cpu cpu0}",100,63,2,30,2,0x666666,.25,0x666666,1,0x000099,.75,0x000033,1}}


${goto 20}${font Pseudo APL:Bold:size=12}${top name 1} ${goto 115}${top pid 1} ${goto 185}${top cpu 1}${font SansMono:Bold:size=11}%
${goto 20}${font Pseudo APL:Bold:size=12}${top name 2} ${goto 115}${top pid 2} ${goto 185}${top cpu 2}${font SansMono:Bold:size=11}%
${goto 20}${font Pseudo APL:Bold:size=12}${top name 3} ${goto 115}${top pid 3} ${goto 185}${top cpu 3}${font SansMono:Bold:size=11}%

${image /home/luke/Conky/memory.png -s 225x90 -p 30,215}


${goto 5}${font Pseudo APL:Bold:size=14} RAM ${goto 110}${mem}${goto 190}/${memmax}
#${goto 15}${membar 30,245}
${lua gradbar {15,321,"${memperc}",100,63,2,30,2,0x666666,.25,0x666666,1,0x000099,.75,0x000033,1}}

${goto 5}${font Pseudo APL:Bold:size=14} SWAP ${goto 110}${swap}${goto 190}/${swapmax}
#${goto 15}${swapbar 30,245}
${lua gradbar {15,381,"${swapperc}",100,63,2,30,2,0x666666,.25,0x666666,1,0x000099,.75,0x000033,1}}

${goto 20}${font Pseudo APL:Bold:size=12}${top_mem name 1} ${goto 115}${top_mem pid 1} ${goto 185}${top_mem mem 1}${font SansMono:Bold:size=11}%
${goto 20}${font Pseudo APL:Bold:size=12}${top_mem name 2} ${goto 115}${top_mem pid 2} ${goto 185}${top_mem mem 2}${font SansMono:Bold:size=11}%
${goto 20}${font Pseudo APL:Bold:size=12}${top_mem name 3} ${goto 115}${top_mem pid 3} ${goto 185}${top_mem mem 3}${font SansMono:Bold:size=11}%

${image /home/luke/Conky/Storage.png -s 225x90 -p 29,453}


${goto 5}${font Pseudo APL:Bold:size=14} / ${goto 120}${fs_used /}${goto 205}/15G
${lua gradbar {15,555,"${fs_used_perc /}",100,63,2,15,2,0x666666,.25,0x666666,1,0x000099,.75,0x000033,1}}
${goto 5}${font Pseudo APL:Bold:size=14} /home ${goto 120}${fs_used /home}${goto 205}/37G
${lua gradbar {15,595,"${fs_used_perc /home}",100,63,2,15,2,0x666666,.25,0x666666,1,0x000099,.75,0x000033,1}}
${goto 5}${font Pseudo APL:Bold:size=14} Storage ${goto 120}${fs_used /media/storage}${goto 205}/${fs_size /media/storage}
${lua gradbar {15,635,"${fs_used_perc /media/storage}",100,63,2,15,2,0x666666,.25,0x666666,1,0x000099,.75,0x000033,1}}
${goto 5}${font Pseudo APL:Bold:size=14} Music ${goto 120}${fs_used /media/sde6}${goto 205}/${fs_size /media/sde6}
${lua gradbar {15,675,"${fs_used_perc /media/sde6}",100,63,2,15,2,0x666666,.25,0x666666,1,0x000099,.75,0x000033,1}}
${goto 5}${font Pseudo APL:Bold:size=14} External ${goto 120}${fs_used /media/sde5}${goto 205}/${fs_size /media/sde5}
${lua gradbar {15,715,"${fs_used_perc /media/sde5}",100,63,2,15,2,0x666666,.25,0x666666,1,0x000099,.75,0x000033,1}}
${goto 5}${font Pseudo APL:Bold:size=14} Videos ${goto 120}${fs_used /media/sdc1}${goto 205}/${fs_size /media/sdc1}
${lua gradbar {15,755,"${fs_used_perc /media/sdc1}",100,63,2,15,2,0x666666,.25,0x666666,1,0x000099,.75,0x000033,1}}
${goto 5}${font Pseudo APL:Bold:size=14} Software ${goto 120}${fs_used /media/sdb1}${goto 205}/${fs_size /media/sdb1}
${lua gradbar {15,795,"${fs_used_perc /media/sdb1}",100,63,2,15,2,0x666666,.25,0x666666,1,0x000099,.75,0x000033,1}}

${image /home/luke/Conky/temps.png -s 225x90 -p 23,798}

${goto 5}${font Pseudo APL:Bold:size=14} CPU ${goto 225}${platform it87.656 temp 1}F
${lua gradbar {15,893,"${platform it87.656 temp 1}",195,63,2,15,2,0x666666,.25,0x666666,1,0x000099,.75,0x000033,1}}
${goto 5}${font Pseudo APL:Bold:size=14} Motherboard ${goto 225}${platform it87.656 temp 2}F
${lua gradbar {15,935,"${platform it87.656 temp 2}",200,63,2,15,2,0x666666,.25,0x666666,1,0x000099,.75,0x000033,1}}
${goto 5}${font Pseudo APL:Bold:size=14} GPU ${goto 225}${nvidia temp}F
${lua gradbar {15,975,"${platform it87.656 temp 2}",200,63,2,15,2,0x666666,.25,0x666666,1,0x000099,.75,0x000033,1}}


conky_weather
max_specials 10000
max_user_text 15000
background no
use_xft yes
xftfont sans:size=9
xftalpha 1
total_run_times 0
own_window yes
own_window_argb_visual no
own_window_transparent yes
own_window_type normal
own_window_title conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 350 360
maximum_width 350
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_shade_color black
default_outline_color white
alignment top_middle
gap_x 200
gap_y 10
no_buffers yes
uppercase no
cpu_avg_samples 6
override_utf8_locale yes
text_buffer_size 100000
top_name_width 5
update_interval 1
default_color FFFFFF
temperature_unit fahrenheit
# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2
format_human_readable yes
short_units yes
update_interval 1
imlib_cache_size 0

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
temperature_unit Fahrenheit

### LUA Load ###
lua_load /home/luke/Conky/allcombined_2.lua


## lua funcions
## background ##################################################################
#${lua draw_bg {corner_radius,x_position,y_position,width,height,color,alpha,draw_type,line_width,outline_color,outline_alpha}}
#note for background: set width=0 - width will be conky window width, set height=0 - height will be conky window height
# draw_type: 1=fill, 2=outline(must specify line_width), 3=outline and fill (must specify line_width, outline_color and outline_alpha)
## gradient bars ###############################################################
#${lua gradbar {x_position,y_position,"conky_object",object_max_value,number_of_divisions,division_width,division_height,division_gap,bg_color,bg_alpha,start_color,start_alpha,mid_color,mid_alpha,end_color,end_alpha}}
## calendar ###############################################################
#${lua luacal {x_position,y_position,"title_font",title_fontsize,title_color,title_alpha,"dates_font",dates_fontsize,dates_color,dates_alpha,"highlight_font",highlight_fontsize,highlight_color,highlight_alpha,"spacer",colum_gap,title_gap,row_gap,start_day}
#note for calendar: start day... 0=sunday, 1=monday ... "spacer" can help align calendar with non fix width fonts
## textured background ###############################################################
#${lua tex_bg {corner_radius,x_position,y_position,width,height,"/path/to/texture.png"}}
## lua draw images ###############################################################
#${lua luaimage {x_position,y_position,width,height,"/path/to/image"}}
#note for images: set width=0 - width will be image width, set height=0 - height will be image height
## lua draw text ###############################################################
#${lua luatext {x_position,y_position,color,alpha,"font",fontsize,"justify"}}
#note for text: justify can be "r" = right, "c" = center, "l" = left
#${lua draw_bg {10,0,0,0,0,0x000000,0.3}}
${lua draw_bg {25,0,0,0,0,0x000000,0.3}}
TEXT
${image /home/luke/Conky/weather.png -s 225x90 -p 75,5}${lua draw_bg {25,0,0,0,0,0x000000,0.3}}
${image /home/luke/Conky/thermometer.png -s 50x50 -p 20,90}





${voffset 7}${goto 70}${font Pseudo APL:Bold:size=20}${execpi 600 sed -n '4p' $HOME/Accuweather_Conky_USA_Images/curr_cond}°F ${voffset -5}
${font Pseudo APL:Bold:size=14}${goto 10}Dawn ${execpi 600 sed -n '15p' $HOME/Accuweather_Conky_USA_Images/curr_cond}${texeci 500 bash $HOME/Accuweather_Conky_USA_Images/acc_usa_images}${image $HOME/Accuweather_Conky_USA_Images/cc.png -p 185,90 -s 140x125}
${goto 10}Dusk ${execpi 600 sed -n '16p' $HOME/Accuweather_Conky_USA_Images/curr_cond}

${font Pseudo APL:Bold:size=12}${goto 25}${execpi 600 sed -n '6p' $HOME/Accuweather_Conky_USA_Images/tod_ton}${goto 140}${execpi 600 sed -n '11p' $HOME/Accuweather_Conky_USA_Images/tod_ton}${goto 260}${execpi 600 sed -n '16p' $HOME/Accuweather_Conky_USA_Images/tod_ton}

${font Pseudo APL:Bold:size=11}${goto 90}${execpi 600 sed -n '9p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 205}${execpi 600 sed -n '14p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 320}${execpi 600 sed -n '19p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F
${voffset 5}${font Pseudo APL:Bold:size=11}${goto 90}${execpi 600 sed -n '10p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 205}${execpi 600 sed -n '15p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 320}${execpi 600 sed -n '20p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${image $HOME/Accuweather_Conky_USA_Images/7.png -p 10,225 -s 80x67}${image $HOME/Accuweather_Conky_USA_Images/12.png -p 128,225 -s 80x67}${image $HOME/Accuweather_Conky_USA_Images/17.png -p 246,225 -s 80x67}${voffset -5}


${font Pseudo APL:Bold:size=50}${alignc}${time %I}:${time %M}${time %P}
${voffset -35}${font Pseudo APL:Bold:size=31}${alignc}${time %a} ${time %D}${voffset 35}
${image /home/luke/Conky/network.png -s 225x90 -p 75,405}${image /home/luke/Conky/up.png -s 30x30 -p 20,495}
${goto 70}${font Pseudo APL:Bold:size=16}${upspeed eth0} ${voffset -8}${goto 163}${upspeedgraph 23,165 666666 000066}${voffset 8}
${image /home/luke/Conky/down.png -s 30x30 -p 20,548}
${goto 70}${font Pseudo APL:Bold:size=16}${downspeed eth0} ${voffset -8}${goto 163}${downspeedgraph 23,165 666666 000066}${voffset 8}



allcombined_2.lua (by mrpeachy)
--[[ by mrpeachy -
combines background bar and calendar functions
]]
require 'cairo'
require 'imlib2'

function rgb_to_r_g_b(col_a)
return ((col_a[1] / 0x10000) % 0x100) / 255., ((col_a[1] / 0x100) % 0x100) / 255., (col_a[1] % 0x100) / 255., col_a[2]
end

function conky_gradbar(bartab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
local updates=tonumber(conky_parse('${updates}'))
if updates>5 then
--#########################################################################################################
--convert to table
local bartab=loadstring("return" .. bartab)()
local bar_startx=bartab[1]
local bar_starty=bartab[2]
local number=bartab[3]
local number=conky_parse(number)
local number_max=bartab[4]
local divisions=bartab[5]
local div_width=bartab[6]
local div_height=bartab[7]
local div_gap=bartab[8]
local bg_col=bartab[9]
local bg_alpha=bartab[10]
local st_col=bartab[11]
local st_alpha=bartab[12]
local mid_col=bartab[13]
local mid_alpha=bartab[14]
local end_col=bartab[15]
local end_alpha=bartab[16]
--color conversion
local br,bg,bb,ba=rgb_to_r_g_b({bg_col,bg_alpha})
local sr,sg,sb,sa=rgb_to_r_g_b({st_col,st_alpha})
local mr,mg,mb,ma=rgb_to_r_g_b({mid_col,mid_alpha})
local er,eg,eb,ea=rgb_to_r_g_b({end_col,end_alpha})
if number==nil then number=0 end
local number_divs=(number/number_max)*divisions
cairo_set_line_width (cr,div_width)
--gradient calculations
for i=1,divisions do
if i<(divisions/2) and i<=number_divs then
colr=((mr-sr)*(i/(divisions/2)))+sr
colg=((mg-sg)*(i/(divisions/2)))+sg
colb=((mb-sb)*(i/(divisions/2)))+sb
cola=((ma-sa)*(i/(divisions/2)))+sa
elseif i>=(divisions/2) and i<=number_divs then
colr=((er-mr)*((i-(divisions/2))/(divisions/2)))+mr
colg=((eg-mg)*((i-(divisions/2))/(divisions/2)))+mg
colb=((eb-mb)*((i-(divisions/2))/(divisions/2)))+mb
cola=((ea-ma)*((i-(divisions/2))/(divisions/2)))+ma
else
colr=br
colg=bg
colb=bb
cola=ba
end
cairo_set_source_rgba (cr,colr,colg,colb,cola)
cairo_move_to (cr,bar_startx+((div_width+div_gap)*i-1),bar_starty)
cairo_rel_line_to (cr,0,div_height)
cairo_stroke (cr)
end
--#########################################################################################################
end-- if updates>5
bartab=nil
colr=nil
colg=nil
colb=nil
cola=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_draw_bg(bgtab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--#########################################################################################################
--convert to table
local bgtab=loadstring("return" .. bgtab)()
local r=bgtab[1]
local x=bgtab[2]
local y=bgtab[3]
local w=bgtab[4]
local h=bgtab[5]
local color=bgtab[6]
local alpha=bgtab[7]
if w==0 then
w=tonumber(conky_window.width)
end
if h==0 then
h=tonumber(conky_window.height)
end
cairo_set_source_rgba (cr,rgb_to_r_g_b({color,alpha}))
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
--the drawing part---------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_fill (cr)
--#########################################################################################################
bgtab=nil
w=nil
h=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_luacal(caltab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--####################################################################################################
local caltab=loadstring("return" .. caltab)()
local cal_x=caltab[1]
local cal_y=caltab[2]
local tfont=caltab[3]
local tfontsize=caltab[4]
local tc=caltab[5]
local ta=caltab[6]
local bfont=caltab[7]
local bfontsize=caltab[8]
local bc=caltab[9]
local ba=caltab[10]
local hfont=caltab[11]
local hfontsize=caltab[12]
local hc=caltab[13]
local ha=caltab[14]
local spacer=caltab[15]
local gaph=caltab[16]
local gapt=caltab[17]
local gapl=caltab[18]
local sday=caltab[19]
--convert colors
--local font=string.gsub(font,"_"," ")
local tred,tgreen,tblue,talpha=rgb_to_r_g_b({tc,ta})
--main body text color
local bred,bgreen,bblue,balpha=rgb_to_r_g_b({bc,ba})
--highlight text color
local hred,hgreen,hblue,halpha=rgb_to_r_g_b({hc,ha})
--###################################################
--calendar calcs
local year=os.date("%G")
local today=tonumber(os.date("%d"))
local t1 = os.time( {    year=year,month=03,day=01,hour=00,min=0,sec=0} );
local t2 = os.time( {    year=year,month=02,day=01,hour=00,min=0,sec=0} );
local feb=(os.difftime(t1,t2))/(24*60*60)
local monthdays={ 31, feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
local day=tonumber(os.date("%w"))+1-sday
local day_num = today
local remainder=day_num % 7
local start_day=day-(day_num % 7)
if start_day<0 then start_day=7+start_day end     
local month=os.date("%m")
local mdays=monthdays[tonumber(month)]
local x=mdays+start_day
local dnum={}
local dnumh={}
if mdays+start_day<36 then
dlen=35
plen=29
else
dlen=42
plen=36
end
for i=1,dlen do
if i<=start_day then
dnum[i]="  "
else
dn=i-start_day
if dn=="nil" then dn=0 end
if dn<=9 then dn=(spacer .. dn) end
if i>x then dn="" end
dnum[i]=dn
dnumh[i]=dn
if dn==(spacer .. today) or dn==today then
dnum[i]=""
end
if dn==(spacer .. today) or dn==today then
dnumh[i]=dn
place=i
else dnumh[i]="  "
end
end
end--for
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
if tonumber(sday)==0 then
dys={"SU","MO","TU","WE","TH","FR","SA"}
else
dys={"MO","TU","WE","TH","FR","SA","SU"}
end
--draw calendar titles
for i=1,7 do
cairo_move_to (cr, cal_x+(gaph*(i-1)), cal_y)
cairo_show_text (cr, dys[i])
cairo_stroke (cr)
end
--draw calendar body
cairo_select_font_face (cr, bfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, bfontsize);
cairo_set_source_rgba (cr,bred,bgreen,bblue,balpha)
for i=1,plen,7 do
local fn=i
for i=fn,fn+6 do
cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
cairo_show_text (cr, dnum[i])
cairo_stroke (cr)
end
end
--highlight
cairo_select_font_face (cr, hfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, hfontsize);
cairo_set_source_rgba (cr,hred,hgreen,hblue,halpha)
for i=1,plen,7 do
local fn=i
for i=fn,fn+6 do
cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
cairo_show_text (cr, dnumh[i])
cairo_stroke (cr)
end
end
--#########################################################################################################
caltab=nil
dlen=nil
plen=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_luaimage(imtab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--#########################################################################################################
local imtab=loadstring("return" .. imtab)()
local im_x=imtab[1]
local im_y=imtab[2]
local im_w=imtab[3]
local im_h=imtab[4]
local file=imtab[5]
local show = imlib_load_image(file)
if show == nil then return end
imlib_context_set_image(show)
if tonumber(im_w)==0 then
width=imlib_image_get_width()
else
width=tonumber(im_w)
end
if tonumber(im_h)==0 then
height=imlib_image_get_height()
else
height=tonumber(im_h)
end
imlib_context_set_image(show)
local scaled=imlib_create_cropped_scaled_image(0, 0, imlib_image_get_width(), imlib_image_get_height(), width, height)
imlib_free_image()
imlib_context_set_image(scaled)
imlib_render_image_on_drawable(im_x, im_y)
imlib_free_image()
show=nil
--#########################################################################################################
imtab=nil
height=nil
width=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_tex_bg(textab)
local textab=loadstring("return" .. textab)()
local tex_file=textab[6]
local surface = cairo_image_surface_create_from_png(tostring(tex_file))
local cw,ch = conky_window.width, conky_window.height
local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, cw,ch)
local cr=cairo_create(cs)
--#########################################################################################################
--convert to table
local r=textab[1]
local x=textab[2]
local y=textab[3]
local w=textab[4]
local h=textab[5]
if w=="0" then
w=cw
end
if h=="0" then
h=ch
end
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
--the drawing part---------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_clip (cr)
cairo_new_path (cr);
--image part
cairo_set_source_surface (cr, surface, 0, 0)
cairo_paint (cr)
--#########################################################################################################
textab=nil
w=nil
h=nil
cairo_destroy(cr)
cairo_surface_destroy (cs)
cairo_surface_destroy (surface)
cr=nil
return ""
end-- end main function

function conky_luatext(txttab)--x,y,c,a,f,fs,txt,j ##################################################
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--#########################################################################################################
--convert to table
local txttab=loadstring("return" .. txttab)()
local x=txttab[1]
local y=txttab[2]
local c=txttab[3]
local a=txttab[4]
local f=txttab[5]
local fs=txttab[6]
local j=txttab[7]
local txt=txttab[8]
cairo_select_font_face (cr, f, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, fs)
local extents=cairo_text_extents_t:create()
cairo_text_extents(cr,txt,extents)
local wx=extents.x_advance
cairo_set_source_rgba (cr,rgb_to_r_g_b({c,a}))
if j=="l" then
cairo_move_to (cr,x,y)
elseif j=="c" then
cairo_move_to (cr,x-(wx/2),y)
elseif j=="r" then
cairo_move_to (cr,x-wx,y)
end
cairo_show_text (cr,txt)
cairo_stroke (cr)
--#########################################################################################################
txttab=nil
cairo_destroy(cr)
cairo_surface_destroy (cs)
cr=nil
return ""
end-- end main function


You can get all the images and weather script with my custom images  here (https://www.dropbox.com/s/vxg911uzzn3otfp/conky_images.tar.gz).
Title: Re: Conky Codes and Images
Post by: lwfitz on March 28, 2013, 06:20:19 PM
My tribute to Jimi....

(http://en.zimagez.com/miniature/screenshot-03282013-115611am.png) (http://en.zimagez.com/zimage/screenshot-03282013-115611am.php)

conky_system
max_specials 10000
max_user_text 15000
background no
use_xft yes
xftfont sans:size=9
xftalpha 1
total_run_times 0
own_window yes
own_window_argb_visual no
own_window_transparent yes
own_window_type override
own_window_title conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 275 1000
maximum_width 275
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_shade_color black
default_outline_color white
alignment tl
gap_x 15
gap_y 30
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
text_buffer_size 100000
top_name_width 5
update_interval 1
default_color FFFFFF
temperature_unit fahrenheit
short_units yes

### LUA Load ###
lua_load /home/luke/Conky/allcombined.lua

#lua_load /home/luke/Conky/draw_bg.lua

## lua funcions
## background ##################################################################
#${lua draw_bg {corner_radius,x_position,y_position,width,height,color,alpha,draw_type,line_width,outline_color,outline_alpha}}
#note for background: set width=0 - width will be conky window width, set height=0 - height will be conky window height
# draw_type: 1=fill, 2=outline(must specify line_width), 3=outline and fill (must specify line_width, outline_color and outline_alpha)
## gradient bars ###############################################################
#${lua gradbar {x_position,y_position,"conky_object",object_max_value,number_of_divisions,division_width,division_height,division_gap,bg_color,bg_alpha,start_color,start_alpha,mid_color,mid_alpha,end_color,end_alpha}}
## calendar ###############################################################
#${lua luacal {x_position,y_position,"title_font",title_fontsize,title_color,title_alpha,"dates_font",dates_fontsize,dates_color,dates_alpha,"highlight_font",highlight_fontsize,highlight_color,highlight_alpha,"spacer",colum_gap,title_gap,row_gap,start_day}
#note for calendar: start day... 0=sunday, 1=monday ... "spacer" can help align calendar with non fix width fonts
## textured background ###############################################################
#${lua tex_bg {corner_radius,x_position,y_position,width,height,"/path/to/texture.png"}}
## lua draw images ###############################################################
#${lua luaimage {x_position,y_position,width,height,"/path/to/image"}}
#note for images: set width=0 - width will be image width, set height=0 - height will be image height
## lua draw text ###############################################################
#${lua luatext {x_position,y_position,color,alpha,"font",fontsize,"justify"}}
#note for text: justify can be "r" = right, "c" = center, "l" = left
#${lua draw_bg {10,0,0,0,0,0x000000,0.3}}
#${lua draw_bg {25,0,0,0,0,0x333333,0.4}}
TEXT
#${image /home/luke/Conky/CPU.png -s 150x75 -p 65,5}
${lua tex_bg {30,2,1,281,1029,"/home/luke/Conky/brushed2.png"}}${lua draw_bg {30,0,0,285,1030,0x000000,.75,2,2}}

${goto 5}${font jimi:size=40}cpu ${lua gradbar {0,78,"${memperc}",100,100,1,3,0,0xFFFFFF,1,0x999999,0,0x333333,0,0x000000,0}}
${voffset -22}${goto 5}${font jimi:size=15} Core1${goto 90}${font Pseudo APL:Bold:size=14}${cpu cpu1}${font SansMono:Bold:size=11}%${goto 150}${font jimi:size=15}Core2${goto 235}${font Pseudo APL:Bold:size=14}${cpu cpu2}${font SansMono:Bold:size=11}%
${goto 5}${font jimi:size=15} Core3${goto 90}${font Pseudo APL:Bold:size=14}${cpu cpu3}${font SansMono:Bold:size=11}%${goto 150}${font jimi:size=15}Core4${goto 235}${font Pseudo APL:Bold:size=14}${cpu cpu4}${font SansMono:Bold:size=11}%
${goto 5}${font jimi:size=15} Core5${goto 90}${font Pseudo APL:Bold:size=14}${cpu cpu5}${font SansMono:Bold:size=11}%${goto 150}${font jimi:size=15}Core6${goto 235}${font Pseudo APL:Bold:size=14}${cpu cpu6}${font SansMono:Bold:size=11}%${voffset 22}
${lua gradbar {11,155,"${cpu cpu0}",100,250,1,30,0,0xCCCCCC,.0,0x999999,1,0x333333,.5,0x000000,1}}
${goto 20}${font Pseudo APL:Bold:size=12}${top name 1} ${goto 115}${top pid 1} ${goto 185}${top cpu 1}${font SansMono:Bold:size=11}%
${goto 20}${font Pseudo APL:Bold:size=12}${top name 2} ${goto 115}${top pid 2} ${goto 185}${top cpu 2}${font SansMono:Bold:size=11}%
${goto 20}${font Pseudo APL:Bold:size=12}${top name 3} ${goto 115}${top pid 3} ${goto 185}${top cpu 3}${font SansMono:Bold:size=11}%
#${image /home/luke/Conky/memory.png -s 225x90 -p 30,215}

${goto 5}${font jimi:size=40}Memory${lua gradbar {-15,300,"${memperc}",100,235,1,3,0,0xFFFFFF,1,0x999999,0,0x333333,0,0x000000,0}}
${voffset -25}${goto 5}${font jimi:size=15} RAM ${goto 110}${font Pseudo APL:Bold:size=14}${mem}${goto 190}/${memmax}${voffset 25}
${lua gradbar {11,329,"${memperc}",100,250,1,30,0,0x000000,.0,0x999999,1,0x333333,.5,0x000000,1}}

${voffset -25}${goto 5}${font jimi:size=15} SWAP ${goto 110}${font Pseudo APL:Bold:size=14}${swap}${goto 190}/${swapmax}${voffset 25}
${lua gradbar {11,389,"${swapperc}",100,250,1,30,0,0x000000,.0,0x999999,1,0x333333,.5,0x000000,1}}
${voffset -13}${goto 20}${font Pseudo APL:Bold:size=12}${top_mem name 1} ${goto 115}${top_mem pid 1} ${goto 185}${top_mem mem 1}${font SansMono:Bold:size=11}%
${goto 20}${font Pseudo APL:Bold:size=12}${top_mem name 2} ${goto 115}${top_mem pid 2} ${goto 185}${top_mem mem 2}${font SansMono:Bold:size=11}%
${goto 20}${font Pseudo APL:Bold:size=12}${top_mem name 3} ${goto 115}${top_mem pid 3} ${goto 185}${top_mem mem 3}${font SansMono:Bold:size=11}%${voffset 13}
#${image /home/luke/Conky/Storage.png -s 225x90 -p 29,453}
#
#
${color }${goto 5}${font jimi:size=40}Storage ${color}${lua gradbar {-17,529,"${memperc}",100,250,1,3,0,0xFFFFFF,1,0x999999,0,0x333333,0,0x000000,0}}
${voffset -20}${goto 5}${font jimi:size=15} / ${font Pseudo APL:Bold:size=14}${goto 120}${fs_used /}${goto 205}/15G
${lua gradbar {11,557,"${fs_used_perc /}",100,250,1,15,0,0x000000,.0,0x999999,1,0x333333,.75,0x000000,1}}
${goto 5}${font jimi:size=15} /home ${font Pseudo APL:Bold:size=14}${goto 120}${fs_used /home}${goto 205}/37G
${lua gradbar {11,597,"${fs_used_perc /home}",100,250,1,15,0,0x000000,.0,0x999999,1,0x333333,.75,0x000000,1}}
${goto 5}${font jimi:size=15} storage ${font Pseudo APL:Bold:size=14}${goto 120}${fs_used /media/storage}${goto 205}/${fs_size /media/storage}
${lua gradbar {11,637,"${fs_used_perc /media/storage}",100,250,1,15,0,0x000000,0,0x999999,1,0x333333,.75,0x000000,1}}
${goto 5}${font jimi:size=15} music ${font Pseudo APL:Bold:size=14}${goto 120}${fs_used /media/sde6}${goto 205}/${fs_size /media/sde6}
${lua gradbar {11,677,"${fs_used_perc /media/sde6}",100,250,1,15,0,0x000000,0,0x999999,1,0x333333,.75,0x000000,1}}
${goto 5}${font jimi:size=15} external ${font Pseudo APL:Bold:size=14}${goto 120}${fs_used /media/sde5}${goto 205}/${fs_size /media/sde5}
${lua gradbar {11,717,"${fs_used_perc /media/sde5}",100,250,1,15,0,0x000000,.0,0x999999,1,0x333333,.75,0x000000,1}}
${goto 5}${font jimi:size=15} videos ${font Pseudo APL:Bold:size=14} ${goto 120}${fs_used /media/sdc1}${goto 205}/${fs_size /media/sdc1}
${lua gradbar {11,757,"${fs_used_perc /media/sdc1}",100,250,1,15,0,0x000000,.0,0x999999,1,0x333333,.75,0x000000,1}}
${goto 5}${font jimi:size=15} software ${font Pseudo APL:Bold:size=14}${goto 120}${fs_used /media/sdb1}${goto 205}/${fs_size /media/sdb1}${voffset 20}
${lua gradbar {11,797,"${fs_used_perc /media/sdb1}",100,250,1,15,0,0x000000,.0,0x999999,1,0x333333,.75,0x000000,1}}
#
#
${voffset -10}${color }${goto 5}${font jimi:size=40}Temps ${color}${lua gradbar {-4,874,"${memperc}",100,170,1,3,0,0xFFFFFF,1,0x999999,0,0x333333,0,0x000000,0}}${voffset 10}
${voffset -25}${goto 5}${font jimi:size=15} cpu ${font Pseudo APL:Bold:size=14} ${goto 225}${platform it87.656 temp 1}F
${lua gradbar {15,907,"${platform it87.656 temp 1}",195,250,1,15,0,0x000000,.0,0x999999,1,0x333333,.75,0x000000,1}}
${goto 5}${font jimi:size=15} motherboard ${font Pseudo APL:Bold:size=14}  ${goto 225}${platform it87.656 temp 2}F
${lua gradbar {15,947,"${platform it87.656 temp 2}",200,250,1,15,0,0x000000,.01,0x999999,1,0x333333,.75,0x000000,1}}
${goto 5}${font jimi:size=15} gpu ${font Pseudo APL:Bold:size=14} ${goto 225}${nvidia temp}F${voffset 25}
${lua gradbar {15,987,"${platform it87.656 temp 2}",200,250,1,15,0,0x000000,.0,0x999999,1,0x333333,.5,0x000000,1}}


conky_weather
max_specials 10000
max_user_text 15000
background no
use_xft yes
xftfont sans:size=9
xftalpha 1
total_run_times 0
own_window yes
own_window_argb_visual no
own_window_transparent yes
own_window_type desktop
own_window_title conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 350 700
maximum_width 350
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_shade_color black
default_outline_color white
alignment top_middle
gap_x 200
gap_y 10
no_buffers yes
uppercase no
cpu_avg_samples 6
override_utf8_locale yes
text_buffer_size 100000
top_name_width 5
update_interval 1
default_color FFFFFF
temperature_unit fahrenheit
# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2
format_human_readable yes
short_units yes
update_interval 1
imlib_cache_size 0

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
temperature_unit Fahrenheit

### LUA Load ###
lua_load /home/luke/Conky/allcombined.lua


## lua funcions
## background ##################################################################
#${lua draw_bg {corner_radius,x_position,y_position,width,height,color,alpha,draw_type,line_width,outline_color,outline_alpha}}
#note for background: set width=0 - width will be conky window width, set height=0 - height will be conky window height
# draw_type: 1=fill, 2=outline(must specify line_width), 3=outline and fill (must specify line_width, outline_color and outline_alpha)
## gradient bars ###############################################################
#${lua gradbar {x_position,y_position,"conky_object",object_max_value,number_of_divisions,division_width,division_height,division_gap,bg_color,bg_alpha,start_color,start_alpha,mid_color,mid_alpha,end_color,end_alpha}}
## calendar ###############################################################
#${lua luacal {x_position,y_position,"title_font",title_fontsize,title_color,title_alpha,"dates_font",dates_fontsize,dates_color,dates_alpha,"highlight_font",highlight_fontsize,highlight_color,highlight_alpha,"spacer",colum_gap,title_gap,row_gap,start_day}
#note for calendar: start day... 0=sunday, 1=monday ... "spacer" can help align calendar with non fix width fonts
## textured background ###############################################################
#${lua tex_bg {corner_radius,x_position,y_position,width,height,"/path/to/texture.png"}}
## lua draw images ###############################################################
#${lua luaimage {x_position,y_position,width,height,"/path/to/image"}}
#note for images: set width=0 - width will be image width, set height=0 - height will be image height
## lua draw text ###############################################################
#${lua luatext {x_position,y_position,color,alpha,"font",fontsize,"justify"}}
#note for text: justify can be "r" = right, "c" = center, "l" = left
#${lua draw_bg {10,0,0,0,0,0x000000,0.3}}
${lua draw_bg {25,0,0,0,0,0x000000,0.3}}
TEXT
#${image /home/luke/Conky/weather.png -s 225x90 -p 75,5}${lua draw_bg {25,0,0,0,0,0xFFFFFF,0.05}}
${lua tex_bg {30,2,1,358,700,"/home/luke/Conky/brushed2.png"}}${lua draw_bg {30,0,0,360,702,0x000000,.75,2,2}}${image /home/luke/Conky/thermometer.png -s 50x50 -p 20,18}

${goto 70}${font Pseudo APL:Bold:size=20}${texeci 500 bash $HOME/1b1_accuweather_images/1b1}${execpi 600 sed -n '29p' $HOME/1b1_accuweather_images/curr_cond}°F
${font jimi:size=15}${goto 10}Dawn${font Pseudo APL:bold:size=14} ${execpi 600 sed -n '39p' $HOME/1b1_accuweather_images/curr_cond}${image /home/luke/1b1_accuweather_images/cc.png -p 110,5 -s 260x180}
${font jimi:size=15}${goto 10}Dusk${font Pseudo APL:bold:size=14} ${execpi 600 sed -n '40p' $HOME/1b1_accuweather_images/curr_cond}
${font jimi:size=15}${goto 10}Rain${font Pseudo APL:bold:size=14} ${alignc 37}${font Sans:size=11}${execpi 600 sed -n '28p' $HOME/1b1_accuweather_images/first_days}
${font jimi:size=15}${goto 10}Clouds${font Pseudo APL:bold:size=14} ${alignc 37}${font Sans:size=11}${execpi 600 sed -n '35p' $HOME/1b1_accuweather_images/curr_cond}
#${font Pseudo APL:Bold:size=14}${goto 10}Wind ${alignc 37}${font Sans:size=11}${execpi 600 sed -n '31p' $HOME/1b1_accuweather_images/curr_cond} ${execpi 600 sed -n '32p' $HOME/1b1_accuweather_images/curr_cond}

${font Pseudo APL:Bold:size=12}${goto 25}${execpi 600 sed -n '5p' $HOME/1b1_accuweather_images/first_days}${goto 140}${execpi 600 sed -n '10p' $HOME/1b1_accuweather_images/first_days}${goto 260}${execpi 600 sed -n '15p' $HOME/1b1_accuweather_images/first_days}



${image $HOME/1b1_accuweather_images/6.png -p 0,180 -s 115x79}${image $HOME/1b1_accuweather_images/11.png -p 122,180 -s 115x79}${image $HOME/1b1_accuweather_images/16.png -p 242,180 -s 115x79}
${voffset 9}${font Pseudo APL:Bold:size=13}${goto 40}${execpi 600 sed -n '8p' $HOME/1b1_accuweather_images/first_days}°F${goto 160}${execpi 600 sed -n '13p' $HOME/1b1_accuweather_images/first_days}°F${goto 280}${execpi 600 sed -n '18p' $HOME/1b1_accuweather_images/first_days}°F${voffset -9}

${font Pseudo APL:Bold:size=12}${goto 25}${execpi 600 sed -n '20p' $HOME/1b1_accuweather_images/first_days}${goto 140}${execpi 600 sed -n '1p' $HOME/1b1_accuweather_images/last_days}${goto 260}${execpi 600 sed -n '6p' $HOME/1b1_accuweather_images/last_days}
${image $HOME/1b1_accuweather_images/21.png -p 0,300 -s 115x79}${image $HOME/1b1_accuweather_images/last_2.png -p 122,300 -s 115x79}${image $HOME/1b1_accuweather_images/last_7.png -p 242,300 -s 115x79}



${voffset 9}${font Pseudo APL:Bold:size=13}${goto 40}${execpi 600 sed -n '23p' $HOME/1b1_accuweather_images/first_days}°F${goto 160}${execpi 600 sed -n '4p' $HOME/1b1_accuweather_images/last_days}°F${goto 280}${execpi 600 sed -n '9p' $HOME/1b1_accuweather_images/last_days}°F${voffset -9}

${font Pseudo APL:bold:size=50}${alignc}${time %I}:${time %M}${time %P}
${voffset -35}${font Pseudo APL:Bold:size=31}${alignc}${time %a} ${time %D}${voffset 35}${color}
${voffset -25}${goto 5}${font jimi:size=40}Network${voffset 25}${lua gradbar {-15,572,"${memperc}",100,257,1,3,0,0xFFFFFF,1,0x999999,0,0x333333,0,0x000000,0}}${image /home/luke/Conky/up.png -s 30x30 -p 20,582}
${voffset -35}${goto 70}${font Pseudo APL:Bold:size=16}${upspeed eth0} ${voffset -8}${goto 163}${upspeedgraph 23,165 666666 000066}${voffset 8}
${image /home/luke/Conky/down.png -s 30x30 -p 20,630}
${goto 70}${font Pseudo APL:Bold:size=16}${downspeed eth0} ${voffset -8}${goto 163}${downspeedgraph 23,165 666666 000066}${voffset -75}


allcombined.lua
--[[ by mrpeachy -
combines background bar and calendar functions
]]
require 'cairo'
require 'imlib2'

function rgb_to_r_g_b(col_a)
return ((col_a[1] / 0x10000) % 0x100) / 255., ((col_a[1] / 0x100) % 0x100) / 255., (col_a[1] % 0x100) / 255., col_a[2]
end

function conky_gradbar(bartab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
local updates=tonumber(conky_parse('${updates}'))
if updates>5 then
--#########################################################################################################
--convert to table
local bartab=loadstring("return" .. bartab)()
local bar_startx=bartab[1]
local bar_starty=bartab[2]
local number=bartab[3]
local number=conky_parse(number)
local number_max=bartab[4]
local divisions=bartab[5]
local div_width=bartab[6]
local div_height=bartab[7]
local div_gap=bartab[8]
local bg_col=bartab[9]
local bg_alpha=bartab[10]
local st_col=bartab[11]
local st_alpha=bartab[12]
local mid_col=bartab[13]
local mid_alpha=bartab[14]
local end_col=bartab[15]
local end_alpha=bartab[16]
--color conversion
local br,bg,bb,ba=rgb_to_r_g_b({bg_col,bg_alpha})
local sr,sg,sb,sa=rgb_to_r_g_b({st_col,st_alpha})
local mr,mg,mb,ma=rgb_to_r_g_b({mid_col,mid_alpha})
local er,eg,eb,ea=rgb_to_r_g_b({end_col,end_alpha})
if number==nil then number=0 end
local number_divs=(number/number_max)*divisions
cairo_set_line_width (cr,div_width)
--gradient calculations
for i=1,divisions do
if i<(divisions/2) and i<=number_divs then
colr=((mr-sr)*(i/(divisions/2)))+sr
colg=((mg-sg)*(i/(divisions/2)))+sg
colb=((mb-sb)*(i/(divisions/2)))+sb
cola=((ma-sa)*(i/(divisions/2)))+sa
elseif i>=(divisions/2) and i<=number_divs then
colr=((er-mr)*((i-(divisions/2))/(divisions/2)))+mr
colg=((eg-mg)*((i-(divisions/2))/(divisions/2)))+mg
colb=((eb-mb)*((i-(divisions/2))/(divisions/2)))+mb
cola=((ea-ma)*((i-(divisions/2))/(divisions/2)))+ma
else
colr=br
colg=bg
colb=bb
cola=ba
end
cairo_set_source_rgba (cr,colr,colg,colb,cola)
cairo_move_to (cr,bar_startx+((div_width+div_gap)*i-1),bar_starty)
cairo_rel_line_to (cr,0,div_height)
cairo_stroke (cr)
end
--#########################################################################################################
end-- if updates>5
bartab=nil
colr=nil
colg=nil
colb=nil
cola=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_draw_bg(bgtab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--#########################################################################################################
--convert to table
local bgtab=loadstring("return" .. bgtab)()
local r=bgtab[1]
local x=bgtab[2]
local y=bgtab[3]
local w=bgtab[4]
local h=bgtab[5]
local color=bgtab[6]
local alpha=bgtab[7]
local draw=bgtab[8]
local lwidth=bgtab[9]
local olcolor=bgtab[10]
local olalpha=bgtab[11]
if w==0 then
w=tonumber(conky_window.width)
end
if h==0 then
h=tonumber(conky_window.height)
end
cairo_set_source_rgba (cr,rgb_to_r_g_b({color,alpha}))
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
--the drawing part---------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
if draw==1 then
cairo_fill (cr)
elseif draw==2 then
cairo_set_line_width (cr,lwidth)
cairo_stroke (cr)
elseif draw==3 then
cairo_fill_preserve (cr)
cairo_set_source_rgba (cr,rgb_to_r_g_b({olcolor,olalpha}))
cairo_set_line_width (cr,lwidth)
cairo_stroke (cr)
end
--#########################################################################################################
bgtab=nil
w=nil
h=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_luacal(caltab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--####################################################################################################
local caltab=loadstring("return" .. caltab)()
local cal_x=caltab[1]
local cal_y=caltab[2]
local tfont=caltab[3]
local tfontsize=caltab[4]
local tc=caltab[5]
local ta=caltab[6]
local bfont=caltab[7]
local bfontsize=caltab[8]
local bc=caltab[9]
local ba=caltab[10]
local hfont=caltab[11]
local hfontsize=caltab[12]
local hc=caltab[13]
local ha=caltab[14]
local spacer=caltab[15]
local gaph=caltab[16]
local gapt=caltab[17]
local gapl=caltab[18]
local sday=caltab[19]
--convert colors
--local font=string.gsub(font,"_"," ")
local tred,tgreen,tblue,talpha=rgb_to_r_g_b({tc,ta})
--main body text color
local bred,bgreen,bblue,balpha=rgb_to_r_g_b({bc,ba})
--highlight text color
local hred,hgreen,hblue,halpha=rgb_to_r_g_b({hc,ha})
--###################################################
--calendar calcs
local year=os.date("%G")
local today=tonumber(os.date("%d"))
local t1 = os.time( {    year=year,month=03,day=01,hour=00,min=0,sec=0} );
local t2 = os.time( {    year=year,month=02,day=01,hour=00,min=0,sec=0} );
local feb=(os.difftime(t1,t2))/(24*60*60)
local monthdays={ 31, feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
local day=tonumber(os.date("%w"))+1-sday
local day_num = today
local remainder=day_num % 7
local start_day=day-(day_num % 7)
if start_day<0 then start_day=7+start_day end     
local month=os.date("%m")
local mdays=monthdays[tonumber(month)]
local x=mdays+start_day
local dnum={}
local dnumh={}
if mdays+start_day<36 then
dlen=35
plen=29
else
dlen=42
plen=36
end
for i=1,dlen do
if i<=start_day then
dnum[i]="  "
else
dn=i-start_day
if dn=="nil" then dn=0 end
if dn<=9 then dn=(spacer .. dn) end
if i>x then dn="" end
dnum[i]=dn
dnumh[i]=dn
if dn==(spacer .. today) or dn==today then
dnum[i]=""
end
if dn==(spacer .. today) or dn==today then
dnumh[i]=dn
place=i
else dnumh[i]="  "
end
end
end--for
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
if tonumber(sday)==0 then
dys={"SU","MO","TU","WE","TH","FR","SA"}
else
dys={"MO","TU","WE","TH","FR","SA","SU"}
end
--draw calendar titles
for i=1,7 do
cairo_move_to (cr, cal_x+(gaph*(i-1)), cal_y)
cairo_show_text (cr, dys[i])
cairo_stroke (cr)
end
--draw calendar body
cairo_select_font_face (cr, bfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, bfontsize);
cairo_set_source_rgba (cr,bred,bgreen,bblue,balpha)
for i=1,plen,7 do
local fn=i
for i=fn,fn+6 do
cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
cairo_show_text (cr, dnum[i])
cairo_stroke (cr)
end
end
--highlight
cairo_select_font_face (cr, hfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, hfontsize);
cairo_set_source_rgba (cr,hred,hgreen,hblue,halpha)
for i=1,plen,7 do
local fn=i
for i=fn,fn+6 do
cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
cairo_show_text (cr, dnumh[i])
cairo_stroke (cr)
end
end
--#########################################################################################################
caltab=nil
dlen=nil
plen=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_luaimage(imtab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--#########################################################################################################
local imtab=loadstring("return" .. imtab)()
local im_x=imtab[1]
local im_y=imtab[2]
local im_w=imtab[3]
local im_h=imtab[4]
local file=imtab[5]
local show = imlib_load_image(file)
if show == nil then return end
imlib_context_set_image(show)
if tonumber(im_w)==0 then
width=imlib_image_get_width()
else
width=tonumber(im_w)
end
if tonumber(im_h)==0 then
height=imlib_image_get_height()
else
height=tonumber(im_h)
end
imlib_context_set_image(show)
local scaled=imlib_create_cropped_scaled_image(0, 0, imlib_image_get_width(), imlib_image_get_height(), width, height)
imlib_free_image()
imlib_context_set_image(scaled)
imlib_render_image_on_drawable(im_x, im_y)
imlib_free_image()
show=nil
--#########################################################################################################
imtab=nil
height=nil
width=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_tex_bg(textab)
local textab=loadstring("return" .. textab)()
local tex_file=textab[6]
local surface = cairo_image_surface_create_from_png(tostring(tex_file))
local cw,ch = conky_window.width, conky_window.height
local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, cw,ch)
local cr=cairo_create(cs)
--#########################################################################################################
--convert to table
local r=textab[1]
local x=textab[2]
local y=textab[3]
local w=textab[4]
local h=textab[5]
if w=="0" then
w=cw
end
if h=="0" then
h=ch
end
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
--the drawing part---------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_clip (cr)
cairo_new_path (cr);
--image part
cairo_set_source_surface (cr, surface, 0, 0)
cairo_paint (cr)
--#########################################################################################################
textab=nil
w=nil
h=nil
cairo_destroy(cr)
cairo_surface_destroy (cs)
cairo_surface_destroy (surface)
cr=nil
return ""
end-- end main function

function conky_luatext(txttab)--x,y,c,a,f,fs,txt,j ##################################################
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--#########################################################################################################
--convert to table
local txttab=loadstring("return" .. txttab)()
local x=txttab[1]
local y=txttab[2]
local c=txttab[3]
local a=txttab[4]
local f=txttab[5]
local fs=txttab[6]
local j=txttab[7]
local txt=txttab[8]
cairo_select_font_face (cr, f, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, fs)
local extents=cairo_text_extents_t:create()
cairo_text_extents(cr,txt,extents)
local wx=extents.x_advance
cairo_set_source_rgba (cr,rgb_to_r_g_b({c,a}))
if j=="l" then
cairo_move_to (cr,x,y)
elseif j=="c" then
cairo_move_to (cr,x-(wx/2),y)
elseif j=="r" then
cairo_move_to (cr,x-wx,y)
end
cairo_show_text (cr,txt)
cairo_stroke (cr)
--#########################################################################################################
txttab=nil
cairo_destroy(cr)
cairo_surface_destroy (cs)
cr=nil
return ""
end-- end main function


The weather script,images and font can be found here (https://www.dropbox.com/s/2051u1n9vqcvi0z/jimi_conky_images.tar.gz)

Extract the 1b1_accuweather_images folder from the archive directly to your home folder and then extract the up,down and thermometer images wherever you want but you will have to change the path withing the conky_weather config to line up with where you put them.
Extract the font to ~/.fonts and then restart conky.

And finally the wallpaper

(http://ompldr.org/taHd5aA) (http://ompldr.org/vaHd5aA/jimi_hendrix.png)


####allcombined.lua is by mrpeachy#####
####The accuweather script is by TeoBigusGeekus and the original scripts and images can be found here  (http://crunchbang.org/forums/viewtopic.php?id=19235)####

The accuweather url will have to be changed within the accuweather script. Theres a read me pdf within that folder that will tell you how to do that if need be. The images provided in my archive are edited versions of Teo's images.
Title: fkn flicker!
Post by: dizzie on March 31, 2013, 01:43:38 PM
OH hai! *licks screen*

I have a problem that is driving me slightly insane....
Same OS, same conky same everything, On my main desktop, conky is behaving as it should be.
On my laptop however... not so much.
Conky is flickering/blinking like a fucking trafficlight, and YES i have the double buffer/own windiws etc etc, still...
Works perfekt on both my desktops, NOT on my laptop (Desktops has nvidia, laptop has Intel onboard crap) Only reason i have found to cause this :D

Any suggestions? Calling me an idiot isnt one  8)
Title: Re: fkn flicker!
Post by: Sector11 on March 31, 2013, 02:29:48 PM
Is callin' ya late for cake allowed?  lwfitz ate the last piece honest!   ::)

Screen res of smallest desktop (I can hear it now: 1920x1200) and lappy please.
Also ... no code ... no help.

inxi vid specs of desktop and lappy 'might' help as well.
31 Mar 13 | 11:27:47 ~
         $ vid
Graphics:  Card: NVIDIA GT218 [GeForce 210] bus-ID: 02:00.0 chip-ID: 10de:0a65
           X.Org: 1.12.4 driver: nvidia Resolution: 1920x1080@60.0hz
           GLX Renderer: GeForce 210/PCIe/SSE2 GLX Version: 3.3.0 NVIDIA 313.26 Direct Rendering: Yes

31 Mar 13 | 11:28:02 ~
         $


1. Start the lappy conky in a terminal ... what errors do you get if any?
2. Barring that eliminate everything under TEXT on the lappy conky and re-add one line at a time until it starts blinking.
Title: Re: fkn flicker!
Post by: dizzie on March 31, 2013, 03:46:02 PM

Works :Graphics:  Card: NVIDIA GK107 [GeForce GT 640] X.Org: 1.12.4 driver: nvidia Resolution: 1920x1080@60.0hz
Works:
Graphics:  Card: NVIDIA G80 [GeForce 8800 GTS] X.org: 1.12.4 driver: nvidia tty size: 80x24 Advanced Data: N/A out of X
Doesnt Work:
Graphics:  Card: Intel 2nd Generation Core Processor Family Integrated Graphics Controller  X.org: 1.12.4 driver: intel tty size: 80x24 Advanced Data: N/A out of X


Conky stuff (that works 2 of 3 lol )


conkyrc:
Quote



#==============================================================================
#  Conky thingamabob
#
#  Date    : 03/08/2011
#  author  : dizzie & original by xeNULL
#  version : v0.2
#  license : Distributed under the terms of GNU GPL version 2 or later
#
#==============================================================================


background yes
update_interval 1


cpu_avg_samples 2
net_avg_samples 2
temperature_unit celsius
short_units yes


double_buffer yes
no_buffers yes
text_buffer_size 2048


gap_x 25
gap_y 40


minimum_size 180 750
maximum_width 180
own_window yes
own_window_type desktop
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
border_inner_margin 0
border_outer_margin 0
alignment tr


draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no


default_bar_size 150 20


override_utf8_locale yes
use_xft yes
xftfont Pragmata:9
xftalpha 0.5
uppercase no


default_color FFFFFF
color1 DDDDDD
color2 AAAAAA
color3 888888
color4 FFFFFF


lua_load ~/.config/conky/ConkyHXR.lua
lua_draw_hook_post main


TEXT
${voffset 25}${font Pragmata:size=9} /// S Y S T E M ///


${voffset 25}${color4}${offset 55}${cpugraph 20,115 999999 ffffff}${color}
${voffset -20}${offset 45}${font Pragmata:size=9}${color}CPU${offset 65}
${offset 55}${font Pragmata:size=8,weight:normal}${color4}${top name 1}${alignr}${top cpu 1}%
${offset 55}${font Pragmata:size=8,weight:normal}${color1}${top name 2}${alignr}${top cpu 2}%
${offset 55}${font Pragmata:size=8,weight:normal}${color2}${top name 3}${alignr}${top cpu 3}%
${offset 55}${font Pragmata:size=8,weight:normal}${color3}${top name 4}${alignr}${top cpu 4}%
${offset 55}${font Pragmata:size=8,weight:normal}${color3}${top name 5}${alignr}${top cpu 5}%


${voffset 30}${color4}${offset 55}${memgraph 5,115  999999 ffffff -l}${color}
${voffset -15}${offset 45}${font Pragmata:size=9}${color}MEM
${offset 55}${font Pragmata:size=8,weight:normal}${color4}${top_mem name 1}${alignr}${top_mem mem 1}%
${offset 55}${font Pragmata:size=8,weight:normal}${color1}${top_mem name 2}${alignr}${top_mem mem 2}%
${offset 55}${font Pragmata:size=8,weight:normal}${color2}${top_mem name 3}${alignr}${top_mem mem 3}%
${offset 55}${font Pragmata:size=8,weight:normal}${color3}${top_mem name 4}${alignr}${top_mem mem 4}%
${offset 55}${font Pragmata:size=8,weight:normal}${color3}${top_mem name 4}${alignr}${top_mem mem 5}%


${voffset 25}${offset 55}${diskiograph 20,115 999999 ffffff}
${voffset -20}${offset 45}${font Pragmata:size=9}${color}DISK
${offset 55}${font Pragmata:size=8,weight:normal${alignr}}${color}- ${fs_used /} -  ${fs_size /}
${offset 55}${font Pragmata:size=8,weight:normal${alignr}}${color}~ ${fs_used /home} -  ${fs_size /home}
${offset 55}${font Pragmata:size=8,weight:normal${alignr}}${color}@ ${fs_used /mnt/srv} -  ${fs_size /mnt/srv}
${offset 55}${font Pragmata:size=8,weight:normal${alignr}}${color}¥ ${fs_used /mnt/backup} -  ${fs_size /mnt/backup}


${voffset 5}${color4}${offset 10}${upspeedgraph eth0 20,70 999999 ffffff}${alignr}${offset 0}${upspeedgraph wlan0 20,70 999999 ffffff}${color}
${color4}${offset 10}${downspeedgraph eth0 20,70 999999 ffffff}${alignr}${offset 0}${downspeedgraph wlan0 20,70 999999 ffffff}${color}
  ${voffset 8}${offset 10}${font Pragmata:size=9}${color}ETHERNET IP         ROUTER IP
  ${offset 10}${color2}${font Pragmata:size=8,weight:normal}${addr eth0}${alignr}${offset -10}${gw_ip}


${voffset 42}${offset 45}${font Pragmata:size=9}${color4}MUSIC${color}
${offset 55}${hr}
${font Pragmata:size=8}${offset 55}${color4}Song${color}
${offset 55}${color3}${exec mocp -Q %song}${color}
${offset 55}${color4}Artist${color}
${offset 55}${color3}${exec mocp -Q %artist}${color}
${offset 55}${color4}Album${color}
${offset 55}${color3}${exec mocp -Q %album}${color}
${offset 55}${hr}
${offset 55}${alignr}${color3}${exec mocp -Q %ct} - ${exec mocp -Q %tt}${color}
${voffset -12}${offset 55}${blink ${color4}${exec mocp -Q %state}${color}


${image ~/.config/conky/rin.png -p 70,655 -s 100x100}


ConkyHXR.lua
Quote

--==============================================================================
--  ConkyHXR.lua
--
--  Date    : 03/08/2011
--  Author  : xeNULL
--  Version : v0.1
--  License : Distributed under the terms of GNU GPL version 2 or later
--
--==============================================================================


require 'cairo'


--------------------------------------------------------------------------------
--                                                                    gauge DATA
gauge = {
{
    name='cpu',                    arg='cpu0',                  max_value=100,
    x=40,                          y=90,
    graph_radius=24,
    graph_thickness=5,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.3,
    graph_fg_colour=0x111111,      graph_fg_alpha=0.5,
    hand_fg_colour=0xFFFFFF,       hand_fg_alpha=1.0,
    txt_radius=34,
    txt_weight=0,                  txt_size=8.0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=1.0,
    graduation_radius=28,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.3,
},
{
    name='cpu',                    arg='cpu1',                  max_value=100,
    x=40,                          y=90,
    graph_radius=18,
    graph_thickness=5,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.3,
    graph_fg_colour=0x111111,      graph_fg_alpha=0.5,
    hand_fg_colour=0xFFFFFF,       hand_fg_alpha=1.0,
    txt_radius=10,
    txt_weight=0,                  txt_size=8.0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=1.0,
    graduation_radius=28,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.3,
},
{
    name='memperc',                arg='',                      max_value=100,
    x=40,                          y=210,
    graph_radius=24,
    graph_thickness=5,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.3,
    graph_fg_colour=0x111111,      graph_fg_alpha=0.5,
    hand_fg_colour=0xFFFFFF,       hand_fg_alpha=1.0,
    txt_radius=34,
    txt_weight=0,                  txt_size=8.0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=1.0,
    graduation_radius=23,
    graduation_thickness=0,        graduation_mark_thickness=2,
    graduation_unit_angle=27,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.5,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.3,
},
{
    name='fs_used_perc',           arg='/',                     max_value=100,
    x=40,                          y=340,
    graph_radius=24,
    graph_thickness=5,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.3,
    graph_fg_colour=0x111111,      graph_fg_alpha=0.5,
    hand_fg_colour=0xFFFFFF,       hand_fg_alpha=1.0,
    txt_radius=34,
    txt_weight=0,                  txt_size=8.0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=1.0,
    graduation_radius=23,
    graduation_thickness=0,        graduation_mark_thickness=2,
    graduation_unit_angle=27,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.5,
},
{
    name='downspeedf',           arg='eth0',                     max_value=100,
    x=40,                          y=425,
    graph_radius=24,
    graph_thickness=5,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.3,
    graph_fg_colour=0x111111,      graph_fg_alpha=0.5,
    hand_fg_colour=0xFFFFFF,       hand_fg_alpha=1.0,
    txt_radius=34,
    txt_weight=0,                  txt_size=8.0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=1.0,
    graduation_radius=28,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    caption='Down',
    caption_weight=1,              caption_size=6.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.5,
},
{
    name='upspeedf',           arg='eth0',                     max_value=100,
    x=40,                          y=425,
    graph_radius=18,
    graph_thickness=5,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.3,
    graph_fg_colour=0x111111,      graph_fg_alpha=0.5,
    hand_fg_colour=0xFFFFFF,       hand_fg_alpha=1.0,
    txt_radius=10,
    txt_weight=0,                  txt_size=8.0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=1.0,
    graduation_radius=28,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    caption='Up',
    caption_weight=1,              caption_size=6.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.5,
},
{
    name='downspeedf',           arg='wlan0',                     max_value=100,
    x=135,                          y=425,
    graph_radius=24,
    graph_thickness=5,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.3,
    graph_fg_colour=0x111111,      graph_fg_alpha=0.5,
    hand_fg_colour=0xFFFFFF,       hand_fg_alpha=1.0,
    txt_radius=34,
    txt_weight=0,                  txt_size=8.0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=1.0,
    graduation_radius=28,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    caption='Down',
    caption_weight=1,              caption_size=6.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.5,
},
{
    name='upspeedf',           arg='wlan0',                     max_value=100,
    x=135,                          y=425,
    graph_radius=18,
    graph_thickness=5,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.3,
    graph_fg_colour=0x111111,      graph_fg_alpha=0.5,
    hand_fg_colour=0xFFFFFF,       hand_fg_alpha=1.0,
    txt_radius=10,
    txt_weight=0,                  txt_size=8.0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=1.0,
    graduation_radius=28,
    graduation_thickness=0,        graduation_mark_thickness=1,
    graduation_unit_angle=27,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    caption='Up',
    caption_weight=1,              caption_size=6.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.5,
},
{
    name='mixer',                arg='Master',                      max_value=100,
    x=40,                          y=542,
    graph_radius=24,
    graph_thickness=5,
    graph_start_angle=180,
    graph_unit_angle=2.7,          graph_unit_thickness=2.7,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.3,
    graph_fg_colour=0x111111,      graph_fg_alpha=0.5,
    hand_fg_colour=0xFFFFFF,       hand_fg_alpha=1.0,
    txt_radius=34,
    txt_weight=0,                  txt_size=8.0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=1.0,
    graduation_radius=23,
    graduation_thickness=0,        graduation_mark_thickness=2,
    graduation_unit_angle=27,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.5,
    caption='',
    caption_weight=1,              caption_size=8.0,
    caption_fg_colour=0xFFFFFF,    caption_fg_alpha=0.3,
},
}


-------------------------------------------------------------------------------
--                                                                 rgb_to_r_g_b
-- converts color in hexa to decimal
--
function rgb_to_r_g_b(colour, alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end


-------------------------------------------------------------------------------
--                                                            angle_to_position
-- convert degree to rad and rotate (0 degree is top/north)
--
function angle_to_position(start_angle, current_angle)
    local pos = current_angle + start_angle
    return ( ( pos * (2 * math.pi / 360) ) - (math.pi / 2) )
end




-------------------------------------------------------------------------------
--                                                              draw_gauge_ring
-- displays gauges
--
function draw_gauge_ring(display, data, value)
    local max_value = data['max_value']
    local x, y = data['x'], data['y']
    local graph_radius = data['graph_radius']
    local graph_thickness, graph_unit_thickness = data['graph_thickness'], data['graph_unit_thickness']
    local graph_start_angle = data['graph_start_angle']
    local graph_unit_angle = data['graph_unit_angle']
    local graph_bg_colour, graph_bg_alpha = data['graph_bg_colour'], data['graph_bg_alpha']
    local graph_fg_colour, graph_fg_alpha = data['graph_fg_colour'], data['graph_fg_alpha']
    local hand_fg_colour, hand_fg_alpha = data['hand_fg_colour'], data['hand_fg_alpha']
    local graph_end_angle = (max_value * graph_unit_angle) % 360


    -- background ring
    cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, 0), angle_to_position(graph_start_angle, graph_end_angle))
    cairo_set_source_rgba(display, rgb_to_r_g_b(graph_bg_colour, graph_bg_alpha))
    cairo_set_line_width(display, graph_thickness)
    cairo_stroke(display)


    -- arc of value
    local val = value % (max_value + 1)
    local start_arc = 0
    local stop_arc = 0
    local i = 1
    while i <= val do
        start_arc = (graph_unit_angle * i) - graph_unit_thickness
        stop_arc = (graph_unit_angle * i)
        cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
        cairo_set_source_rgba(display, rgb_to_r_g_b(graph_fg_colour, graph_fg_alpha))
        cairo_stroke(display)
        i = i + 1
    end
    local angle = start_arc


    -- hand
    start_arc = (graph_unit_angle * val) - (graph_unit_thickness * 2)
    stop_arc = (graph_unit_angle * val)
    cairo_arc(display, x, y, graph_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
    cairo_set_source_rgba(display, rgb_to_r_g_b(hand_fg_colour, hand_fg_alpha))
    cairo_stroke(display)


    -- graduations marks
    local graduation_radius = data['graduation_radius']
    local graduation_thickness, graduation_mark_thickness = data['graduation_thickness'], data['graduation_mark_thickness']
    local graduation_unit_angle = data['graduation_unit_angle']
    local graduation_fg_colour, graduation_fg_alpha = data['graduation_fg_colour'], data['graduation_fg_alpha']
    if graduation_radius > 0 and graduation_thickness > 0 and graduation_unit_angle > 0 then
        local nb_graduation = graph_end_angle / graduation_unit_angle
        local i = 0
        while i < nb_graduation do
            cairo_set_line_width(display, graduation_thickness)
            start_arc = (graduation_unit_angle * i) - (graduation_mark_thickness / 2)
            stop_arc = (graduation_unit_angle * i) + (graduation_mark_thickness / 2)
            cairo_arc(display, x, y, graduation_radius, angle_to_position(graph_start_angle, start_arc), angle_to_position(graph_start_angle, stop_arc))
            cairo_set_source_rgba(display,rgb_to_r_g_b(graduation_fg_colour,graduation_fg_alpha))
            cairo_stroke(display)
            cairo_set_line_width(display, graph_thickness)
            i = i + 1
        end
    end


    -- text
    local txt_radius = data['txt_radius']
    local txt_weight, txt_size = data['txt_weight'], data['txt_size']
    local txt_fg_colour, txt_fg_alpha = data['txt_fg_colour'], data['txt_fg_alpha']
    local movex = txt_radius * math.cos(angle_to_position(graph_start_angle, angle))
    local movey = txt_radius * math.sin(angle_to_position(graph_start_angle, angle))
    cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, txt_weight)
    cairo_set_font_size (display, txt_size)
    cairo_set_source_rgba (display, rgb_to_r_g_b(txt_fg_colour, txt_fg_alpha))
    cairo_move_to (display, x + movex - (txt_size / 2), y + movey + 3)
    cairo_show_text (display, value)
    cairo_stroke (display)


    -- caption
    local caption = data['caption']
    local caption_weight, caption_size = data['caption_weight'], data['caption_size']
    local caption_fg_colour, caption_fg_alpha = data['caption_fg_colour'], data['caption_fg_alpha']
    local tox = graph_radius * (math.cos((graph_start_angle * 2 * math.pi / 360)-(math.pi/2)))
    local toy = graph_radius * (math.sin((graph_start_angle * 2 * math.pi / 360)-(math.pi/2)))
    cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, caption_weight);
    cairo_set_font_size (display, caption_size)
    cairo_set_source_rgba (display, rgb_to_r_g_b(caption_fg_colour, caption_fg_alpha))
    cairo_move_to (display, x + tox + 5, y + toy + 1)
    -- bad hack but not enough time !
    if graph_start_angle < 105 then
        cairo_move_to (display, x + tox - 30, y + toy + 1)
    end
    cairo_show_text (display, caption)
    cairo_stroke (display)
end




-------------------------------------------------------------------------------
--                                                               go_gauge_rings
-- loads data and displays gauges
--
function go_gauge_rings(display)
    local function load_gauge_rings(display, data)
        local str, value = '', 0
        str = string.format('${%s %s}',data['name'], data['arg'])
        str = conky_parse(str)
        value = tonumber(str)
        draw_gauge_ring(display, data, value)
    end
   
    for i in pairs(gauge) do
        load_gauge_rings(display, gauge)
    end
end


-------------------------------------------------------------------------------
--                                                                         MAIN
function conky_main()
    if conky_window == nil then
        return
    end


    local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
    local display = cairo_create(cs)
   
    local updates = conky_parse('${updates}')
    update_num = tonumber(updates)
   
    if update_num > 5 then
        go_gauge_rings(display)
    end


    cairo_surface_destroy(cs)
    cairo_destroy(display)


end
Title: Re: fkn flicker!
Post by: Sector11 on March 31, 2013, 05:59:14 PM
I'm going to guess that you did a copy/past thing with the lappy conky and or a bit of tweaking or it won't be working in the desktop either.

You have a few errors like this: start calling a font ---
${font Pragmata:size=8,weight:normal${alignr}}

and put the ${alignr} inside the closing font call in this section:
${voffset 25}${offset 55}${diskiograph 20,115 999999 ffffff}
${voffset -20}${offset 45}${font Pragmata:size=9}${color}DISK
${offset 55}${font Pragmata:size=8,weight:normal${alignr}}${color}- ${fs_used /} -  ${fs_size /}
${offset 55}${font Pragmata:size=8,weight:normal${alignr}}${color}~ ${fs_used /home} -  ${fs_size /home}
${offset 55}${font Pragmata:size=8,weight:normal${alignr}}${color}@ ${fs_used /mnt/srv} -  ${fs_size /mnt/srv}
${offset 55}${font Pragmata:size=8,weight:normal${alignr}}${color}¥ ${fs_used /mnt/backup} -  ${fs_size /mnt/backup}


I found it with this error:
31 Mar 13 | 14:10:29 ~
         $ conky -c /media/5/conky/dizzie.conky &
[1] 868

31 Mar 13 | 14:26:10 ~
         $ Conky: forked to background, pid is 873

Conky: desktop window (264) is root window
Conky: window type - desktop
Conky: drawing to created window (0x1800001)
Conky: drawing to double buffer
Conky: Oops...looks like something overflowed in add_font().


The corrected section:
${voffset 25}${offset 55}${diskiograph 20,115 999999 ffffff}
${voffset -20}${offset 45}${font Pragmata:size=9}${color}DISK
${offset 55}${font Pragmata:size=8}${alignr}${color}- ${fs_used /} -  ${fs_size /}
${offset 55}${alignr}${color}~ ${fs_used /home} -  ${fs_size /home}
${offset 55}${alignr}${color}@ ${fs_used /mnt/srv} -  ${fs_size /mnt/srv}
${offset 55}${alignr}${color}¥ ${fs_used /mnt/backup} -  ${fs_size /mnt/backup}


Note a couple of things:
  1. Once you call a font you do not need to call it again unless you change something.
  2. ",weight:normal" in a font does nothing.

Also try this on the lappy conky:

border_inner_margin 5
border_outer_margin 0

and change all ${alignr} to ${alignr 2} to move it off the edge of the conky
Title: Re: fkn flicker!
Post by: lwfitz on March 31, 2013, 07:19:59 PM
Great now I want F-ing cake.....

Ill look into this when I get home in just a bit. Minus what Sector told you I dont see any reason for it to flicker.
Title: Temperatures
Post by: jedi on April 05, 2013, 07:22:19 AM
OK, so I'd like to display the little temp symbol next to the number representing the actual temp of the hw i'm displaying in conky.  On some of them the symbol is right next to the number, while on others, it has a space between the number and the temp symbol.  Any ideas or advice appreciated!
Title: Re: Temperatures
Post by: dizzie on April 05, 2013, 07:25:52 AM
i had that too, i just went and used ${goto xx} sleesy, but it works for me :)
Title: Font - Spacing help
Post by: Sector11 on April 05, 2013, 01:08:01 PM
@ dizzie

LCDmono or LCDmono2 maybe - they act strangely in calendars for some reason.  Like Digital-7 (non-mono) stopped working properly - the top gets cut off ... but ${font Digital\-7:size=14} works perfect.  Something changed in the "system", an opinion. It's happening with most distros.

Probably not the laptop, but the font you are using.  If alignment or spacing is your main priority - use a mono font!
Been pushing that one for a long time.

Also if you add two lines above TEXT:
format_human_readable
QuoteIf enabled, values which are in bytes will be printed in human readable format (i.e., KiB, MiB, etc). If disabled, the number of bytes is printed instead.
Mind you if you want bytes ... don't use that.

and
short_units
QuoteShortens units to a single character (kiB->k, GiB->G, etc.). Default is off.

it will clean up your // Drives /// area - making use of ${goto xx} a lot easier.

RE The wallpaper;

I have that wall, it reminds me that to a quark I'm a whole universe ... to a universe I'm a quark.  Maybe our galaxy is a quark to another universe? Is that Rod Serling that just walked by?

Title: Re: Temperatures
Post by: Sector11 on April 05, 2013, 01:16:36 PM
↑ & ↑↑ not sleazy at all, I've used the same but for the past little while I've not needed it.

${font}Temperatures ${color7}${hr}${color}
${alignc}CPU  ${color5}${platform f71882fg.2560 temp 1}${color}°\
     MB  ${color5}${platform f71882fg.2560 temp 2}${color}°
${alignc}GPU  ${color5}${nvidia temp}${color}°\
     HD  ${color5}${execi 5 hddtemp -n /dev/sda}${color}°


What commands are you using that you require a goto?
Title: Re: Conky Codes and Images
Post by: Sector11 on April 05, 2013, 05:07:44 PM
@ Dizzie's request

1920x1080
(http://t.imgbox.com/aduq8bTX.jpg) (http://imgbox.com/aduq8bTX)

The top oneliner with a second line on the right only:
# killall conky && conky -c /media/5/Conky/S11_Conky_Desktop_top &
###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,sticky,below,skip_taskbar,skip_pager
own_window_colour gray
own_window_class Conky
own_window_title Simple

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type normal
# own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
# own_window_argb_value 0

minimum_size 1900 0     ## width, height
maximum_width 1900     ## width, usually a good idea to equal minimum width

gap_x 10 # left-right
gap_y 0 # up-down

alignment top_left  #bottom_left
###################################################  End Window Settings  ###
###  Font Settings  #########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont monofur:bold:size=16
#xftfont Anonymous Pro:bold:size=8
#xftfont CorporateMonoExtraBold:size=8

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################

draw_shades yes
default_shade_color black

draw_outline no # amplifies text if yes
default_outline_color black

default_color FFDEAD #255 222 173 NavajoWhite DCDCDC #220 220 220 Gainsboro
color0 8FBC8F #143 188 143 DarkSeaGreen
color1 778899 #119 136 153 LightSlateGray
color2 FF8C00 #255 140   0 DarkOrange
color3 62C2C2 #098 194 194 S11 Light Green #7FFF00 #127 255   0 Chartreuse
color4 FFA07A #255 160 122 LightSalmon
color5 FFDEAD #255 222 173 NavajoWhite
color6 00BFFF #  0 191 255 DeepSkyBlue
color7 00FFFF #  0 255 255 Cyan
color8 FFFF00 #255 255   0 Yellow
color9 B22222 #178  34  34 FireBrick
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders no #yes
#default_graph_size 15 40
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################
# Boolean value, if true, Conky will be forked to background when started.
background yes

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 1028

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
# temperature_unit Fahrenheit

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load /media/5/Conky/LUA/draw-bg.lua
#TEXT
#${lua conky_draw_bg 10 0 0 0 0 0x000000 0.2}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
#lua_load /media/5/Conky/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 0 0 0 0 0 0x000000 0.1
# lua_draw_hook_post draw-bg 125 0 0 0 0 0x000000 0.01
#
# TEXT
#
### mount.lua ##################################################################
#
##instructions
##load script
##lua_load ~/path_to/mounted.lua
lua_load /media/5/Conky/LUA/mounted.lua
## first lua command below text:
## ${lua get_mounted_data interval}, where interval is a number.  This starts data gathering
## to get output:
## ${lua mount partition_number data_type}, where partition number is a number
## data_type can be
## total - shows total number of partitions mounted, requires a partition_number also, use 1, could be used in an if_match
## fsys - shows filesystem
## size - shows space used in appropriate units
## free - shows free space in appropriate units
## use% - shows % used
## mount - shows mountpoint
#######################################################  End LUA Settings  ###
# The all important - How often conky refreshes.
# If you have a "Crey" try: 0.2 - smokin' - but watch the CPU useage go UP!
update_interval 1

TEXT
| ${time %a %x | %T} | ${uptime_short}${goto 416}|\
CPU % Avg=${color5}${if_match ${cpu cpu0} < 10}${color1}00${color}${cpu cpu0}\
${else}${if_match ${cpu cpu0} < 100}${color1}0${color}${cpu cpu0}\
${else}${cpu cpu0}${endif}${endif}\
1=${color5}${if_match ${cpu cpu1} < 10}${color1}00${color}${cpu cpu1}\
${else}${if_match ${cpu cpu1} < 100}${color1}0${color}${cpu cpu1}\
${else}${cpu cpu1}${endif}${endif}\
2=${color5}${if_match ${cpu cpu2} < 10}${color1}00${color}${cpu cpu2}\
${else}${if_match ${cpu cpu2} < 100}${color1}0${color}${cpu cpu2}\
${else}${cpu cpu2}${endif}${endif}\
3=${color5}${if_match ${cpu cpu3} < 10}${color1}00${color}${cpu cpu3}\
${else}${if_match ${cpu cpu3} < 100}${color1}0${color}${cpu cpu3}\
${else}${cpu cpu3}${endif}${endif}${color} |\
RAM ${mem} / ${memmax} |\
SDA Read ${diskio_read sda}${goto 1107}|  SDA Write ${diskio_write sda}${goto 1298}|\
eth0 Down ${downspeedf eth0}${goto 1510}| Up ${upspeedf eth0}${goto 1630}|\
${goto 1655}${nodename} desktop ${desktop} of ${desktop_number} |
${alignr 1}| ${kernel} | ${machine} | ${freq_g} GHz |

Title: Re: Conky Codes and Images
Post by: Sector11 on April 05, 2013, 05:10:46 PM
@ lwfitz - Hey - both nice ones!
Title: Re: Conky Codes and Images
Post by: Sector11 on April 05, 2013, 06:49:12 PM
This is my current setup as of last night.
(http://i.imgur.com/P3fwM7ll.jpg) (http://imgur.com/P3fwM7l)
1920x1080

Title: Re: Conky Codes and Images
Post by: dizzie on April 05, 2013, 07:09:15 PM
@S11, very nice :) When i am done with this migraine i will play around with it
Title: Re: Conky Codes and Images
Post by: Sector11 on April 05, 2013, 07:18:22 PM
Oooooooooo been there, had those, would not wish one on my worst enemy.

Stay cool, stay dark ... see ya when come back.
Title: Re: Conky Codes and Images
Post by: Sector11 on April 05, 2013, 09:36:05 PM
@ dizzie ....

Thought I'd play while you were cool|dark ...
(http://i.imgur.com/keUCh6vl.png) (http://imgur.com/keUCh6v)
Grey area is your lappy size

The test conky:
# killall conky && conky -c /media/5/Conky/S11_Conky_Desktop_dizzie &
###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,sticky,below,skip_taskbar,skip_pager
own_window_colour gray
own_window_class Conky
own_window_title Simple

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type normal
# own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
# own_window_argb_value 0

minimum_size 1900 0     ## width, height
maximum_width 1900     ## width, usually a good idea to equal minimum width

##minimum_size 1346 0     ## width, height
##maximum_width 1346     ## width, usually a good idea to equal minimum width

gap_x 10 # left-right
gap_y 10 # up-down

alignment top_left  #bottom_left
###################################################  End Window Settings  ###
###  Font Settings  #########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
##xftfont monofur:bold:size=16
xftfont monofur:bold:size=12

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################

draw_shades yes
default_shade_color black

draw_outline no # amplifies text if yes
default_outline_color black

default_color FFDEAD #255 222 173 NavajoWhite DCDCDC #220 220 220 Gainsboro
color0 8FBC8F #143 188 143 DarkSeaGreen
color1 778899 #119 136 153 LightSlateGray
color2 FF8C00 #255 140   0 DarkOrange
color3 62C2C2 #098 194 194 S11 Light Green #7FFF00 #127 255   0 Chartreuse
color4 FFA07A #255 160 122 LightSalmon
color5 FFDEAD #255 222 173 NavajoWhite
color6 00BFFF #  0 191 255 DeepSkyBlue
color7 00FFFF #  0 255 255 Cyan
color8 FFFF00 #255 255   0 Yellow
color9 B22222 #178  34  34 FireBrick
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders no #yes
#default_graph_size 15 40
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################
# Boolean value, if true, Conky will be forked to background when started.
background yes

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 1028

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
# temperature_unit Fahrenheit

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load /media/5/Conky/LUA/draw-bg.lua
#TEXT
#${lua conky_draw_bg 10 0 0 0 0 0x000000 0.2}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
#lua_load /media/5/Conky/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 0 0 0 0 0 0x000000 0.1
# lua_draw_hook_post draw-bg 125 0 0 0 0 0x000000 0.01
#
# TEXT
#
### mount.lua ##################################################################
#
##instructions
##load script
##lua_load ~/path_to/mounted.lua
lua_load /media/5/Conky/LUA/mounted.lua
## first lua command below text:
## ${lua get_mounted_data interval}, where interval is a number.  This starts data gathering
## to get output:
## ${lua mount partition_number data_type}, where partition number is a number
## data_type can be
## total - shows total number of partitions mounted, requires a partition_number also, use 1, could be used in an if_match
## fsys - shows filesystem
## size - shows space used in appropriate units
## free - shows free space in appropriate units
## use% - shows % used
## mount - shows mountpoint
#######################################################  End LUA Settings  ###
# The all important - How often conky refreshes.
# If you have a "Crey" try: 0.2 - smokin' - but watch the CPU useage go UP!
update_interval 1

TEXT
| ${time %a %x | %T} | ${uptime_short}${goto 334}|\
CPU % Avg=${color5}${if_match ${cpu cpu0} < 10}${color1}00${color}${cpu cpu0}\
${else}${if_match ${cpu cpu0} < 100}${color1}0${color}${cpu cpu0}\
${else}${cpu cpu0}${endif}${endif}\
1=${color5}${if_match ${cpu cpu1} < 10}${color1}00${color}${cpu cpu1}\
${else}${if_match ${cpu cpu1} < 100}${color1}0${color}${cpu cpu1}\
${else}${cpu cpu1}${endif}${endif}\
2=${color5}${if_match ${cpu cpu2} < 10}${color1}00${color}${cpu cpu2}\
${else}${if_match ${cpu cpu2} < 100}${color1}0${color}${cpu cpu2}\
${else}${cpu cpu2}${endif}${endif}\
3=${color5}${if_match ${cpu cpu3} < 10}${color1}00${color}${cpu cpu3}\
${else}${if_match ${cpu cpu3} < 100}${color1}0${color}${cpu cpu3}\
${else}${cpu cpu3}${endif}${endif}${color} |\
RAM ${mem} / ${memmax} |\
SDA Read ${diskio_read sda}${goto 902}| SDA Write ${diskio_write sda}${goto 1054}|\
eth0 Down ${downspeedf eth0}${goto 1214}| Up ${upspeedf eth0}${goto 1318}|
| ${nodename} on desktop ${desktop} of ${desktop_number} |\
Temperatures: CPU ${color5}${platform f71882fg.2560 temp 1}${color}° |\
MB ${color5}${platform f71882fg.2560 temp 2}${color}° |\
GPU ${color5}${nvidia temp}${color}° |\
HD ${color5}${execi 5 hddtemp -n /dev/sda}${color}° |\
${alignr 580}| ${kernel} | ${machine} | ${freq_g} GHz |


${color FFFFFF}Mostly text output for spacing purposes

| Fri 05/04/13 | 16:34:54 | 98d 22h 56m |\
CPU % Avg=${if_match ${cpu cpu0} < 10}00${cpu cpu0}\
${else}${if_match ${cpu cpu0} < 100}0${cpu cpu0}\
${else}${cpu cpu0}${endif}${endif}\
1=${if_match ${cpu cpu1} < 10}00${cpu cpu1}\
${else}${if_match ${cpu cpu1} < 100}0${cpu cpu1}\
${else}${cpu cpu1}${endif}${endif}\
2=${if_match ${cpu cpu2} < 10}00${cpu cpu2}\
${else}${if_match ${cpu cpu2} < 100}0${cpu cpu2}\
${else}${cpu cpu2}${endif}${endif}\
3=${if_match ${cpu cpu3} < 10}00${cpu cpu3}\
${else}${if_match ${cpu cpu3} < 100}0${cpu cpu3}\
${else}${cpu cpu3}${endif}${endif} |\
RAM ${mem} / ${memmax} |\
SDA Read 999.9G | SDA Write 999.9G |\
eth0 Down 9999.99 | Up 9999.99 |${color}


The only place I cheated:
${alignr 580}| ${kernel} | ${machine} | ${freq_g} GHz |
that ${alignr 580} will probably be something like ${alignr 15} for you.

Also this won't match you 100% obviously but maybe it will help a little bit and I enjoyed doing it.
Title: Re: Conky Codes and Images
Post by: dizzie on April 05, 2013, 10:21:24 PM
Very nice! Even looks good with a bright background :) Only 2 cores on this laptop, but its fixable, oh and intel gma, so no nvidia stuff either (fixable too)


(http://en.zimagez.com/miniature/2013-04-06-0018451366x768scrot.png) (http://en.zimagez.com/zimage/2013-04-06-0018451366x768scrot.php)
Title: Re: Conky Codes and Images
Post by: Sector11 on April 05, 2013, 10:46:24 PM
Works on light backgrounds because of something I learned from Teo (his weather scripts) I turned "shadow" on.

draw_shades yes
default_shade_color black

draw_outline no # amplifies text if yes
default_outline_color black


Outline messes up here, try it on yours, might be good there.

Glad you like it.  Looking forward to seeing what you do with it.
Title: Re: Conky Codes and Images
Post by: Sector11 on April 10, 2013, 07:24:05 PM
Building a new one - I blame falldown!   After all, he built "the one banner to conky them all!" :D

(http://i.imgur.com/65wCx3cl.jpg) (http://imgur.com/65wCx3c)

How do I fill all that space?  What do I use .... v9000 an obvious choice - mounted.lua too ...

${execi 0.1 thinking_cap}See you when I'm done!

Title: Re: Conky Codes and Images
Post by: Sector11 on April 11, 2013, 02:18:19 AM
D R U M R O L  L !
Thank you falldown

S11_VSIDO_Banner.conky

On light and medium backgrounds
(http://i.imgur.com/nKVzFVdl.jpg) (http://imgur.com/nKVzFVd)

on a black background
(http://i.imgur.com/GMPc9LOl.png) (http://imgur.com/GMPc9LO)
The "7.4M of trash" under VSIDO disappears when trash is emptied.

# killall conky && conky -c /media/5/Conky/S11_VSIDO_Banner.conky &
###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,sticky,below,skip_taskbar,skip_pager
own_window_colour gray
own_window_class Conky
own_window_title Falldown VSIDO Banner

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type normal
# own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
# own_window_argb_value 0

minimum_size 1552 160     ## width, height
maximum_width 1552     ## width, usually a good idea to equal minimum width

gap_x 0 # left-right
gap_y 5 # up-down

alignment top_middle  #bottom_left
###################################################  End Window Settings  ###
###  Font Settings  #########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont monofur:bold:size=12
#xftfont Anonymous Pro:bold:size=8
#xftfont CorporateMonoExtraBold:size=8

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################

draw_shades yes
default_shade_color black

draw_outline no # amplifies text if yes
default_outline_color black

default_color FFDEAD #255 222 173 NavajoWhite
color0 8FBC8F #143 188 143 DarkSeaGreen
color1 778899 #119 136 153 LightSlateGray
color2 FF8C00 #255 140   0 DarkOrange
color3 62C2C2 #098 194 194 S11 Light Green #7FFF00 #127 255   0 Chartreuse
color4 FFA07A #255 160 122 LightSalmon
color5 DCDCDC #220 220 220 Gainsboro
color6 00BFFF #  0 191 255 DeepSkyBlue
color7 00FFFF #  0 255 255 Cyan
color8 FFFF00 #255 255   0 Yellow
color9 B22222 #178  34  34 FireBrick
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes
#default_graph_size 15 40
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################
# Boolean value, if true, Conky will be forked to background when started.
background yes

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 1028

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
# temperature_unit Fahrenheit

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load /media/5/Conky/LUA/draw-bg.lua
#TEXT
#${lua conky_draw_bg 10 0 0 0 0 0x000000 0.2}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
lua_load /media/5/Conky/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.2
# lua_draw_hook_post draw-bg 125 0 0 0 0 0x000000 0.01
#
# TEXT
#
### mount.lua ##################################################################
#
##instructions
##load script
##lua_load ~/path_to/mounted.lua
# lua_load /media/5/Conky/LUA/mounted.lua
## first lua command below text:
## ${lua get_mounted_data interval}, where interval is a number.  This starts data gathering
## to get output:
## ${lua mount partition_number data_type}, where partition number is a number
## data_type can be
## total - shows total number of partitions mounted, requires a partition_number also, use 1, could be used in an if_match
## fsys - shows filesystem
## size - shows space used in appropriate units
## free - shows free space in appropriate units
## use% - shows % used
## mount - shows mountpointconky -c /media/5/Conky/S11_Conky_Desktop_top_12 &
#######################################################  End LUA Settings  ###
# The all important - How often conky refreshes.
# If you have a "Crey" try: 0.2 - smokin' - but watch the CPU useage go UP!
update_interval 1

TEXT
${lua conky_draw_bg 10 0 0 0 0 0x000000 0.2}${image /media/5/Conky/images/vsido_logo_conky.png -p 0,0 -s 1552x160}\
| ${nodename} | desktop ${desktop} of ${desktop_number} | ${time %a %x | %T} | 2${uptime_short}${goto 526}|\
CPU % Avg=${if_match ${cpu cpu0} < 10}${color1}00${color}${cpu cpu0}\
${else}${if_match ${cpu cpu0} < 100}${color1}0${color}${cpu cpu0}\
${else}${cpu cpu0}${endif}${endif}\
1=${if_match ${cpu cpu1} < 10}${color1}00${color}${cpu cpu1}\
${else}${if_match ${cpu cpu1} < 100}${color1}0${color}${cpu cpu1}\
${else}${cpu cpu1}${endif}${endif}\
2=${if_match ${cpu cpu2} < 10}${color1}00${color}${cpu cpu2}\
${else}${if_match ${cpu cpu2} < 100}${color1}0${color}${cpu cpu2}\
${else}${cpu cpu2}${endif}${endif}\
3=${if_match ${cpu cpu3} < 10}${color1}00${color}${cpu cpu3}\
${else}${if_match ${cpu cpu3} < 100}${color1}0${color}${cpu cpu3}\
${else}${cpu cpu3}${endif}${endif}${color} |\
${goto 915}| Net Traffic${goto 1075}${color1}rx ↓${goto 1195}${color0}tx ↑${goto 1315}${color}Total${goto 1435}${color5}Avg. Rate
| CPU Fan ${color5}${platform f71882fg.2560 fan 1} ${color}rpm |\
Temps CPU ${color5}${platform f71882fg.2560 temp 1}${color}° |\
Mobo ${color5}${platform f71882fg.2560 temp 2}${color}° |\
GPU ${color5}${nvidia temp}${color}° |\
HDD ${color5}${execi 5 hddtemp -n /dev/sda}${color}° |\
RAM ${mem} / ${memmax} |\
${goto 915}${color}| ${execpi 86422 date --date="-1 day" | awk '{print $3" "$2" "$6}'}${goto 1075}${execpi 300 vnstat | grep "yesterday" | awk '{print "${color1}"$2" "$3"${goto 1195}${color0}"$5" "$6"${goto 1315}${color}"$8" "$9"${goto 1435}${color5}"$11" "$12}'}
${goto 915}${color}| ${execpi 86422 date --date="0 day" | awk '{print $3" "$2" "$6}'}${goto 1075}${execpi 86422 vnstat | grep "today" | awk '{print "${color1}"$2" "$3"${goto 1195}${color0}"$5" "$6"${goto 1315}${color}"$8" "$9"${goto 1435}${color5}"$11" "$12}'}
${goto 915}${color}| Current Week${execpi 86422 vnstat -w | grep "current week" | awk '{print "${goto 1075}${color1}"$3" "$4"${goto 1195}${color0}"$6" "$7"${goto 1315}${color}"$9" "$10"${goto 1435}${color5}"$12" "$13}'}${color}
| Disk  Read  ${color5}${diskio_read /dev/sda}${goto 327}${color}| Disk Write  ${color5}${diskio_write /dev/sda}${color}\
${goto 915}${color}| Last Week${execpi 86422 vnstat -w | grep "last week" | awk '{print "${goto 1075}${color1}"$3" "$4"${goto 1195}${color0}"$6" "$7"${goto 1315}${color}"$9" "$10"${goto 1435}${color5}"$12" "$13}'}${color}
| ${diskiograph_read /dev/sda 14,300 00ffff ff0000 5 -lt}${diskiograph_write /dev/sda 14,300 ff0000 00ffff 5 -lt}${color}
| eth0  Down  ${color5}${downspeedf eth0}${goto 327}${color}| Up  ${color5}${upspeedf eth0}${color}
| ${color}${downspeedgraph eth0 14,300 00ffff ff0000 5 -lt}${upspeedgraph eth0 14,300 ff0000 00ffff 5 -lt}      ${color9}${execi 15 du -sh ~/.local/share/Trash/files/ | awk '{print $1}' | sed '/^4.0K/ d'  | sed 's/$/ of trash!/'}${color}\
${goto 915}${color}| Last 7 Days${execpi 86422 vnstat -w | grep "last 7 days" | awk '{print "${goto 1075}${color1}"$4" "$5"${goto 1195}${color0}"$7" "$8"${goto 1315}${color}"$10" "$11"${goto 1435}${color5}"$13" "$14}'}${color}
| Root Used ${color5}${fs_used /} (${fs_used_perc /}%)  ${color}Total ${color5}${fs_size /}${color}${goto 335}Home ${color5}${fs_used_perc /home}     ${fs_used /home}     ${fs_size /home}${color} \
${goto 915}${color}| ${time %b %Y}${execpi 86422 vnstat -m | grep "`date +"%b %y"`" | awk '{print "${goto 1075}${color1}"$3" "$4"${goto 1195}${color0}"$6" "$7"${goto 1315}${color}"$9" "$10"${goto 1435}${color5}"$12" "$13}'}${color}

Title: Re: Conky Codes and Images
Post by: VastOne on April 11, 2013, 02:21:52 AM
^ Most excellent sir!

WOW!
Title: Re: Conky Codes and Images
Post by: Sector11 on April 11, 2013, 02:32:32 AM
Thank you.

Just so you know ... imageshack.us is stopping this page from loading for me.
And dizzies avatar isn't showing.
(http://thumbnails106.imagebam.com/24820/74e146248197242.jpg) (http://www.imagebam.com/image/74e146248197242)
Title: Re: Conky Codes and Images
Post by: VastOne on April 11, 2013, 02:36:15 AM
I will let dizzie know... He must have it loaded from a url that is no longer valid

What is missing? I have nothing from imageshack.us on here
Title: Re: Conky Codes and Images
Post by: Sector11 on April 11, 2013, 02:46:20 AM
Yea, I can't find any "imageshack.us" stuff on this page either but it is there again ....

Quoteconnecting to img851.imageshack.us...

and stays stuck there ...  :-[
Title: Re: Conky Codes and Images
Post by: dizzie on April 11, 2013, 06:28:14 AM
Next time, send me a PM, instead of letting the world know that imagecrap.us suck balls :)
Title: Re: Conky Codes and Images 11 Apr 13 | 11:25:58 ~ $ 11 Apr 13 | 11:
Post by: Sector11 on April 11, 2013, 02:27:48 PM
@dizzie
Next time, send me a PM, instead of letting the world know that imagecrap.us suck balls :)



Would that be golf balls, tennis balls, baseballs, hardballs, footballs etc etc .....

Only one way to fix this faux-pas:

11 Apr 13 | 11:24:58 ~
         $ vuze send cake dizzie

11 Apr 13 | 11:25:58 ~
         $ ...done

11 Apr 13 | 11:25:58 ~
         $


Title: Re: Conky Codes and Images
Post by: falldown on April 11, 2013, 02:44:55 PM
(http://i.imgur.com/Ei6xgdzl.jpg) (http://imgur.com/Ei6xgdz)

Simple conky to fit the new wall!  :)
Title: Re: Conky Codes and Images
Post by: Sector11 on April 11, 2013, 04:23:32 PM
Boy, that's a tough one.  Take forever to duplicate that!  8)

You've just proved that "simple" can be beautiful! ;)

I can do simple too ...
... somewhere between the first conky command and the 267th command there has to be a simple one in there - someplace!  :D
Title: Re: Conky Codes and Images
Post by: Sector11 on April 12, 2013, 09:33:20 PM
I have a new conky that is simple SIMPLE SiMpLe - consists of one line under TEXT - but you really need to see it with the right wallpaper to appreciate it properly:

TEXT
${font FFF Tusj:size=100}VSIDO${font} (http://i.imgbox.com/acfKyf6o.png)
Title: Re: Conky Codes and Images
Post by: blaze on April 13, 2013, 08:10:33 AM
great stuff Sector11, gave me a good `n` well needed  :D after a tough week
Title: Re: Conky Codes and Images
Post by: jedi on April 13, 2013, 09:38:19 AM
clowns frighten me
Title: Re: Conky Codes and Images
Post by: Sector11 on April 13, 2013, 05:42:45 PM
@ blaze - I was wondering if anyone would take the time to look.  I thought it was worth the  :D as well.

@ jedi - you're not alone.
Title: Net Speed Graph Colors
Post by: lwfitz on April 14, 2013, 06:28:46 PM
Is there a way to show more that two colors in a net speed graph?
For instance my code is

${downspeedgraph eth0 20,75 0066CC CC0000 }

Which starts red and fades into blue but I would like to have red fade into orange-yellow-green-blue and then finally into purple......

Any ideas?
Title: Re: Net Speed Graph Colors
Post by: VastOne on April 14, 2013, 06:33:21 PM
I know this is possible... I have seen it setup on #! and I believe Sector11 will have the answers
Title: Re: Net Speed Graph Colors
Post by: lwfitz on April 14, 2013, 07:20:47 PM
Thanks, yeah I know Ive seen something similar but for the life of me I cant find it. Sector11 always has the answer....  ??? ???
Title: Re: Net Speed Graph Colors
Post by: Sector11 on April 15, 2013, 06:17:01 PM
No I don't have the answer ... I "think" this might do the trick though woulf did a script: Bargraph widget (http://u-scripts.blogspot.com.ar/2010/07/bargraph-widget.html).  He did that long before I even understood how to use a LUA script.  :D

Near the bottom 3/4 of the way down I see a multi-colour graph: green yellow white red blue

Not sure is mrpeachy did one as well or not.
Title: Re: Net Speed Graph Colors
Post by: lwfitz on April 16, 2013, 03:59:57 AM
Quote from: Sector11 on April 15, 2013, 06:17:01 PM
No I don't have the answer ... I "think" this might do the trick though woulf did a script: Bargraph widget (http://u-scripts.blogspot.com.ar/2010/07/bargraph-widget.html).  He did that long before I even understood how to use a LUA script.  :D

Near the bottom 3/4 of the way down I see a multi-colour graph: green yellow white red blue

Not sure is mrpeachy did one as well or not.


Thanks buddy Ill check it out..... and you have the answer..... you just dont know what it is yet  8)
Title: Re: Conky Codes and Images
Post by: lwfitz on April 16, 2013, 06:35:39 AM
My current config that Im working on

(http://en.zimagez.com/miniature/screenshot-04152013-110126pm.png) (http://en.zimagez.com/zimage/screenshot-04152013-110126pm.php)


conky_system
max_specials 10000
max_user_text 15000
background no
use_xft yes
xftfont sans:size=9
xftalpha 1
total_run_times 0
own_window yes
own_window_argb_visual no
own_window_transparent yes
own_window_type normal
own_window_title conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 285 1000
maximum_width 285
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_shade_color black
default_outline_color white
alignment middle_left
gap_x 10
gap_y -10
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
text_buffer_size 100000
top_name_width 5
update_interval 1
default_color FFFFFF
temperature_unit fahrenheit
short_units yes


## Set the path to your script here.
lua_load /home/luke/Conky/allcombined_2.lua

#lua_load ~/Conky/bargraph.lua
#lua_draw_hook_pre main_bars


## lua funcions
## background ##################################################################
#${lua draw_bg {corner_radius,x_position,y_position,width,height,color,alpha}}
#note for background: set width=0 - width will be conky window width, set height=0 - height will be conky window height
## gradient bars ###############################################################
#${lua gradbar {x_position,y_position,"conky_object",object_max_value,number_of_divisions,division_width,division_height,division_gap,bg_color,bg_alpha,start_color,start_alpha,mid_color,mid_alpha,end_color,end_alpha}}
## calendar ###############################################################
#${lua luacal {x_position,y_position,"title_font",title_fontsize,title_color,title_alpha,"dates_font",dates_fontsize,dates_color,dates_alpha,"highlight_font",highlight_fontsize,highlight_color,highlight_alpha,"spacer",colum_gap,title_gap,row_gap,start_day}
#note for calendar: start day... 0=sunday, 1=monday ... "spacer" can help align calendar with non fix width fonts
## textured background ###############################################################
#${lua tex_bg {corner_radius,x_position,y_position,width,height,"/path/to/texture.png"}}
## lua draw images ###############################################################
#${lua luaimage {x_position,y_position,width,height,"/path/to/image"}}
#note for images: set width=0 - width will be image width, set height=0 - height will be image height
## lua draw text ###############################################################
#${lua luatext {x_position,y_position,color,alpha,"font",fontsize,"justify"}}
# not for text: justify can be "r" = right, "c" = center, "l" = left

#${lua draw_bg {10,0,0,0,0,0x000000,0.5}}

TEXT
${lua draw_bg {20,12,2,268,140,0xFFFFFF,.1,2,1}}${image /home/luke/Conky/red_2.png -p 0,-7}
${goto 25}${voffset 4}${font Pseudo APL:bold:size=10}CPU Average ${lua gradbar {125,27,"${cpu cpu0}",100,48,1,10,1,0x000000,.75,0xFFFF00,1,0xCC6633,1,0xCC0000,1}}${alignr -12}${cpu cpu0}${font Sans:bold:size=10}%       
#${font saxmono:bold:normal:size=10}${color1}k${voffset -1}${font}${color2} TEMP ${hwmon 1 temp 1}°C${lua gradbar {90,127,"${hwmon 1 temp 1}",100,50,2,10,1,0xFFFFFF,0.25,0xFFFFFF,.5,0xFFFF33,.65,0xCC0000,1}}
${goto 25}${font Pseudo APL:bold:size=10}${voffset 1}CPU1 ${lua gradbar {72,42,"${cpu cpu1}",100,75,1,10,1,0x000000,.75,0xFFFF00,1,0xCC6633,1,0xCC0000,1}}${alignr -8}${cpu cpu1}${font Sans:bold:size=10}%       
${goto 25}${font Pseudo APL:bold:size=10}CPU2 ${lua gradbar {72,57,"${cpu cpu2}",100,75,1,10,1,0x000000,.75,0xFFFF00,1,0xCC6633,1,0xCC0000,1}}${alignr -8}${cpu cpu2}${font Sans:bold:size=10}%       
${goto 25}${font Pseudo APL:bold:size=10}CPU3 ${lua gradbar {72,72,"${cpu cpu3}",100,75,1,10,1,0x000000,.75,0xFFFF00,1,0xCC6633,1,0xCC0000,1}}${alignr -8}${cpu cpu3}${font Sans:bold:size=10}%       
${goto 25}${font Pseudo APL:bold:size=10}CPU4 ${lua gradbar {72,87,"${cpu cpu4}",100,75,1,10,1,0x000000,.75,0xFFFF00,1,0xCC6633,1,0xCC0000,1}}${alignr -8}${cpu cpu4}${font Sans:bold:size=10}%       
${goto 25}${font Pseudo APL:bold:size=10}CPU5 ${lua gradbar {72,102,"${cpu cpu5}",100,75,1,10,1,0x000000,.75,0xFFFF00,1,0xCC6633,1,0xCC0000,1}}${alignr -8}${cpu cpu5}${font Sans:bold:size=10}%       
${goto 25}${font Pseudo APL:bold:size=10}CPU6 ${lua gradbar {72,117,"${cpu cpu6}",100,75,1,10,1,0x000000,.75,0xFFFF00,1,0xCC6633,1,0xCC0000,1}}${alignr -8}${cpu cpu6}${font Sans:bold:size=10}%       
#${hr 2}



${lua draw_bg {20,12,165,268,75,0xFFFFFF,.1,2,1}}${goto 25}${font Pseudo APL:bold:size=10}RAM${goto 115}${mem}${goto 155} / ${memmax}
${lua gradbar {27,191,"${memperc}",100,97,1,10,1,0x000000,.75,0xFFFF00,1,0xCC6633,1,0xCC0000,1}}${alignr 15}${memperc}${font Sans:bold:size=10}% 
${goto 25}${font Pseudo APL:bold:size=10}SWAP${goto 115}${swap}${goto 155} / ${swapmax}
${lua gradbar {27,220,"${swapperc}",100,97,1,10,1,0x000000,.75,0xFFFF00,1,0xCC6633,1,0xCC0000,1}}${alignr 15}${swapperc}${font Sans:bold:size=10}% 
#${hr 2}
#${image /home/luke/Conky/red_bar.png -s 250x4 -p 0,235}


${lua draw_bg {20,12,275,268,200,0xFFFFFF,.1,2,1}}
${voffset -8}${goto 25}${font Pseudo APL:bold:size=10}${voffset 10}/${goto 105}${fs_used /}${goto 155} / ${fs_size /}
${lua gradbar {27,298,"${fs_used_perc /}",100,97,1,10,1,0x000000,.75,0xFFFF00,1,0xCC6633,1,0xCC0000,1}}${alignr 15}${fs_used_perc /}${font Sans:bold:size=10}% 
${goto 25}${font Pseudo APL:bold:size=10}/Home${goto 105}${fs_used  /home}${goto 155} / ${fs_size  /home}
${lua gradbar {27,328,"${fs_used_perc /home}",100,97,1,10,1,0x000000,.75,0xFFFF00,1,0xCC6633,1,0xCC0000,1}}${alignr 15}${fs_used_perc  /home}${font Sans:bold:size=10}% 
${goto 25}${font Pseudo APL:bold:size=10}External${goto 105}${fs_used /media/sdf5}${goto 155} / ${fs_size /media/sdf5}
${lua gradbar {27,358,"${fs_used_perc /media/sdf5}",100,97,1,10,1,0x000000,.75,0xFFFF00,1,0xCC6633,1,0xCC0000,1}}${alignr 15}${fs_used_perc /media/sdf5}${font Sans:bold:size=10}% 
${goto 25}${font Pseudo APL:bold:size=10}Software${goto 105}${fs_used /media/sdc1}${goto 155} / ${fs_size /media/sdc1}
${lua gradbar {27,388,"${fs_used_perc /media/sdc1}",100,97,1,10,1,0x000000,.75,0xFFFF00,1,0xCC6633,1,0xCC0000,1}}${alignr 15}${fs_used_perc /media/sdc1}${font Sans:bold:size=10}% 
${goto 25}${font Pseudo APL:bold:size=10}Storage${goto 105}${fs_used /media/storage}${goto 155} / ${fs_size /media/storage}
${lua gradbar {27,418,"${fs_used_perc /media/storage}",100,97,1,10,1,0x000000,.75,0xFFFF00,1,0xCC6633,1,0xCC0000,1}}${alignr 15}${fs_used_perc /media/storage}${font Sans:bold:size=10}% 
${goto 25}${font Pseudo APL:bold:size=10}Media${goto 105}${fs_used /media/sdd1}${goto 155} / ${fs_size /media/sdd1}
${lua gradbar {27,448,"${fs_used_perc /media/sdd1}",100,97,1,10,1,0x000000,.75,0xFFFF00,1,0xCC6633,1,0xCC0000,1}}${alignr 15}${fs_used_perc /media/sdd1}${font Sans:bold:size=10}% 
#${font Pseudo APL:bold:size=10}Storage${goto 105}${fs_used /media/storage}${goto 155} / ${fs_size /media/storage}
#${lua gradbar {5,457,"${fs_used_perc /media/storage}",100,97,1,10,1,0x000000,.75,0xFFFF00,1,0xCC6633,1,0xCC0000,1}}${alignr 15}${fs_used_perc /media/storage}${font Sans:bold:size=10}%${voffset 8} 
#${hr 2}
#${image /home/luke/Conky/red_bar.png -s 250x4 -p 0,450}


${lua draw_bg {20,12,500,268,100,0xFFFFFF,.1,2,1}}
${voffset -4}${goto 25}${font Pseudo APL:bold:size=10}CPU Temp
${lua gradbar {27,520,"${platform it87.656 temp 1}",200,97,1,10,1,0x000000,.75,0xFFFF00,1,0xCC6633,1,0xCC0000,1}}${alignr 20}${platform it87.656 temp 1}°
${goto 25}${font Pseudo APL:bold:size=10}System Temp
${lua gradbar {27,550,"${platform it87.656 temp 2}",200,97,1,10,1,0x000000,.75,0xFFFF00,1,0xCC6633,1,0xCC0000,1}}${alignr 20}${platform it87.656 temp 2}°
${goto 25}${font Pseudo APL:bold:size=10}GPU Temp
${lua gradbar {27,580,"${nvidia temp}",220,97,1,10,1,0x000000,.75,0xFFFF00,1,0xCC6633,1,0xCC0000,1}}${alignr 20}${nvidia temp}°${voffset 4}
#${hr 2}
#${image /home/luke/Conky/red_bar.png -s 250x4 -p 0,570}

${lua draw_bg {20,12,629,268,103,0xFFFFFF,.1,2,1}}
${voffset 8}${goto 25}${font Pseudo APL:bold:size=10}NAME ${goto 120}   PID    CPU     MEM
${goto 25}${top name 1} ${alignr 25} ${top pid 1} ${top cpu 1} ${top mem 1}
${goto 25}${top name 2} ${alignr 25} ${top pid 2} ${top cpu 2} ${top mem 2}
${goto 25}${top name 3} ${alignr 25} ${top pid 3} ${top cpu 3} ${top mem 3}
${goto 25}${top name 4} ${alignr 25} ${top pid 4} ${top cpu 4} ${top mem 4}
${goto 25}${top name 5} ${alignr 25} ${top pid 5} ${top cpu 5} ${top mem 5}
#${top name 6} ${alignr 5} ${top pid 6} ${top cpu 6} ${top mem 6}
#${top name 7} ${alignr 5} ${top pid 7} ${top cpu 7} ${top mem 7}
#${top name 8} ${alignr 5} ${top pid 8} ${top cpu 8} ${top mem 8}%{voffset -8}
#${hr 2}   
#${voffset 10}${goto 50}${font Sans:size=22}${time %I:%M %p}
#${lua luacal {100,425,"Sans",10,0x00FF00,1,"Sans",10,0xFFFFF0,1,"Mono",14,0x00FF00,1," ",20,18,16,0}}
#${goto 15}${font Sans:bold:size=12}${time %d}${font}
#${goto 15}${time %B}
#${goto 15}${time %Y}
#${voffset 40}${hr 2}
#${voffset 10}${font Sans:size=10}Connection Type ${goto 220}${gw_iface}
#I.P${goto 173}${addr eth0}
#${image /home/luke/Conky/red_bar.png -s 250x4 -p 0,700}


${lua draw_bg {20,12,760,268,223,0xFFFFFF,.1,2,1}}
#${goto 25}Downloads
${goto 25}Down Speed${goto 125}${downspeed eth0}
${goto 25}Today:${alignr 25}${execi 1 vnstat -i eth0 | grep "today" | awk '{print $2 $3}'}
${goto 25}Week:${alignr 20}${execi 1 vnstat -i eth0 -w | grep "current week" | awk '{print $3 $4}'}
${goto 25}Month:${alignr 25}${execi 1 vnstat -i eth0 -m | grep "`date +"%b '%y"`" | awk '{print $3 $4}'}
${goto 20}${downspeedgraph eth0 30,250 FFFF00 CC0000 -t}
${goto 25}Up Speed${goto 125}${upspeed eth0}
${goto 25}Today: ${alignr 25}${execi 1 vnstat -i eth0 | grep "today" | awk '{print $5 $6}'}
${goto 25}Week: ${alignr 20}${execi 1 vnstat -i eth0 -w | grep "current week" | awk '{print $6 $7}'}
${goto 25}Month: ${alignr 25}${execi 1 vnstat -i eth0 -m | grep "`date +"%b '%y"`" | awk '{print $6 $7}'}
#${goto 25}Uploads
${goto 20}${upspeedgraph eth0 30,250 FFFF00 CC0000 000000 -t}





allcombined_2.lua (by mrpeachy)
--[[ by mrpeachy -
combines background bar and calendar functions
]]
require 'cairo'
require 'imlib2'

function rgb_to_r_g_b(col_a)
return ((col_a[1] / 0x10000) % 0x100) / 255., ((col_a[1] / 0x100) % 0x100) / 255., (col_a[1] % 0x100) / 255., col_a[2]
end

function conky_gradbar(bartab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
local updates=tonumber(conky_parse('${updates}'))
if updates>5 then
--#########################################################################################################
--convert to table
local bartab=loadstring("return" .. bartab)()
local bar_startx=bartab[1]
local bar_starty=bartab[2]
local number=bartab[3]
local number=conky_parse(number)
local number_max=bartab[4]
local divisions=bartab[5]
local div_width=bartab[6]
local div_height=bartab[7]
local div_gap=bartab[8]
local bg_col=bartab[9]
local bg_alpha=bartab[10]
local st_col=bartab[11]
local st_alpha=bartab[12]
local mid_col=bartab[13]
local mid_alpha=bartab[14]
local end_col=bartab[15]
local end_alpha=bartab[16]
--color conversion
local br,bg,bb,ba=rgb_to_r_g_b({bg_col,bg_alpha})
local sr,sg,sb,sa=rgb_to_r_g_b({st_col,st_alpha})
local mr,mg,mb,ma=rgb_to_r_g_b({mid_col,mid_alpha})
local er,eg,eb,ea=rgb_to_r_g_b({end_col,end_alpha})
if number==nil then number=0 end
local number_divs=(number/number_max)*divisions
cairo_set_line_width (cr,div_width)
--gradient calculations
for i=1,divisions do
if i<(divisions/2) and i<=number_divs then
colr=((mr-sr)*(i/(divisions/2)))+sr
colg=((mg-sg)*(i/(divisions/2)))+sg
colb=((mb-sb)*(i/(divisions/2)))+sb
cola=((ma-sa)*(i/(divisions/2)))+sa
elseif i>=(divisions/2) and i<=number_divs then
colr=((er-mr)*((i-(divisions/2))/(divisions/2)))+mr
colg=((eg-mg)*((i-(divisions/2))/(divisions/2)))+mg
colb=((eb-mb)*((i-(divisions/2))/(divisions/2)))+mb
cola=((ea-ma)*((i-(divisions/2))/(divisions/2)))+ma
else
colr=br
colg=bg
colb=bb
cola=ba
end
cairo_set_source_rgba (cr,colr,colg,colb,cola)
cairo_move_to (cr,bar_startx+((div_width+div_gap)*i-1),bar_starty)
cairo_rel_line_to (cr,0,div_height)
cairo_stroke (cr)
end
--#########################################################################################################
end-- if updates>5
bartab=nil
colr=nil
colg=nil
colb=nil
cola=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_draw_bg(bgtab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--#########################################################################################################
--convert to table
local bgtab=loadstring("return" .. bgtab)()
local r=bgtab[1]
local x=bgtab[2]
local y=bgtab[3]
local w=bgtab[4]
local h=bgtab[5]
local color=bgtab[6]
local alpha=bgtab[7]
if w==0 then
w=tonumber(conky_window.width)
end
if h==0 then
h=tonumber(conky_window.height)
end
cairo_set_source_rgba (cr,rgb_to_r_g_b({color,alpha}))
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
--the drawing part---------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_fill (cr)
--#########################################################################################################
bgtab=nil
w=nil
h=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_luacal(caltab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--####################################################################################################
local caltab=loadstring("return" .. caltab)()
local cal_x=caltab[1]
local cal_y=caltab[2]
local tfont=caltab[3]
local tfontsize=caltab[4]
local tc=caltab[5]
local ta=caltab[6]
local bfont=caltab[7]
local bfontsize=caltab[8]
local bc=caltab[9]
local ba=caltab[10]
local hfont=caltab[11]
local hfontsize=caltab[12]
local hc=caltab[13]
local ha=caltab[14]
local spacer=caltab[15]
local gaph=caltab[16]
local gapt=caltab[17]
local gapl=caltab[18]
local sday=caltab[19]
--convert colors
--local font=string.gsub(font,"_"," ")
local tred,tgreen,tblue,talpha=rgb_to_r_g_b({tc,ta})
--main body text color
local bred,bgreen,bblue,balpha=rgb_to_r_g_b({bc,ba})
--highlight text color
local hred,hgreen,hblue,halpha=rgb_to_r_g_b({hc,ha})
--###################################################
--calendar calcs
local year=os.date("%G")
local today=tonumber(os.date("%d"))
local t1 = os.time( {    year=year,month=03,day=01,hour=00,min=0,sec=0} );
local t2 = os.time( {    year=year,month=02,day=01,hour=00,min=0,sec=0} );
local feb=(os.difftime(t1,t2))/(24*60*60)
local monthdays={ 31, feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
local day=tonumber(os.date("%w"))+1-sday
local day_num = today
local remainder=day_num % 7
local start_day=day-(day_num % 7)
if start_day<0 then start_day=7+start_day end     
local month=os.date("%m")
local mdays=monthdays[tonumber(month)]
local x=mdays+start_day
local dnum={}
local dnumh={}
if mdays+start_day<36 then
dlen=35
plen=29
else
dlen=42
plen=36
end
for i=1,dlen do
if i<=start_day then
dnum[i]="  "
else
dn=i-start_day
if dn=="nil" then dn=0 end
if dn<=9 then dn=(spacer .. dn) end
if i>x then dn="" end
dnum[i]=dn
dnumh[i]=dn
if dn==(spacer .. today) or dn==today then
dnum[i]=""
end
if dn==(spacer .. today) or dn==today then
dnumh[i]=dn
place=i
else dnumh[i]="  "
end
end
end--for
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
if tonumber(sday)==0 then
dys={"SU","MO","TU","WE","TH","FR","SA"}
else
dys={"MO","TU","WE","TH","FR","SA","SU"}
end
--draw calendar titles
for i=1,7 do
cairo_move_to (cr, cal_x+(gaph*(i-1)), cal_y)
cairo_show_text (cr, dys[i])
cairo_stroke (cr)
end
--draw calendar body
cairo_select_font_face (cr, bfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, bfontsize);
cairo_set_source_rgba (cr,bred,bgreen,bblue,balpha)
for i=1,plen,7 do
local fn=i
for i=fn,fn+6 do
cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
cairo_show_text (cr, dnum[i])
cairo_stroke (cr)
end
end
--highlight
cairo_select_font_face (cr, hfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, hfontsize);
cairo_set_source_rgba (cr,hred,hgreen,hblue,halpha)
for i=1,plen,7 do
local fn=i
for i=fn,fn+6 do
cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
cairo_show_text (cr, dnumh[i])
cairo_stroke (cr)
end
end
--#########################################################################################################
caltab=nil
dlen=nil
plen=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_luaimage(imtab)
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--#########################################################################################################
local imtab=loadstring("return" .. imtab)()
local im_x=imtab[1]
local im_y=imtab[2]
local im_w=imtab[3]
local im_h=imtab[4]
local file=imtab[5]
local show = imlib_load_image(file)
if show == nil then return end
imlib_context_set_image(show)
if tonumber(im_w)==0 then
width=imlib_image_get_width()
else
width=tonumber(im_w)
end
if tonumber(im_h)==0 then
height=imlib_image_get_height()
else
height=tonumber(im_h)
end
imlib_context_set_image(show)
local scaled=imlib_create_cropped_scaled_image(0, 0, imlib_image_get_width(), imlib_image_get_height(), width, height)
imlib_free_image()
imlib_context_set_image(scaled)
imlib_render_image_on_drawable(im_x, im_y)
imlib_free_image()
show=nil
--#########################################################################################################
imtab=nil
height=nil
width=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function

function conky_tex_bg(textab)
local textab=loadstring("return" .. textab)()
local tex_file=textab[6]
local surface = cairo_image_surface_create_from_png(tostring(tex_file))
local cw,ch = conky_window.width, conky_window.height
local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, cw,ch)
local cr=cairo_create(cs)
--#########################################################################################################
--convert to table
local r=textab[1]
local x=textab[2]
local y=textab[3]
local w=textab[4]
local h=textab[5]
if w=="0" then
w=cw
end
if h=="0" then
h=ch
end
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
--the drawing part---------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_clip (cr)
cairo_new_path (cr);
--image part
cairo_set_source_surface (cr, surface, 0, 0)
cairo_paint (cr)
--#########################################################################################################
textab=nil
w=nil
h=nil
cairo_destroy(cr)
cairo_surface_destroy (cs)
cairo_surface_destroy (surface)
cr=nil
return ""
end-- end main function

function conky_luatext(txttab)--x,y,c,a,f,fs,txt,j ##################################################
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
--#########################################################################################################
--convert to table
local txttab=loadstring("return" .. txttab)()
local x=txttab[1]
local y=txttab[2]
local c=txttab[3]
local a=txttab[4]
local f=txttab[5]
local fs=txttab[6]
local j=txttab[7]
local txt=txttab[8]
cairo_select_font_face (cr, f, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, fs)
local extents=cairo_text_extents_t:create()
cairo_text_extents(cr,txt,extents)
local wx=extents.x_advance
cairo_set_source_rgba (cr,rgb_to_r_g_b({c,a}))
if j=="l" then
cairo_move_to (cr,x,y)
elseif j=="c" then
cairo_move_to (cr,x-(wx/2),y)
elseif j=="r" then
cairo_move_to (cr,x-wx,y)
end
cairo_show_text (cr,txt)
cairo_stroke (cr)
--#########################################################################################################
txttab=nil
cairo_destroy(cr)
cairo_surface_destroy (cs)
cr=nil
return ""
end-- end main function




conky_weather
max_specials 10000
max_user_text 15000
background no
use_xft yes
xftfont sans:size=9
xftalpha 1
total_run_times 0
own_window yes
own_window_argb_visual no
own_window_transparent yes
own_window_type desktop
own_window_title conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 370 420
maximum_width 370
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_shade_color black
default_outline_color white
alignment top_middle
gap_x 200
gap_y 20
no_buffers yes
uppercase no
cpu_avg_samples 6
override_utf8_locale yes
text_buffer_size 100000
top_name_width 5
update_interval 1
default_color FFFFFF
temperature_unit fahrenheit
# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2
format_human_readable yes
short_units yes
update_interval 1
imlib_cache_size 0

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
temperature_unit Fahrenheit

### LUA Load ###
lua_load /home/luke/Conky/allcombined_2.lua


## lua funcions
## background ##################################################################
#${lua draw_bg {corner_radius,x_position,y_position,width,height,color,alpha,draw_type,line_width,outline_color,outline_alpha}}
#note for background: set width=0 - width will be conky window width, set height=0 - height will be conky window height
# draw_type: 1=fill, 2=outline(must specify line_width), 3=outline and fill (must specify line_width, outline_color and outline_alpha)
## gradient bars ###############################################################
#${lua gradbar {x_position,y_position,"conky_object",object_max_value,number_of_divisions,division_width,division_height,division_gap,bg_color,bg_alpha,start_color,start_alpha,mid_color,mid_alpha,end_color,end_alpha}}
## calendar ###############################################################
#${lua luacal {x_position,y_position,"title_font",title_fontsize,title_color,title_alpha,"dates_font",dates_fontsize,dates_color,dates_alpha,"highlight_font",highlight_fontsize,highlight_color,highlight_alpha,"spacer",colum_gap,title_gap,row_gap,start_day}
#note for calendar: start day... 0=sunday, 1=monday ... "spacer" can help align calendar with non fix width fonts
## textured background ###############################################################
#${lua tex_bg {corner_radius,x_position,y_position,width,height,"/path/to/texture.png"}}
## lua draw images ###############################################################
#${lua luaimage {x_position,y_position,width,height,"/path/to/image"}}
#note for images: set width=0 - width will be image width, set height=0 - height will be image height
## lua draw text ###############################################################
#${lua luatext {x_position,y_position,color,alpha,"font",fontsize,"justify"}}
#note for text: justify can be "r" = right, "c" = center, "l" = left
#${lua draw_bg {10,0,0,0,0,0x000000,0.3}}
${lua draw_bg {25,0,0,0,0,0x000000,0.3}}
TEXT
#${image /home/luke/Conky/weather.png -s 225x90 -p 75,5}${lua draw_bg {25,0,0,0,0,0xFFFFFF,0.05}}${image /home/luke/Conky/red_2.png -p 25,-7}
${lua draw_bg {20,0,18,370,405,0xFFFFFF,.1,2,1}}${image /home/luke/Conky/thermometer.png -s 50x50 -p 20,18}${image /home/luke/Conky/red_3.png -p -7,0}

${goto 70}${font Pseudo APL:Bold:size=20}${texeci 500 bash $HOME/1b1_accuweather_images/1b1}${execpi 600 sed -n '29p' $HOME/1b1_accuweather_images/curr_cond}°F
${font Pseudo APL:bold:size=15}${goto 10}Dawn${font Pseudo APL:bold:size=14} ${execpi 600 sed -n '39p' $HOME/1b1_accuweather_images/curr_cond}${image /home/luke/1b1_accuweather_images/cc.png -p 130,15 -s 260x180}
${font Pseudo APL:bold:size=15}${goto 10}Dusk${font Pseudo APL:bold:size=14} ${execpi 600 sed -n '40p' $HOME/1b1_accuweather_images/curr_cond}
${font Pseudo APL:bold:size=15}${goto 10}Rain${font Pseudo APL:bold:size=14} ${alignc 37}${font Sans:size=11}${execpi 600 sed -n '28p' $HOME/1b1_accuweather_images/first_days}
${font Pseudo APL:bold:size=15}${goto 10}Clouds${font Pseudo APL:bold:size=14} ${alignc 37}${font Sans:size=11}${execpi 600 sed -n '35p' $HOME/1b1_accuweather_images/curr_cond}
#${font Pseudo APL:Bold:size=14}${goto 10}Wind ${alignc 37}${font Sans:size=11}${execpi 600 sed -n '31p' $HOME/1b1_accuweather_images/curr_cond} ${execpi 600 sed -n '32p' $HOME/1b1_accuweather_images/curr_cond}

${font Pseudo APL:Bold:size=12}${goto 25}${execpi 600 sed -n '5p' $HOME/1b1_accuweather_images/first_days}${goto 140}${execpi 600 sed -n '10p' $HOME/1b1_accuweather_images/first_days}${goto 260}${execpi 600 sed -n '15p' $HOME/1b1_accuweather_images/first_days}



${image $HOME/1b1_accuweather_images/6.png -p 0,190 -s 115x79}${image $HOME/1b1_accuweather_images/11.png -p 122,190 -s 115x79}${image $HOME/1b1_accuweather_images/16.png -p 242,190 -s 115x79}
${voffset 9}${font Pseudo APL:Bold:size=13}${goto 40}${execpi 600 sed -n '8p' $HOME/1b1_accuweather_images/first_days}°F${goto 160}${execpi 600 sed -n '13p' $HOME/1b1_accuweather_images/first_days}°F${goto 280}${execpi 600 sed -n '18p' $HOME/1b1_accuweather_images/first_days}°F${voffset -9}

${font Pseudo APL:Bold:size=12}${goto 25}${execpi 600 sed -n '20p' $HOME/1b1_accuweather_images/first_days}${goto 140}${execpi 600 sed -n '1p' $HOME/1b1_accuweather_images/last_days}${goto 260}${execpi 600 sed -n '6p' $HOME/1b1_accuweather_images/last_days}
${image $HOME/1b1_accuweather_images/21.png -p 0,310 -s 115x79}${image $HOME/1b1_accuweather_images/last_2.png -p 122,310 -s 115x79}${image $HOME/1b1_accuweather_images/last_7.png -p 242,310 -s 115x79}



${voffset 9}${font Pseudo APL:Bold:size=13}${goto 40}${execpi 600 sed -n '23p' $HOME/1b1_accuweather_images/first_days}°F${goto 160}${execpi 600 sed -n '4p' $HOME/1b1_accuweather_images/last_days}°F${goto 280}${execpi 600 sed -n '9p' $HOME/1b1_accuweather_images/last_days}°F${voffset -9}



The weather script is by TeoBigusGeekus (http://crunchbang.org/forums/viewtopic.php?id=19235), The script along with my
images can be downloaded here. Just extract the archive to your home folder. To get the correct url for your city just follow the read me in the archive.
Download here (https://www.dropbox.com/s/1fg7gfnjqe1drrc/1b1_accuweather_images.tar.gz)



conky_clock
max_specials 10000
max_user_text 15000
background no
use_xft yes
xftfont sans:size=9
xftalpha 1
total_run_times 0
own_window yes
own_window_argb_visual no
own_window_transparent yes
own_window_type desktop
own_window_title conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 450 200
maximum_width 450
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_shade_color black
default_outline_color white
alignment bottom_middle
gap_x 975
gap_y 50
no_buffers yes
uppercase no
cpu_avg_samples 6
override_utf8_locale yes
text_buffer_size 100000
top_name_width 5
update_interval 1
default_color FFFFFF
temperature_unit fahrenheit
# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2
format_human_readable yes
short_units yes
update_interval 1
imlib_cache_size 0

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
temperature_unit Fahrenheit

### LUA Load ###
lua_load /home/luke/Conky/text_clock.lua
lua_draw_hook_post draw_text

TEXT
#${lua draw_bg {25,0,0,0,0,0x000000,0.3}}



text_clock.lua

--[[
text        - text to display, default = "Conky is good for you"
  use conky_parse to display conky value ie text=conly_parse("${cpu cpu1}")
            - coordinates below are relative to top left corner of the conky window
x           - x coordinate of first letter (bottom-left), default = center of conky window
y           - y coordinate of first letter (bottom-left), default = center of conky window
h_align - horizontal alignement of text relative to point (x,y), default="l"
  available values are "l": left, "c" : center, "r" : right
v_align - vertical alignment of text relative to point (x,y), default="b"
  available values "t" : top, "m" : middle, "b" : bottom
font_name   - name of font to use, default = Free Sans
font_size   - size of font to use, default = 14
italic      - display text in italic (true/false), default=false
oblique     - display text in oblique (true/false), default=false (I don' see the difference with italic!)
bold        - display text in bold (true/false), default=false
angle       - rotation of text in degrees, default = 0 (horizontal)
colour      - table of colours for text, default = plain white {{1,0xFFFFFF,1}}
  this table contains one or more tables with format {P,C,A}
              P=position of gradient (0 = beginning of text, 1= end of text)
              C=hexadecimal colour
              A=alpha (opacity) of color (0=invisible,1=opacity 100%)
              Examples :
              for a plain color {{1,0x00FF00,0.5}}
              for a gradient with two colours {{0,0x00FF00,0.5},{1,0x000033,1}}
              or {{0.5,0x00FF00,1},{1,0x000033,1}} -with this one, gradient will start in the middle of the text
              for a gradient with three colours {{0,0x00FF00,0.5},{0.5,0x000033,1},{1,0x440033,1}}
  and so on ...
orientation - in case of gradient, "orientation" defines the starting point of the gradient, default="ww"
  there are 8 available starting points : "nw","nn","ne","ee","se","ss","sw","ww"
  (n for north, w for west ...)
  theses 8 points are the 4 corners + the 4 middles of text's outline
  so a gradient "nn" will go from "nn" to "ss" (top to bottom, parallele to text)
  a gradient "nw" will go from "nw" to "se" (left-top corner to right-bottom corner)
radial - define a radial gradient (if present at the same time as "orientation", "orientation" will have no effect)
  this parameter is a table with 6 numbers : {xa,ya,ra,xb,yb,rb}
  they define two circle for the gradient :
  xa, ya, xb and yb are relative to x and y values above
reflection_alpha    - add a reflection effect (values from 0 to 1) default = 0 = no reflection
                      other values = starting opacity
reflection_scale    - scale of the reflection (default = 1 = height of text)
reflection_length   - length of reflection, define where the opacity will be set to zero
  calues from 0 to 1, default =1
skew_x,skew_y    - skew text around x or y axis
]]
require 'cairo'

function conky_draw_text()
    text_settings={

       {
        text="" ..conky_parse("${time %I:%M%P}"),
        x=100,
        y=150,
        colour={{0,0xCC0000,.75},{0.8,0xFFFFFF,0.6},{1,0xCC0000,0.75}},
        orientation="nn",
        font_name="LuxiMono",
        bold=true,
        font_size=80,
        },       
       {
        text="" .. conky_parse("${time %I:%M%P}"),
        x=99,
        y=149,
        colour={{0,0xFFFFFF,0.75},{.2,0xCC0000,0.4},{.8,0xFFFFFF,.75}},
        orientation="nn",
        font_name="LuxiMono",
        bold=true,
        font_size=80,
        },
        {
        text="" .. conky_parse("${time %D}"),
        x=138,
        y=189,
        colour={{0,0xCC0000,.75},{0.8,0xFFFFFF,0.6},{1,0xCC0000,0.75}},
        orientation="nn",
        font_name="LuxiMono",
        bold=true,
        font_size=40,
        },
       {
        text="" .. conky_parse("${time %D}"),
        x=137,
        y=190,
        colour={{0,0xFFFFFF,0.75},{.2,0xCC0000,0.4},{.8,0xFFFFFF,.75}},
        orientation="nn",
        font_name="LuxiMono",
        bold=true,
        font_size=40,
        },
}

if conky_window == nil then return end
if tonumber(conky_parse("$updates"))<3 then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
    cr = cairo_create (cs)
   
    for i,v in pairs(text_settings) do
        display_text(v)
    end
   
    cairo_destroy(cr)
    cairo_surface_destroy(cs)
end

function rgb_to_r_g_b(tcolour)
    colour,alpha=tcolour[2],tcolour[3]
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

function display_text(t)
    if t.text==nil then t.text="Conky is good for you !" end
    if t.x==nil then t.x = conky_window.width/2 end
    if t.y==nil then t.y = conky_window.height/2 end
    if t.colour==nil then t.colour={{1,0xFFFFFF,1}} end
    if t.font_name==nil then t.font_name="Free Sans" end
    if t.font_size==nil then t.font_size=14 end
    if t.angle==nil then t.angle=0 end
    if t.italic==nil then t.italic=false end
    if t.oblique==nil then t.oblique=false end
    if t.bold==nil then t.bold=false end
    if t.radial ~= nil then
    if #t.radial~=6 then
    print ("error in radial table")
    t.radial=nil
    end
    end
    if t.orientation==nil then t.orientation="ww" end
    if t.h_align==nil then t.h_align="l" end
    if t.v_align==nil then t.v_align="b" end   
   
    cairo_save(cr)
    cairo_translate(cr,t.x,t.y)
    cairo_rotate(cr,t.angle*math.pi/180)
    local slant = CAIRO_FONT_SLANT_NORMAL
    local weight =CAIRO_FONT_WEIGHT_NORMAL
    if t.italic then slant = CAIRO_FONT_SLANT_ITALIC end
    if t.oblique then slant = CAIRO_FONT_SLANT_OBLIQUE end
    if t.bold then weight = CAIRO_FONT_WEIGHT_BOLD end
    cairo_select_font_face(cr, t.font_name, slant,weight)
    cairo_set_font_size(cr,t.font_size)
   
    for i=1, #t.colour do   
        if #t.colour[i]~=3 then
        print ("error in color table")
        t.colour[i]={1,0xFFFFFF,1}
        end
    end
    local te=cairo_text_extents_t:create()
    cairo_text_extents (cr,t.text,te)
    if #t.colour==1 then
        cairo_set_source_rgba(cr,rgb_to_r_g_b(t.colour[1]))
    else
local pat
    if t.radial==nil then
    local pts=linear_orientation(t,te)
    pat = cairo_pattern_create_linear (pts[1],pts[2],pts[3],pts[4])
else
pat = cairo_pattern_create_radial (t.radial[1],t.radial[2],t.radial[3],t.radial[4],t.radial[5],t.radial[6])
end

        for i=1, #t.colour do
            cairo_pattern_add_color_stop_rgba (pat, t.colour[i][1], rgb_to_r_g_b(t.colour[i]))
        end
        cairo_set_source (cr, pat)
        cairo_pattern_destroy(pat)
    end
   
    local mx,my=0,0
   
    if t.h_align=="c" then
    mx=-te.width/2
    elseif t.h_align=="r" then
    mx=-te.width
end
    if t.v_align=="m" then
    my=-te.height/2-te.y_bearing
    elseif t.v_align=="t" then
    my=-te.y_bearing
end
cairo_move_to(cr,mx,my)

    cairo_show_text(cr,t.text)
    cairo_stroke(cr)
    cairo_restore(cr)
end


function linear_orientation(t,te)
local w,h=te.width,te.height
local xb,yb=te.x_bearing,te.y_bearing

    if t.h_align=="c" then
    xb=xb-w/2
    elseif t.h_align=="r" then
    xb=xb-w
    end
    if t.v_align=="m" then
    yb=-h/2
    elseif t.v_align=="t" then
    yb=0
    end
   
if t.orientation=="nn" then
p={xb+w/2,yb,xb+w/2,yb+h}
elseif t.orientation=="ne" then
p={xb+w,yb,xb,yb+h}
elseif t.orientation=="ww" then
p={xb,h/2,xb+w,h/2}
elseif vorientation=="se" then
p={xb+w,yb+h,xb,yb}
elseif t.orientation=="ss" then
p={xb+w/2,yb+h,xb+w/2,yb}
elseif vorientation=="ee" then
p={xb+w,h/2,xb,h/2}
elseif t.orientation=="sw" then
p={xb,yb+h,xb+w,yb}
elseif t.orientation=="nw" then
p={xb,yb,xb+w,yb+h}
end
return p
end




(http://ompldr.org/taTM5cQ) (http://ompldr.org/vaTM5cQ/VSIDO_floyd.png)


(http://ompldr.org/taTQyeQ) (http://ompldr.org/vaTQyeQ/red_2.png)


(http://ompldr.org/taTQyeg) (http://ompldr.org/vaTQyeg/red_3.png)
Title: Re: Net Speed Graph Colors
Post by: Sector11 on April 16, 2013, 04:41:10 PM
I have lots of answers - it's matching them with the right questions that I have problems with.  :D
Title: Re: Net Speed Graph Colors
Post by: Sector11 on April 16, 2013, 04:59:23 PM
OH OH OH OH!!!!

mrpeachy's gradient bar (http://crunchbang.org/forums/viewtopic.php?pid=110768#p110768) maybe?

Title: Re: Conky Codes and Images
Post by: Sector11 on April 16, 2013, 05:41:59 PM
OPINION ALERT!

There is only one thing wrong with that - and I do mean ONE! --- UNO! --- UN .... 9 less than 10!

RED!  I do not like red - never have!

Now if it was a nice blue!  WOW!!!!!!!  Or a shade of grey maybe!

Saying that - snagged anyway!
Title: Re: Net Speed Graph Colors
Post by: lwfitz on April 16, 2013, 06:11:11 PM
^ Possibly. I am a huge fan of those grad bars and maybe I can edit the lua to draw the graph..... or break something while trying  ;D
Title: Re: Conky Codes and Images
Post by: lwfitz on April 16, 2013, 06:23:04 PM
 :D Oh I know you dont and normally neither do I but this one just fell into place

Heres a little blue for you....... I think the colors match  :P

(http://en.zimagez.com/miniature/blue213.png) (http://en.zimagez.com/zimage/blue213.php)

(http://en.zimagez.com/miniature/blue310.png) (http://en.zimagez.com/zimage/blue310.php)

(http://ompldr.org/taTM5eQ) (http://ompldr.org/vaTM5eQ/VSIDO_floyd_blue.png)

Title: Re: Conky Codes and Images
Post by: Sector11 on April 16, 2013, 06:44:19 PM
Thank you ... I'll play with those as soon as I get time. :D
Title: Re: Conky Codes and Images
Post by: jedi on April 17, 2013, 12:07:39 AM
Ok, this is an oldy that's been 'floating' (get it, floating at the top of my screen?) around a long time.  (yeah I'm humorless)  Anyway, it originally only showed either the current condition icon during the daytime hours, and the moon phase icon during the night time hours.  So with some help from the "Great One", Sector11, I now have it showing both but cannot get rid of the errant "Sunrise" you see at the bottom left of the Conky.

(http://www.zimagez.com/miniature/screenshot-04162013-080622pm.png) (http://www.zimagez.com/zimage/screenshot-04162013-080622pm.php)

Here is my Conky, and configs...

The Conky I call "time";


######################
# - Conky settings - #
######################

background no
update_interval .3
cpu_avg_samples 2
total_run_times 0
override_utf8_locale yes

double_buffer yes
#no_buffers yes

text_buffer_size 10240
#imlib_cache_size 0

minimum_size 1250 0
maximum_width 1250

gap_x 60
gap_y 50
#####################
# - Text settings - #
#####################
use_xft yes
xftfont Santana:size=8
xftalpha .8
uppercase no
alignment top_left
#############################
# - Window specifications - #
#############################
own_window yes
own_window_transparent yes
own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_class conky-semi
#own_window_argb_visual yes
#own_window_argb_value 255
border_inner_margin 0
border_outer_margin 0
#########################
# - Graphics settings - #
#########################
draw_shades no
#default_shade_color 292421
draw_outline no
draw_borders no
stippled_borders 0
draw_graph_borders no
TEXT
${execpi 36000 /home/jed/Conky/Scripts/horical.sh}
${font CaviarDreams:size=20}${goto 60}${color 949494}${voffset 10}${time %l:%M %P}
${font CaviarDreams:size=12.5}${goto 90}${color 3881C7}${voffset -20}${time %A %B %d %Y}
${voffset 20}${goto 700}${color 3881C7}${font CaviarDreams:size=10}${execi 1 conkyForecast-SunsetSunriseCountdown  -t} in: ${color 949494}${execi 1 conkyForecast-SunsetSunriseCountdown -L}
${goto 700}${color 3881C7}Current Moon Phase: ${goto 900}${color 949494}${execi 300 conkyForecast --imperial --datatype=MP}
${execpi 1800 conkyForecast --location=USME0330 --imperial --template=$HOME/Conky/LUA/day-night.template}


The script to show the horizontal days of the month.  "horical.sh";


#!/bin/bash
# a script to display a horizontal calendar on conky (hence the name horical :D)
#
TODAY=`date +%d`
TOPLINE=" "
OVER=" "
REST=" "
# -------- This part is to find out the number of days in a month to display-----------#
a=`date +%-Y`
e1=`expr $a % 400`
e2=`expr $a % 100`
e3=`expr $a % 4`
if [ $e1 == 0 ]
  then c=1
  elif [ $e2 == 0 ]
  then c=0
  elif [ $e3 == 0 ]
  then c=1
  else c=0
fi
p=`date +%-m`
# if the current year is not a leap one, c = 0
if [ $c == 0 ]
  then
if [ $p == 2 ]
then b=28 # this is the number of days in Febuary
elif [ $p == 11 ] || [ $p == 4 ] || [ $p == 6 ] ||  [ $p == 9 ]
then b=30
else b=31
fi
  else
if [ $p == 2 ]
then b=29 # the number of days in Febuary in a leap year
elif [ $p == 11 ] || [ $p == 4 ] || [ $p == 6 ] ||  [ $p == 9 ]
then b=30
else b=31
fi
fi
#--------------------- The bottom line which displays the days of month ----------#
i=1
if [ $TODAY -ne 1 ]
then
    while [ $i -lt $TODAY ]; do
        if [ $i -lt 10 ]
        then
            OVER="$OVER 0$i"
        else
            OVER="$OVER $i"
        fi
        i=$[$i+1]
    done
fi
i=$[$i+1]
if [ $TODAY -ne $b ]
then
    while [ $i -ne $[$b] ]; do
        if [ $i -lt 10 ]
        then
            REST="$REST 0$i"
        else
            REST="$REST $i"
        fi
        i=$[$i+1]
    done
    REST="$REST $b"
fi
#------------- the top line which displays the abbreviated weekday names-------#
k=`date +%u`
j=`date +%e`
f=`expr $j % 7`
if [ $k -lt $f ]
then
y=$[$k+8-$f]
else
y=$[$k-$f+1]
fi
while [ $b -gt 0 ]; do
    case "$y" in
    1) TOPLINE="$TOPLINE Mo";;
    2) TOPLINE="$TOPLINE Tu";;
    3) TOPLINE="$TOPLINE We";;
    4) TOPLINE="$TOPLINE Th";;
    5) TOPLINE="$TOPLINE Fr";;
    6) TOPLINE="$TOPLINE Sa";;
    7) TOPLINE="$TOPLINE Su";;
    esac
    b=$[$b-1]
    y=$[$y+1]
    if [ $y -eq 8 ]
    then
        y=1
    fi
done
echo '${goto 15}''${color 949494}${font Droid Sans Mono:size=7.5}'$TOPLINE | sed 's/Su/${color 48a3fd}Su${color 949494}/g' | sed 's/Su/${color 3881C7}Su/g'
echo '${goto 15}''${font Droid Sans Mono:bold:size=7.5}''${color 3c3c3c}'$OVER '${color 3881C7}'$TODAY'${color}${color 949494}'$REST


Last but not least, the template that shows the icons.  "day-night.template"


${execi 1 conkyForecast-SunsetSunriseCountdown --location=USME0330 -t}${image [--datatype=WI --night] -p 405,20 -s 100x100}${image [--datatype=MI] -p 555,40 -s 100x100}


Thanks for advice/help.  Much appreciated!
Title: Re: Conky Codes and Images
Post by: VastOne on April 17, 2013, 12:31:51 AM
^ Nice jedi!  Well balanced and clean

Impressive!  8)
Title: Re: Conky Codes and Images
Post by: Sector11 on April 17, 2013, 01:31:17 AM
@ jedi ...

change:
background no
to
background yes

text_buffer_size 10240
is WAY WAY too much - try 512 or 1024

and kill the conky and restart it that "should fix" the "Sunrise" - it's a left over from just "saving"  - you should kill the conky and restart it when working on it.

I played with your setup as well and part way through I realized I had the the weather icon for Maine and the times for Buenos Aires ... Gee, no wonder the sunrise sunset times "times" didn't match.  So I switched Maine to ${tztime US/Eastern  %l:%M %P} so I could see things happen at "your time"

(http://i.imgur.com/Noo1u1sl.jpg) (http://imgur.com/Noo1u1s)

Top is your original code... centre is the font doubled - you have something strange going on there.

Bottom is using a different "calendar" that:
Title: Re: Conky Codes and Images
Post by: Sector11 on April 17, 2013, 01:52:59 AM
conkycal.sh can be found in the post above.  The conkycal.lang file is NOT needed if you are going to use it in English, it's the default.

And to make it complete it also does different month in different years.  I show three languages with three months here to show the "extra days" padded to the end to make it a universal width:
(http://i.imgur.com/j2INvtOl.jpg) (http://imgur.com/j2INvtO)

TEXT
${alignc}Apr 2013 - English
${font Monofur:size=20}${execpi 3600 /media/5/Conky/scripts/conkycal.sh|sed 's/^/\${goto 30}/'}${font}${color}

${alignc}Jan 2013 - Spanish
${font Monofur:size=20}${execpi 3600 /media/5/Conky/scripts/conkycal.sh -d "2013 1" -l es|sed 's/^/\${goto 30}/'}${font}${color}

${alignc}Feb 2013 - Portuguese
${font Monofur:size=20}${execpi 3600 /media/5/Conky/scripts/conkycal.sh -d "2013 2" -l pt|sed 's/^/\${goto 30}/'}${font}${color}


While not all want or need the language function there are Linux users that will appreciate it.  Easy to add to as well, if you can add a language please let me know.  Profanity doesn't count.  :D

NOTE: The conkycal.lang file MUST be in the same directory as conkycal.sh

conkycal.lang
case ${lang:-$LANG} in
af* )  DOW=("Ma" "Di" "Wo" "Do" "Vr" "Sa" "So");; # Afrikaans (Afrikaans)
be* )  DOW=("Па" "Аў" "Се" "Ча" "Пя" "Су" "Ня");; # Belarusian (Беларуская)
bs* )  DOW=("Po" "Ut" "Sr" "Če" "Pe" "Su" "Ne");; # Bosnian (Bosanac)
bg* )  DOW=("По" "Вт" "Ср" "Че" "Пе" "Съ" "Не");; # Bulgarian (Български)
zh* )  DOW=("周一" "周二" "周三" "周四" "周五" "周六" "周天");; # Chinese (中文)
hr* )  DOW=("Po" "Ut" "Ut" "Sr" "Če" "Su" "Ne");; # Croatian (Hrvatska)
cs* )  DOW=("Po" "Út" "St" "Čt" "Pá" "So" "Ne");; # Czech (Čeština)
da* )  DOW=("Ma" "Ti" "On" "To" "Fr" "Lø" "Sø");; # Danish (Dánština)
nl* )  DOW=("Ma" "Di" "Wo" "Do" "Vr" "Za" "Zo");; # Dutch (Nederlandse)
de* )  DOW=("Mo" "Di" "Mi" "Do" "Fr" "Sa" "So");; # German (Deutche)
el* )  DOW=("Δε" "Τρ" "Τε" "Πέ" "Πα" "Σά" "Κυ");; # Greek (Ελληνικά)
et* )  DOW=("Es" "Te" "Ko" "Ne" "Re" "La" "Pü");; # Estonian (Eesti)
tl* )  DOW=("Lu" "Ma" "Mi" "Hu" "Bi" "Sa" "Li");; # Filipino (Filipino)
fi* )  DOW=("Ma" "Ti" "Ke" "To" "Pe" "La" "Su");; # Finnish (Suomen)
fr* )  DOW=("Lu" "Ma" "Me" "Je" "Ve" "Sa" "Di");; # French (Français)
gl* )  DOW=("Lu" "Ma" "Mé" "Xo" "Ve" "Sá" "Do");; # Galician (Galego)
hi* )  DOW=("सोम" "मंगल" "बुध" "गुरु" "शुक्र" "शनि" "सूर्य") ;; # Hindi (हिन्दी)
hu* )  DOW=("Hé" "Ke" "Se" "Cü" "Pé" "So" "Va");; # Hungarian (Magyar)
is* )  DOW=("Má" "Þr" "Mi" "Fi" "Fö" "La" "Su");; # Icelandic (Íslenska)
id* )  DOW=("Se" "Se" "Ra" "Ka" "Ju" "Sa" "Mi");; # Indonesian (Indonesia)
it* )  DOW=("Lu" "Ma" "Me" "Gi" "Ve" "Sa" "Do");; # Italian (Italiano)
ja* )  DOW=("月曜" "火曜" "水曜" "木曜" "金曜" "土曜" "日曜");; # Japanese (日本語) x
ko* )  DOW=("월요" "화요" "수요" "목요" "금요" "토요" "일요");; # Korean (한국어) x
lv* )  DOW=("Pr" "Ot" "Tr" "Ce" "Pe" "Se" "Sv");; # Latvian (Latviešu)
lt* )  DOW=("pi" "an" "tr" "ke" "pe" "še" "se");; # Lithuanian (Lietuviškai)
mk* )  DOW=("По" "Вт" "Ср" "Че" "Пе" "Са" "Не");; # Macedonian (Македонски)
ml* )  DOW=("Is" "Se" "Ra" "Ra" "Ju" "Sa" "Mi");; # Malayam (Bahasa Melayu)
nb* )  DOW=("ma" "ti" "on" "to" "fr" "lø" "sø");; # Norwegian (Norsk)
pl* )  DOW=("Po" "Wt" "Śr" "Cz" "Pt" "So" "Nd");; # Polish (Polska)
pt* )  DOW=("Sq" "Te" "Qa" "Qi" "Se" "Sá" "Do");; # Portuguese (Português)
ro* )  DOW=("Lu" "Ma" "Mi" "Jo" "Vi" "Sa" "Du");; # Romanian (Român)
ru* )  DOW=("По" "Вт" "Ср" "Че" "Пя" "Су" "Во");; # Russian (Русский)
sr* )  DOW=("Po" "Ut" "Sr" "Če" "Pe" "Su" "Ne");; # Serbian (Српски)
sk* )  DOW=("Po" "Ut" "St" "Št" "Pi" "So" "Ne");; # Slovak (Slovenčina)
sl* )  DOW=("Po" "To" "Sr" "Če" "Pe" "So" "Ne");; # Slovenian (Slovenski)
es* )  DOW=("Lu" "Ma" "Mi" "Ju" "Vi" "Sá" "Do");; # Spanish (Español)
sv* )  DOW=("Må" "Ti" "On" "To" "Fr" "Lö" "Sö");; # Swedish (Svenska)
tr* )  DOW=("Pa" "Sa" "Ça" "Pe" "Cu" "Cu" "Pa");; # Turkish (Türkçe)
uk* )  DOW=("По" "Ві" "Се" "Че" "Пя" "Су" "Не");; # Ukrainian (Українська)
        * ) DOW=("Mo" "Tu" "We" "Th" "Fr" "Sa" "Su") ;;
esac


It does horizontal as well as vertical with the "-v" switch:
(http://i.imgur.com/X0R5Gy5l.jpg) (http://imgur.com/X0R5Gy5)

Enjoy!
Title: Re: Conky Codes and Images
Post by: jedi on April 17, 2013, 03:05:06 AM
Using your exact configs;

It is SO HUGE!!!  (yeah I know some dingleberry is gonna come along and post a reply saying TWSS!)  Anyway even changing the font size it stays that big on the screen.  This is part of my graphics puzzle I've been unable to figure out.  This is your config on my 1920x1080 resolution screen;

(http://www.zimagez.com/miniature/screenshot-04162013-103455pm.png) (http://www.zimagez.com/zimage/screenshot-04162013-103455pm.php)

I know something isn't right, because a few days ago I had installed Debian Netinst and these graphic problems did not exist.  So, I'm not sure what the deal is.  The same still holds true also when I try to "open" or "save" a file in any application.  The "save" and "open" dialog screens are so big they go off the display making me have to 'alt-mouseclick' to move them around so I can click the button.  I know different topic should be another thread somewhere.  Oh well...

So I changed the font sizes (once again) and got what I want!  However, that said, no matter what I did to the "conkycal.sh", it would not change the size of the horizontal calendar.  SO, to fix that, I just switched back to the original "horical.sh" from my previous post, and voila (that's some of my language skills there everyone!) I got it back down to the size I want.

(http://www.zimagez.com/miniature/screenshot-04162013-110336pm.png) (http://www.zimagez.com/zimage/screenshot-04162013-110336pm.php)
Title: Re: Conky Codes and Images
Post by: jedi on April 17, 2013, 03:09:33 AM
And one more thing before I forget!  If I use my original configs, posted above, it still has the "Sunrise" showing at the bottom left of the Conky.  This is after saving it, closing it, KILLING it, and then even re-booting the computer and restarting the Conky!!!  Who says I can't "MAKE" problems for myself!!!  Go figure.  Maybe some puzzles aren't meant to be figured out...

Oh and the text_buffer_size 10240 had me actually laughing out loud in a room by myself.  My family is starting to worry about me!  Somehow I'd inadvertently placed a 0 at the end of the 1024.  I'd have left it that way till the end of "time" (get it? 'time' Conky) if you hadn't noticed it Sector11...  Yeah I know, the humor is way to dry...

Edited by Sector11: Response found here (http://vsido.org/index.php/topic,327.msg4305.html#msg4305)
Title: Mysterious Sunrise
Post by: Sector11 on April 17, 2013, 01:41:29 PM
This come about because of this post (http://vsido.org/index.php/topic,18.msg4299.html#msg4299) and the very next post after that.

CASE IN POINT:  Be careful of code not needed and where code is placed.

Sometimes; nothing, 0, Zero, zilch can be a big thing indeed!   ;)

And I like your sense of "haha"  :D but then some question mine!  ::)

To continue ... Lets look for the mysterious Sunrise
0 TEXT
1 ${execpi 36000 /home/jed/Conky/Scripts/horical.sh}
2 ${font CaviarDreams:size=20}${goto 60}${color 949494}${voffset 10}${time %l:%M %P}
3 ${font CaviarDreams:size=12.5}${goto 90}${color 3881C7}${voffset -20}${time %A %B %d %Y}
4 ${voffset 20}${goto 700}${color 3881C7}${font CaviarDreams:size=10}${execi 1 conkyForecast-SunsetSunriseCountdown  -t} in: ${color 949494}${execi 1 conkyForecast-SunsetSunriseCountdown -L}
5 ${goto 700}${color 3881C7}Current Moon Phase: ${goto 900}${color 949494}${execi 300 conkyForecast --imperial --datatype=MP}
6 ${execpi 1800 conkyForecast --location=USME0330 --imperial --template=$HOME/Conky/LUA/day-night.template}


Analizing it here in a text editor made it super simple.....
Title: Re: Conky Codes and Images
Post by: Sector11 on April 18, 2013, 07:54:16 PM
I just updated my daily use weather conky to include sunrise/set and moonrise/set times along with the moon phase image for the complete 10 days:

(http://i.imgur.com/zWuE0nnl.jpg) (http://imgur.com/zWuE0nn)

The conky: S11_v9_Vert.conky
## killall conky && conky -c /media/5/Conky/S11_v9_Vert.conky &
##
## The latest script is a lua only weather script. aka: v9000
## http://crunchbanglinux.org/forums/topic/16100/weather-in-conky/
##
## the file:
## http://dl.dropbox.com/u/19008369/weatheragain9000.lua.tar.gz
##
## mrppeachys LUA Tutorial
## http://crunchbanglinux.org/forums/topic/17246/how-to-using-lua-scripts-in-conky/
##
##
###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
own_window_colour 000000
own_window_class Conky
own_window_title S11 v9 Vertical
# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type normal
# own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
# own_window_argb_value 150

minimum_size 110 875  ##820 260   ## width, height
maximum_width 110     ##820       ## width, usually a good idea to equal minimum width

gap_x 10    ### l|r
gap_y 10    ### u|d
alignment top_left #tl
####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
#xftfont Anonymous Pro:size=9
xftfont monofur:bold:size=9

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes

draw_shades yes
default_shade_color black

draw_outline no # amplifies text if yes
default_outline_color black

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
default_shade_color 000000
default_outline_color 000000

default_color DCDCDC #220 220 220 Gainsboro
color0 8FBC8F #143 188 143 DarkSeaGreen
color1 778899 #119 136 153 LightSlateGray
color2 FF8C00 #255 140   0 DarkOrange
color3 7FFF00 #127 255   0 Chartreuse
color4 FFA07A #255 160 122 LightSalmon
color5 FFDEAD #255 222 173 NavajoWhite
color6 00BFFF #  0 191 255 DeepSkyBlue
color7 00FFFF #  0 255 255 Cyan
color8 FFFF00 #255 255   0 Yellow
color9 B22222 #178  34  34 FireBrick
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders no
#default_graph_size 15 40
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################
# Boolean value, if true, Conky will be forked to background when started.
background yes

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 512

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
# temperature_unit Fahrenheit

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or it blinks.
##
# lua_load ~/wea_conky/draw_bg.lua
## TEXT
## ${lua conky_draw_bg 10 0 0 0 0 0x000000 0.2}
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
##
## OR Both above TEXT (No composite manager required - no blinking!)
##
lua_load /media/5/Conky/LUA/draw-bg.lua
lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.2
#
# TEXT
#
############### V9000 ########################################################
#starts the lua weather data gathering function, call once at top of conkyrc
lua_load ~/v9000/v9000.lua
lua_draw_hook_post weather
lua_load /media/5/Conky/templates/S11_V9_Vert-template.lua
#######################################################  End LUA Settings  ###
# The all important - How often conky refreshes.
# If you have a "Crey" try: 0.2 - smokin' - but watch the CPU useage go UP!
update_interval 1
### one blank line after TEXT
TEXT


S11_V9_Vert-template.lua
--[[
The latest script is a lua only weather script. aka: v9000
http://crunchbanglinux.org/forums/topic/16100/weather-in-conky/

the file:
http://dl.dropbox.com/u/19008369/v9000.tar.gz

mrppeachys LUA Tutorial
http://crunchbanglinux.org/forums/topic/17246/how-to-using-lua-scripts-in-conky/
]]
_G.weather_script = function()--#### DO NOT EDIT THIS LINE ###############################
--these tables hold the coordinates for each repeat do not edit ##########################
top_left_x_coordinate={}-- ###############################################################
top_left_y_coordinate={}-- ###############################################################
-- #######################################################################################
-- SET DEFAULTS ##########################################################################
-- set defaults do not localise these defaults if you use a seperate display script
-- default_font="Anonymous Pro" --font must be in quotes
default_font="monofur" -- font must be in quotes
default_font_size=14
default_color=0xF0FFFF -- Azure
default_alpha=1 -- fully opaque
default_image_width=20
default_image_height=20
-- ## New Options ###
default_face="bold"
-- "normal" for normal/normal
-- "bold" for normal/bold
-- "italic" for italic/normal
-- "bolditalic" for italic/bold
-- END OF DEFAULTS #######################################################################
-- START OF CURRENT WEATHER CONDITIONS  ##################################################
--## Moon ICON Placement for today ###
-- image({x=25,y=20,w=62,h=62,file=moon_icon[1]})
-- image({x=25,y=20,w=62,h=62,file="/media/5/Conky/images/RCAF-Roundel.png"})

out({c=0x00FFFF,a=1,x=20,y=10,txt=forecast_day_short[1].." "..forecast_date[1].." "..forecast_month_short[1]})
   out({c=0xF0FFFF,a=1,x=15,y=33,txt=now["temp"]})
   out({c=0xFFDEAD,a=1,x=15,y=47,txt=now["feels_like"]})

image({x=40,y=15,h=45,w=45,file=now["weather_icon"]})
--  image({x=40,y=15,h=45,w=45,file="/media/5/Conky/images/red+x.png"})

out({c=0x00FFFF,a=1,x=5,y=73,txt="Bar P"})
out({c=0xF0FFFF,a=1,x=60,y=73,txt=now["pressure_mb"]})
out({c=0x00FFFF,a=1,x=5,y=86,txt="Humid"})
out({c=0xF0FFFF,a=1,x=60,y=86,txt=now["humidity"].." %"})
out({c=0x00FFFF,a=1,x=5,y=99,txt="Dew P"})
out({c=0xF0FFFF,a=1,x=60,y=99,txt=now["dew_point"].." °"})
out({c=0x00FFFF,a=1,x=5,y=112,txt="U V"})
out({c=0xF0FFFF,a=1,x=60,y=112,txt=uv_index_num[1]})
out({c=0xF0FFFF,a=1,x=90,y=112,txt=uv_index_txt[1]})
out({c=0x00FFFF,a=1,x=5,y=125,txt="Cloud"})
out({c=0xF0FFFF,a=1,x=60,y=125,txt=cloud_cover[1].." %"})
out({c=0x00FFFF,a=1,x=5,y=138,txt="Rain"})
out({c=0xF0FFFF,a=1,x=60,y=138,txt=precipitation[1].." %"})
-- 10 Day Forecast starts here
out({c=0xF5F5DC,a=1,x=12,y=158,txt="10  Forecast"})
out({c=0xF5F5DC,a=1,x=10,y=171,txt="Starts Today"})
-- START OF WEATHER REPEAT CODE - WEATHER REPEAT CODE - WEATHER REPEAT CODE ##############
--start or weather forecast table section
--set start forecast day
start_day=1
--set total forecast days you want to display
number_of_days=10
-- up-down
topy=195 --300  --125 -- y = u|d
tyy=70 --55 -- topy+(tyy*1)
-- left-right
topx=5 -- x = l|r
-- txx=130
--set coordinates for top lef corners for each repeat
top_left_x_coordinate[1],top_left_y_coordinate[1]        =topx ,topy
   top_left_x_coordinate[2],top_left_y_coordinate[2]     =topx ,topy+(tyy*1)
top_left_x_coordinate[3],top_left_y_coordinate[3]        =topx ,topy+(tyy*2)
   top_left_x_coordinate[4],top_left_y_coordinate[4]     =topx ,topy+(tyy*3)
top_left_x_coordinate[5],top_left_y_coordinate[5]        =topx ,topy+(tyy*4)
   top_left_x_coordinate[6],top_left_y_coordinate[6]     =topx ,topy+(tyy*5)
top_left_x_coordinate[7],top_left_y_coordinate[7]        =topx ,topy+(tyy*6)
   top_left_x_coordinate[8],top_left_y_coordinate[8]     =topx ,topy+(tyy*7)
top_left_x_coordinate[9],top_left_y_coordinate[9]        =topx ,topy+(tyy*8)
   top_left_x_coordinate[10],top_left_y_coordinate[10]   =topx ,topy+(tyy*9)
--########################################################################################
for i=start_day,number_of_days-(start_day-1) do --start of day repeat, do not edit #######
tlx=top_left_x_coordinate[i] --sets top left x position for each repeat ##################
tly=top_left_y_coordinate[i] --sets top left y position for each repeat ##################
--########################################################################################
-- Day and Date
out({c=0x00FFFF,a=1,x=tlx+10,y=tly,txt=forecast_day_short[i].." "..forecast_date[i].." "..forecast_month_short[i]})
-- Forecasted High & Low
out({c=0xFF8C00,a=1,x=tlx,y=tly+13,txt=high_temp[i]})
   out({c=0x87CEFA,a=1,x=tlx,y=tly+26,txt=low_temp[i]})
-- condition images and moon phase images
image({x=30,y=tly+5,file=weather_icon[i]})image({x=75,y=tly+5,file=moon_icon[i]})
-- repeat test images
--   image({x=30,y=tly+5,file="/media/5/Conky/images/red+x.png"})image({x=75,y=tly+5,file="/media/5/Conky/images/red+x.png"})
-- Sunrise & Sunset
out({c=0xEEE8AA,a=1,x=tlx,y=tly+40,txt="S:"..sun_rise_24[i]})
   out({c=0x48D1CC,a=1,x=tlx+60,y=tly+40,txt=sun_set_24[i]})
-- Moonrise & Moonset
out({a=1,x=tlx,y=tly+53,txt="M:"..moon_rise_24[i]})
   out({c=0x48D1CC,a=1,x=tlx+60,y=tly+53,txt=moon_set_24[i]})
-- out({c=0xFAFAEC,a=1,x=tlx,y=tly+78,txt="P:"..moon_phase[i]})
--########################################################################################
end--of forecast repeat section ##########################################################
--########################################################################################
--END OF WEATHER CODE ----END OF WEATHER CODE ----END OF WEATHER CODE ---
--########################################################################################
end--of weather_display function do not edit this line ###################################
--########################################################################################

Title: Re: Conky Support, Codes and Screnshots
Post by: Sector11 on May 17, 2013, 07:00:26 PM
Just another general run of the mill conky to show off the new GNUS VSIDO (Debian SID Class) that goes where no other sub goes.

GNUS VSIDO on patrol
(http://t.imgbox.com/adk5tZ8f.jpg) (http://imgbox.com/adk5tZ8f)
Note: Calendar alignment problem fixed in code below.

The conky (graphics are optional):
###  Begin Window Settings  ##################################################
own_window yes

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
own_window_class Conky
own_window_title General Conky

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type override
# own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#own_window_argb_value 150

minimum_size 270 965 ## width, height
maximum_width 270 ## width

gap_x 10 ### left &right
gap_y 10 ### up & down

alignment tl
####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont monofur:bold:size=12

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
draw_shades yes #no # amplifies text if yes
default_shade_color 000000

draw_outline no # amplifies text if yes
default_outline_color 000000

default_color DCDCDC #220 220 220 Gainsboro
color0 8FBC8F #143 188 143 DarkSeaGreen
color1 778899 #119 136 153 LightSlateGray
color2 FF8C00 #255 140   0 DarkOrange
color3 7FFF00 #127 255   0 Chartreuse
color4 FFA07A #255 160 122 LightSalmon
color5 FFDEAD #255 222 173 NavajoWhite
color6 00BFFF #  0 191 255 DeepSkyBlue
color7 00FFFF #  0 255 255 Cyan
color8 FFFF00 #255 255   0 Yellow
color9 FF0000 #255   0   0 Red
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes #no
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################

# Boolean value, if true, Conky will be forked to background when started.
background no

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 256

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

## default bar size
default_bar_size 200 20

# Width for $top name value (default 15 characters)
top_name_width 8

## Specify a default width and height for graphs.
## Example: 'default_graph_size 0 25'. This is particularly useful for execgraph
## and execigraph as they do not take size arguments
## default_graph_size 200 0

#draw_graph_borders no

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load /media/5/Conky/LUA/dra2w-bg.lua
#TEXT
#${lua conky_draw_bg 10 0 0 0 0 0x000000 0.2}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
lua_load /media/5/Conky/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.2
### mount.lua ##################################################################
#
##instructions
##load script
##lua_load ~/path_to/mounted.lua
#lua_load /media/5/Conky/LUA/mounted.lua
## first lua command below text:
## ${lua get_mounted_data interval}, where interval is a number.  This starts data gathering
## to get output:
## ${lua mount partition_number data_type}, where partition number is a number
## data_type can be
## total - shows total number of partitions mounted, requires a partition_number also, use 1, could be used in an if_match
## fsys - shows filesystem
## size - shows space used in appropriate units
## free - shows free space in appropriate units
## use% - shows % used
## mount - shows mountpoint
#######################################################  End LUA Settings  ###

#digiThe all important - How often conky refreshes.
# If you have a "Crey" try: 0.2 - smokin' - but watch the CPU useage go UP!
update_interval 1 # in seconds

# stuff after 'TEXT' will be formatted on screen
TEXT
${lua conky_draw_bg 20 0 0 0 0 0x000000 0.4}\
  ${font Dock 51:size=40}${color1}Sector${color}${font}\
${image /media/5/My_Images/Sector11_Avatar/S11_falldown3.png -p 200,0 -s 60x60}\
${image /media/5/Conky/images/EVE.png -p -5,65 -s 80x80}
${image /media/5/Conky/images/Wall.E.png -p 205,65 -s 80x80}
${color5}${font LED_Mono:size=30}${alignc}${time %T}${font}${color}
${alignc}${color6}Easter${color}
${alignc}${exec ncal -e}
${alignc}SU MO ${color6}${time %b %Y}${color} FR SA
${goto 60}${color}${execp LAR=`date +%-d`; ncal -bh | sed '2d' | sed -e '1d' -e 's/\<'$LAR'\>/${color6}&${color}/' | sed ':a;N;$!ba;s/\n/\n${goto 60}/g'}
${voffset 5} Time online: ${alignr 15}${uptime_short}
${voffset 5}${alignc}${kernel}
${voffset 5}${alignc}${color5}Temperatures${color}
${alignc}CPU  ${color5}${platform f71882fg.2560 temp 1}${color}°\
     MB  ${color5}${platform f71882fg.2560 temp 2}${color}°
${alignc}GPU  ${color5}${nvidia temp}${color}°\
     HD  ${color5}${hddtemp /dev/sda}${color}°
${voffset 5}${alignc}${color5}Nvidia GPU${color}
GPU ${color5}${nvidia gpufreq} ${color}MHz${alignr 15}MEM ${color5}${nvidia memfreq} ${color}MHz
${voffset 5}${alignc}${color5}Disk Activity${color}
${goto 10}${diskiograph 50,250 FF0000 0000FF -t -l}${goto 10}${color1}${cpubar cpu4 50,250}${color}\
${voffset -35}${goto 80}SDA: R: ${diskio_read /dev/sda}
${goto 80}     W: ${diskio_write /dev/sda}
${voffset 9}${goto 60}${color1}${fs_bar /}${color}
${voffset -28}/Root   ${fs_size /}${goto 170}Used${goto 220}${fs_used_perc /}%
${goto 60}${color1}${fs_bar /home}${color}
${voffset -28}/Home   ${fs_size /home}${goto 170}Used${goto 220}${fs_used_perc /home}%
${goto 60}${color1}${fs_bar /media/5}${color}
${voffset -28} /M/5   ${fs_size /media/5}${goto 170}Used${goto 220}${fs_used_perc /media/5}%
${voffset 5} RAM    Used ${mem}${goto 170}Total ${memmax}
${voffset 5}${alignc}${color5}CPU${color}
${voffset 5}${goto 10}CPU1\
${voffset -8}${goto 60}${color1}${cpubar cpu1}${goto 60}${cpugraph cpu1 -t 20,200 FF0000 FFFF00}\
${voffset -12}${goto 70}${color}${if_match ${cpu cpu1}<10}  ${cpu cpu1}\
${else}${if_match ${cpu cpu1}<100} ${cpu cpu1}\
${else}${cpu cpu1}${endif}${endif}%
${voffset 8}${goto 10}CPU2\
${voffset -8}${goto 60}${color1}${cpubar cpu2}${goto 60}${cpugraph cpu2 -t 20,200 FF0000 FFFF00}\
${voffset -12}${goto 70}${color}${if_match ${cpu cpu2}<10}  ${cpu cpu2}\
${else}${if_match ${cpu cpu2}<100} ${cpu cpu2}\
${else}${cpu cpu2}${endif}${endif}%
${voffset 8}${goto 10}CPU3\
${voffset -8}${goto 60}${color1}${cpubar cpu3}${goto 60}${cpugraph cpu3 -t 20,200 FF0000 FFFF00}\
${voffset -12}${goto 70}${color}${if_match ${cpu cpu3}<10}  ${cpu cpu3}\
${else}${if_match ${cpu cpu3}<100} ${cpu cpu3}\
${else}${cpu cpu3}${endif}${endif}%
${voffset 8}${goto 10}Avg\
${voffset -8}${goto 60}${color1}${cpubar cpu0}${goto 60}${cpugraph cpu0 -t 20,200 FF0000 FFFF00}\
${voffset -12}${goto 70}${color}${if_match ${cpu cpu0}<10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0}<100} ${cpu cpu0}\
${else}${cpu cpu0}${endif}${endif}%           μm ${freq_g}
${voffset 8}${alignc}${color5}Network${color}
${voffset 5} Down${voffset -6}${goto 60}${color1}${downspeedgraph eth0 20,200 0000ff fff000 5 -lt}\
${voffset -12}${goto 90}${color}${downspeed eth0}
${voffset 5} Up${voffset -6}${goto 60}${color1}${upspeedgraph eth0 20,200 0000ff fff000 5 -lt}\
${voffset -12}${goto 90}${color}${upspeed eth0}
${voffset 8}${alignc}${color5}Processes${color}
Total ${color5}${processes}${color}${alignr 15}Running ${color5}${running_processes}${color}
${goto 220}${color0}mem${color}
Name${goto 90}${color7}cpu${color}   mem  ${color1}uid${color}${goto 220}${color0}res${color}
${cpubar cpu0 0,250}
${top name 1}${goto 75}${color7}${top cpu 1}${color}${color}${top mem 1}${color1}${top uid 1}${color0}${goto 220}${top mem_res 1}${color}
${top name 2}${goto 75}${color7}${top cpu 2}${color}${top mem 2}${color1}${top uid 2}${color0}${goto 220}${top mem_res 2}${color}
${top name 3}${goto 75}${color7}${top cpu 3}${color}${top mem 3}${color1}${top uid 3}${color0}${goto 220}${top mem_res 3}${color}
${top name 4}${goto 75}${color7}${top cpu 4}${color}${top mem 4}${color1}${top uid 4}${color0}${goto 220}${top mem_res 4}${color}
${top name 5}${goto 75}${color7}${top cpu 5}${color}${top mem 5}${color1}${top uid 5}${color0}${goto 220}${top mem_res 5}${color}
${top name 6}${goto 75}${color7}${top cpu 6}${color}${top mem 3}${color1}${top uid 6}${color0}${goto 220}${top mem_res 6}${color}
${top name 7}${goto 75}${color7}${top cpu 7}${color}${top mem 7}${color1}${top uid 7}${color0}${goto 220}${top mem_res 7}${color}
${top name 8}${goto 75}${color7}${top cpu 8}${color}${top mem 8}${color1}${top uid 8}${color0}${goto 220}${top mem_res 8}${color}
${top name 9}${goto 75}${color7}${top cpu 9}${color}${top mem 9}${color1}${top uid 9}${color0}${goto 220}${top mem_res 9}${color}
Title: Re: Conky Support, Codes and Screnshots
Post by: lwfitz on May 17, 2013, 07:04:00 PM
Ohhhhhh I like!

That wallpaper is pretty cool too! Great job my friend!
Title: Re: Conky Support, Codes and Screnshots
Post by: Sector11 on May 17, 2013, 07:24:03 PM
Thanks ... had to resize this one (http://wallbase.cc/wallpaper/299670)

And still working on circles....
Title: Re: Conky Support, Codes and Screenshots
Post by: lwfitz on May 22, 2013, 05:02:25 AM
New one Im working on

(http://en.zimagez.com/miniature/screenshot-05212013-105843pm.png) (http://en.zimagez.com/zimage/screenshot-05212013-105843pm.php)

Long way to go but its coming along
Title: Re: Conky Support, Codes and Screenshots
Post by: jedi on June 04, 2013, 04:15:05 AM
My "System" Conky, based on McLovin's bars Conky.

(http://en.zimagez.com/miniature/systemconky.png) (http://en.zimagez.com/zimage/systemconky.php)

The Conky;  .systemconkyrc

######################
# - Conky settings -   #
# -Based on a conky- #
# -by McLovins Bars- #
# -Tweaked by jedi - #
# -all mistakes by me...(jedi)
######################

background no
update_interval 1
cpu_avg_samples 2
total_run_times 0
override_utf8_locale yes

double_buffer yes
#no_buffers yes

text_buffer_size 10240
imlib_cache_size 10240

minimum_size 300 880
maximum_width 300

gap_x 15
gap_y 45
#####################
# - Text settings - #
#####################
use_xft yes
xftfont Santana:size=11
#xftalpha 0.8

uppercase no

# Text alignment, other possible values are commented
#alignment middle_left
#alignment middle_middle
#alignment middle_right
#alignment top_middle
alignment top_right
#alignment top_right
#alignment bottom_left
#alignment bottom_right
#alignment bottom_middle

######################
# - Color settings - #
######################
color0 c3c3c3 #mid gray
color1 FF0000 #red
color2 A4FFA4 #light green
color3 007EFF #bright blue
color4 E3E3E3 #very light gray
color5 c6771a #an orange shade
color6 CA8718 #a dust like color
color7 FFE500 #a darker yellow color
color8 C3FF00 #lime green
color9 227992 #bars-blue #another blue 48a3fd
default_color c3c3c3
default_shade_color gray
default_outline_color black
#############################
# - Window specifications - #
#############################
own_window yes
own_window_type normal #override
own_window_transparent yes
own_window_hints undecorated,sticky,below,skip_taskbar,skip_pager
own_window_colour gray
own_window_class Conky
own_window_title clicky
#own_window_argb_visual yes
#own_window_argb_value 255

border_inner_margin 0
border_outer_margin 0

#########################
# - Graphics settings - #
#########################
draw_shades no
draw_outline no
draw_borders no
stippled_borders 0
draw_graph_borders no

####
## Load Lua for bargraphs (required)
## Set the path to your script here.
#
lua_load ~/Conky/LUA/bargraph.lua
lua_draw_hook_pre main_bars
TEXT
${goto 6}${voffset 4}${color 547EC8}${font xspiralmental:size=14}G${color}${font}${voffset -4}${goto 32}Distro:${alignr}${execi 2600 cat /etc/issue.net}
${goto 6}${voffset 4}${color 547EC8}${font xspiralmental:size=14}Z${color}${font}${voffset -4}${goto 32}Kernel:${alignr}${kernel}
${goto 6}${voffset 4}${color 547EC8}${font StyleBats:size=14}o${color}${font}${voffset -4}${goto 32}Uptime:${alignr}${uptime}
${goto 6}${voffset 4}${color 547EC8}${font StyleBats:size=14}q${color}${font}${voffset -4}${goto 32}Processes:${alignr}${processes} ($running_processes running)
${color 547EC8}${hr}${color}
${goto 8}${color 951C1C}${font Weather:size=19}x${color}${font}${goto 32}${voffset -2}Motherboard Temp: ${alignr}${hwmon 2 temp 2}º C${font}
${goto 8}${color 951C1C}${font Weather:size=19}x${color}${font}${goto 32}${voffset -2}CPU Socket Temp: ${alignr}${hwmon 1 temp 1}º C${font}
${color 547EC8}${hr}${color}
${goto 46}${color 547EC8}${font Poky:size=16}P${color}${voffset}${font}${voffset -4}${goto 28}${alignc}${execi 1000 cat /proc/cpuinfo | egrep -m 1 'model name' | sed -e 's/model name.*: //' | cut -c41-47} ${exec cat /proc/cpuinfo | egrep -m 1 'model name' | sed -e 's/model name.*: //' | cut -c1-5} ${exec cat /proc/cpuinfo | egrep -m 1 'model name' | sed -e 's/model name.*: //' | cut -c10-13}-${exec cat /proc/cpuinfo | egrep -m 1 'model name' | sed -e 's/model name.*: //' | cut -c19-20} ${exec cat /proc/cpuinfo | egrep -m 1 'model name' | sed -e 's/model name.*: //' | cut -c28-49}
${goto 70}${color 951C1C}${font Weather:size=19}x${color}${font}${voffset -4}${goto 85}Physical CPU Temp: ${alignr}${goto 235}${hwmon temp 1}º C${font}
${alignc}Avg CPU use: ${cpu cpu0}%
${alignc}Load:  ${loadavg}
${goto 75}${color 951C1C}${font Weather:size=19}x${color}${font}${goto 32}${voffset -4}${alignc}Core 1 Temp: ${execi 10 sensors | grep "Core 1" | cut -d "+" -f2 | cut -c1-2}º C
${goto 6}${color 547EC8}${font Poky:size=16}P${color}${font}${voffset -4}${goto 28}CPU1: ${freq_g 1}Gh ${alignr}${cpu cpu1}%
${goto 6}${color 547EC8}${font Poky:size=16}P${color}${font}${voffset -4}${goto 28}CPU2: ${freq_g 2}Gh ${alignr}${cpu cpu2}%

${goto 75}${color 951C1C}${font Weather:size=19}x${color}${font}${goto 32}${voffset -4}${alignc}Core 2 Temp: ${execi 10 sensors | grep "Core 2" | cut -d "+" -f2 | cut -c1-2}º C
${goto 6}${color 547EC8}${font Poky:size=16}P${color}${font}${voffset -4}${goto 28}CPU3: ${freq_g 3}Gh ${alignr}${cpu cpu3}%
${goto 6}${color 547EC8}${font Poky:size=16}P${color}${font}${voffset -4}${goto 28}CPU4: ${freq_g 4}Gh ${alignr}${cpu cpu4}%

${goto 75}${color 951C1C}${font Weather:size=19}x${color}${font}${goto 32}${voffset -4}${alignc}Core 3 Temp: ${execi 10 sensors | grep "Core 3" | cut -d "+" -f2 | cut -c1-2}º C
${goto 6}${color 547EC8}${font Poky:size=16}P${color}${font}${voffset -4}${goto 28}CPU5: ${freq_g 5}Gh ${alignr}${cpu cpu5}%
${goto 6}${color 547EC8}${font Poky:size=16}P${color}${font}${voffset -4}${goto 28}CPU6: ${freq_g 6}Gh ${alignr}${cpu cpu6}%

${goto 75}${color 951C1C}${font Weather:size=19}x${color}${font}${goto 32}${voffset -4}${alignc}Core 4 Temp: ${execi 10 sensors | grep "Core 0" | cut -d "+" -f2 | cut -c1-2}º C
${goto 6}${color 547EC8}${font Poky:size=16}P${color}${font}${voffset -4}${goto 28}CPU7: ${freq_g 7}Gh ${alignr}${cpu cpu7}%
${goto 6}${color 547EC8}${font Poky:size=16}P${color}${font}${voffset -4}${goto 28}CPU8: ${freq_g 8}Gh ${alignr}${cpu cpu8}%

${goto 66}${voffset 4}${color 547EC8}${font Poky:size=11}M${color}${font}${voffset -8}${goto 32}${alignc}Used RAM: ${mem}${voffset -4}
${voffset 4}${goto 32}${alignc}Total RAM: ${memmax}

${alignc}${color5}GPU Temp:${color9} ${nvidia temp}º
${alignc}${color5}GPU Freq:${color1} ${nvidia gpufreq}MHz
${alignc}${color5}GPU Mem Freq:${color1} ${nvidia memFreq}MHz${color9}

${goto 3}${color 547EC8}${font Martin Vogel's Symbols:size=20}h${color}${font}${voffset -4}${goto 32}Disk I/O: ${diskio}${alignr}${voffset -10}${diskiograph 18,160 00D7FF FF452A -l -t}

${alignc}  NETWORK      ${alignr}${gw_iface} ${voffset -3}
${color 547EC8}${font PizzaDude Bullets:size=16}M${color}${font}${goto 32}${voffset -4}Upload Speed: ${upspeedf wlan0}${font}${alignr}Total: ${totalup wlan0}
${color 547EC8}${font PizzaDude Bullets:size=16}S${color}${font}${goto 32}${voffset -4}Download Speed: ${downspeedf wlan0}${font}${goto 32}${alignr}Total: ${totaldown wlan0}

${color 547EC8}${font Poky:size=16}w${color}${font}${goto 32}${voffset -20}Router IP: ${alignr}${gw_ip}
${goto 32}Local IP:  ${alignr}${addr wlan0}
${goto 32}Public IP: ${alignr}${execi 300 wget -q -O - checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'}
${goto 32}Signal : ${alignr}${wireless_link_qual_perc wlan0}%

${color 547EC8}${font Poky:size=16}Q${color}${font}${goto 32}${voffset -9}Battery :${alignr}${battery_percent BAT0}%
${alignc}${battery_time BAT0}


The lua;  bargraph.lua

--[[ BARGRAPH WIDGET
To call the script in a conky, use, before TEXT
lua_load /path/to/the/script/bargraph.lua
lua_draw_hook_pre main_rings
        and add one line (blank or not) after TEXT


Parameters are :
3 parameters are mandatory
name - the name of the conky variable to display, for example for {$cpu cpu0}, just write name="cpu"
arg - the argument of the above variable, for example for {$cpu cpu0}, just write arg="cpu0"
  arg can be a numerical value if name=""
max - the maximum value the above variable can reach, for example, for {$cpu cpu0}, just write max=100

Optional parameters:
x,y - coordinates of the starting point of the bar, default = middle of the conky window
cap - end of cap line, ossibles values are r,b,s (for round, butt, square), default="b"
  http://www.cairographics.org/samples/set_line_cap/
angle - angle of rotation of the bar in degress, default = 0 (i.e. a vertical bar)
  set to 90 for an horizontal bar
skew_x - skew bar around x axis, default = 0
skew_y - skew bar around y axis, default = 0
blocks  - number of blocks to display for a bar (values >0) , default= 10
height - height of a block, default=10 pixels
width - width of a block, default=20 pixels
space - space between 2 blocks, default=2 pixels
angle_bar - this angle is used to draw a bar on a circular way (ok, this is no more a bar !) default=0
radius - for cicular bars, internal radius, default=0
  with radius, parameter width has no more effect.

Colours below are defined into braces {colour in hexadecimal, alpha}
fg_colour - colour of a block ON, default= {0x00FF00,1}
bg_colour - colour of a block OFF, default = {0x00FF00,0.5}
alarm - threshold, values after this threshold will use alarm_colour colour , default=max
alarm_colour - colour of a block greater than alarm, default=fg_colour
smooth - (true or false), create a gradient from fg_colour to bg_colour, default=false
mid_colour - colours to add to gradient, with this syntax {position into the gradient (0 to1), colour hexa, alpha}
  for example, this table {{0.25,0xff0000,1},{0.5,0x00ff00,1},{0.75,0x0000ff,1}} will add
  3 colurs to gradient created by fg_colour and alarm_colour, default=no mid_colour
led_effect - add LED effects to each block, default=no led_effect
  if smooth=true, led_effect is not used
  possibles values : "r","a","e" for radial, parallelel, perdendicular to the bar (just try!)
  led_effect has to be used with theses colours :
fg_led - middle colour of a block ON, default = fg_colour
bg_led - middle colour of a block OFF, default = bg_colour
alarm_led - middle colour of a block > ALARM,  default = alarm_colour

reflection parameters, not avaimable for circular bars
reflection_alpha    - add a reflection effect (values from 0 to 1) default = 0 = no reflection
                      other values = starting opacity
reflection_scale    - scale of the reflection (default = 1 = height of text)
reflection_length   - length of reflection, define where the opacity will be set to zero
  calues from 0 to 1, default =1
reflection - position of reflection, relative to a vertical bar, default="b"
  possibles values are : "b","t","l","r" for bottom, top, left, right
draw_me     - if set to false, text is not drawn (default = true or 1)
              it can be used with a conky string, if the string returns 1, the text is drawn :
              example : "${if_empty ${wireless_essid wlan0}}${else}1$endif",
]]

require 'cairo'

----------------START OF PARAMETERS ----------
function conky_main_bars()
local bars_settings={
{ --[ Graph for MOBO Temp ]--
name="hwmon 2 temp 2",
arg="hwmon 2 temp 2",
max=100,
alarm=100,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=35,
x=158, y=97,
height=2,width=10,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU Socket Temp ]--
name="hwmon 1 temp 1",
arg="hwmon 1 temp 1",
max=100,
alarm=100,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=35,
x=158, y=118,
height=2,width=10,
angle=90,
led_effect="e",
space=1,
cap="r",
},
--[[ { --[ Graph for Physical CPU Temp ]--
name="hwmon temp 3",
arg="hwmon temp 3",
max=100,
alarm=100,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=35,
x=158, y=133,
height=2,width=10,
angle=90,
led_effect="e",
space=1,
cap="r",
},
]] { --[ Graph for CPU1 Left]--
name="cpu",
arg="cpu1",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=192, y=252,
height=3,width=7,
angle=270,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU1 Right ]--
name="cpu",
arg="cpu1",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=190, y=245,
height=3,width=7,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU2 Left]--
name="cpu",
arg="cpu2",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=192, y=273,
height=3,width=7,
angle=270,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU2 Right]--
name="cpu",
arg="cpu2",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=190, y=266,
height=3,width=7,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU3 Left ]--
name="cpu",
arg="cpu3",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=192, y=327,
height=3,width=7,
angle=270,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU3 Right ]--
name="cpu",
arg="cpu3",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=190, y=320,
height=3,width=7,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU4 Left ]--
name="cpu",
arg="cpu4",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=192, y=348,
height=3,width=7,
angle=270,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU4 Right ]--
name="cpu",
arg="cpu4",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=190, y=341,
height=3,width=7,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU5 Left ]--
name="cpu",
arg="cpu5",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=192, y=403,
height=3,width=7,
angle=270,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU5 Right ]--
name="cpu",
arg="cpu5",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=190, y=396,
height=3,width=7,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU6 Left ]--
name="cpu",
arg="cpu6",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=192, y=424,
height=3,width=7,
angle=270,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU6 Right ]--
name="cpu",
arg="cpu6",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=190, y=417,
height=3,width=7,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU7 Left ]--
name="cpu",
arg="cpu7",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=192, y=479,
height=3,width=7,
angle=270,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU7 Right ]--
name="cpu",
arg="cpu7",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=190, y=472,
height=3,width=7,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU8 Left ]--
name="cpu",
arg="cpu8",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=192, y=501,
height=3,width=7,
angle=270,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU8 Right ]--
name="cpu",
arg="cpu8",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=17,
x=190, y=494,
height=3,width=7,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for Memory ]--
name="memperc",
arg="",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
x=63,y=556,
blocks=89,
space=0,
height=2,width=12,
angle=90,
led_effect="e",
cap="r",
},
--[[ { --[ Graph for Root ]--
name="fs_used_perc",
arg="/",
max=100,
alarm=75,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=92,
x=65, y=500,
height=2,width=10,
angle=90,
led_effect="e",
space=0,
cap="r",
},
{ --[ Graph for Home ]--
name="fs_used_perc",
arg="/home",
max=100,
alarm=75,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=92,
x=65, y=557,
height=2,width=10,
angle=90,
led_effect="e",
space=0,
cap="r",
},
]] { --[ Graph for WiFi Signal strength ]--
name="wireless_link_qual_perc",
arg="wlan0",
max=100,
alarm=100,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=60,
x=86, y=796,
height=2,width=10,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for Battery power ]--
name="battery_percent",
arg="BAT0",
max=100,
alarm=100,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=60,
x=86, y=827,
height=2,width=10,
angle=90,
led_effect="e",
space=1,
cap="r",
},
}
-----------END OF PARAMETERS--------------


   
if conky_window == nil then return end

local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)

cr = cairo_create(cs)   
--prevent segmentation error when reading cpu state
    if tonumber(conky_parse('${updates}'))>3 then
        for i in pairs(bars_settings) do
       
        draw_multi_bar_graph(bars_settings[i])
       
        end
    end
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil

end



function draw_multi_bar_graph(t)
cairo_save(cr)
--check values
if t.draw_me == true then t.draw_me = nil end
if t.draw_me ~= nil and conky_parse(tostring(t.draw_me)) ~= "1" then return end
if t.name==nil and t.arg==nil then
print ("No input values ... use parameters 'name' with 'arg' or only parameter 'arg' ")
return
end
if t.max==nil then
print ("No maximum value defined, use 'max'")
return
end
if t.name==nil then t.name="" end
if t.arg==nil then t.arg="" end

--set default values
if t.x == nil then t.x = conky_window.width/2 end
if t.y == nil then t.y = conky_window.height/2 end
if t.blocks == nil then t.blocks=10 end
if t.height == nil then t.height=10 end
if t.angle == nil then t.angle=0 end
t.angle = t.angle*math.pi/180
--line cap style
if t.cap==nil then t.cap = "b" end
local cap="b"
for i,v in ipairs({"s","r","b"}) do
if v==t.cap then cap=v end
end
local delta=0
if t.cap=="r" or t.cap=="s" then delta = t.height end
if cap=="s" then cap = CAIRO_LINE_CAP_SQUARE
elseif cap=="r" then
cap = CAIRO_LINE_CAP_ROUND
elseif cap=="b" then
cap = CAIRO_LINE_CAP_BUTT
end
--end line cap style
--if t.led_effect == nil then t.led_effect="r" end
if t.width == nil then t.width=20 end
if t.space == nil then t.space=2 end
if t.radius == nil then t.radius=0 end
if t.angle_bar == nil then t.angle_bar=0 end
t.angle_bar = t.angle_bar*math.pi/360 --halt angle

--colours
if t.bg_colour == nil then t.bg_colour = {0x00FF00,0.5} end
if #t.bg_colour~=2 then t.bg_colour = {0x00FF00,0.5} end
if t.fg_colour == nil then t.fg_colour = {0x00FF00,1} end
if #t.fg_colour~=2 then t.fg_colour = {0x00FF00,1} end
if t.alarm_colour == nil then t.alarm_colour = t.fg_colour end
if #t.alarm_colour~=2 then t.alarm_colour = t.fg_colour end

if t.mid_colour ~= nil then
for i=1, #t.mid_colour do   
    if #t.mid_colour[i]~=3 then
    print ("error in mid_color table")
    t.mid_colour[i]={1,0xFFFFFF,1}
    end
end
    end
   
if t.bg_led ~= nil and #t.bg_led~=2 then t.bg_led = t.bg_colour end
if t.fg_led ~= nil and #t.fg_led~=2 then t.fg_led = t.fg_colour end
if t.alarm_led~= nil and #t.alarm_led~=2 then t.alarm_led = t.fg_led end

if t.led_effect~=nil then
if t.bg_led == nil then t.bg_led = t.bg_colour end
if t.fg_led == nil then t.fg_led = t.fg_colour end
if t.alarm_led == nil  then t.alarm_led = t.fg_led end
end


if t.alarm==nil then t.alarm = t.max end --0.8*t.max end
if t.smooth == nil then t.smooth = false end

if t.skew_x == nil then
t.skew_x=0
else
t.skew_x = math.pi*t.skew_x/180
end
if t.skew_y == nil then
t.skew_y=0
else
t.skew_y = math.pi*t.skew_y/180
end

if t.reflection_alpha==nil then t.reflection_alpha=0 end
if t.reflection_length==nil then t.reflection_length=1 end
if t.reflection_scale==nil then t.reflection_scale=1 end

--end of default values


local function rgb_to_r_g_b(col_a)
return ((col_a[1] / 0x10000) % 0x100) / 255., ((col_a[1] / 0x100) % 0x100) / 255., (col_a[1] % 0x100) / 255., col_a[2]
end


--functions used to create patterns

local function create_smooth_linear_gradient(x0,y0,x1,y1)
local pat = cairo_pattern_create_linear (x0,y0,x1,y1)
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(t.fg_colour))
cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(t.alarm_colour))
if t.mid_colour ~=nil then
for i=1, #t.mid_colour do
cairo_pattern_add_color_stop_rgba (pat, t.mid_colour[i][1], rgb_to_r_g_b({t.mid_colour[i][2],t.mid_colour[i][3]}))
end
end
return pat
end

local function create_smooth_radial_gradient(x0,y0,r0,x1,y1,r1)
local pat =  cairo_pattern_create_radial (x0,y0,r0,x1,y1,r1)
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(t.fg_colour))
cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(t.alarm_colour))
if t.mid_colour ~=nil then
for i=1, #t.mid_colour do
cairo_pattern_add_color_stop_rgba (pat, t.mid_colour[i][1], rgb_to_r_g_b({t.mid_colour[i][2],t.mid_colour[i][3]}))
end
end
return pat
end

local function create_led_linear_gradient(x0,y0,x1,y1,col_alp,col_led)
local pat = cairo_pattern_create_linear (x0,y0,x1,y1) ---delta, 0,delta+ t.width,0)
cairo_pattern_add_color_stop_rgba (pat, 0.0, rgb_to_r_g_b(col_alp))
cairo_pattern_add_color_stop_rgba (pat, 0.5, rgb_to_r_g_b(col_led))
cairo_pattern_add_color_stop_rgba (pat, 1.0, rgb_to_r_g_b(col_alp))
return pat
end

local function create_led_radial_gradient(x0,y0,r0,x1,y1,r1,col_alp,col_led,mode)
local pat = cairo_pattern_create_radial (x0,y0,r0,x1,y1,r1)
if mode==3 then
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(col_alp))
cairo_pattern_add_color_stop_rgba (pat, 0.5, rgb_to_r_g_b(col_led))
cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(col_alp))
else
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(col_led))
cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(col_alp))
end
return pat
end






local function draw_single_bar()
--this fucntion is used for bars with a single block (blocks=1) but
--the drawing is cut in 3 blocks : value/alarm/background
--not zvzimzblr for circular bar
local function create_pattern(col_alp,col_led,bg)
local pat

if not t.smooth then
if t.led_effect=="e" then
pat = create_led_linear_gradient (-delta, 0,delta+ t.width,0,col_alp,col_led)
elseif t.led_effect=="a" then
pat = create_led_linear_gradient (t.width/2, 0,t.width/2,-t.height,col_alp,col_led)
elseif  t.led_effect=="r" then
pat = create_led_radial_gradient (t.width/2, -t.height/2, 0, t.width/2,-t.height/2,t.height/1.5,col_alp,col_led,2)
else
pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(col_alp))
end
else
if bg then
pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(t.bg_colour))
else
pat = create_smooth_linear_gradient(t.width/2, 0, t.width/2,-t.height)
end
end
return pat
end

local y1=-t.height*pct/100
local y2,y3
if pct>(100*t.alarm/t.max) then
y1 = -t.height*t.alarm/100
y2 = -t.height*pct/100
if t.smooth then y1=y2 end
end

if t.angle_bar==0 then

--block for fg value
local pat = create_pattern(t.fg_colour,t.fg_led,false)
cairo_set_source(cr,pat)
cairo_rectangle(cr,0,0,t.width,y1)
cairo_fill(cr)
cairo_pattern_destroy(pat)

-- block for alarm value
if not t.smooth and y2 ~=nil then
pat = create_pattern(t.alarm_colour,t.alarm_led,false)
cairo_set_source(cr,pat)
cairo_rectangle(cr,0,y1,t.width,y2-y1)
cairo_fill(cr)
y3=y2
cairo_pattern_destroy(pat)
else
y2,y3=y1,y1
end
-- block for bg value
cairo_rectangle(cr,0,y2,t.width,-t.height-y3)
pat = create_pattern(t.bg_colour,t.bg_led,true)
cairo_set_source(cr,pat)
cairo_pattern_destroy(pat)
cairo_fill(cr)
end
end  --end single bar






local function draw_multi_bar()
--function used for bars with 2 or more blocks
for pt = 1,t.blocks do
--set block y
local y1 = -(pt-1)*(t.height+t.space)
local light_on=false

--set colors
local col_alp = t.bg_colour
local col_led = t.bg_led
if pct>=(100/t.blocks) or pct>0 then --ligth on or not the block
if pct>=(pcb*(pt-1))  then
light_on = true
col_alp = t.fg_colour
col_led = t.fg_led
if pct>=(100*t.alarm/t.max) and (pcb*pt)>(100*t.alarm/t.max) then
col_alp = t.alarm_colour
col_led = t.alarm_led
end
end
end

--set colors
--have to try to create gradients outside the loop ?
local pat

if not t.smooth then
if t.angle_bar==0 then
if t.led_effect=="e" then
pat = create_led_linear_gradient (-delta, 0,delta+ t.width,0,col_alp,col_led)
elseif t.led_effect=="a" then
pat = create_led_linear_gradient (t.width/2, -t.height/2+y1,t.width/2,0+t.height/2+y1,col_alp,col_led)
elseif  t.led_effect=="r" then
pat = create_led_radial_gradient (t.width/2, y1, 0, t.width/2,y1,t.width/1.5,col_alp,col_led,2)
else
pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(col_alp))
end
else
if t.led_effect=="a"  then
pat = create_led_radial_gradient (0, 0, t.radius+(t.height+t.space)*(pt-1),
0, 0, t.radius+(t.height+t.space)*(pt),
col_alp,col_led,3)
else
pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(col_alp))
end

end
else

if light_on then
if t.angle_bar==0 then
pat = create_smooth_linear_gradient(t.width/2, t.height/2, t.width/2,-(t.blocks-0.5)*(t.height+t.space))
else
pat = create_smooth_radial_gradient(0, 0, (t.height+t.space),  0,0,(t.blocks+1)*(t.height+t.space),2)
end
else
pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(t.bg_colour))
end
end
cairo_set_source (cr, pat)
cairo_pattern_destroy(pat)

--draw a block
if t.angle_bar==0 then
cairo_move_to(cr,0,y1)
cairo_line_to(cr,t.width,y1)
else
cairo_arc( cr,0,0,
t.radius+(t.height+t.space)*(pt)-t.height/2,
-t.angle_bar -math.pi/2 ,
t.angle_bar -math.pi/2)
end
cairo_stroke(cr)
end
end




local function setup_bar_graph()
--function used to retrieve the value to display and to set the cairo structure
if t.blocks ~=1 then t.y=t.y-t.height/2 end

local value = 0
if t.name ~="" then
value = tonumber(conky_parse(string.format('${%s %s}', t.name, t.arg)))
--$to_bytes doesn't work when value has a decimal point,
--https://garage.maemo.org/plugins/ggit/browse.php/?p=monky;a=commitdiff;h=174c256c81a027a2ea406f5f37dc036fac0a524b;hp=d75e2db5ed3fc788fb8514121f67316ac3e5f29f
--http://sourceforge.net/tracker/index.php?func=detail&aid=3000865&group_id=143975&atid=757310
--conky bug?
--value = (conky_parse(string.format('${%s %s}', t.name, t.arg)))
--if string.match(value,"%w") then
-- value = conky_parse(string.format('${to_bytes %s}',value))
--end
else
value = tonumber(t.arg)
end

if value==nil then value =0 end

pct = 100*value/t.max
pcb = 100/t.blocks

cairo_set_line_width (cr, t.height)
cairo_set_line_cap  (cr, cap)
cairo_translate(cr,t.x,t.y)
cairo_rotate(cr,t.angle)

local matrix0 = cairo_matrix_t:create()
tolua.takeownership(matrix0)
cairo_matrix_init (matrix0, 1,t.skew_y,t.skew_x,1,0,0)
cairo_transform(cr,matrix0)



--call the drawing function for blocks
if t.blocks==1 and t.angle_bar==0 then
draw_single_bar()
if t.reflection=="t" or t.reflection=="b" then cairo_translate(cr,0,-t.height) end
else
draw_multi_bar()
end

--dot for reminder
--[[
if t.blocks ~=1 then
cairo_set_source_rgba(cr,1,0,0,1)
cairo_arc(cr,0,t.height/2,3,0,2*math.pi)
cairo_fill(cr)
else
cairo_set_source_rgba(cr,1,0,0,1)
cairo_arc(cr,0,0,3,0,2*math.pi)
cairo_fill(cr)
end]]

--call the drawing function for reflection and prepare the mask used
if t.reflection_alpha>0 and t.angle_bar==0 then
local pat2
local matrix1 = cairo_matrix_t:create()
tolua.takeownership(matrix1)
if t.angle_bar==0 then
pts={-delta/2,(t.height+t.space)/2,t.width+delta,-(t.height+t.space)*(t.blocks)}
if t.reflection=="t" then
cairo_matrix_init (matrix1,1,0,0,-t.reflection_scale,0,-(t.height+t.space)*(t.blocks-0.5)*2*(t.reflection_scale+1)/2)
pat2 = cairo_pattern_create_linear (t.width/2,-(t.height+t.space)*(t.blocks),t.width/2,(t.height+t.space)/2)
elseif t.reflection=="r" then
cairo_matrix_init (matrix1,-t.reflection_scale,0,0,1,delta+2*t.width,0)
pat2 = cairo_pattern_create_linear (delta/2+t.width,0,-delta/2,0)
elseif t.reflection=="l" then
cairo_matrix_init (matrix1,-t.reflection_scale,0,0,1,-delta,0)
pat2 = cairo_pattern_create_linear (-delta/2,0,delta/2+t.width,-0)
else --bottom
cairo_matrix_init (matrix1,1,0,0,-1*t.reflection_scale,0,(t.height+t.space)*(t.reflection_scale+1)/2)
pat2 = cairo_pattern_create_linear (t.width/2,(t.height+t.space)/2,t.width/2,-(t.height+t.space)*(t.blocks))
end
end
cairo_transform(cr,matrix1)

if t.blocks==1 and t.angle_bar==0 then
draw_single_bar()
cairo_translate(cr,0,-t.height/2)
else
draw_multi_bar()
end


cairo_set_line_width(cr,0.01)
cairo_pattern_add_color_stop_rgba (pat2, 0,0,0,0,1-t.reflection_alpha)
cairo_pattern_add_color_stop_rgba (pat2, t.reflection_length,0,0,0,1)
if t.angle_bar==0 then
cairo_rectangle(cr,pts[1],pts[2],pts[3],pts[4])
end
cairo_clip_preserve(cr)
cairo_set_operator(cr,CAIRO_OPERATOR_CLEAR)
cairo_stroke(cr)
cairo_mask(cr,pat2)
cairo_pattern_destroy(pat2)
cairo_set_operator(cr,CAIRO_OPERATOR_OVER)

end --reflection
pct,pcb=nil
end --setup_bar_graph()

--start here !
setup_bar_graph()
cairo_restore(cr)
end


There's a lot here that will need some "tweaking" for it to work on your system.  I'll also include an attachment of the needed fonts!  It's a fun Conky to work on.  All the credit goes to McLovin, and also the help I received with the sensors info from Sector11...

Jedi
Title: Re: Conky Support, Codes and Screenshots
Post by: VastOne on June 04, 2013, 04:36:36 AM
Nice one jedi...

Good to see some McLovin love...

... and posts in the conky thread again
Title: Re: Conky Support, Codes and Screenshots
Post by: jedi on June 04, 2013, 05:28:35 AM
Yes, Sector11 pointed out a request for it on the buntu forums, so I was devious and posted it here with a link to it on the buntu forum.   ;)
Title: Re: Conky Support, Codes and Screenshots
Post by: McLovin on June 09, 2013, 10:41:31 PM
looks good, thank you for the creds, I haven't made a new one in a while, but I have modified the one i use daily a little bit, changed the record image that shows when I'm not playing any music, added backgrounds, edited the weather alerts code on MrPeachie's v9000 a little to fit what I wanted, and added a lua graph for the network activity.
(http://t.imgbox.com/abyjOhkt.jpg) (http://imgbox.com/abyjOhkt)
Title: Re: Conky Support, Codes and Screenshots
Post by: jedi on July 01, 2013, 06:02:21 AM
A question to the Conky guru's among us.  This is one of those times I'm not even sure how to ask the question, by-the-way.

First off, I have some flicker in the top Conky.  Nothing major, but every once in a while it will flicker for a few seconds.  (2-5 seconds)  I can live with it, but if it's an easy fix I'd like to fix it.  I'm running Fluxbox, and Compton as the composite mgr.

Second and more tricky, is the led graphs lua file I'm using.  I've noticed that I can't evenly space out the bars all the way across the top of the desktop.  I'm not even close to lua fluency, and when I try to make them all the same size, with the same spacing between them, some just disappear completely and no matter what (x) (y) coordinates I can't get them to work or appear.  The scrot below will show you the best I've gotten it to work.  I'm working with a 1920x1080 screen res.  The Conky I've been trying to make is just a remake of McLovins bars Conky except instead of it being vertical, I'd like to try something horizontal.  Is this possible?

I'll include the Conkyrc and lua files for perusal by someone a lot smarter than me!  Any help appreciated!  It's just Conky, so no emergency or "must have answers RIGHT NOW" required.  I've tried searching through the forum here and at #! and the buntu Conky thread as well.  I've also tried to "doctor" it up myself but to no avail.  So I'm breaking down and asking for help.  I just can't quite grasp why I can't put the bars where I want using the (x) and (y) coordinate statements in the lua file for each representative bar I want to display on the screen.  Like I said, any help appreciated but no emergency or hurry required.  Conky is just a really fun distraction for me!

Here's the scrot;

(http://en.zimagez.com/miniature/topbars.jpg) (http://en.zimagez.com/zimage/topbars.php)

The Conky;


##################################################
# killall conky && conky -c /home/jed/Conky/sysledconkyrc &
##################################################
background yes
update_interval 1
double_buffer yes
no_buffers yes
imlib_cache_size 0
override_utf8_locale yes
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
own_window_class conky
own_window_title horizleds
border_inner_margin 0
border_outer_margin 0
minimum_size 1920 55
alignment tl
gap_x 5
gap_y 5
default_color 4B60B4
text_buffer_size 512
use_xft yes
xftfont monofur:bold:size=11
xftalpha 1
cpu_avg_samples 2
net_avg_samples 1

lua_load /home/jed/Conky/LUA/leds.lua
lua_draw_hook_post main_bars

TEXT


${goto 15}MOBO Temp ${color ff6100}${hwmon 2 temp 2}°C${color 4B60B4}${goto 135}|${goto 160}CPU Socket Temp ${color ff6100}${hwmon 1 temp 1}°C${voffset -15}${color 4B60B4} ${goto 1050}Kernel: ${kernel} ${goto 1420}Up:${color ff6100} ${uptime}${color 4B60B4}${goto 1630}${scroll 40 1${execi 2600 cat /etc/issue.net}-VSIDO}${goto 365}${color 4B60B4}${voffset 15}Avg CPU Use: ${color 3DBA2F}${cpu cpu0}% ${color 4B60B4}${goto 483}|${goto 500}${color 4B60B4}RAM Use:${color 3DBA2F}${mem} / ${memmax}${color 4B60B4}${goto 735}Bat:${color 3DBA2F}${battery_percent BAT0}% ${color ff6100}${battery_time BAT0}${color 4B60B4}${goto 875}|${goto 900}WiFi Signal: ${color 3DBA2F}${wireless_link_qual_perc wlan0}%


The leds.lua;


--[[ BARGRAPH WIDGET
v1.3 by wlourf (03 march 2010)
This widget draw a simple bar like (old) equalizers on hi-fi systems.
http://u-scripts.blogspot.com/
        Tweaked by McLovin, then borked by jedi
The arguments are :
- "name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'...
  or you can set it to "" if you want to display a numeric value with arg=numeric_value
    - "arg" is the argument to the stat type, e.g. if in Conky you would write ${cpu cpu0}, 'cpu0' would be the argument.
      If you would not use an argument in the Conky variable, use ''.
- "max" is the maximum value of the bar. If the Conky variable outputs a percentage, use 100.
- "nb_blocks" is the umber of block to draw
- "cap" id the cap of a block, possibles values are CAIRO_LINE_CAP_ROUND , CAIRO_LINE_CAP_SQUARE or CAIRO_LINE_CAP_BUTT
  see http://www.cairographics.org/samples/set_line_cap/
- "xb" and "yb" are the coordinates of the bottom left point of the bar, or the center of the circle if radius>0
- "w" and "h" are the width and the height of a block (without caps), w has no effect for "circle" bar
- "space" is the space betwwen two blocks, can be null or negative
- "bgc" and "bga" are background colors and alpha when the block is not LIGHT OFF
- "fgc" and "fga" are foreground colors and alpha when the block is not LIGHT ON
- "alc" and "ala" are foreground colors and alpha when the block is not LIGHT ON and ALARM ON
- "alarm" is the value where blocks LIGHT ON are in a different color (values from 0 to 100)
- "led_effect" true or false : to show a block with a led effect
- "led_alpha" alpha of the center of the led (values from 0 to 1)
- "smooth" true or false : colors in the bar has a smooth effect
- "mid_color",mid_alpha" : colors of the center of the bar (mid_color can to be set to nil)
- "rotation" : angle of rotation of the bar (values are 0 to 360 degrees). 0 = vertical bar, 90 = horizontal bar
- "radius" : draw the bar on a circle (it's no more a circle, radius = 0 to keep bars)
- "angle_bar"  : if radius>0 angle_bar is the angle of the bar
v1.0 (10 Feb. 2010) original release
v1.1 (13 Feb. 2010) numeric values can be passed instead conky stats with parameters name="", arg = numeric_value
v1.2 (28 Feb. 2010) just renamed the widget to bargraph
v1.3 (03 March 2010) added parameters radius & angle_bar to draw the bar in a circular way
]]

require 'cairo'

----------------START OF PARAMETERS ----------
function conky_main_bars()
local bars_settings={
{ --[ Graph for MOBO Temp ]--
name="hwmon 2 temp 2",
arg="hwmon 2 temp 2",
max=100,
alarm=40,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff6100,0},
    alarm_led={0xff6100,1},
blocks=35,
x=10, y=20,
height=2,width=10,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU Socket Temp ]--
name="hwmon 1 temp 1",
arg="hwmon 1 temp 1",
max=100,
alarm=40,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff6100,0},
    alarm_led={0xff6100,1},
blocks=35,
x=175, y=20,
height=2,width=10,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for CPU Socket Temp ]--
name="cpu",
arg="cpu0",
max=100,
alarm=100,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=35,
x=366, y=20,
height=2,width=10,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for Memory ]--
name="memperc",
arg="",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
x=510,y=20,
blocks=50,
space=1,
height=2,width=10,
angle=90,
led_effect="e",
cap="r",
},
--[[ { --[ Graph for Root ]--
name="fs_used_perc",
arg="/",
max=100,
alarm=75,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=35,
x=1260, y=20,
height=2,width=10,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for Home ]--
name="fs_used_perc",
arg="/home",
max=100,
alarm=75,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=35,
x=610, y=20,
height=2,width=10,
angle=90,
led_effect="e",
space=1,
cap="r",
},
]] { --[ Graph for WiFi Signal strength ]--
name="wireless_link_qual_perc",
arg="wlan0",
max=100,
alarm=100,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=40,
x=900, y=20,
height=2,width=10,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ --[ Graph for Battery power ]--
name="battery_percent",
arg="BAT0",
max=100,
alarm=100,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=35,
x=750, y=20,
height=2,width=10,
angle=90,
led_effect="e",
space=1,
cap="r",
},
}
-----------END OF PARAMETERS--------------
if conky_window == nil then return end

local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)

cr = cairo_create(cs)
--prevent segmentation error when reading cpu state
    if tonumber(conky_parse('${updates}'))>3 then
        for i in pairs(bars_settings) do

        draw_multi_bar_graph(bars_settings[i])

        end
    end
cairo_destroy(cr)
cairo_surface_destroy(cs)

end



function draw_multi_bar_graph(t)
cairo_save(cr)
--check values
if t.name==nil and t.arg==nil then
print ("No input values ... use parameters 'name' with 'arg' or only parameter 'arg' ")
return
end
if t.max==nil then
print ("No maximum value defined, use 'max'")
return
end
if t.name==nil then t.name="" end
if t.arg==nil then t.arg="" end

--set default values
if t.x == nil then t.x = conky_window.width/2 end
if t.y == nil then t.y = conky_window.height/2 end
if t.blocks == nil then t.blocks=10 end
if t.height == nil then t.height=10 end
if t.angle == nil then t.angle=0 end
t.angle = t.angle*math.pi/180
--line cap style
if t.cap==nil then t.cap = "b" end
local cap="b"
for i,v in ipairs({"s","r","b"}) do
if v==t.cap then cap=v end
end
delta=0
if t.cap=="r" or t.cap=="s" then delta = t.height end
if cap=="s" then cap = CAIRO_LINE_CAP_SQUARE
elseif cap=="r" then
cap = CAIRO_LINE_CAP_ROUND
elseif cap=="b" then
cap = CAIRO_LINE_CAP_BUTT
end
--end line cap style
--if t.led_effect == nil then t.led_effect="r" end
if t.width == nil then t.width=20 end
if t.space == nil then t.space=2 end
if t.radius == nil then t.radius=0 end
if t.angle_bar == nil then t.angle_bar=0 end
t.angle_bar = t.angle_bar*math.pi/360 --halt angle

--colours
if t.bg_colour == nil then t.bg_colour = {0xffffff,0.5} end
if #t.bg_colour~=2 then t.bg_colour = {0xffffff,0.5} end
if t.fg_colour == nil then t.fg_colour = {0xffffff,1} end
if #t.fg_colour~=2 then t.fg_colour = {0xffffff,1} end
if t.alarm_colour == nil then t.alarm_colour = t.fg_colour end
if #t.alarm_colour~=2 then t.alarm_colour = t.fg_colour end

if t.mid_colour ~= nil then
for i=1, #t.mid_colour do
    if #t.mid_colour[i]~=3 then
    print ("error in mid_color table")
    t.mid_colour[i]={1,0xFFFFFF,1}
    end
end
    end

if t.bg_led ~= nil and #t.bg_led~=2 then t.bg_led = t.bg_colour end
if t.fg_led ~= nil and #t.fg_led~=2 then t.fg_led = t.fg_colour end
if t.alarm_led~= nil and #t.alarm_led~=2 then t.alarm_led = t.fg_led end

if t.led_effect~=nil then
if t.bg_led == nil then t.bg_led = t.bg_colour end
if t.fg_led == nil then t.fg_led = t.fg_colour end
if t.alarm_led == nil  then t.alarm_led = t.fg_led end
end


if t.alarm==nil then t.alarm = t.max end --0.8*t.max end
if t.smooth == nil then t.smooth = false end

if t.skew_x == nil then
t.skew_x=0
else
t.skew_x = math.pi*t.skew_x/180
end
if t.skew_y == nil then
t.skew_y=0
else
t.skew_y = math.pi*t.skew_y/180
end

if t.reflection_alpha==nil then t.reflection_alpha=0 end
if t.reflection_length==nil then t.reflection_length=1 end
if t.reflection_scale==nil then t.reflection_scale=1 end

--end of default values


local function rgb_to_r_g_b(col_a)
return ((col_a[1] / 0x10000) % 0x100) / 255., ((col_a[1] / 0x100) % 0x100) / 255., (col_a[1] % 0x100) / 255., col_a[2]
end


--functions used to create patterns

local function create_smooth_linear_gradient(x0,y0,x1,y1)
local pat = cairo_pattern_create_linear (x0,y0,x1,y1)
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(t.fg_colour))
cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(t.alarm_colour))
if t.mid_colour ~=nil then
for i=1, #t.mid_colour do
cairo_pattern_add_color_stop_rgba (pat, t.mid_colour[i][1], rgb_to_r_g_b({t.mid_colour[i][2],t.mid_colour[i][3]}))
end
end
return pat
end

local function create_smooth_radial_gradient(x0,y0,r0,x1,y1,r1)
local pat =  cairo_pattern_create_radial (x0,y0,r0,x1,y1,r1)
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(t.fg_colour))
cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(t.alarm_colour))
if t.mid_colour ~=nil then
for i=1, #t.mid_colour do
cairo_pattern_add_color_stop_rgba (pat, t.mid_colour[i][1], rgb_to_r_g_b({t.mid_colour[i][2],t.mid_colour[i][3]}))
end
end
return pat
end

local function create_led_linear_gradient(x0,y0,x1,y1,col_alp,col_led)
local pat = cairo_pattern_create_linear (x0,y0,x1,y1) ---delta, 0,delta+ t.width,0)
cairo_pattern_add_color_stop_rgba (pat, 0.0, rgb_to_r_g_b(col_alp))
cairo_pattern_add_color_stop_rgba (pat, 0.5, rgb_to_r_g_b(col_led))
cairo_pattern_add_color_stop_rgba (pat, 1.0, rgb_to_r_g_b(col_alp))
return pat
end

local function create_led_radial_gradient(x0,y0,r0,x1,y1,r1,col_alp,col_led,mode)
local pat = cairo_pattern_create_radial (x0,y0,r0,x1,y1,r1)
if mode==3 then
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(col_alp))
cairo_pattern_add_color_stop_rgba (pat, 0.5, rgb_to_r_g_b(col_led))
cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(col_alp))
else
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(col_led))
cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(col_alp))
end
return pat
end






local function draw_single_bar()
--this fucntion is used for bars with a single block (blocks=1) but
--the drawing is cut in 3 blocks : value/alarm/background
--not zvzimzblr for circular bar
local function create_pattern(col_alp,col_led,bg)
local pat

if not t.smooth then
if t.led_effect=="e" then
pat = create_led_linear_gradient (-delta, 0,delta+ t.width,0,col_alp,col_led)
elseif t.led_effect=="a" then
pat = create_led_linear_gradient (t.width/2, 0,t.width/2,-t.height,col_alp,col_led)
elseif  t.led_effect=="r" then
pat = create_led_radial_gradient (t.width/2, -t.height/2, 0, t.width/2,-t.height/2,t.height/1.5,col_alp,col_led,2)
else
pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(col_alp))
end
else
if bg then
pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(t.bg_colour))
else
pat = create_smooth_linear_gradient(t.width/2, 0, t.width/2,-t.height)
end
end
return pat
end

local y1=-t.height*pct/100
local y2=nil
if pct>(100*t.alarm/t.max) then
y1 = -t.height*t.alarm/100
y2 = -t.height*pct/100
if t.smooth then y1=y2 end
end

if t.angle_bar==0 then

--block for fg value
pat = create_pattern(t.fg_colour,t.fg_led,false)
cairo_set_source(cr,pat)
cairo_rectangle(cr,0,0,t.width,y1)
cairo_fill(cr)

-- block for alarm value
if not t.smooth and y2 ~=nil then
pat = create_pattern(t.alarm_colour,t.alarm_led,false)
cairo_set_source(cr,pat)
cairo_rectangle(cr,0,y1,t.width,y2-y1)
cairo_fill(cr)
y3=y2
else
y2,y3=y1,y1
end
-- block for bg value
cairo_rectangle(cr,0,y2,t.width,-t.height-y3)
pat = create_pattern(t.bg_colour,t.bg_led,true)
cairo_set_source(cr,pat)
cairo_pattern_destroy(pat)
cairo_fill(cr)
end
end  --end single bar






local function draw_multi_bar()
--function used for bars with 2 or more blocks
for pt = 1,t.blocks do
--set block y
local y1 = -(pt-1)*(t.height+t.space)
local light_on=false

--set colors
local col_alp = t.bg_colour
local col_led = t.bg_led
if pct>=(100/t.blocks) or pct>0 then --ligth on or not the block
if pct>=(pcb*(pt-1))  then
light_on = true
col_alp = t.fg_colour
col_led = t.fg_led
if pct>=(100*t.alarm/t.max) and (pcb*pt)>(100*t.alarm/t.max) then
col_alp = t.alarm_colour
col_led = t.alarm_led
end
end
end

--set colors
--have to try to create gradients outside the loop ?
local pat

if not t.smooth then
if t.angle_bar==0 then
if t.led_effect=="e" then
pat = create_led_linear_gradient (-delta, 0,delta+ t.width,0,col_alp,col_led)
elseif t.led_effect=="a" then
pat = create_led_linear_gradient (t.width/2, -t.height/2+y1,t.width/2,0+t.height/2+y1,col_alp,col_led)
elseif  t.led_effect=="r" then
pat = create_led_radial_gradient (t.width/2, y1, 0, t.width/2,y1,t.width/1.5,col_alp,col_led,2)
else
pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(col_alp))
end
else
if t.led_effect=="a"  then
pat = create_led_radial_gradient (0, 0, t.radius+(t.height+t.space)*(pt-1),
0, 0, t.radius+(t.height+t.space)*(pt),
col_alp,col_led,3)
else
pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(col_alp))
end

end
else

if light_on then
if t.angle_bar==0 then
pat = create_smooth_linear_gradient(t.width/2, t.height/2, t.width/2,-(t.blocks-0.5)*(t.height+t.space))
else
pat = create_smooth_radial_gradient(0, 0, (t.height+t.space),  0,0,(t.blocks+1)*(t.height+t.space),2)
end
else
pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(t.bg_colour))
end
end
cairo_set_source (cr, pat)
cairo_pattern_destroy(pat)

--draw a block
if t.angle_bar==0 then
cairo_move_to(cr,0,y1)
cairo_line_to(cr,t.width,y1)
else
cairo_arc( cr,0,0,
t.radius+(t.height+t.space)*(pt)-t.height/2,
-t.angle_bar -math.pi/2 ,
t.angle_bar -math.pi/2)
end
cairo_stroke(cr)
end
end




local function setup_bar_graph()
--function used to retrieve the value to display and to set the cairo structure
if t.blocks ~=1 then t.y=t.y-t.height/2 end

local value = 0
if t.name ~="" then
value = tonumber(conky_parse(string.format('${%s %s}', t.name, t.arg)))
else
value = tonumber(t.arg)
end

if value==nil then value =0 end

pct = 100*value/t.max
pcb = 100/t.blocks

cairo_set_line_width (cr, t.height)
cairo_set_line_cap  (cr, cap)
cairo_translate(cr,t.x,t.y)
cairo_rotate(cr,t.angle)

local matrix0 = cairo_matrix_t:create()
cairo_matrix_init (matrix0, 1,t.skew_y,t.skew_x,1,0,0)
cairo_transform(cr,matrix0)



--call the drawing function for blocks
if t.blocks==1 and t.angle_bar==0 then
draw_single_bar()
if t.reflection=="t" or t.reflection=="b" then cairo_translate(cr,0,-t.height) end
else
draw_multi_bar()
end

--dot for reminder
--[[
if t.blocks ~=1 then
cairo_set_source_rgba(cr,1,0,0,1)
cairo_arc(cr,0,t.height/2,3,0,2*math.pi)
cairo_fill(cr)
else
cairo_set_source_rgba(cr,1,0,0,1)
cairo_arc(cr,0,0,3,0,2*math.pi)
cairo_fill(cr)
end
]]
--call the drawing function for reflection and prepare the mask used
if t.reflection_alpha>0 and t.angle_bar==0 then
local pat2
local matrix1 = cairo_matrix_t:create()
if t.angle_bar==0 then
pts={-delta/2,(t.height+t.space)/2,t.width+delta,-(t.height+t.space)*(t.blocks)}
if t.reflection=="t" then
cairo_matrix_init (matrix1,1,0,0,-t.reflection_scale,0,-(t.height+t.space)*(t.blocks-0.5)*2*(t.reflection_scale+1)/2)
pat2 = cairo_pattern_create_linear (t.width/2,-(t.height+t.space)*(t.blocks),t.width/2,(t.height+t.space)/2)
elseif t.reflection=="r" then
cairo_matrix_init (matrix1,-t.reflection_scale,0,0,1,delta+2*t.width,0)
pat2 = cairo_pattern_create_linear (delta/2+t.width,0,-delta/2,0)
elseif t.reflection=="l" then
cairo_matrix_init (matrix1,-t.reflection_scale,0,0,1,-delta,0)
pat2 = cairo_pattern_create_linear (-delta/2,0,delta/2+t.width,-0)
else --bottom
cairo_matrix_init (matrix1,1,0,0,-1*t.reflection_scale,0,(t.height+t.space)*(t.reflection_scale+1)/2)
pat2 = cairo_pattern_create_linear (t.width/2,(t.height+t.space)/2,t.width/2,-(t.height+t.space)*(t.blocks))
end
end
cairo_transform(cr,matrix1)

if t.blocks==1 and t.angle_bar==0 then
draw_single_bar()
cairo_translate(cr,0,-t.height/2)
else
draw_multi_bar()
end


cairo_set_line_width(cr,0.01)
cairo_pattern_add_color_stop_rgba (pat2, 0,0,0,0,1-t.reflection_alpha)
cairo_pattern_add_color_stop_rgba (pat2, t.reflection_length,0,0,0,1)
if t.angle_bar==0 then
cairo_rectangle(cr,pts[1],pts[2],pts[3],pts[4])
end
cairo_clip_preserve(cr)
cairo_set_operator(cr,CAIRO_OPERATOR_CLEAR)
cairo_stroke(cr)
cairo_mask(cr,pat2)
cairo_pattern_destroy(pat2)
cairo_set_operator(cr,CAIRO_OPERATOR_OVER)

end --reflection


end --setup_bar_graph()


--start here !
setup_bar_graph()
cairo_restore(cr)
end
Title: Re: Conky Support, Codes and Screenshots
Post by: Sector11 on July 01, 2013, 11:47:59 AM
Good morning Jed ...

I'm up early, have to go out, but when I come back I will be looking at this.
What is your screen width? 1920?

EDIT: never mind.....
Quoteminimum_size 1920 55
DUH!!!

It'll give me something to play with.
Title: Re: Conky Support, Codes and Screenshots
Post by: Sector11 on July 01, 2013, 08:43:57 PM
@ jedi ....

I ran into the same thing you did.  If the bars are too close, they loose the centre line (the blue bar).  Something weird going on with that script.

Anyway, I moved things around a bit, this gives you a space above ${kernel} to play with and I scrolled the date above your distro info.  You may not like it, sorry but it's the best I can do.  I'm no LUA expert either.

Also, I don't have battery nor wlan0 so the values shown are hard coded, your commands are commented our above TEXT and the bars above them are cpu1 and cpu2 in the LUA script.  The lua script still has your battery and wlan sections  ... just comment out the cpu1 and 2 sections and incomment the Battery and Wlan stuff, I 'think' I configured them correctly.

I added a white background so it can be seen on dark backgrounds.
(http://t.imgbox.com/acwKZmjl.jpg) (http://imgbox.com/acwKZmjl)

The modified conky:
##################################################
# killall conky && conky -c /home/jed/Conky/sysledconkyrc &
# killall conky && conky -c ~/jed/Conky/sysledconkyrc &
##################################################
background yes
update_interval 0.5
double_buffer yes
no_buffers yes
imlib_cache_size 0
override_utf8_locale yes
own_window yes
own_window_type normal
own_window_transparent yes
## own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below ## Jed's Line
own_window_hints undecorate,skip_taskbar,skip_pager,below
own_window_class conky
own_window_title horizleds
border_inner_margin 0
border_outer_margin 0
minimum_size 1910 55 # testing with 500
## minimum_size 1910 55 ## Jed had 1920 but the 'gap_x 5' pushed it 5 pixels off the screen
maximum_width 1910
alignment tl
gap_x 30
gap_y -5
default_color 4B60B4
text_buffer_size 512
use_xft yes
xftfont monofur:bold:size=11
xftalpha 1
cpu_avg_samples 2
net_avg_samples 1

lua_load ~/jed/Conky/LUA/leds.lua
lua_draw_hook_post main_bars

#${goto 15}MOBO Temp ${color ff6100}${hwmon 2 temp 2}°C${color 4B60B4}${goto 135}|${goto 160}CPU Socket Temp ${color ff6100}${hwmon 1 temp 1}°C${voffset -15}${color 4B60B4} ${goto 1050}Kernel: ${kernel} ${goto 1420}Up:${color ff6100} ${uptime}${color 4B60B4}${goto 1630}${scroll 40 1${execi 2600 cat /etc/issue.net}-VSIDO}
#${goto 365}${color 4B60B4}Avg CPU Use: ${color 3DBA2F}${cpu cpu0}% ${color 4B60B4}${goto 483}|${goto 500}${color 4B60B4}RAM Use:${color 3DBA2F}${mem} / ${memmax}${color 4B60B4}${goto 735}Bat:${color 3DBA2F}${battery_percent BAT0}% ${color ff6100}${battery_time BAT0}${color 4B60B4}${goto 875}|${goto 900}WiFi Signal: ${color 3DBA2F}${wireless_link_qual_perc wlan0}%
lua_load /media/5/Conky/LUA/draw-bg.lua
TEXT
${lua conky_draw_bg 10 0 0 0 0 0xffffff 0.2}
${goto 165}|${goto 350}|${goto 525}|${goto 750}|${goto 920}${color 3DBA2F}${memperc}${goto 936}%${color} |${goto 1040}${time %T}${goto 1190}|${goto 1265}${scroll 23 1${time %A %e %b %Y} }${goto 1500}|${goto 1680}|
${goto 15}MOBO Temp ${color ff6100}${hwmon 2 temp 2}°C${color}\
${goto 165}|   CPU Socket Temp ${color ff6100}${hwmon 1 temp 1}°C${color}\
${goto 350}|   Avg CPU Use: ${color 3DBA2F}${cpu cpu0}%${color}\
${goto 525}|   ${kernel}${goto 750}\
${goto 750}| RAM Use: ${color 3DBA2F}${mem} / ${memmax}${color}\
${goto 950}|         Up:${color ff6100} ${uptime}${color}${goto 1190}|\
${goto 1210}${scroll 40 1${execi 86400 cat /etc/issue.net}-VSIDO}\
${goto 1500}|  Bat: ${color 3DBA2F}85%${goto 1610}${color ff6100}16:44:52${color}\
${goto 1680}|   WiFi Signal: ${color 3DBA2F}100%${color}


and the new leds.lua
--[[ BARGRAPH WIDGET
v1.3 by wlourf (03 march 2010)
This widget draw a simple bar like (old) equalizers on hi-fi systems.
http://u-scripts.blogspot.com/
        Tweaked by McLovin, then borked by jedi
The arguments are :
- "name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'...
  or you can set it to "" if you want to display a numeric value with arg=numeric_value
    - "arg" is the argument to the stat type, e.g. if in Conky you would write ${cpu cpu0}, 'cpu0' would be the argument.
      If you would not use an argument in the Conky variable, use ''.
- "max" is the maximum value of the bar. If the Conky variable outputs a percentage, use 100.
- "nb_blocks" is the umber of block to draw
- "cap" id the cap of a block, possibles values are CAIRO_LINE_CAP_ROUND , CAIRO_LINE_CAP_SQUARE or CAIRO_LINE_CAP_BUTT
  see http://www.cairographics.org/samples/set_line_cap/
- "xb" and "yb" are the coordinates of the bottom left point of the bar, or the center of the circle if radius>0
- "w" and "h" are the width and the height of a block (without caps), w has no effect for "circle" bar
- "space" is the space betwwen two blocks, can be null or negative
- "bgc" and "bga" are background colors and alpha when the block is not LIGHT OFF
- "fgc" and "fga" are foreground colors and alpha when the block is not LIGHT ON
- "alc" and "ala" are foreground colors and alpha when the block is not LIGHT ON and ALARM ON
- "alarm" is the value where blocks LIGHT ON are in a different color (values from 0 to 100)
- "led_effect" true or false : to show a block with a led effect
- "led_alpha" alpha of the center of the led (values from 0 to 1)
- "smooth" true or false : colors in the bar has a smooth effect
- "mid_color",mid_alpha" : colors of the center of the bar (mid_color can to be set to nil)
- "rotation" : angle of rotation of the bar (values are 0 to 360 degrees). 0 = vertical bar, 90 = horizontal bar
- "radius" : draw the bar on a circle (it's no more a circle, radius = 0 to keep bars)
- "angle_bar"  : if radius>0 angle_bar is the angle of the bar
v1.0 (10 Feb. 2010) original release
v1.1 (13 Feb. 2010) numeric values can be passed instead conky stats with parameters name="", arg = numeric_value
v1.2 (28 Feb. 2010) just renamed the widget to bargraph
v1.3 (03 March 2010) added parameters radius & angle_bar to draw the bar in a circular way
]]

require 'cairo'

----------------START OF PARAMETERS ----------
function conky_main_bars()
local bars_settings={
{ -- Graph for MOBO Temp
name="hwmon 2 temp 2",
arg="hwmon 2 temp 2",
max=100,
alarm=40,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff6100,0},
     alarm_led={0xff6100,1},
blocks=50, --35
x=10, y=20,
height=2,width=10,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ -- Graph for CPU Socket Temp
name="hwmon 1 temp 1",
arg="hwmon 1 temp 1",
max=100,
alarm=40,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff6100,0},
     alarm_led={0xff6100,1},
blocks=50, --35,
x=190, y=20, --x=175, y=20,
height=2,width=10,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ -- Graph for CPU Socket Temp
name="cpu",
arg="cpu0",
max=100,
alarm=100,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
     alarm_led={0xff0000,1},
blocks=50, --35,
x=370, y=20,
height=2,width=10,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ -- Graph for Memory
name="memperc",
arg="",
max=100,
alarm=60,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
     alarm_led={0xff0000,1},
x=765, y=20, --x=510,y=70,
blocks=50,
space=1,
height=2,width=10,
angle=90,
led_effect="e",
cap="r",
},
{ -- Graph for WiFi Signal strength
name="cpu",
arg="cpu1",
max=100,
alarm=100,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
     alarm_led={0xff0000,1},
blocks=50,
x=1520, y=20,
height=2,width=10,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ -- Graph for WiFi Signal strength
name="cpu",
arg="cpu2",
max=100,
alarm=100,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
     alarm_led={0xff0000,1},
blocks=50,
x=1700, y=20,
height=2,width=10,
angle=90,
led_effect="e",
space=1,
cap="r",
},
--[[ { -- Graph for Battery power
name="battery_percent",
arg="BAT0",
max=100,
alarm=100,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
     alarm_led={0xff0000,1},
blocks=50,
x=1520, y=20,
height=2,width=10,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ -- Graph for WiFi Signal strength
name="wireless_link_qual_perc",
arg="wlan0",
max=100,
alarm=100,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
     alarm_led={0xff0000,1},
blocks=50,
x=1700, y=20,
height=2,width=10,
angle=90,
led_effect="e",
space=1,
cap="r",
},
]]
--[[ { -- Graph for Root
name="fs_used_perc",
arg="/",
max=100,
alarm=75,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=35,
x=1260, y=20,
height=2,width=10,
angle=90,
led_effect="e",
space=1,
cap="r",
},
{ -- Graph for Home
name="fs_used_perc",
arg="/home",
max=100,
alarm=75,
bg_colour={0x000000,0.75},
bg_led={0x3c3c3c,0.5},
fg_colour={0x000000,1},
fg_led={0x48a3fd,1},
alarm_colour={0xff0000,0},
    alarm_led={0xff0000,1},
blocks=35,
x=610, y=20,
height=2,width=10,
angle=90,
led_effect="e",
space=1,
cap="r",
},
]]
}
-----------END OF PARAMETERS--------------
if conky_window == nil then return end

local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)

cr = cairo_create(cs)
--prevent segmentation error when reading cpu state
    if tonumber(conky_parse('${updates}'))>3 then
        for i in pairs(bars_settings) do

        draw_multi_bar_graph(bars_settings[i])

        end
    end
cairo_destroy(cr)
cairo_surface_destroy(cs)

end



function draw_multi_bar_graph(t)
cairo_save(cr)
--check values
if t.name==nil and t.arg==nil then
print ("No input values ... use parameters 'name' with 'arg' or only parameter 'arg' ")
return
end
if t.max==nil then
print ("No maximum value defined, use 'max'")
return
end
if t.name==nil then t.name="" end
if t.arg==nil then t.arg="" end

--set default values
if t.x == nil then t.x = conky_window.width/2 end
if t.y == nil then t.y = conky_window.height/2 end
if t.blocks == nil then t.blocks=10 end
if t.height == nil then t.height=10 end
if t.angle == nil then t.angle=0 end
t.angle = t.angle*math.pi/180
--line cap style
if t.cap==nil then t.cap = "b" end
local cap="b"
for i,v in ipairs({"s","r","b"}) do
if v==t.cap then cap=v end
end
delta=0
if t.cap=="r" or t.cap=="s" then delta = t.height end
if cap=="s" then cap = CAIRO_LINE_CAP_SQUARE
elseif cap=="r" then
cap = CAIRO_LINE_CAP_ROUND
elseif cap=="b" then
cap = CAIRO_LINE_CAP_BUTT
end
--end line cap style
--if t.led_effect == nil then t.led_effect="r" end
if t.width == nil then t.width=20 end
if t.space == nil then t.space=2 end
if t.radius == nil then t.radius=0 end
if t.angle_bar == nil then t.angle_bar=0 end
t.angle_bar = t.angle_bar*math.pi/360 --halt angle

--colours
if t.bg_colour == nil then t.bg_colour = {0xffffff,0.5} end
if #t.bg_colour~=2 then t.bg_colour = {0xffffff,0.5} end
if t.fg_colour == nil then t.fg_colour = {0xffffff,1} end
if #t.fg_colour~=2 then t.fg_colour = {0xffffff,1} end
if t.alarm_colour == nil then t.alarm_colour = t.fg_colour end
if #t.alarm_colour~=2 then t.alarm_colour = t.fg_colour end

if t.mid_colour ~= nil then
for i=1, #t.mid_colour do
    if #t.mid_colour[i]~=3 then
    print ("error in mid_color table")
    t.mid_colour[i]={1,0xFFFFFF,1}
    end
end
    end

if t.bg_led ~= nil and #t.bg_led~=2 then t.bg_led = t.bg_colour end
if t.fg_led ~= nil and #t.fg_led~=2 then t.fg_led = t.fg_colour end
if t.alarm_led~= nil and #t.alarm_led~=2 then t.alarm_led = t.fg_led end

if t.led_effect~=nil then
if t.bg_led == nil then t.bg_led = t.bg_colour end
if t.fg_led == nil then t.fg_led = t.fg_colour end
if t.alarm_led == nil  then t.alarm_led = t.fg_led end
end


if t.alarm==nil then t.alarm = t.max end --0.8*t.max end
if t.smooth == nil then t.smooth = false end

if t.skew_x == nil then
t.skew_x=0
else
t.skew_x = math.pi*t.skew_x/180
end
if t.skew_y == nil then
t.skew_y=0
else
t.skew_y = math.pi*t.skew_y/180
end

if t.reflection_alpha==nil then t.reflection_alpha=0 end
if t.reflection_length==nil then t.reflection_length=1 end
if t.reflection_scale==nil then t.reflection_scale=1 end

--end of default values


local function rgb_to_r_g_b(col_a)
return ((col_a[1] / 0x10000) % 0x100) / 255., ((col_a[1] / 0x100) % 0x100) / 255., (col_a[1] % 0x100) / 255., col_a[2]
end


--functions used to create patterns

local function create_smooth_linear_gradient(x0,y0,x1,y1)
local pat = cairo_pattern_create_linear (x0,y0,x1,y1)
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(t.fg_colour))
cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(t.alarm_colour))
if t.mid_colour ~=nil then
for i=1, #t.mid_colour do
cairo_pattern_add_color_stop_rgba (pat, t.mid_colour[i][1], rgb_to_r_g_b({t.mid_colour[i][2],t.mid_colour[i][3]}))
end
end
return pat
end

local function create_smooth_radial_gradient(x0,y0,r0,x1,y1,r1)
local pat =  cairo_pattern_create_radial (x0,y0,r0,x1,y1,r1)
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(t.fg_colour))
cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(t.alarm_colour))
if t.mid_colour ~=nil then
for i=1, #t.mid_colour do
cairo_pattern_add_color_stop_rgba (pat, t.mid_colour[i][1], rgb_to_r_g_b({t.mid_colour[i][2],t.mid_colour[i][3]}))
end
end
return pat
end

local function create_led_linear_gradient(x0,y0,x1,y1,col_alp,col_led)
local pat = cairo_pattern_create_linear (x0,y0,x1,y1) ---delta, 0,delta+ t.width,0)
cairo_pattern_add_color_stop_rgba (pat, 0.0, rgb_to_r_g_b(col_alp))
cairo_pattern_add_color_stop_rgba (pat, 0.5, rgb_to_r_g_b(col_led))
cairo_pattern_add_color_stop_rgba (pat, 1.0, rgb_to_r_g_b(col_alp))
return pat
end

local function create_led_radial_gradient(x0,y0,r0,x1,y1,r1,col_alp,col_led,mode)
local pat = cairo_pattern_create_radial (x0,y0,r0,x1,y1,r1)
if mode==3 then
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(col_alp))
cairo_pattern_add_color_stop_rgba (pat, 0.5, rgb_to_r_g_b(col_led))
cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(col_alp))
else
cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(col_led))
cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(col_alp))
end
return pat
end






local function draw_single_bar()
--this fucntion is used for bars with a single block (blocks=1) but
--the drawing is cut in 3 blocks : value/alarm/background
--not zvzimzblr for circular bar
local function create_pattern(col_alp,col_led,bg)
local pat

if not t.smooth then
if t.led_effect=="e" then
pat = create_led_linear_gradient (-delta, 0,delta+ t.width,0,col_alp,col_led)
elseif t.led_effect=="a" then
pat = create_led_linear_gradient (t.width/2, 0,t.width/2,-t.height,col_alp,col_led)
elseif  t.led_effect=="r" then
pat = create_led_radial_gradient (t.width/2, -t.height/2, 0, t.width/2,-t.height/2,t.height/1.5,col_alp,col_led,2)
else
pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(col_alp))
end
else
if bg then
pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(t.bg_colour))
else
pat = create_smooth_linear_gradient(t.width/2, 0, t.width/2,-t.height)
end
end
return pat
end

local y1=-t.height*pct/100
local y2=nil
if pct>(100*t.alarm/t.max) then
y1 = -t.height*t.alarm/100
y2 = -t.height*pct/100
if t.smooth then y1=y2 end
end

if t.angle_bar==0 then

--block for fg value
pat = create_pattern(t.fg_colour,t.fg_led,false)
cairo_set_source(cr,pat)
cairo_rectangle(cr,0,0,t.width,y1)
cairo_fill(cr)

-- block for alarm value
if not t.smooth and y2 ~=nil then
pat = create_pattern(t.alarm_colour,t.alarm_led,false)
cairo_set_source(cr,pat)
cairo_rectangle(cr,0,y1,t.width,y2-y1)
cairo_fill(cr)
y3=y2
else
y2,y3=y1,y1
end
-- block for bg value
cairo_rectangle(cr,0,y2,t.width,-t.height-y3)
pat = create_pattern(t.bg_colour,t.bg_led,true)
cairo_set_source(cr,pat)
cairo_pattern_destroy(pat)
cairo_fill(cr)
end
end  --end single bar






local function draw_multi_bar()
--function used for bars with 2 or more blocks
for pt = 1,t.blocks do
--set block y
local y1 = -(pt-1)*(t.height+t.space)
local light_on=false

--set colors
local col_alp = t.bg_colour
local col_led = t.bg_led
if pct>=(100/t.blocks) or pct>0 then --ligth on or not the block
if pct>=(pcb*(pt-1))  then
light_on = true
col_alp = t.fg_colour
col_led = t.fg_led
if pct>=(100*t.alarm/t.max) and (pcb*pt)>(100*t.alarm/t.max) then
col_alp = t.alarm_colour
col_led = t.alarm_led
end
end
end

--set colors
--have to try to create gradients outside the loop ?
local pat

if not t.smooth then
if t.angle_bar==0 then
if t.led_effect=="e" then
pat = create_led_linear_gradient (-delta, 0,delta+ t.width,0,col_alp,col_led)
elseif t.led_effect=="a" then
pat = create_led_linear_gradient (t.width/2, -t.height/2+y1,t.width/2,0+t.height/2+y1,col_alp,col_led)
elseif  t.led_effect=="r" then
pat = create_led_radial_gradient (t.width/2, y1, 0, t.width/2,y1,t.width/1.5,col_alp,col_led,2)
else
pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(col_alp))
end
else
if t.led_effect=="a"  then
pat = create_led_radial_gradient (0, 0, t.radius+(t.height+t.space)*(pt-1),
0, 0, t.radius+(t.height+t.space)*(pt),
col_alp,col_led,3)
else
pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(col_alp))
end

end
else

if light_on then
if t.angle_bar==0 then
pat = create_smooth_linear_gradient(t.width/2, t.height/2, t.width/2,-(t.blocks-0.5)*(t.height+t.space))
else
pat = create_smooth_radial_gradient(0, 0, (t.height+t.space),  0,0,(t.blocks+1)*(t.height+t.space),2)
end
else
pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(t.bg_colour))
end
end
cairo_set_source (cr, pat)
cairo_pattern_destroy(pat)

--draw a block
if t.angle_bar==0 then
cairo_move_to(cr,0,y1)
cairo_line_to(cr,t.width,y1)
else
cairo_arc( cr,0,0,
t.radius+(t.height+t.space)*(pt)-t.height/2,
-t.angle_bar -math.pi/2 ,
t.angle_bar -math.pi/2)
end
cairo_stroke(cr)
end
end




local function setup_bar_graph()
--function used to retrieve the value to display and to set the cairo structure
if t.blocks ~=1 then t.y=t.y-t.height/2 end

local value = 0
if t.name ~="" then
value = tonumber(conky_parse(string.format('${%s %s}', t.name, t.arg)))
else
value = tonumber(t.arg)
end

if value==nil then value =0 end

pct = 100*value/t.max
pcb = 100/t.blocks

cairo_set_line_width (cr, t.height)
cairo_set_line_cap  (cr, cap)
cairo_translate(cr,t.x,t.y)
cairo_rotate(cr,t.angle)

local matrix0 = cairo_matrix_t:create()
cairo_matrix_init (matrix0, 1,t.skew_y,t.skew_x,1,0,0)
cairo_transform(cr,matrix0)



--call the drawing function for blocks
if t.blocks==1 and t.angle_bar==0 then
draw_single_bar()
if t.reflection=="t" or t.reflection=="b" then cairo_translate(cr,0,-t.height) end
else
draw_multi_bar()
end

--dot for reminder
--[[
if t.blocks ~=1 then
cairo_set_source_rgba(cr,1,0,0,1)
cairo_arc(cr,0,t.height/2,3,0,2*math.pi)
cairo_fill(cr)
else
cairo_set_source_rgba(cr,1,0,0,1)
cairo_arc(cr,0,0,3,0,2*math.pi)
cairo_fill(cr)
end
]]
--call the drawing function for reflection and prepare the mask used
if t.reflection_alpha>0 and t.angle_bar==0 then
local pat2
local matrix1 = cairo_matrix_t:create()
if t.angle_bar==0 then
pts={-delta/2,(t.height+t.space)/2,t.width+delta,-(t.height+t.space)*(t.blocks)}
if t.reflection=="t" then
cairo_matrix_init (matrix1,1,0,0,-t.reflection_scale,0,-(t.height+t.space)*(t.blocks-0.5)*2*(t.reflection_scale+1)/2)
pat2 = cairo_pattern_create_linear (t.width/2,-(t.height+t.space)*(t.blocks),t.width/2,(t.height+t.space)/2)
elseif t.reflection=="r" then
cairo_matrix_init (matrix1,-t.reflection_scale,0,0,1,delta+2*t.width,0)
pat2 = cairo_pattern_create_linear (delta/2+t.width,0,-delta/2,0)
elseif t.reflection=="l" then
cairo_matrix_init (matrix1,-t.reflection_scale,0,0,1,-delta,0)
pat2 = cairo_pattern_create_linear (-delta/2,0,delta/2+t.width,-0)
else --bottom
cairo_matrix_init (matrix1,1,0,0,-1*t.reflection_scale,0,(t.height+t.space)*(t.reflection_scale+1)/2)
pat2 = cairo_pattern_create_linear (t.width/2,(t.height+t.space)/2,t.width/2,-(t.height+t.space)*(t.blocks))
end
end
cairo_transform(cr,matrix1)

if t.blocks==1 and t.angle_bar==0 then
draw_single_bar()
cairo_translate(cr,0,-t.height/2)
else
draw_multi_bar()
end


cairo_set_line_width(cr,0.01)
cairo_pattern_add_color_stop_rgba (pat2, 0,0,0,0,1-t.reflection_alpha)
cairo_pattern_add_color_stop_rgba (pat2, t.reflection_length,0,0,0,1)
if t.angle_bar==0 then
cairo_rectangle(cr,pts[1],pts[2],pts[3],pts[4])
end
cairo_clip_preserve(cr)
cairo_set_operator(cr,CAIRO_OPERATOR_CLEAR)
cairo_stroke(cr)
cairo_mask(cr,pat2)
cairo_pattern_destroy(pat2)
cairo_set_operator(cr,CAIRO_OPERATOR_OVER)

end --reflection

end --setup_bar_graph()

--start here !
setup_bar_graph()
cairo_restore(cr)
end

Title: Re: Conky Support, Codes and Screenshots
Post by: jedi on July 04, 2013, 05:35:36 AM
Thanks Sector11, I finally found a wlourf script that was just a tad older that is doing what I want.  I simply made multiple Conky's that are pulling their own lua script.  (4 for the top!) Still not sure if I like the look yet, but hey, it was fun playing!  Going to dress it up with some color probably, but I think I have the basics of it done.  I like the looks of these bars better than what I was using and the script seems to run a little better.

(http://www.zimagez.com/miniature/screenshot-07042013-012559am.png) (http://www.zimagez.com/zimage/screenshot-07042013-012559am.php)
Title: Re: Conky Support, Codes and Screenshots
Post by: jedi on July 04, 2013, 07:45:54 AM
And here it is semi-finished.  Total of 8 Conky's running.  The CPU is under duress due to manipulating my photo library in Shotwell.  This also accounts for the high CPU temps!  Thanks to Sector11, mrpeachy, wlourf and I know I'm missing someone!  Sorry for that, it's late!  Thanks to VastOne for the awesome gmusicbrowser work he does!

It's a little cluttered right now, but it is displaying about all the info I'd ever need to keep track of.  Conky can be really useful!!!  The tint2 bar will be updated to remove the clock and replace it with a launcher bar when I get a little sleep.

And here's the scrot;

(http://www.zimagez.com/miniature/screenshot-07042013-033506am.png) (http://www.zimagez.com/zimage/screenshot-07042013-033506am.php)
Title: Re: Conky Support, Codes and Screenshots
Post by: jedi on July 08, 2013, 06:44:06 AM
Hey all...

Anyone noticed issues with v9000 as of the last 24 to 48 hours?  Specifically the v9000.lua file around line 748.  Attempt to perform arithmetic on a nil value.  The problem comes and goes.  It'll work sometimes for hours, then bang.  After a while it'll work again.  Just wondering if it's just me or if something borked Conky/Lua/jedi during the last dist-upgrade...
Title: Re: Conky Support, Codes and Screenshots
Post by: PackRat on July 08, 2013, 01:21:32 PM
That's the weather script isn't it?

My first guess would be that there is an interruption of service from whatever weather agency is providing the data. Have you tried to start that conky from a terminal and note any of the errors?

I know that the original conkyForecast script would stall every now and then because it couldn't connect to the weather service servers.
Title: Re: Conky Support, Codes and Screenshots
Post by: jedi on July 08, 2013, 09:42:27 PM
It starts fine in terminal.  No errors, but eventually it will 'disappear' from the screen and the error will show up in terminal then.  It is the weirdest thing.  I've noticed some weird behavior with another Conky in this same time frame that uses a script to call the weekday names for a horizontal calendar Conky.  The days remain, (the numbers) but the weekday names disappear.  Strangeness like this has been happening since Friday or Saturday...
Title: Re: Conky Support, Codes and Screenshots
Post by: jedi on July 09, 2013, 06:37:01 AM
Did I ever mention that I love Conky?  Changed it again.

(http://en.zimagez.com/miniature/latest.png) (http://en.zimagez.com/zimage/latest.php)

A huge thank-you to Sector11 without whom I'd never have been able to get this far with Conky.  He is undoubtedly the most generous soul when it comes to helping anyone with a genuine interest in anything Conky related.  His patience and willingness to help, are part of why the Linux community can be so wonderful to work with.  Thank-you Sector11...

The weather is of course mrpeachy's v9000 which is here (http://crunchbang.org/forums/viewtopic.php?pid=162437#p162437).  When you download his scripts it will have Sector11's weather template he designed as part of the tar file you'll need to download.  Just follow his very specific instructions and you'll be all set.  Sector11 has written/designed many other useful and beautiful weather templates for several of the most popular weather scripts out there!

The system info Conky on the right is based on a Conky by McLovin which is posted a few posts above this one, and which utilizes a bargraph lua script written by wlourf and heavily modified by McLovin.  Maybe one of the best bargraph's I've ever used.  Thanks McLovin!  (also a big thanks to wlourf)

The bottom extreme right is a lua script to show all mounted file systems also written by mrpeachy.  Just in case you weren't sure, mrpeachy is "The Man" when it comes to all things lua, and has helped me personally on more than one occasion.  In other words, ask nice and you'll be amazed at how generous some of the guys who do all this hard work will help you out!

conkymountrc

background yes
update_interval 1
cpu_avg_samples 2
total_run_times 0
override_utf8_locale yes

double_buffer yes
no_buffers yes

text_buffer_size 1024
imlib_cache_size 1024

minimum_size 370 0
maximum_width 370

gap_x 0
gap_y 35
#####################
# - Text settings - #
#####################
use_xft yes
xftfont monofur:bold:size=11
xftalpha 1

uppercase no

# Text alignment, other possible values are commented
alignment bottom_right

######################
# - Color settings - #
######################
color0 c3c3c3 #mid gray
color1 FF0000 #red
color2 A4FFA4 #light green
color3 007EFF #bright blue
color4 E3E3E3 #very light gray
color5 c6771a #an orange shade
color6 CA8718 #a dust like color
color7 FFE500 #a darker yellow color
color8 C3FF00 #lime green
color9 227992 #bars-blue #another blue 48a3fd
default_color c3c3c3
default_shade_color gray
default_outline_color black
#############################
# - Window specifications - #
#############################
own_window yes
own_window_transparent yes
own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_class conky
own_window_title clicky
#own_window_argb_visual yes
#own_window_argb_value 255

border_inner_margin 0
border_outer_margin 0

#########################
# - Graphics settings - #
#########################
draw_shades no
draw_outline no
draw_borders no
stippled_borders 0
draw_graph_borders no

lua_load ~/Conky/LUA/mounted.lua

Text
${lua get_mounted_data 3}
${color 888888}FSYS${color 888888} = ${lua mount 1 total}${goto 100}${color 888888}Size${goto 150}${color D4741B}Free${goto 200}${color1}Used${goto 255}${color 888888}Mount Point
${voffset -5} ${color 547EC8}${stippled_hr 5 1}${color 888888}
${color 4B60B4}${lua mount 1 fsys 9}${goto 100}${color 888888}${lua mount 1 size}${goto 150}${color D4741B}${lua mount 1 free}${goto 200}${color1}${lua mount 1 use%}${goto 260}${color 888888}${lua mount 1 mount}
${color 4B60B4}${lua mount 5 fsys 9}${goto 100}${color 888888}${lua mount 5 size}${goto 150}${color D4741B}${lua mount 5 free}${goto 200}${color1}${lua mount 5 use%}${goto 260}${color 888888}${lua mount 5 mount}
${color 4B60B4}${lua mount 3 fsys 9}${goto 100}${color 888888}${lua mount 3 size}${goto 150}${color D4741B}${lua mount 3 free}${goto 200}${color1}${lua mount 3 use%}${goto 260}${color 888888}${lua mount 3 mount}
${color 4B60B4}${lua mount 4 fsys 9}${goto 100}${color 888888}${lua mount 4 size}${goto 150}${color D4741B}${lua mount 4 free}${goto 200}${color1}${lua mount 4 use%}${goto 260}${color 888888}${lua mount 4 mount}
${color 4B60B4}${lua mount 6 fsys 9}${goto 100}${color 888888}${lua mount 6 size}${goto 150}${color D4741B}${lua mount 6 free}${goto 200}${color1}${lua mount 6 use%}${goto 260}${color 888888}${lua mount 6 mount}
${color 4B60B4}${lua mount 8 fsys 9}${goto 100}${color 888888}${lua mount 8 size}${goto 150}${color D4741B}${lua mount 8 free}${goto 200}${color1}${lua mount 8 use%}${goto 260}${color 888888}${lua mount 8 mount}
${color 4B60B4}${lua mount 9 fsys 9}${goto 100}${color 888888}${lua mount 9 size}${goto 150}${color D4741B}${lua mount 9 free}${goto 200}${color1}${lua mount 9 use%}${goto 260}${color 888888}${lua mount 9 mount}
${color 4B60B4}${lua mount 7 fsys 9}${goto 100}${color 888888}${lua mount 7 size}${goto 150}${color D4741B}${lua mount 7 free}${goto 200}${color1}${lua mount 7 use%}${goto 260}${color 888888}${lua mount 7 mount}
${alignc}${execi 10 hddtemp /dev/sda}
${alignc}${execi 10 hddtemp /dev/sdb}


mounted.lua

--[[partitions for conky by mrpeachy

##instructions
##load script
lua_load ~/lua/mounted.lua
## first lua command below text:
## ${lua get_mounted_data interval}, where interval is a number.  This starts data gathering
## to get output:
## ${lua mount partition_number data_type text_length}, where partition number is a number
## text_length is optional, lets you specify the max number of characters the function returns. only affects fsys and mount data options
## data_type can be
## total - shows total number of partitions mounted, requires a partition_number also, use 1, could be used in an if_match
## fsys - shows filesystem
## size - shows space used in appropriate units
## free - shows free space in appropriate units
## use% - shows % used
## mount - shows mountpoint

TEXT
CPU %: ${cpu cpu0} ${lua get_mounted_data 10}
TOTAL PARTITIONS MOUNTED: ${lua mount 1 total}
FSYS${goto 100}SIZE${goto 200}USED%${goto 300}MOUNT
${lua mount 1 fsys}${goto 100}${lua mount 1 size}${goto 200}${lua mount 1 use%}${goto 300}${lua mount 1 mount 10}
${lua mount 2 fsys}${goto 100}${lua mount 2 size}${goto 200}${lua mount 2 use%}${goto 300}${lua mount 2 mount 10}
${lua mount 3 fsys}${goto 100}${lua mount 3 size}${goto 200}${lua mount 3 use%}${goto 300}${lua mount 3 mount 10}
${lua mount 4 fsys}${goto 100}${lua mount 4 size}${goto 200}${lua mount 4 use%}${goto 300}${lua mount 4 mount 10}

]]

conky_start=1
function conky_get_mounted_data(interval)
local updates=tonumber(conky_parse("${updates}"))
timer=(updates % interval)
if timer==0 or conky_start==1 then
fsys={}
size={}
used={}
avail={}
uperc={}
mount={}
local file = io.popen("df -h")
for line in file:lines() do
if string.find(line,"/dev/")~=nil then
local s,f,fs=string.find(line,"^([%d%a%p]*)%s")
table.insert(fsys,fs)
local s,f,sz=string.find(line,"%s*([%d%a%p]*)%s",f)
table.insert(size,sz)
local s,f,us=string.find(line,"%s*([%d%a%p]*)%s",f)
table.insert(used,us)
local s,f,av=string.find(line,"%s*([%d%a%p]*)%s",f)
table.insert(avail,av)
local s,f,up=string.find(line,"%s*([%d%a%p]*)%s",f)
table.insert(uperc,up)
local s,f,mn=string.find(line,"%s*([%d%a%p]*)%s*$",f)
table.insert(mount,mn)
end
end
file:close()
conky_start=nil
end--timed section
return ""
end

function conky_mount(n,d,c)--n=partition_number,d=data_type,c=number of characters to return
d=tostring(d)
n=tonumber(n)
c=tonumber(c) or 0
if d=="total" then
data=#fsys or 1
elseif d=="fsys" then
data=fsys[n] or ""
if c~=0 then
data=string.sub(data,1,c) or ""
end
elseif d=="size" then
data=size[n] or ""
elseif d=="used" then
data=used[n] or ""
elseif d=="free" then
data=avail[n] or ""
elseif d=="use%" then
data=uperc[n] or ""
elseif d=="mount" then
data=mount[n] or ""
if c~=0 then
data=string.sub(data,1,c) or ""
end
else
data="check data type"
end
return data
end--end main function


The network usage Conky I (cough-cough) 'borrowed' from Sector11.  I'm thinking he wrote this one with some help from dk75 over at #!.

vnstatconkyrc

# killall conky && conky -c ~/Conky/S11_VNS.conky &
# with help from dk75

###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes

# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes

own_window_type normal #override
own_window_transparent yes
own_window_hints undecorated,sticky,below,skip_taskbar,skip_pager
# own_window_colour ffffff
own_window_class Conky
own_window_title Vnstats

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type normal
own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
own_window_argb_value 255

minimum_size 330 0 ## width, height
maximum_width 330  ## width, usually a good idea to equal minimum width

gap_x 380 ### left &right
gap_y 50  #295 ### up & down

alignment br
####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont Anonymous Pro:size=9

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes

### WARNING ### These do NOT play well with ~/Conky/LUA/draw-bg.lua
###################################################################
draw_shades no #### <<<--- yes --- To see it easier on light screens.
#default_shade_color black
draw_outline no #### <<<--- yes --- Amplifies text if yes
default_outline_color black

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
default_shade_color gray
default_outline_color black

color0 c3c3c3 #mid gray
color1 FF0000 #red
color2 A4FFA4 #light green
color3 007EFF #bright blue
color4 E3E3E3 #very light gray
color5 c6771a #an orange shade
color6 CA8718 #a dust like color
color7 FFE500 #a darker yellow color
color8 C3FF00 #lime green
color9 28478D #bars-blue #another blue 227992 48a3fd 3881c7
default_color c3c3c3
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################

# yes
background yes

# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer right

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 512

# Subtract (file system) buffers from used memory?
no_buffers yes

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

#   Maximum size of user text buffer, i.e. layout below TEXT line in config file
#  (default is 16384 bytes)
# max_user_text 16384

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load ~/Conky/LUA/draw-bg.lua
#TEXT
#${lua conky_draw_bg 10 0 0 0 0 0x000000 0.6}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
#lua_load /home/jed/Conky/test/draw_bg.lua
#lua_draw_hook_pre draw_bg 75 0 0 0 0 0x000000 0.5
#
#######################################################  End LUA Settings  ###

#digiThe all important - How often conky refreshes.5
# If you have a "Crey" try: 0.2 - smokin' - but watch the CPU useage go UP!
update_interval 1 # in seconds

# stuff after 'TEXT' will be formatted on screen
TEXT
${color9}Network Usage Statistics${color} ${hr}
${downspeedgraph wlan0 24,150 A52A2A 0000FF -t -l}${goto 180}${upspeedgraph wlan0 24,150 0000FF A52A2A -t -l}
  Down: ${downspeedf wlan0}${goto 195}Up: ${upspeedf wlan0}

${color9}Transfer Totals${color} ${hr}
${color6}rx${goto 85}tx${goto 170}Total${goto 265}Avg Rate${color}
${color9}Today:${color}
${execpi 300 vnstat | grep "today" | awk '{print $2" "$3"\
${goto 85}"$5" "$6"\
${goto 170}"$8" "$9"\
${goto 265}"$11" "$12}'}
${color9}Yesterday:${color}
${execpi 300 vnstat | grep "yesterday" | awk '{print $2" "$3"\
${goto 85}"$5" "$6 "\
${goto 170}" $8" "$9 "\
${goto 265}" $11" "$12}'}
${color9}Last Week:${color}
${execpi 300 vnstat -w | grep "last week" | awk '{print $3" "$4"\
${goto 85}" $6" "$7 "\
${goto 170}" $9" "$10 "\
${goto 265}" $12" "$13}'}
${color9}Last 7 Days:${color}
${execpi 300 vnstat -w | grep "last 7 days" | awk '{print $4" "$5 "\
${goto 85}" $7" "$8 "\
${goto 170}" $10" "$11 "\
${goto 265}" $13" "$14}'}
${color9}Current Week:${color}
${execpi 300 vnstat -w | grep "current week" | awk '{print $3" "$4 "\
${goto 85}" $6" "$7 "\
${goto 170}" $9" "$10 "\
${goto 265}" $12" "$13}'}
${color9}${time %B %Y}:${color}
${execi 300 vnstat -m | grep "`date +"%b %y"`" | awk '{print $3" "$4}'}\
${goto 85}${execi 300 vnstat -m | grep "`date +"%b %y"`" | awk '{print $6" "$7}'}\
${goto 170}${execi 300 vnstat -m | grep "`date +"%b %y"`" | awk '{print $9" "$10}'}\
${goto 265}${execi 300 vnstat -m | grep "`date +"%b %y"`" | awk '{print $12" "$13}'}

${color9}Monthly Transfer Totals${color} ${hr}
${color6}${goto 85}rx${goto 170}tx${goto 265}Total${color}
${execpi 300 vnstat -m |mawk -v last=5 '/[A-Z][a-z][a-z].+12/ {test[++i]=$0} END{i=0; while (test[++i]); --i; for (j=i-last; j<=i; j++) {$0=test[j]; print "${color6}"$1, $2 ":${color}${goto 85}"$3" "$4"${goto 170}"$6" "$7"${goto 265}"$9" "$10}}'}
${color0}${hr}${color}


The email Conky on the bottom left was pointed out to me by Sector11, and it was originally created by Mark Buck.

emailconkyrc

use_xft yes
xftfont 123:size=8
xftalpha 0.1
update_interval 1
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 250 0
maximum_width 600
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color 28478D
default_shade_color red
default_outline_color green
alignment bottom_left
gap_x 10
gap_y 50
no_buffers yes
uppercase no
cpu_avg_samples 2
net_avg_samples 1
override_utf8_locale yes
use_spacer right

#lua_load /home/jed/Conky/LUA/draw_bg.lua
#lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.4

TEXT
${font Petita Bold:pixelsize=14}${color 28478D}gmail  -  ${color 525252}${execi 900 conkyEmail --servertype=POP --servername=pop.gmail.com --ssl --username=gmail.com --password=passwordhere --mailinfo=0} new email(s)

${color 28478D}vsido@gmail  -  ${color 525252}${execi 900 conkyEmail --servertype=POP --servername=pop.gmail.com --ssl --username=gmail.com --password=passwordhere --mailinfo=0} new email(s)

${color 28478D}live  -  ${color 525252}${execi 900 conkyEmail --servertype=POP --servername=pop3.live.com --ssl --username=@live.com --password=passwordhere --mailinfo=0} new email(s)

${color 28478D}hotmail  -  ${color 525252}${execi 900 conkyEmail --servertype=POP --servername=pop3.live.com --ssl --username=hotmail.com --password=passwordhere --mailinfo=0} new email(s)


The top left Conky I call the time Conky and again, was one pointed out to me by Sector11.  It was originally created by mobilediesel who has apparently dropped off of planet Earth!  All Conky folks everywhere certainly hope mobilediesel is doing wonderful, and would love to see more of his brilliant and very artistic work!

time

######################
# - Conky settings -
# based on original work by mobilediesel
######################

background yes
update_interval .3
cpu_avg_samples 2
total_run_times 0
override_utf8_locale yes

double_buffer yes
#no_buffers yes

text_buffer_size 1024
#imlib_cache_size 0

minimum_size 1250 0
maximum_width 1250

gap_x 10
gap_y 10
#####################
# - Text settings - #
#####################
use_xft yes
xftfont Santana:size=8
xftalpha .8
uppercase no
alignment top_left
#############################
# - Window specifications - #
#############################
own_window yes
own_window_transparent yes
own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_class conky-semi
#own_window_argb_visual yes
#own_window_argb_value 255
border_inner_margin 0
border_outer_margin 0
#########################
# - Graphics settings - #
#########################
draw_shades no
#default_shade_color 292421
draw_outline no
draw_borders no
stippled_borders 0
draw_graph_borders no
TEXT
${execpi 36000 /home/jed/Conky/Scripts/horical.sh}
${font CaviarDreams:size=30}${goto 60}${color 949494}${voffset 10}${time %l:%M %P}
${font CaviarDreams:size=18}${goto 60}${color 3881C7}${voffset -10}${time %A %B %d %Y}
${goto 600}${color 3881C7}${font CaviarDreams:size=10}${execi 1 conkyForecast-SunsetSunriseCountdown  -t} in: ${color 949494}${execi 1 conkyForecast-SunsetSunriseCountdown -L}
${goto 600}${color 3881C7}Current Moon Phase: ${goto 720}${color 949494}${execi 300 conkyForecast --imperial --datatype=MP}
${execpi 1800 conkyForecast --location=USME0330 --imperial --template=$HOME/Conky/LUA/day-night.template}


The horical.sh script

#!/bin/bash
# a script to display a horizontal calendar on conky (hence the name horical :D)
# created by mobilediesel
#
TODAY=`date +%d`
TOPLINE=" "
OVER=" "
REST=" "
# -------- This part is to find out the number of days in a month to display-----------#
a=`date +%-Y`
e1=`expr $a % 400`
e2=`expr $a % 100`
e3=`expr $a % 4`
if [ $e1 == 0 ]
  then c=1
  elif [ $e2 == 0 ]
  then c=0
  elif [ $e3 == 0 ]
  then c=1
  else c=0
fi
p=`date +%-m`
# if the current year is not a leap one, c = 0
if [ $c == 0 ]
  then
if [ $p == 2 ]
then b=28 # this is the number of days in Febuary
elif [ $p == 11 ] || [ $p == 4 ] || [ $p == 6 ] ||  [ $p == 9 ]
then b=30
else b=31
fi
  else
if [ $p == 2 ]
then b=29 # the number of days in Febuary in a leap year
elif [ $p == 11 ] || [ $p == 4 ] || [ $p == 6 ] ||  [ $p == 9 ]
then b=30
else b=31
fi
fi
#--------------------- The bottom line which displays the days of month ----------#
i=1
if [ $TODAY -ne 1 ]
then
    while [ $i -lt $TODAY ]; do
        if [ $i -lt 10 ]
        then
            OVER="$OVER 0$i"
        else
            OVER="$OVER $i"
        fi
        i=$[$i+1]
    done
fi
i=$[$i+1]
if [ $TODAY -ne $b ]
then
    while [ $i -ne $[$b] ]; do
        if [ $i -lt 10 ]
        then
            REST="$REST 0$i"
        else
            REST="$REST $i"
        fi
        i=$[$i+1]
    done
    REST="$REST $b"
fi
#------------- the top line which displays the abbreviated weekday names-------#
k=`date +%u`
j=`date +%e`
f=`expr $j % 7`
if [$k -lt $f]
then
y=$[$k+8-$f]
else
y=$[$k-$f+1]
fi
while [ $b -gt 0 ]; do
    case "$y" in
    1) TOPLINE="$TOPLINE Mo";;
    2) TOPLINE="$TOPLINE Tu";;
    3) TOPLINE="$TOPLINE We";;
    4) TOPLINE="$TOPLINE Th";;
    5) TOPLINE="$TOPLINE Fr";;
    6) TOPLINE="$TOPLINE Sa";;
    7) TOPLINE="$TOPLINE Su";;
    esac
    b=$[$b-1]
    y=$[$y+1]
    if [ $y -eq 8 ]
    then
        y=1
    fi
done
echo '${goto 15}''${color 949494}${font Droid Sans Mono:size=12}'$TOPLINE | sed 's/Su/${color 48a3fd}Su${color 949494}/g' | sed 's/Su/${color 3881C7}Su/g'
echo '${goto 15}''${font Droid Sans Mono:bold:size=12}''${color 3c3c3c}'$OVER '${color 3881C7}'$TODAY'${color}${color 949494}'$REST


the day-night.template file

${image [--datatype=WI] -p 350,40 -s 100x100}${image [--datatype=MI] -p 555,40 -s 100x100}


The time Conky relies on having conkyForecast installed and configured correctly for your location.  Like I tell everyone all the time, I'm a copy/paste guy that knows enough to get myself in heaps of trouble on my own system.  That said, think twice before asking me for help!  Google and the forums are your friend.  My best advice, is to get rid of whatever distro your currently using and install VSIDO which you can get here at the VSIDO forums and was developed by VastOne.  It has none of the bloat and overhead installed that most major distro's come with by default, thus making it harder to break!

Everything here will need some specific tweaking to work on your personal system since it will be nothing at all like my own.

Hope I didn't mess up on the creds.  Someone over at that site that glows orange asked for all of this!  Sorry for such a long post...
Title: Re: Conky Support, Codes and Screenshots
Post by: McLovin on July 29, 2013, 05:37:47 AM
This all makes me laugh, I keep seeing more and more of my stuff being used, and ppl getting from other sources, it hilarious lol, i just like seeing how far my stuff makes the rounds
Title: Re: Conky Support, Codes and Screenshots
Post by: VastOne on July 29, 2013, 05:57:27 PM
^ That it is...

It would be nice to have a 'ripple' capability like Google+ does to be able to see everywhere VSIDO is
Title: Re: Conky Support, Codes and Screenshots
Post by: PwL on August 03, 2013, 06:54:01 AM
Minimal two-line Conky, bottom right 30%, sits after leftside 70% Tint

Deleted a line by accident, VastOne corrected that and posted whole thing again. See next post.
Title: Re: Conky Support, Codes and Screenshots
Post by: VastOne on August 03, 2013, 02:52:54 PM
^ That is very nice...

I did have an issue with it, getting an error ... There is no TEXT statement in your code so it would not run

I added as such and this worked


# .conkyrc - Edited from various examples across the 'net
# Used by VastOne on VSIDO
#http://conky.sourceforge.net/config_settings.html
# Bottom right conky, goes together with left tint2
###############################################################

## Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

## fiddle with window
# use_spacer

## Use Xft?
use_xft yes
xftfont liberation sans:size=11
xftalpha 0.9
text_buffer_size 2048

## Update interval in seconds
update_interval 1

## This is the number of times Conky will update before quitting.
## Set to zero to run forever.
total_run_times 0

## Draw shades?
draw_shades no

## Draw outlines?
draw_outline no

## Draw borders around text
draw_borders no

own_window_argb_visual yes

## override lets you see conky even when super+d
own_window_type override

own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window yes
own_window_transparent yes
own_window_class conky-semi
own_window_colour 000000

## Stippled borders?
stippled_borders 0

## border margins
# border_margin 0

## border width
border_width 1

alignment bottom_right

## Gap between borders of screen and text
## same thing as passing -x at command line
gap_x 2
gap_y 1
minimum_size 100 27
maximum_width 600
## 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

TEXT
${color ebebeb}Kernel $kernel ${color 73AEB4} ${color 73AEB4}MEM ${color lime green}${memperc}% ${mem} / ${memmax} ${color 73AEB4} CPU ${color yellow}${cpu cpu0}%, ${cpu cpu1}%
${color 73AEB4}C0 ${color yellow}${exec sensors | grep 'Core0 Temp' | cut -c15-19}, ${color 73AEB4}C1 ${color yellow}${exec sensors | grep 'Core1 Temp' | cut -c15-19}  ${color 73AEB4}NET${color 7D8C93}  ${voffset 1}${downspeedgraph eth0 12,70 000000 ff0000}  ${upspeedgraph eth0 12,70 000000 00ff00}  ${color FFFFFF}${font Arial:size=11} ${time %F}   ${time %H: %M: %S}


Title: Re: Conky Support, Codes and Screenshots
Post by: jedi on October 18, 2013, 02:50:26 AM
@zbreaker...

(http://www.zimagez.com/miniature/newiso2.png) (http://www.zimagez.com/zimage/newiso2.php)

This is the one that checks the email.  It is using conkyemail which i'll attach and also a python script i got from VastOne which i'll also attach.

email conky;  (mine is called .conkyrc3)

use_xft yes
xftfont 123:size=11
xftalpha 0.1
update_interval 1
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 250 0
maximum_width 600
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color 3881C7
default_shade_color red
default_outline_color green
alignment top_left
gap_x 95
gap_y 300
no_buffers yes
uppercase no
cpu_avg_samples 2
net_avg_samples 1
override_utf8_locale yes
use_spacer right

#lua_load /home/jed/Conky/LUA/draw_bg.lua
#lua_draw_hook_post draw_bg 10 0 0 0 0 0x000000 0.4

TEXT
${color 3881C7}Jed   - ${execpi 15 python ~/Conky/Scripts/gmail_parser.py yours@gmail.com yours 0}
${color 3881C7}VSIDO Community   - ${execpi 15 python ~/Conky/Scripts/gmail_parser.py yours@gmail.com yours 0}

${color 3881C7}jedsdesk  -  ${color 525252}${execi 90 conkyEmail --servertype=POP --servername=mail.yourserver.com --ssl --username=yours --password=yours --mailinfo=0} new email(s)
${color 3881C7}live  -  ${color 525252}${execi 900 conkyEmail --servertype=POP --servername=pop3.live.com --ssl --username=yours@live.com --password=yours --mailinfo=0} new email(s)
${color 3881C7}hotmail  -  ${color 525252}${execi 900 conkyEmail --servertype=POP --servername=pop3.live.com --ssl --username=yours@hotmail.com --password=yours --mailinfo=0} new email(s)


This is the one displaying the time and date;  (i call it .conkyrc2)


use_xft yes
xftfont 123:size=10
xftalpha 0.1
update_interval 1
total_run_times 0
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 400 150
maximum_width 600
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color 525252
default_shade_color red
default_outline_color green
alignment top_left
gap_x 120
gap_y 750
no_buffers yes
uppercase no
cpu_avg_samples 2
net_avg_samples 1
override_utf8_locale yes
use_spacer right

#lua_load /home/jed/Conky/LUA/draw_bg.lua
#lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.4

TEXT


${goto 210}${font}${color 780F0F}${font Petita Medium:pixelsize=28}${voffset 25}${time %d},${goto 245}${font Petita Medium:pixelsize=28}${time %A}${font}${goto 10}${color 0F2C48}${font GeoSans Light:pixelsize=75}${voffset -30}${time %l:%M}${goto 210}${font Petita Medium:pixelsize=32}${color CD621B}${font Petita Medium:pixelsize=14}${time  %B}, ${time %Y}${font}#${font GeoSans Light:pixelsize=38}

${color 202E37}${hr}



The upper right is the desktop widget from gmusicbrowser.  If you have VSIDO installed, then you already have it.  Lot of different choices to choose from!

The far right is mrpeachy's v9000 weather script conky.  A quick google search will find it for you!  It's really that popular...

https://docs.google.com/file/d/0BxZsBfDm9Fo_THFaVWlYdjJBdnc/edit?usp=sharing (https://docs.google.com/file/d/0BxZsBfDm9Fo_THFaVWlYdjJBdnc/edit?usp=sharing)
Title: Re: Conky Support, Codes and Screenshots
Post by: zbreaker on October 18, 2013, 01:48:32 PM
jedi - thanks.

A little hacking fun will be had this weekend!
Title: Re: Conky Support, Codes and Screenshots
Post by: statmonkey on October 19, 2013, 03:18:43 PM
Very nice jedi and thanks for posting those configs.  I will be "borrowing" liberally.
Title: Re: Conky Support, Codes and Screenshots
Post by: jedi on October 19, 2013, 09:21:37 PM
Enjoy!  I also *borrowed* these. 
Title: Re: Conky Support, Codes and Screenshots
Post by: jedi on November 02, 2013, 10:56:58 PM
As promised on Google+.  A couple of different Conky's to play around with.

(http://en.zimagez.com/miniature/debshow1.jpg) (http://en.zimagez.com/zimage/debshow1.php)

The clock Conkyrc

# — Conky settings — #

background yes

update_interval 1
total_run_times 0
net_avg_samples 2

override_utf8_locale yes

double_buffer yes
no_buffers yes

text_buffer_size 2048
imlib_cache_size 0


# — Window specifications — #
own_window_type override
own_window_class Conky
own_window yes
#own_window_type conky
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

border_inner_margin 0
border_outer_margin 0

minimum_size 525 600
maximum_width 525

alignment mm

gap_x -30
gap_y -65



# — Graphics settings — #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

# — Text settings — #
use_xft yes
xftfont LCDMono2:size=10.1
xftalpha 1.0

default_color 227992 ##dark red A84C47 ##opaque white FFFFFF

uppercase no
use_spacer right

# — Lua Load — #
lua_load ~/Conky/LUA/greyclock.lua
lua_draw_hook_post main
lua_load ~/v9000/v9000.lua
lua_draw_hook_pre weather
lua_load ~/Conky/chrono-full.template.lua


TEXT
${voffset 305}${goto 290}${font LCDMono2:size=23.1}${time %l:%M}${font}
${voffset 2}${goto 292}${time %a %d %b} 


The greyclock.lua file


require 'cairo'
--------------------------------------------------------------------------------
----Adjustable Settings
coffee_table = {
    {
    name='time',                   arg='%I.%M',                    max_value=12,
    x=230,                         y=230,
    cup_radius=112, --hour-hand
    cup_wall_thickness=90,
    cup_bg_clr=0xffffff,           cup_bg_alpha=0.0,
    cup_fg_clr=0xFFFFFF,           cup_fg_alpha=0.0,
    handle_length=70,              handle_circ=5,
    handle_fg_clr=0xFFFFFF,        handle_fg_alpha=1.0,
    graduation_radius=184,
    graduation_thickness=8,        graduation_mark_circ=1.5,
    graduation_mark_angle=30,
    graduation_fg_clr=0xFFFFFF,    graduation_fg_alpha=0.5,
    saucer_thickness=6,            thick_saucer_circ=11/12,   
    saucer_radius=195,             thin_saucer_circ=11/12,   
    saucer_fg_clr=0xFFFFFF,        saucer_fg_alpha=0.3,
    saucer_mark_fg_clr=0xFFFFFF,   saucer_mark_fg_alpha=0.0,
    inner_saucer=true,
    txt_weight=0,                  txt_size=8.0,
    txt_fg_clr=0xFFFFFF,           txt_fg_alpha=0.0,
    caption='',                    caption2='',
    },
   {
    name='time',                   arg='%H',                    max_value=12,
    x=230,                         y=230,
    cup_radius=2,
    cup_wall_thickness=3,
    cup_bg_clr=0xffffff,           cup_bg_alpha=1.0,
    cup_fg_clr=0xFFFFFF,           cup_fg_alpha=1.0,
    handle_length=40,              handle_circ=4,
    handle_fg_clr=0xFFFFFF,        handle_fg_alpha=0.0,
    graduation_radius=187,
    graduation_thickness=1,        graduation_mark_circ=0.5,
    graduation_mark_angle=3,
    graduation_fg_clr=0xFFFFFF,    graduation_fg_alpha=0.5,
    saucer_thickness=6,            thick_saucer_circ=11/12,   
    saucer_radius=195,             thin_saucer_circ=11/12,   
    saucer_fg_clr=0xFFFFFF,        saucer_fg_alpha=0.0,
    saucer_mark_fg_clr=0xFFFFFF,   saucer_mark_fg_alpha=0.0,
    inner_saucer=true,
    txt_weight=0,                  txt_size=8.0,
    txt_fg_clr=0xFFFFFF,           txt_fg_alpha=0.0,
    caption='',                    caption2='',
    },
    {
    name='time',                   arg='%M',                    max_value=60,
    x=230,                         y=230,
    cup_radius=118,
    cup_wall_thickness=120,
    cup_bg_clr=0xffffff,           cup_bg_alpha=0.0,
    cup_fg_clr=0xFFFFFF,           cup_fg_alpha=0.0,
    graduation_radius=183,
    graduation_thickness=10,       graduation_mark_circ=2.5,
    graduation_mark_angle=90,
    graduation_fg_clr=0xFFFFFF,    graduation_fg_alpha=0.5,
    handle_length=110,              handle_circ=3,
    handle_fg_clr=0xFFFFFF,        handle_fg_alpha=1.0,
    saucer_thickness=6,            thick_saucer_circ=11/12,
    saucer_radius=220,             thin_saucer_circ=11/12,   
    saucer_fg_clr=0xFFFFFF,        saucer_fg_alpha=0.3,
    saucer_mark_fg_clr=0xFFFFFF,   saucer_mark_fg_alpha=0.0,
    txt_weight=0,                  txt_size=8.0,
    txt_fg_clr=0xFFFFFF,           txt_fg_alpha=0.0,
    caption='',                    caption2='',
    },
    {
    name='time',                   arg='%S',                    max_value=60,
    x=230,                         y=230,
    cup_radius=120,
    cup_wall_thickness=120,
    cup_bg_clr=0xffffff,           cup_bg_alpha=0.0,
    cup_fg_clr=0xFFFFFF,         cup_fg_alpha=0.0,
    handle_fg_clr=0xFFFFFF,        handle_fg_alpha=1.0,
    handle_length=118,              handle_circ=1,
    graduation_radius=185,
    graduation_thickness=6,        graduation_mark_circ=0.5,
    graduation_mark_angle=6,
    graduation_fg_clr=0xFFFFFF,    graduation_fg_alpha=0.5,
    saucer_thickness=5,    thick_saucer_circ=1,
    saucer_radius=205,             thin_saucer_circ=11/12,   
    saucer_fg_clr=0xFFFFFF,        saucer_fg_alpha=0.4,
    saucer_mark_fg_clr=0xFFFFFF,   saucer_mark_fg_alpha=0.4,
    txt_weight=0,                  txt_size=8.0,
    txt_fg_clr=0xFFFFFF,           txt_fg_alpha=0.0,
    caption='',                    caption2='',
},

    {
    name='cpu',                    arg='cpu0',                  max_value=100,
    x=230,                         y=105,
    cup_radius=20,
    cup_wall_thickness=40,
    cup_start_angle=0,
    cup_bg_clr=0xFFFFFF,           cup_bg_alpha=0.0,
    cup_fg_clr=0xFFFFFF,           cup_fg_alpha=0.0,
    handle_fg_clr=0xFFFFFF,        handle_fg_alpha=0.0,
    handle_length=40,              handle_circ=4,
    xtxt=-20,    ytxt= -12,
    txt_weight=0,                  txt_size=10.0,
    txt_fg_clr=0xFFFFFF,           txt_fg_alpha=0.8,
    caption='CPU ',               caption2=' %',
    graduation_radius=35,
    graduation_thickness=3,        graduation_mark_circ=2,
    graduation_mark_angle=36,
    graduation_fg_clr=0xFFFFFF,    graduation_fg_alpha=0.6,
    saucer_thickness=6,            thick_saucer_circ=0.85,
    saucer_radius=40,              thin_saucer_circ=0.85,
    saucer_fg_clr=0xFFFFFF,    saucer_fg_alpha= 0.3,
    saucer_mark_fg_clr=0xFFFFFF,   saucer_mark_fg_alpha=0.5,
    inner_saucer=true,
    },
    {
    name='freq_g',                 arg='/',                  max_value=5,
    x=230,                         y=105,
    cup_radius=12,
    cup_wall_thickness=23,
    cup_start_angle=0,
    cup_bg_clr=0xFFFFFF,           cup_bg_alpha=0.0,
    cup_fg_clr=0xFFFFFF,           cup_fg_alpha=0.0,
    handle_fg_clr=0xFFFFFF,        handle_fg_alpha=0.0,
    handle_length=40,              handle_circ=4,
    xtxt=-20,    ytxt= 0,
    txt_weight=0,                  txt_size=10.0,
    txt_fg_clr=0xFFFFFF,           txt_fg_alpha=0.8,
    caption='',    caption2=' GHz',
    graduation_radius=25,
    graduation_thickness=6,        graduation_mark_circ=4,
    graduation_mark_angle=30,
    graduation_fg_clr=0xFFFFFF,    graduation_fg_alpha=0.0,
    saucer_thickness=6,            thick_saucer_circ=0.75,
    saucer_radius=45,              thin_saucer_circ=0.75,
    saucer_fg_clr=0xFFFFFF,    saucer_fg_alpha= 0.3,
    saucer_mark_fg_clr=0xFFFFFF,   saucer_mark_fg_alpha=0.5,
},
{
    name='hwmon',                arg='temp 1',                      max_value=100,
    x=230,                         y=105,
    cup_radius=12,
    cup_wall_thickness=23,
    cup_start_angle=0,
    cup_bg_clr=0xFFFFFF,           cup_bg_alpha=0.0,
    cup_fg_clr=0xFFFFFF,           cup_fg_alpha=0.0,
    handle_fg_clr=0xFFFFFF,        handle_fg_alpha=0.0,
    handle_length=40,              handle_circ=4,
    xtxt=-15,    ytxt= 12,
    txt_weight=0,                  txt_size=10.0,
    txt_fg_clr=0xFFFFFF,           txt_fg_alpha=0.8,
    caption='',         caption2=' ºC',
    graduation_radius=35,
    graduation_thickness=6,        graduation_mark_circ=2,
    graduation_mark_angle=36,
    graduation_fg_clr=0xFFFFFF,    graduation_fg_alpha=0.6,
    saucer_thickness=6,    thick_saucer_circ=0.85,
    saucer_radius=40,              thin_saucer_circ=0.85,   
    saucer_fg_clr=0xFFFFFF,        saucer_fg_alpha= 0.3,
    saucer_mark_fg_clr=0xFFFFFF,   saucer_mark_fg_alpha=0.5,
    inner_saucer=true,
},   
---------------1/2
{
    name='memperc',                arg='/',                      max_value=100,
    x=135,                         y=150,
    cup_radius=12,
    cup_wall_thickness=23,
    cup_start_angle=0,
    cup_bg_clr=0xFFFFFF,           cup_bg_alpha=0.0,
    cup_fg_clr=0xFFFFFF,           cup_fg_alpha=0.0,
    handle_fg_clr=0xFFFFFF,        handle_fg_alpha=0.0,
    handle_length=40,              handle_circ=4,
    xtxt=-25,    ytxt=0,
    txt_weight=0,                  txt_size=10.0,
    txt_fg_clr=0xFFFFFF,           txt_fg_alpha=0.8,
    caption='RAM ',         caption2=' %',
    graduation_radius=35,
    graduation_thickness=6,        graduation_mark_circ=2,
    graduation_mark_angle=36,
    graduation_fg_clr=0xFFFFFF,    graduation_fg_alpha=0.6,
    saucer_thickness=6,    thick_saucer_circ=0.85,
    saucer_radius=40,              thin_saucer_circ=0.85,   
    saucer_fg_clr=0xFFFFFF,        saucer_fg_alpha= 0.3,
    saucer_mark_fg_clr=0xFFFFFF,   saucer_mark_fg_alpha=0.5,
    inner_saucer=true,
},   
------------------2/3   
{
    name='fs_used_perc',           arg='/home',                      max_value=100,
    x=105,                         y=240,
    cup_radius=12,
    cup_wall_thickness=27,
    cup_start_angle=0,
    cup_bg_clr=0xFFFFFF,           cup_bg_alpha=0.0,
    cup_fg_clr=0xFFFFFF,           cup_fg_alpha=0.0,
    handle_fg_clr=0xFFFFFF,        handle_fg_alpha=0.0,
    handle_length=40,              handle_circ=4,
    xtxt=-30,    ytxt= 12,
    txt_weight=0,                  txt_size=10.0,
    txt_fg_clr=0xFFFFFF,           txt_fg_alpha=0.8,
    caption=' FS H: ',         caption2=' %',
    graduation_radius=35,
    graduation_thickness=6,        graduation_mark_circ=2,
    graduation_mark_angle=36,
    graduation_fg_clr=0xFFFFFF,    graduation_fg_alpha=0.6,   
    saucer_thickness=6,            thick_saucer_circ=0.85,
    saucer_radius=40,              thin_saucer_circ=0.85,     
    saucer_fg_clr=0xFFFFFF,        saucer_fg_alpha=0.3,
    saucer_mark_fg_clr=0xFFFFFF,   saucer_mark_fg_alpha=0.5,
    inner_saucer=true,
},
{
    name='fs_used_perc',           arg='/',                      max_value=100,
    x=105,                         y=240,
    cup_radius=12,
    cup_wall_thickness=27,
    cup_start_angle=0,
    cup_bg_clr=0xFFFFFF,           cup_bg_alpha=0.0,
    cup_fg_clr=0xFFFFFF,           cup_fg_alpha=0.0,
    handle_fg_clr=0xFFFFFF,        handle_fg_alpha=0.0,
    handle_length=40,              handle_circ=4,
    xtxt=-30,    ytxt= -5,
    txt_weight=0,                  txt_size=10.0,
    txt_fg_clr=0xFFFFFF,           txt_fg_alpha=0.8,
    caption=' FS /: ',         caption2=' %',
    graduation_radius=25,
    graduation_thickness=4,        graduation_mark_circ=4,
    graduation_mark_angle=36,
    graduation_fg_clr=0xFFFFFF,    graduation_fg_alpha=0.0,
    saucer_thickness=6,            thick_saucer_circ=0.85,
    saucer_radius=45,              thin_saucer_circ=0.85,     
    saucer_fg_clr=0xFFFFFF,        saucer_fg_alpha=0.3,
    saucer_mark_fg_clr=0xFFFFFF,   saucer_mark_fg_alpha=0.5,
},
}
 
--Fixed code -do not edit unless you know what you are doing------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- converts color in hexa to decimal
function rgb_to_r_g_b(clr, alpha)
    return ((clr / 0x10000) % 0x100) / 255., ((clr / 0x100) % 0x100) / 255., (clr % 0x100) / 255., alpha
end
-------------------------------------------------------------------------------
------------------------------------------------------------------------
local function draw_coffee_table(display, data, value)
     max_value = data['max_value']
     x, y = data['x'], data['y']
     if x==nil then x=conky_window.width/2 end
     if y==nil then y=conky_window.height/2 end
     cup_radius = data['cup_radius']   
     if cup_radius==nil then cup_radius=conky_window.width/4 end
     cup_wall_thickness = data['cup_wall_thickness']
     if cup_wall_thickness==nil then cup_wall_thickness=20 end
     handle_length, handle_circ = data['handle_length'], data['handle_circ']
     if handle_length==nil then handle_length=20 end
     if handle_circ==nil then handle_circ=1 end
     cup_start_angle = data['cup_start_angle']
     if cup_start_angle == nil then cup_start_angle =0 end
     total_angle = data['total_angle']
     if total_angle == nil then total_angle=360 end
     cup_sector_angle = (math.abs(total_angle))/max_value 
     cup_end_angle = total_angle + cup_start_angle
     cup_bg_clr, cup_bg_alpha = data['cup_bg_clr'], data['cup_bg_alpha']
     if cup_bg_clr==nil then cup_bg_clr =0xffffff end
     cup_fg_clr, cup_fg_alpha = data['cup_fg_clr'], data['cup_fg_alpha']
     if cup_fg_clr==nil then cup_fg_clr =0xffffff end
     if cup_fg_alpha==nil then cup_fg_alpha=0 end
     handle_fg_clr, handle_fg_alpha = data['handle_fg_clr'], data['handle_fg_alpha'] 
     if handle_fg_clr==nil then handle_fg_clr = 0xffffff end
     if handle_fg_alpha==nil then handle_fg_alpha=0 end
     
     saucer_radius = data['saucer_radius']
     if saucer_radius==nil then saucer_radius=conky_window.width/2 end
     total_saucer_angle=data['total_saucer_angle']
     if total_saucer_angle==nil then total_saucer_angle=360 end
     saucer_sector_angle=(math.abs(total_saucer_angle))/max_value 
     saucer_thickness = data['saucer_thickness']
     if saucer_thickness==nil then saucer_thickness=6 end
     saucer_fg_clr = data['saucer_fg_clr']
     if saucer_fg_clr ==nil then saucer_fg_clr=0 end
     saucer_fg_alpha = data['saucer_fg_alpha']
     if saucer_fg_alpha ==nil then saucer_fg_alpha=0 end
     
     saucer_mark_fg_alpha = data['saucer_mark_fg_alpha']
     if saucer_mark_fg_alpha ==nil then saucer_mark_fg_alpha=0 end
     saucer_mark_fg_clr = data['saucer_mark_fg_clr']
     if saucer_mark_fg_clr ==nil then saucer_mark_fg_clr=0xffffff end
     thick_saucer_circ = data['thick_saucer_circ']
     if thick_saucer_circ==nil then thick_saucer_circ =0.9 end
     thin_saucer_circ = data['thin_saucer_circ']
     if thin_saucer_circ==nil then thin_saucer_circ =0.9 end
     inner_saucer = data['inner_saucer']
     
     graduation_radius = data['graduation_radius']
     if graduation_radius ==nil then graduation_radius = conky_window.width/3 end
     graduation_thickness, graduation_mark_circ = data['graduation_thickness'], data['graduation_mark_circ']
     if graduation_thickness ==nil then graduation_thickness = 2 end
     if graduation_mark_circ ==nil then graduation_mark_circ = 1 end
     graduation_mark_angle = data['graduation_mark_angle']
     if graduation_mark_angle == nil then graduation_mark_angle = total_angle/10 end
     graduation_fg_clr, graduation_fg_alpha = data['graduation_fg_clr'], data['graduation_fg_alpha']
     if graduation_fg_clr ==nil then graduation_fg_clr= 0xffffff end
     if graduation_fg_alpha==nil then graduation_fg_alpha =0 end
     
     
     txt_weight, txt_size = data['txt_weight'], data['txt_size']
     if txt_weight == nil then txt_weight=1 end
     if txt_size == nil then txt_size=8 end
     txt_fg_clr, txt_fg_alpha = data['txt_fg_clr'], data['txt_fg_alpha']
     if txt_fg_clr ==nil then txt_fg_clr= 0xffffff end
     if txt_fg_alpha==nil then txt_fg_alpha =0 end
     caption = data['caption']
     if caption==nil then caption='' end
     caption2 = data['caption2']
     if caption2==nil then caption2='' end
     xtxt, ytxt= data ['xtxt'], data['ytxt']
     if xtxt ==nil then xtxt=0 end
     if ytxt ==nil then ytxt=0 end

--convert degree to rad and rotate (0 degree is top/north)
    function angle_to_position(start_angle, current_angle)   
      if total_angle < 0 then
        local pos = start_angle - current_angle
        return ( ( pos * (math.pi / 180) ) - (math.pi / 2) )
      else
        local pos = current_angle + start_angle
        return ( ( pos * (math.pi / 180) ) - (math.pi / 2) )
      end   
    end
--cup centre background   
  if cup_bg_alpha >0   then
    if total_angle < 0 then
      cairo_arc_negative(display, x, y, cup_radius, angle_to_position(cup_start_angle, 0), angle_to_position(cup_end_angle, 0))
    else
      cairo_arc(display, x, y, cup_radius, angle_to_position(cup_start_angle, 0), angle_to_position(cup_start_angle, cup_end_angle))
    end
    cairo_set_source_rgba(display, rgb_to_r_g_b(cup_bg_clr, cup_bg_alpha))
    cairo_set_line_width(display, cup_wall_thickness)
    cairo_stroke(display)
  end
--cup wall fg   
  if cup_fg_alpha > 0 then
   local fg_stop_arc = (cup_sector_angle * value)
    if total_angle < 0 then
cairo_arc_negative(display, x, y, cup_radius, angle_to_position(cup_start_angle, 0), angle_to_position(cup_start_angle, fg_stop_arc))
    else
cairo_arc(display, x, y, cup_radius, angle_to_position(cup_start_angle, 0), angle_to_position(cup_start_angle, fg_stop_arc))
    end
    cairo_set_source_rgba(display, rgb_to_r_g_b(cup_fg_clr, cup_fg_alpha))
    cairo_set_line_width(display, cup_wall_thickness)
    cairo_stroke(display)
  end
-- cup handle
  if handle_fg_alpha>0 then
    local start_handle = (cup_sector_angle * value) - (handle_circ*0.5)
    local stop_handle = (cup_sector_angle * value) +  (handle_circ*0.5)
    if total_angle < 0 then
cairo_arc_negative(display, x, y, cup_radius, angle_to_position(cup_start_angle, start_handle), angle_to_position(cup_start_angle, stop_handle))
    else
cairo_arc(display, x, y, cup_radius, angle_to_position(cup_start_angle, start_handle), angle_to_position(cup_start_angle, stop_handle))
    end
    cairo_set_line_width(display, handle_length)   
    cairo_set_source_rgba(display, rgb_to_r_g_b(handle_fg_clr, handle_fg_alpha))
    cairo_stroke(display)
  end
--saucers   
---thick saucer     
    if saucer_fg_alpha > 0 and (thin_saucer_circ >0 or thick_saucer_circ > 0)
      then
if value < (max_value/2)
        then j = value + ((max_value*total_saucer_angle)/720)
        else j = value - ((max_value*total_saucer_angle)/720)
end

    local start_saucer = (saucer_sector_angle * j) - (value*saucer_sector_angle*0.5*thick_saucer_circ)
    local stop_saucer = (saucer_sector_angle * j) + (value*saucer_sector_angle*0.5*thick_saucer_circ)
    if total_angle < 0 then
cairo_arc_negative(display, x, y, saucer_radius, angle_to_position(cup_start_angle, start_saucer), angle_to_position(cup_start_angle, stop_saucer))
    else
cairo_arc(display, x, y, saucer_radius, angle_to_position(cup_start_angle, start_saucer), angle_to_position(cup_start_angle, stop_saucer))
    end
    cairo_set_source_rgba(display, rgb_to_r_g_b(saucer_fg_clr, saucer_fg_alpha))
    cairo_set_line_width(display, saucer_thickness)
    cairo_stroke(display)
    --thin saucer
      if inner_saucer == true
      then rt = (saucer_radius - 0.5) + (0.5 * saucer_thickness)
      else rt = (saucer_radius + 0.5) - (0.5 * saucer_thickness) 
      end
    local start_thin_saucer = (saucer_sector_angle * j) - (max_value *0.5*saucer_sector_angle*thin_saucer_circ)
    local stop_thin_saucer = (saucer_sector_angle * j) + (max_value *0.5*saucer_sector_angle*thin_saucer_circ)
    if total_angle < 0 then
cairo_arc_negative(display, x, y, rt, angle_to_position(cup_start_angle, start_thin_saucer), angle_to_position(cup_start_angle, stop_thin_saucer))
    else
cairo_arc(display, x, y, rt, angle_to_position(cup_start_angle, start_thin_saucer), angle_to_position(cup_start_angle, stop_thin_saucer))
    end
    cairo_set_source_rgba(display, rgb_to_r_g_b(saucer_fg_clr, saucer_fg_alpha))
    cairo_set_line_width(display, 1)
    cairo_stroke(display)
   end
--saucer mark
    if saucer_mark_fg_alpha > 0 then
local start_cm = (saucer_sector_angle * value) - (handle_circ *0.5 )
local stop_cm = (saucer_sector_angle * value) + (handle_circ *0.5 )
if total_angle < 0 then
  cairo_arc_negative(display, x, y, saucer_radius, angle_to_position(cup_start_angle, start_cm), angle_to_position(cup_start_angle, stop_cm))
else
  cairo_arc(display, x, y, saucer_radius, angle_to_position(cup_start_angle, start_cm), angle_to_position(cup_start_angle, stop_cm))
end
cairo_set_source_rgba(display, rgb_to_r_g_b(saucer_mark_fg_clr, saucer_mark_fg_alpha))
        cairo_set_line_width(display, saucer_thickness)
        cairo_stroke(display)
    end
--graduation mark
     if graduation_radius > 0 and graduation_thickness > 0 and graduation_mark_angle > 0 then
        number_graduation = (math.abs(total_angle) +1)/ graduation_mark_angle
        local start_arc_grad = 0
        local stop_arc_grad = 0
local i = 0
        while i < number_graduation do           
            local start_arc_grad = (graduation_mark_angle * (i)) - (graduation_mark_circ *0.5)
            local stop_arc_grad = (graduation_mark_angle * (i)) + (graduation_mark_circ *0.5)
            if total_angle < 0 then
      cairo_arc_negative(display, x, y, graduation_radius, angle_to_position(cup_start_angle, start_arc_grad), angle_to_position(cup_start_angle, stop_arc_grad))
    else
      cairo_arc(display, x, y, graduation_radius, angle_to_position(cup_start_angle, start_arc_grad), angle_to_position(cup_start_angle, stop_arc_grad))
    end
    cairo_set_source_rgba(display,rgb_to_r_g_b(graduation_fg_clr,graduation_fg_alpha))
            cairo_set_line_width(display, graduation_thickness)
    cairo_stroke(display)           
            i = i + 1
        end
    end   
-- text
  if txt_fg_alpha>0 then
    cairo_select_font_face (display, "hooge 05_53", CAIRO_FONT_SLANT_NORMAL, txt_weight);
    cairo_set_font_size (display,txt_size)
    cairo_set_source_rgba (display, rgb_to_r_g_b(txt_fg_clr, txt_fg_alpha))
    cairo_move_to (display,x+xtxt,y+ytxt)
    cairo_show_text (display, caption ) cairo_show_text (display,value)cairo_show_text (display, caption2 )
    cairo_stroke (display)
  end
end
-------------------------------------------------------------------------------
-- loads data and displays table_settings

function display_coffee_table(display)
    local function load_coffee_table(display, data)
        local str, value = '', 0       
if data['name'] == 'time2' then
    local max_value = data['max_value']
            str = string.format('${time %s}', data['arg'])
            str = conky_parse(str)
            local value2 = tonumber(str:sub(0,2))
    if value2 == max_value then value2 = 0 end
    value = value2 + (tonumber(str:sub(4,5))/60)           
else
            str = string.format('${%s %s}',data['name'], data['arg'])
            str = conky_parse(str)
            value = tonumber(str)
        end
        if value == nil then value = 0 end
        draw_coffee_table(display, data, value)
    end
    for i in pairs(coffee_table) do
        load_coffee_table(display, coffee_table[i])
    end
end
-------------------------------------------------------------------------------
runscheck = 0 -- fix for draw shades running script twice on every update
function conky_main()
    if conky_window == nil then
        return
    end
    local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
    local display = cairo_create(cs)
    local updates = conky_parse('${updates}')
    update_num = tonumber(updates)
    if update_num > 5 then
      cairo_set_antialias (display, CAIRO_ANTIALIAS_SUBPIXEL)
      display_coffee_table(display)
      cairo_set_antialias (display, CAIRO_ANTIALIAS_DEFAULT)
    end   
    cairo_surface_destroy(cs)
    cairo_destroy(display)
end


The weather is the v9000 script by the amazing mrpeachy and I'm not sure who made the weather template (though I suspect Sector11 had a hand in it) but it is heavily modified by me for aesthetics and my screen resolution (1920x1080).  The weather template is called;

chrono-full.template.lua


--[[
The latest script is a lua only weather script. aka: v9000
http://crunchbang.org/forums/viewtopic.php?id=16100

the file:
http://dl.dropbox.com/u/19008369/weatheragain9000.lua.tar.gz

mrppeachys LUA Tutorial
http://crunchbang.org/forums/viewtopic.php?id=17246
]]
_G.weather_script = function()--#### DO NOT EDIT THIS LINE ##############
--these tables hold the coordinates for each repeat do not edit #########
top_left_x_coordinate={}--###############################################
top_left_y_coordinate={}--###############################################
--#######################################################################
--SET DEFAULTS ##########################################################
--set defaults do not localise these defaults if you use a seperate display script
default_font="Arial"--font must be in quotes
default_font_size=14
default_color=0xffffff --white
default_alpha=1 --fully opaque
default_image_width=50
default_image_height=50
-- ## New Options ###
default_face="bold"
-- "normal" for normal/normal
-- "bold" for normal/bold
-- "italic" for italic/normal
-- "bolditalic" for italic/bold
--END OF DEFAULTS #######################################################
--START OF WEATHER CODE -- START OF WEATHER CODE -- START OF WEATHER CODE

-- forecast
datay=375
datayy=15 --datay+(datayy*1)

datafx1=20

imgx=35
imgy=500
imgyy=60 -- imgy+(imgyy*1)
-- =============================================================================
-- Sun & Moon Rise -------------------------------------------------------------
   out({c=0xFAFAEC,a=1,x=10,y=35,txt="Sunrise"})
      out({c=0xFAFAEC,a=1,x=20,y=50,txt=sun_rise_time[1]})
   out({c=0xC0C0C0,a=1,x=365,y=35,txt="Moonrise"})
      out({c=0xC0C0C0,a=1,x=375,y=50,txt=moon_rise_time[1]})
-- Sun & Moon Set --------------------------------------------------------------
   out({c=0xFAFAEC,a=1,x=10,y=390,txt="Sunset"})
      out({c=0xFAFAEC,a=1,x=15,y=405,txt=sun_set_time[1]})
   out({c=0xC0C0C0,a=1,x=350,y=392,txt="Moonset"})
      out({c=0xC0C0C0,a=1,x=363,y=407,txt=moon_set_time[1]})
-- Moon Phase - Top Center Circle ----------------------------------------------
   out({c=0x227992,a=1,x=253,y=143,txt=moon_phase[1]})
   image({x=177,y=67,w=75,h=75,file=moon_icon[1]})
-- image({x=148,y=67,w=55,h=55,file="/media/5/Conky/images/red_1.png"})

-- Forecast for Today - see Day# Circle - Left ---------------------------------
   out({c=0xFF8C00,fs=14,a=1,x=104,y=183,txt=high_temp[1]})
   image({x=70,y=175,w=80,h=80,file=weather_icon[1]})
-- image({x=70,y=150,w=50,h=50,file="/media/5/Conky/images/red_1.png"})
   out({c=0x00BFFF,fs=14,a=1,x=103,y=255,txt=low_temp[1]})

-- Above the Month Circle on the Right -----------------------------------------
-- Humidity
   out({c=0xFAFAEC,a=1,x=267,y=92,txt="Hum:"})
      out({c=0x227992,a=1,x=305,y=92,txt=now["humidity"].."%"})
-- Chance of Rain
   out({c=0xFAFAEC,a=1,x=275,y=107,txt="Rain:"})
      out({c=0x227992,a=1,x=320,y=107,txt=precipitation[1].."%"})
-- Wind Info - See Months Circle & below ---------------------------------------
   image({x=291,y=182,w=65,h=65,file=now["wind_icon"]})
-- image({x=235,y=150,w=50,h=50,file="/media/5/Conky/images/red_1.png"})
   out({c=0x227992,a=1,x=270,y=294,txt=now["wind_mph"]})
-- out({c=0x48D1CC,a=1,x=240,y=260,txt=now["wind_nesw"]})
   out({c=0xFAFAEC,a=1,x=318,y=294,txt="@"})
      out({c=0x227992,a=1,x=340,y=294,txt=now["wind_deg"]})
-- Dew Point -------------------------------------------------------------------
   out({c=0xFAFAEC,a=1,x=292,y=317,txt="DP:"})
      out({c=0x227992,a=1,x=320,y=317,txt=now["dew_point"].."°"})

-- Above Day# Circle on left ---------------------------------------------------
-- Cloud Cover
   out({c=0xFAFAEC,a=1,x=80,y=125,txt="CC:"})
      out({c=0x227992,a=1,x=108,y=124,txt=cloud_cover[1].."%"})
-- Ceiling
   out({c=0xFAFAEC,a=1,x=66,y=141,txt="Ceil:"})
      out({c=0x227992,a=1,x=100,y=140,txt=now["ceiling"]})
-- Current for Today - Day# Circle ---------------------------------------------
   out({c=0xFAFAEC,a=1,x=212,y=250,txt="T:"})
      out({c=0xFF8C00,fs=14,a=1,x=208,y=265,txt=now["temp"].."°"})
   image({x=177,y=269,w=80,h=80,file=now["weather_icon"]})
-- image({x=132,y=218,w=85,h=85,file="/media/5/Conky/images/red_1.png"})
   out({c=0xFAFAEC,a=1,x=212,y=365,txt="F:"})
      out({c=0x227992,fs=14,a=1,x=208,y=380,txt=now["feels_like"].."°"})
-- Below day# Circle on left ---------------------------------------------------
-- Barometric Pressure
out({c=0xFAFAEC,a=1,x=75,y=316,txt=" BP:"})
out({c=0x227992,a=1,x=105,y=314,txt=now["pressure_mb"]})
-- UV
out({c=0xFAFAEC,a=1,x=95,y=336,txt="UV:"})
   out({c=0x227992,a=1,x=123,y=335,txt=uv_index_num[1]})
      out({c=0x227992,a=1,x=137,y=335,txt=uv_index_txt[1]})

-- Forecast for the next 3 hours -----------------------------------------------
-- image({x=5,y=353,w=340,h=2,file="/media/5/Conky/images/LightSlateGrey_1.png"})
out({c=0x227992,a=1,f="Arial",fs=16,x=33,y=433,txt="Next 3"})
out({c=0x227992,a=1,f="Arial",fs=16,x=35,y=447,txt="Hours"})
-- 1st hour
out({c=0xFF9600,x=90,y=440,txt=now["fc_hour1_time"]..":00"})
image({w=60,h=60,x=80,y=450,file=now["fc_hour1_wicon"]}) -- image({w=30,h=30,x=223,y=55,file="/home/sector11/Conky/images/red_1.png"})
out({c=0xAFAFAF,x=95,y=525,txt=now["fc_hour1_temp"] .."°"})
-- 2nd hour
out({c=0xFF9600,x=195,y=440,txt=now["fc_hour2_time"]..":00"})
image({w=60,h=60,x=190,y=450,file=now["fc_hour2_wicon"]}) -- image({w=30,h=30,x=223,y=130,file="/home/sector11/Conky/images/red_1.png"})
out({c=0xAFAFAF,x=205,y=525,txt=now["fc_hour2_temp"] .."°"})
-- 3rd hour
out({c=0xFF9600,x=310,y=440,txt=now["fc_hour3_time"]..":00"})
image({w=60,h=60,x=295,y=450,file=now["fc_hour3_wicon"]}) -- image({w=30,h=30,x=223,y=215,file="/home/sector11/Conky/images/red_1.png"})
out({c=0xAFAFAF,x=315,y=525,txt=now["fc_hour3_temp"] .."°"})

-- =============================================================================
-- FORECAST for the next 9 days
-- Forecast day 2 -- x = l|r  y = u|d

--########################################################################################
--END OF WEATHER CODE ----END OF WEATHER CODE ----END OF WEATHER CODE ---
--#######################################################################
end--of weather_display function do not edit this line ##################
--#######################################################################


The partition map Conky is called

conkymountrc


######################
# - Conky settings - #
# -Based on a conky- #
# -by 'well I'm not sure' #
######################

background yes
update_interval 1
cpu_avg_samples 2
total_run_times 0
override_utf8_locale yes

double_buffer yes
no_buffers yes

text_buffer_size 1024
imlib_cache_size 1024

minimum_size 370 0
maximum_width 370

gap_x 0
gap_y 35
#####################
# - Text settings - #
#####################
use_xft yes
xftfont monofur:bold:size=11
xftalpha 1

uppercase no

# Text alignment, other possible values are commented
alignment bottom_left

######################
# - Color settings - #
######################
color0 c3c3c3 #mid gray
color1 FF0000 #red
color2 A4FFA4 #light green
color3 007EFF #bright blue
color4 E3E3E3 #very light gray
color5 c6771a #an orange shade
color6 CA8718 #a dust like color
color7 FFE500 #a darker yellow color
color8 C3FF00 #lime green
color9 227992 #bars-blue #another blue 48a3fd
default_color c3c3c3
default_shade_color gray
default_outline_color black
#############################
# - Window specifications - #
#############################
own_window yes
own_window_transparent yes
own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_class conky
own_window_title clicky
#own_window_argb_visual yes
#own_window_argb_value 255

border_inner_margin 0
border_outer_margin 0

#########################
# - Graphics settings - #
#########################
draw_shades no
draw_outline no
draw_borders no
stippled_borders 0
draw_graph_borders no

lua_load ~/Conky/LUA/mounted.lua

Text
${lua get_mounted_data 3}
${color 888888}FSYS${color 888888} = ${lua mount 1 total}${goto 100}${color 888888}Size${goto 150}${color D4741B}Free${goto 200}${color1}Used${goto 255}${color 888888}Mount Point
${voffset -5} ${color 547EC8}${stippled_hr 5 1}${color 888888}
${color 3881C7}${lua mount 1 fsys 9}${goto 100}${color 888888}${lua mount 1 size}${goto 150}${color D4741B}${lua mount 1 free}${goto 200}${color1}${lua mount 1 use%}${goto 260}${color 888888}${lua mount 1 mount}
${color 3881C7}${lua mount 5 fsys 9}${goto 100}${color 888888}${lua mount 5 size}${goto 150}${color D4741B}${lua mount 5 free}${goto 200}${color1}${lua mount 5 use%}${goto 260}${color 888888}${lua mount 5 mount}
${color 3881C7}${lua mount 3 fsys 9}${goto 100}${color 888888}${lua mount 3 size}${goto 150}${color D4741B}${lua mount 3 free}${goto 200}${color1}${lua mount 3 use%}${goto 260}${color 888888}${lua mount 3 mount}
${color 3881C7}${lua mount 4 fsys 9}${goto 100}${color 888888}${lua mount 4 size}${goto 150}${color D4741B}${lua mount 4 free}${goto 200}${color1}${lua mount 4 use%}${goto 260}${color 888888}${lua mount 4 mount}
${color 3881C7}${lua mount 6 fsys 9}${goto 100}${color 888888}${lua mount 6 size}${goto 150}${color D4741B}${lua mount 6 free}${goto 200}${color1}${lua mount 6 use%}${goto 260}${color 888888}${lua mount 6 mount}
${color 3881C7}${lua mount 8 fsys 9}${goto 100}${color 888888}${lua mount 8 size}${goto 150}${color D4741B}${lua mount 8 free}${goto 200}${color1}${lua mount 8 use%}${goto 260}${color 888888}${lua mount 8 mount}
${color 3881C7}${lua mount 9 fsys 9}${goto 100}${color 888888}${lua mount 9 size}${goto 150}${color D4741B}${lua mount 9 free}${goto 200}${color1}${lua mount 9 use%}${goto 260}${color 888888}${lua mount 9 mount}
${color 3881C7}${lua mount 7 fsys 9}${goto 100}${color 888888}${lua mount 7 size}${goto 150}${color D4741B}${lua mount 7 free}${goto 200}${color1}${lua mount 7 use%}${goto 260}${color 888888}${lua mount 7 mount}
${alignc}${execi 10 hddtemp /dev/sda}
${alignc}${execi 10 hddtemp /dev/sdb}


The lua file is called

mounted.lua and is also by the great mrpeachy!


--[[partitions for conky by mrpeachy

##instructions
##load script
lua_load ~/lua/mounted.lua
## first lua command below text:
## ${lua get_mounted_data interval}, where interval is a number.  This starts data gathering
## to get output:
## ${lua mount partition_number data_type text_length}, where partition number is a number
## text_length is optional, lets you specify the max number of characters the function returns. only affects fsys and mount data options
## data_type can be
## total - shows total number of partitions mounted, requires a partition_number also, use 1, could be used in an if_match
## fsys - shows filesystem
## size - shows space used in appropriate units
## free - shows free space in appropriate units
## use% - shows % used
## mount - shows mountpoint

TEXT
CPU %: ${cpu cpu0} ${lua get_mounted_data 10}
TOTAL PARTITIONS MOUNTED: ${lua mount 1 total}
FSYS${goto 100}SIZE${goto 200}USED%${goto 300}MOUNT
${lua mount 1 fsys}${goto 100}${lua mount 1 size}${goto 200}${lua mount 1 use%}${goto 300}${lua mount 1 mount 10}
${lua mount 2 fsys}${goto 100}${lua mount 2 size}${goto 200}${lua mount 2 use%}${goto 300}${lua mount 2 mount 10}
${lua mount 3 fsys}${goto 100}${lua mount 3 size}${goto 200}${lua mount 3 use%}${goto 300}${lua mount 3 mount 10}
${lua mount 4 fsys}${goto 100}${lua mount 4 size}${goto 200}${lua mount 4 use%}${goto 300}${lua mount 4 mount 10}

]]

conky_start=1
function conky_get_mounted_data(interval)
local updates=tonumber(conky_parse("${updates}"))
timer=(updates % interval)
if timer==0 or conky_start==1 then
fsys={}
size={}
used={}
avail={}
uperc={}
mount={}
local file = io.popen("df -h")
for line in file:lines() do
if string.find(line,"/dev/")~=nil then
local s,f,fs=string.find(line,"^([%d%a%p]*)%s")
table.insert(fsys,fs)
local s,f,sz=string.find(line,"%s*([%d%a%p]*)%s",f)
table.insert(size,sz)
local s,f,us=string.find(line,"%s*([%d%a%p]*)%s",f)
table.insert(used,us)
local s,f,av=string.find(line,"%s*([%d%a%p]*)%s",f)
table.insert(avail,av)
local s,f,up=string.find(line,"%s*([%d%a%p]*)%s",f)
table.insert(uperc,up)
local s,f,mn=string.find(line,"%s*([%d%a%p]*)%s*$",f)
table.insert(mount,mn)
end
end
file:close()
conky_start=nil
end--timed section
return ""
end

function conky_mount(n,d,c)--n=partition_number,d=data_type,c=number of characters to return
d=tostring(d)
n=tonumber(n)
c=tonumber(c) or 0
if d=="total" then
data=#fsys or 1
elseif d=="fsys" then
data=fsys[n] or ""
if c~=0 then
data=string.sub(data,1,c) or ""
end
elseif d=="size" then
data=size[n] or ""
elseif d=="used" then
data=used[n] or ""
elseif d=="free" then
data=avail[n] or ""
elseif d=="use%" then
data=uperc[n] or ""
elseif d=="mount" then
data=mount[n] or ""
if c~=0 then
data=string.sub(data,1,c) or ""
end
else
data="check data type"
end
return data
end--end main function
Title: Re: Conky Support, Codes and Screenshots
Post by: lwfitz on November 02, 2013, 11:30:17 PM
Wow! Great job Jedi, Im gonna be messing around with this one tonight for sure!
Title: Re: Conky Support, Codes and Screenshots
Post by: VastOne on November 03, 2013, 02:43:04 PM
Very nice Jedi..

How does one load all of that?  ???
Title: Re: Conky Support, Codes and Screenshots
Post by: jedi on November 03, 2013, 07:00:48 PM
It is just 2 Conky's, and the gmusiclayout that you made.  The clock also has a v9000 weather template in it that calls the weather stuff in.  The mounted partitions is just a Conky using mrpeachy's partition mount lua script.  It is all posted above.  ;D
Oh yeah the Tint2 is based on one I got from dizzie and then modified to my liking...
Title: Re: Conky Support, Codes and Screenshots
Post by: McLovin on November 04, 2013, 08:09:21 PM
Hey jedi, can I get your .bashrc config, that thing is sweet, and I'm one of those weirdos who likes to mod my bashrc almost as much as my conky configs.
Title: Re: Conky Support, Codes and Screenshots
Post by: jedi on November 04, 2013, 09:24:27 PM
Quote from: McLovin on November 04, 2013, 08:09:21 PM
Hey jedi, can I get your .bashrc config, that thing is sweet, and I'm one of those weirdos who likes to mod my bashrc almost as much as my conky configs.

Hey McLovin!  I got this from dizzie, so all credit goes to him.  I had to sudo apt-get install figlet for all of it to work.


black='\e[0;30m'
blue='\e[0;34m'
green='\e[0;32m'
cyan='\e[0;36m'
red='\e[0;31m'
purple='\e[0;35m'
brown='\e[0;33m'
lightgray='\e[0;37m'
darkgray='\e[1;30m'
lightblue='\e[1;34m'
lightgreen='\e[1;32m'
lightcyan='\e[1;36m'
lightred='\e[1;31m'
lightpurple='\e[1;35m'
yellow='\e[1;33m'
white='\e[1;37m'
nc='\e[0m'

############################################
# scripts n stuff
############################################

upinfo ()
{
echo -ne "${green}$HOSTNAME ${red}uptime is ${cyan} \t ";uptime | awk /'up/ {print $3,$4,$5,$6,$7,$8,$9,$10}'
}
localnet ()
{
/sbin/ifconfig | awk /'inet addr/ {print $2}'
echo ""
/sbin/ifconfig | awk /'Bcast/ {print $3}'
echo ""
}
myip ()
{
lynx -dump -hiddenlinks=ignore -nolist [url]http://checkip.dyndns.org:8245/[/url] | grep "Current IP Address" | cut -d":" -f2 | cut -d" " -f2
}

extract () {
  if [ -f $1 ] ; then
      case $1 in
          *.tar.bz2)   tar xvjf $1    ;;
          *.tar.gz)    tar xvzf $1    ;;
          *.bz2)       bunzip2 $1     ;;
          *.rar)       rar x $1       ;;
          *.gz)        gunzip $1      ;;
          *.tar)       tar xvf $1     ;;
          *.tbz2)      tar xvjf $1    ;;
          *.tgz)       tar xvzf $1    ;;
          *.zip)       unzip $1       ;;
          *.Z)         uncompress $1  ;;
          *.7z)        7z x $1        ;;
          *)           echo "don't know how to extract '$1'..." ;;
      esac
  else
      echo "'$1' is not a valid file!"
  fi
}



#------------------------------------------////
# Prompt:
#------------------------------------------////

#PS1='\[\033[01;32m\]\u\[\033[01;34m\]@\[\033[01;31m\]\h\[\033[00;34m\]{\[\033[01;34m\]\w\[\033[00;34m\]}\[\033[01;32m\]:\[\033[00m\]'
PS1='\[\033[01;32m\]\u\[\033[01;34m\]@\[\033[01;31m\]\h\[\033[00;34m\]{\[\033[01;34m\]\w\[\033[00;34m\]}\[\033[01;32m\]:\[\033[00m\]'


#------------------------------------------////
# System Information:
#------------------------------------------////

clear
echo -e "${LIGHTGRAY}";figlet "NSA Deterrence Module";
echo -ne "${red}Today is:\t\t${cyan}" `date`; echo ""
echo -e "${red}Kernel Information: \t${cyan}" `uname -smr`
echo -ne "${cyan}";upinfo;echo ""
echo -e "${cyan}"; cal -3

# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac

# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth

# append to the history file, don't overwrite it
shopt -s histappend
Title: Re: Conky Support, Codes and Screenshots
Post by: PackRat on January 07, 2014, 02:27:42 AM
A minimal conky with just some "essential" info (used in my Xfce setup; January screenshot):

conkyrc

background yes
use_xft yes
xftfont Sans:pixelsize=11
# font Dina-9
xftalpha 0.1
update_interval 1
total_run_times 0
own_window yes
own_window_class conkytile
own_window_title ConkyTile
own_window_type desktop
own_window_colour 0F0F0F
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 620 0
maximum_width 620
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_shade_color 3e0e1e
default_outline_color 0E3E16
alignment tm
gap_x 0
gap_y 8
no_buffers yes
uppercase no
cpu_avg_samples 2
net_avg_samples 1
override_utf8_locale yes
use_spacer none
default_color DAC79C
color0 ffffff
color1 000000
color2 red
color3 yellow
color4 blue
color5 green
color6 orange
color7 00BFFF
color8 FFFF00
color9 F40E0E

lua_load ~/conky/transbg.lua
lua_draw_hook_pre draw_bg 8 0 0 0 0 0x000000 0.66
# ${goto 24}${time %b %e}${offset 8}${time %k:%M}${offset 16}:${offset 16}\

TEXT
${goto 12}Uptime${offset 2}:${offset 8}${uptime_short}${offset 16}:${offset 16}\
CPU0${offset 2}:${offset 8}${if_match ${execpi 60 /home/doug/conky/TCore0.sh}<=50}${color7}${else}${if_match ${execpi 60 /home/doug/conky/TCore0.sh}<=70}${color8}${else}${if_match ${execpi 60 /home/doug/conky/TCore0.sh}>70}${color9}${endif}${endif}${endif}${execpi 60 /home/doug/conky/TCore0.sh}${offset 2}°C${color}${offset 16}:${offset 16}\
CPU1${offset 2}:${offset 8}${if_match ${execpi 60 /home/doug/conky/TCore1.sh}<=50}${color7}${else}${if_match ${execpi 60 /home/doug/conky/TCore1.sh}<=70}${color8}${else}${if_match ${execpi 60 /home/doug/conky/TCore1.sh}>70}${color9}${endif}${endif}${endif}${execpi 60 /home/doug/conky/TCore1.sh}${offset 2}°C${color}${offset 16}:${offset 16}\
CPU${offset 2}:${offset 8}${if_match ${cpu}<=50}${color7}${else}${if_match ${cpu}<=70}${color8}${else}${if_match ${cpu}>70}${color9}${endif}${endif}${endif}${cpu cpu0}%${color}${offset 10}\
${loadavg 1}${offset 4}${loadavg 2}${offset 4}${loadavg 3}${offset 16}:${offset 16}\
Mem${offset 2}:${offset 8}${if_match ${memperc}<=50}${color7}${else}${if_match ${memperc}<=70}${color8}${else}${if_match ${memperc}>70}${color9}${endif}${endif}${endif}${memperc}%${color}${offset 12}


transbg.lua

--[[Background originally by londonali1010 (2009)
    ability to set any size for background mrpeachy 2011
    ability to set variables for bg in conkyrc dk75

the change is that if you set width and/or height to 0
then it assumes the width and/or height of the conky window

so:

Above and After TEXT  (requires a composite manager or it blinks!)

lua_load ~/wea_conky/draw_bg.lua
TEXT
${lua conky_draw_bg 10 0 0 0 0 0x000000 0.4}

OR Both above TEXT (no composite manager required - no blinking!)

lua_load ~/wea_conky/draw_bg.lua
lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.5
TEXT

Note
${lua conky_draw_bg 20 0 0 0 0 0x000000 0.4}
  See below:        1  2 3 4 5 6        7

${lua conky_draw_bg corner_radius x_position y_position width height color alpha}

covers the whole window and will change if you change the minimum_size setting

1 = 20             corner_radius
2 = 0             x_position
3 = 0             y_position
3 = 0             width
5 = 0             height
6 = 0x000000      color
7 = 0.4           alpha

]]

require 'cairo'
local    cs, cr = nil
function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
function conky_draw_bg(r,x,y,w,h,color,alpha)
if conky_window == nil then return end
if cs == nil then cairo_surface_destroy(cs) end
if cr == nil then cairo_destroy(cr) end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local cr = cairo_create(cs)
w=w
h=h
if w=="0" then w=tonumber(conky_window.width) end
if h=="0" then h=tonumber(conky_window.height) end
cairo_set_source_rgba (cr,rgb_to_r_g_b(color,alpha))
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
-----------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_fill (cr)
------------------------------------------------------------
cairo_surface_destroy(cs)
cairo_destroy(cr)
return ""
end


TCore0.sh - the "Core 0" section will need to be changes to match your sensors output; use for as many cores you want displayed:

#!/bin/sh
# exec sensors -f | awk '/Core0 Temp/ {gsub(/\+/,"",$3); gsub(/\..+/,"",$3); print $3}'
sensors | awk '/Core 0/ {gsub(/\+/,"",$3); gsub(/\..+/,"",$3); print $3}'
Title: Re: Conky Support, Codes and Screenshots
Post by: untune on January 27, 2014, 03:13:40 AM
Hi.  I just registered in the hope of  getting some conky help.

For the last couple of years I have been pressed by work demands into using Windows, and have only recently restarted using linux instead. I had saved my old conky scripts, the "now playing" portion of which relied on VastOne's cover art templates.

For some reason now that I come to run them again the "now playing" data still appears when I am using Amarok, but not when I am using vlc or (my favoured player) gmb.

When I use amarok, my desktop looks like this (as desired):
(http://s13.postimg.org/xkf4g542r/Screenshot_270114_02_26_48.png) (http://postimg.org/image/xkf4g542r/)

But when playing the same tracks using vlc or gmb I get this:
(http://s13.postimg.org/5lkypa2g3/Screenshot_270114_02_29_36.png) (http://postimg.org/image/5lkypa2g3/)

My start script:
#!/bin/bash
#conky -c ~/.config/conky/.conkyrc_hdd &
conky -c ~/.config/conky/.conkyrc_network &
conky -c ~/.config/conky/.conkyrc_monitor & #conky -c ~/.config/conky/.conkyrc_web &
conky -c ~/.config/conky/.conkyrc_music


opens this:
own_window yes
own_window_type desktop
own_window_transparent yes
own_window_colour 191919
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
border_inner_margin 5
border_outer_margin 0
default_color 919191
default_shade_color 000000
default_outline_color d9d7d6
use_spacer yes
no_buffers yes
uppercase yes
imlib_cache_size 0
text_buffer_size 2048
default_bar_size 120 4
total_run_times 0
update_interval 1
cpu_avg_samples 2
net_avg_samples 1
override_utf8_locale yes
minimum_size 120
maximum_width 120
gap_x 20
gap_y 23
background yes
use_xft yes
xftfont dejavu sans mono:size=7
xftalpha 1
alignment top_right

TEXT
${if_running gmusicbrowser}
${execp ~/scripts/conky/conkyGmusicbrowser.py --template=~/scripts/conky/conkyGmusicbrowser.template}$else${if_running amarok}
${execp ~/scripts/conky/conkyAmarok.py --template=~/scripts/conky/conkyAmarok.template}$else${if_running vlc}
${execp ~/scripts/conky/conkyVlc.py --template=~/scripts/conky/conkyVlc.template}$else
#${execi 1200 twidge lsrecent >  ~/scripts/conky/tweets.txt}${execi 1200 python ~/scripts/conky/tw.py ~/scripts/conky/tweets.txt}









which uses this VastOne's python script (unchanged I believe):
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
###############################################################################
# conkygmusicbrowser.py is a simple python script to gather
# details from gmusicbrowser for use in conky.
#
#  Author: VastOne
# Created: 01/28/2011

from datetime import datetime
from optparse import OptionParser
import sys
import traceback
import codecs
import os
import htmllib
import re
from htmlentitydefs import name2codepoint
import shutil
import urllib

try:
    import dbus
    DBUS_AVAIL = True
except ImportError:
    # Dummy D-Bus library
    class _Connection:
        get_object = lambda *a: object()
    class _Interface:
        __init__ = lambda *a: None
        ListNames = lambda *a: []
    class Dummy: pass
    dbus = Dummy()
    dbus.Interface = _Interface
    dbus.service = Dummy()
    dbus.service.method = lambda *a: lambda f: f
    dbus.service.Object = object
    dbus.SessionBus = _Connection
    DBUS_AVAIL = False


class CommandLineParser:

    parser = None

    def __init__(self):

        self.parser = OptionParser()
        self.parser.add_option("-t", "--template", dest="template", type="string", metavar="FILE", help=u"define a template file to generate output in one call. A displayable item in the file is in the form [--datatype=TI]. The following are possible options within each item: --datatype,--ratingchar. Note that the short forms of the options are not currently supported! None of these options are applicable at command line when using templates.")
        self.parser.add_option("-d", "--datatype", dest="datatype", default="TI", type="string", metavar="DATATYPE", help=u"[default: %default] The data type options are: ST (status), CA (coverart), TI (title), AL (album), AR (artist), GE (genre), YR (year), TN (track number), FN (file name), BR (bitrate k/s), LE (length), PP (current position in percent), PT (current position in time), VO (volume), RT (rating). Not applicable at command line when using templates.")
        self.parser.add_option("-c", "--coverartpath", dest="coverartpath", default="/tmp/cover", type="string", metavar="PATH", help=u"[default: %default] The file where coverart gets copied to if found when using the --datatype=CA option. Note that if set to an empty string i.e. \"\" the original file path is provided for the coverart path.")       
        self.parser.add_option("-r", "--ratingchar", dest="ratingchar", default="*", type="string", metavar="CHAR", help=u"[default: %default] The output character for the ratings scale. Command line option overridden if used in templates.")
        self.parser.add_option("-s", "--statustext", dest="statustext", default="Playing,Paused,Stopped", type="string", metavar="TEXT", help=u"[default: %default] The text must be comma delimited in the form 'A,B,C'. Command line option overridden if used in templates.")
        self.parser.add_option("-n", "--nounknownoutput", dest="nounknownoutput", default=False, action="store_true", help=u"Turn off unknown output such as \"Unknown\" for title and \"0:00\" for length. Command line option overridden if used in templates.")
        self.parser.add_option("-S", "--secondsoutput", dest="secondsoutput", default=False, action="store_true", help=u"Force all position and length output to be in seconds only.")
        self.parser.add_option("-m", "--maxlength", dest="maxlength", default="0", type="int", metavar="LENGTH", help=u"[default: %default] Define the maximum length of any datatypes output, if truncated the output ends in \"...\"")
        self.parser.add_option("-v", "--verbose", dest="verbose", default=False, action="store_true", help=u"Request verbose output, not a good idea when running through conky!")
        self.parser.add_option("-V", "--version", dest="version", default=False, action="store_true", help=u"Displays the version of the script.")
        self.parser.add_option("--errorlogfile", dest="errorlogfile", type="string", metavar="FILE", help=u"If a filepath is set, the script appends errors to the filepath.")
        self.parser.add_option("--infologfile", dest="infologfile", type="string", metavar="FILE", help=u"If a filepath is set, the script appends info to the filepath.")               

    def parse_args(self):
        (options, args) = self.parser.parse_args()
        return (options, args)

    def print_help(self):
        return self.parser.print_help()

class MusicData:
    def __init__(self,status,coverart,title,album,length,artist,tracknumber,genre,year,filename,bitrate,current_position_percent,current_position,rating,volume):
        self.status = status
        self.coverart = coverart
        self.title = title
        self.album = album
        self.length = length
        self.artist = artist
        self.tracknumber = tracknumber
        self.genre = genre
        self.year = year
        self.filename = filename
        self.bitrate = bitrate
        self.current_position_percent = current_position_percent
        self.current_position = current_position
        self.rating = rating
        self.volume = volume
       
class GmusicbrowserInfo:
   
    error = u""
    musicData = None
   
    def __init__(self, options):
        self.options = options
       
    def testDBus(self, bus, interface):
        obj = bus.get_object('org.freedesktop.DBus', '/org/freedesktop/DBus')
        dbus_iface = dbus.Interface(obj, 'org.freedesktop.DBus')
        avail = dbus_iface.ListNames()
        return interface in avail
       
    def getOutputData(self, datatype, ratingchar, statustext, nounknownoutput, maxlength):
        output = u""
       
        if nounknownoutput == True:
            unknown_time = ""
            unknown_number = ""
            unknown_string = ""
        else:
            unknown_time = "0:00"
            unknown_number = "0"
            unknown_string = "Unknown"
       
        try:
               
            bus = dbus.SessionBus()
            if self.musicData == None:
               
                if self.testDBus(bus, 'org.mpris.gmusicbrowser'):
               
                    self.logInfo("Calling dbus interface for music data")
   
                    try:
                        self.logInfo("Setting up dbus interface")
                       
                        # setup dbus hooks
                        remote_player = bus.get_object('org.mpris.gmusicbrowser', '/Player')
                        iface_player = dbus.Interface(remote_player, 'org.freedesktop.MediaPlayer')
                       
                        self.logInfo("Calling dbus interface for music data")
                   
                        status = self.getStatusText(iface_player.GetStatus()[0], statustext)
   
                        # try to get all the normal stuff...the props return an empty string if nothing is available
                        props = iface_player.GetMetadata()

                        # grab the data into variables
                        if "location" in props:
                            location = props["location"]
                        else:
                            location = None

                        # handle a file or stream differently for filename
                        if location.find("file://") != -1:
                            filename = location[location.rfind("/")+1:]
                        elif len(location) > 0:
                            filename = location
                        else:
                            filename = ""
                           
                           
                        if "title" in props:
                            title = props["title"]
                        else:
                            title = None
                           
                        if "album" in props:
                            album = props["album"]
                        else:
                            album = None
                           
                        if "artist" in props:
                            artist = props["artist"]
                        else:
                            artist = None
                           
                        if "year" in props:
                            year = str(props["year"])
                        else:
                            year = None
                       
                        if "tracknumber" in props:
                            tracknumber = str(props["tracknumber"])
                        else:
                            tracknumber = None

                        if "audio-bitrate" in props:
                            bitrate = str(props["audio-bitrate"])
                        else:
                            bitrate = None
                           
                        if year == "0": year = None
                        if tracknumber == "0": tracknumber = None
                        if bitrate == "0": bitrate = None
                       
                        # TODO: get album art working for internet based (if feasible)...
                        # get coverart url or file link
                        if "arturl" in props:
                            coverart = os.path.expanduser(urllib.unquote(str(props["arturl"])).replace("file://",""))
                            #coverart = os.path.expanduser(str(props["arturl"]).replace(" ", "%20"))
                            if coverart.find("http://") != -1:
                                coverart = None
                        else:
                            coverart = None                           
                           
                        # common details
                        if "genre" in props:
                            genre = props["genre"]
                        else:
                            genre = None
                       
                        if "rating" in props:
                            rating = props["rating"]
                        else:
                            rating = None

                        if "time" in props:
                            length_seconds = props["time"]
                        else:
                            length_seconds = 0
                                                                               
                        current_seconds = int(iface_player.PositionGet() / 1000)

                        if length_seconds > 0:
                            current_position_percent = str(int((float(current_seconds) / float(length_seconds))*100))
                        else:
                            length_seconds = 0
                            current_position_percent = "0"
                       
                        if self.options.secondsoutput == True:
                            length = str(length_seconds)
                            current_position = str(current_seconds)
                        else:
                            length = str(length_seconds/60).rjust(1,"0")+":"+str(length_seconds%60).rjust(2,"0")
                            current_position = str(int(current_seconds/60)).rjust(1,"0")+":"+str(int(current_seconds%60)).rjust(2,"0")

                        volume = str(iface_player.VolumeGet())

                        self.musicData = MusicData(status,coverart,title,album,length,artist,tracknumber,genre,year,filename,bitrate,current_position_percent,current_position,rating,volume)
                       
                    except Exception, e:
                        self.logError("Issue calling the dbus service:"+e.__str__())

            if self.musicData != None:
               
                self.logInfo("Preparing output for datatype:"+datatype)

                if datatype == "ST": #status
                    if self.musicData.status == None or len(self.musicData.status) == 0:
                        output = None
                    else:
                        output = self.musicData.status

                elif datatype == "CA": #coverart
                    if self.musicData.coverart == None or len(self.musicData.coverart) == 0:
                        output = None
                    else:
                        self.logInfo("Copying coverart from %s to %s"%(self.musicData.coverart, self.options.coverartpath))
                        shutil.copy(self.musicData.coverart, self.options.coverartpath)
                        self.musicData.coverart = self.options.coverartpath                       
                        output = self.musicData.coverart
                           
                elif datatype == "TI": #title
                    if self.musicData.title == None or len(self.musicData.title) == 0:
                        output = None
                    else:
                        output = self.musicData.title
                       
                elif datatype == "AL": #album
                    if self.musicData.album == None or len(self.musicData.album) == 0:
                        output = None
                    else:
                        output = self.musicData.album
                       
                elif datatype == "AR": #artist
                    if self.musicData.artist == None or len(self.musicData.artist) == 0:
                        output = None
                    else:
                        output = self.musicData.artist

                elif datatype == "TN": #tracknumber
                    if self.musicData.tracknumber == None or len(self.musicData.tracknumber) == 0:
                        output = None
                    else:
                        output = self.musicData.tracknumber
                       
                elif datatype == "GE": #genre
                    if self.musicData.title == genre or len(self.musicData.genre) == 0:
                        output = None
                    else:
                        output = self.musicData.genre
                       
                elif datatype == "YR": #year
                    if self.musicData.year == None or len(self.musicData.year) == 0:
                        output = None
                    else:
                        output = self.musicData.year
                                               
                elif datatype == "FN": #filename
                    if self.musicData.filename == None or len(self.musicData.filename) == 0:
                        output = None
                    else:
                        output = self.musicData.filename

                elif datatype == "BR": #bitrate
                    if self.musicData.bitrate == None or len(self.musicData.bitrate) == 0:
                        output = None
                    else:
                        output = self.musicData.bitrate
                       
                elif datatype == "LE": # length
                    if self.musicData.length == None or len(self.musicData.length) == 0:
                        output = None
                    else:
                        output = self.musicData.length
                       
                elif datatype == "PP": #current position in percent
                    if self.musicData.current_position_percent == None or len(self.musicData.current_position_percent) == 0:
                        output = None
                    else:
                        output = self.musicData.current_position_percent
                       
                elif datatype == "PT": #current position in time
                    if self.musicData.current_position == None or len(self.musicData.current_position) == 0:
                        output = None
                    else:
                        output = self.musicData.current_position
                       
                elif datatype == "VO": #volume
                    if self.musicData.volume == None or len(self.musicData.volume) == 0:
                        output = None
                    else:
                        output = self.musicData.volume
                       
                elif datatype == "RT": #rating
                    if self.musicData.rating == None or self.isNumeric(self.musicData.rating) == False:
                        output = None
                    else:
                        rating = int(self.musicData.rating)
                        if rating > 0:
                            output = u"".ljust(rating,ratingchar)
                        elif rating == 0:
                            output = u""
                        else:
                            output = None
                else:
                    self.logError("Unknown datatype provided: " + datatype)
                    return u""

            if output == None or self.musicData == None:
                if datatype in ["LE","PT"]:
                    if self.options.secondsoutput == True:
                        output = unknown_number
                    else:
                        output = unknown_time
                elif datatype in ["PP","VO","YR","TN"]:
                    output = unknown_number
                elif datatype == "CA":
                    output = ""                 
                else:
                    output = unknown_string
           
            if maxlength > 0 and len(output) > maxlength:
                output = output[:maxlength-3]+"..."
               
            return output
       
        except SystemExit:
            self.logError("System Exit!")
            return u""
        except Exception, e:
            traceback.print_exc()
            self.logError("Unknown error when calling getOutputData:" + e.__str__())
            return u""

    def getStatusText(self, status, statustext):
       
        if status != None:       
            statustextparts = statustext.split(",")
           
            if status == 0:
                return statustextparts[0]
            elif status == 1:
                return statustextparts[1]
            elif status == 2:
                return statustextparts[2]
           
        else:
            return status
       
    def getTemplateItemOutput(self, template_text):
       
        # keys to template data
        DATATYPE_KEY = "datatype"
        RATINGCHAR_KEY = "ratingchar"
        STATUSTEXT_KEY = "statustext"       
        NOUNKNOWNOUTPUT_KEY = "nounknownoutput"
        MAXLENGTH_KEY = "maxlength"
       
        datatype = None
        ratingchar = self.options.ratingchar #default to command line option
        statustext = self.options.statustext #default to command line option
        nounknownoutput = self.options.nounknownoutput #default to command line option
        maxlength = self.options.maxlength #default to command line option
       
        for option in template_text.split('--'):
            if len(option) == 0 or option.isspace():
                continue
           
            # not using split here...it can't assign both key and value in one call, this should be faster
            x = option.find('=')
            if (x != -1):
                key = option[:x].strip()
                value = option[x + 1:].strip()
                if value == "":
                    value = None
            else:
                key = option.strip()
                value = None
           
            try:
                if key == DATATYPE_KEY:
                    datatype = value
                elif key == RATINGCHAR_KEY:
                    ratingchar = value
                elif key == STATUSTEXT_KEY:
                    statustext = value                   
                elif key == NOUNKNOWNOUTPUT_KEY:
                    nounknownoutput = True
                elif key == MAXLENGTH_KEY:
                    maxlength = int(value)
                else:
                    self.logError("Unknown template option: " + option)

            except (TypeError, ValueError):
                self.logError("Cannot convert option argument to number: " + option)
                return u""
               
        if datatype != None:
            return self.getOutputData(datatype, ratingchar, statustext, nounknownoutput, maxlength)
        else:
            self.logError("Template item does not have datatype defined")
            return u""


    def getOutputFromTemplate(self, template):
        output = u""
        end = False
        a = 0
       
        # a and b are indexes in the template string
        # moving from left to right the string is processed
        # b is index of the opening bracket and a of the closing bracket
        # everything between b and a is a template that needs to be parsed
        while not end:
            b = template.find('[', a)
           
            if b == -1:
                b = len(template)
                end = True
           
            # if there is something between a and b, append it straight to output
            if b > a:
                output += template[a : b]
                # check for the escape char (if we are not at the end)
                if template[b - 1] == '\\' and not end:
                    # if its there, replace it by the bracket
                    output = output[:-1] + '['
                    # skip the bracket in the input string and continue from the beginning
                    a = b + 1
                    continue
                   
            if end:
                break
           
            a = template.find(']', b)
           
            if a == -1:
                self.logError("Missing terminal bracket (]) for a template item")
                return u""
           
            # if there is some template text...
            if a > b + 1:
                output += self.getTemplateItemOutput(template[b + 1 : a])
           
            a = a + 1

        return output
   
    def writeOutput(self):

        if self.options.template != None:
            #load the file
            try:
                fileinput = codecs.open(os.path.expanduser(self.options.template), encoding='utf-8')
                template = fileinput.read()
                fileinput.close()
            except Exception, e:
                self.logError("Error loading template file: " + e.__str__())
            else:
                output = self.getOutputFromTemplate(template)
        else:
            output = self.getOutputData(self.options.datatype, self.options.ratingchar, self.options.statustext, self.options.nounknownoutput, self.options.maxlength)

        print output.encode("utf-8",'replace')

    def isNumeric(self,value):
        try:
            temp = int(value)
            return True
        except:
            return False
       
    def logInfo(self, text):
        if self.options.verbose == True:
            print >> sys.stdout, "INFO: " + text

        if self.options.infologfile != None:
            datetimestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
            fileoutput = open(self.options.infologfile, "ab")
            fileoutput.write(datetimestamp+" INFO: "+text+"\n")
            fileoutput.close()
           
    def logError(self, text):
        print >> sys.stderr, "ERROR: " + text
       
        if self.options.errorlogfile != None:
            datetimestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
            fileoutput = open(self.options.errorlogfile, "ab")
            fileoutput.write(datetimestamp+" ERROR: "+text+"\n")
            fileoutput.close()

    def unEscape(self,text):
        parser = htmllib.HTMLParser(None)
        parser.save_bgn()
        parser.feed(text)
        return parser.save_end()
   
    def htmlentitydecode(self,s):
        return re.sub('&(%s);' % '|'.join(name2codepoint),
                lambda m: unichr(name2codepoint[m.group(1)]), s)
       
       
def main():
   
    parser = CommandLineParser()
    (options, args) = parser.parse_args()

    if options.version == True:
        print >> sys.stdout,"conkygmusicbrowser v.2.00"
    else:
        if options.verbose == True:
            print >> sys.stdout, "*** INITIAL OPTIONS:"
            print >> sys.stdout, "    datatype:", options.datatype
            print >> sys.stdout, "    template:", options.template
            print >> sys.stdout, "    ratingchar:", options.ratingchar
            print >> sys.stdout, "    nounknownoutput:", options.nounknownoutput
            print >> sys.stdout, "    secondsoutput:", options.secondsoutput
            print >> sys.stdout, "    maxlength:", options.maxlength
            print >> sys.stdout, "    verbose:", options.verbose
            print >> sys.stdout, "    errorlogfile:",options.errorlogfile
            print >> sys.stdout, "    infologfile:",options.infologfile

        gmusicbrowserinfo = GmusicbrowserInfo(options)
        gmusicbrowserinfo.writeOutput()
   
if __name__ == '__main__':
    main()
    sys.exit()
   


with this template:

${image [--datatype=CA] -p 0,104-s 120x120}${if_match "[--datatype=ST]" == "Playing"}${alignc}[--datatype=ST]
${alignc}${font Guifxv2Transports:regular:size=22}${offset -11}1${font}
[--datatype=PT]${alignr}[--datatype=LE]
${execibar 1 ~/scripts/conky/conkyGmusicbrowser.py --datatype=PP}${font dejavu sans mono:size=3}

#${color 919191}TITLE:${color 616161}
${font dejavu sans mono:size=7}[--datatype=TI --maxlength=32]
#${color 919191}ARTIST:${color 616161}
[--datatype=AR --maxlength=32]
#${color 919191}ALBUM:${color 616161}
[--datatype=AL --maxlength=30]
#${color 919191}Volume ${color 616161}${alignr}[--datatype=VO]
#${color 919191}BitRate ${color 616161}${alignr}[--datatype=BR]
${image [--datatype=CA] -p 0,104 -s 120x120}$else${if_match "[--datatype=ST]" == "Paused"}${alignc}[--datatype=ST]
${alignc}${font Guifxv2Transports:regular:size=22}${offset -11}2${font}
[--datatype=PT]${alignr}[--datatype=LE]
${execibar 1 ~/scripts/conky/conkyGmusicbrowser.py --datatype=PP}${font dejavu sans mono:size=3}

#${color 919191}TITLE:${color 616161}
${font dejavu sans mono:size=7}[--datatype=TI --maxlength=32]
#${color 919191}ARTIST:${color 616161}
[--datatype=AR --maxlength=32]
#${color 919191}ALBUM:${color 616161}
[--datatype=AL --maxlength=30]
#${color 919191}Volume ${color 616161}${alignr}[--datatype=VO]
#${color 919191}BitRate ${color 616161}${alignr}[--datatype=BR]
${image [--datatype=CA] -p 0,104 -s 120x120}$else${alignc}Stopped
${alignc}${font Guifxv2Transports:regular:size=22}${offset -11}3${font}
[--datatype=PT]${alignr}[--datatype=LE]
${execibar 1 ~/scripts/conky/conkyGmusicbrowser.py --datatype=PP}${font dejavu sans mono:size=3}

#${color 919191}TITLE:${color 616161}
${font dejavu sans mono:size=7}[--datatype=TI --maxlength=32]
#${color 919191}ARTIST:${color 616161}
[--datatype=AR --maxlength=32]
#${color 919191}ALBUM:${color 616161}
[--datatype=AL --maxlength=30]
#${color 919191}Volume ${color 616161}${alignr}[--datatype=VO]
#${color 919191}BitRate ${color 616161}${alignr}[--datatype=BR]
${image ~/scripts/conky/grey.jpg -p 0,104 -s 120x120}$endif$endif













Can anyone spot what's causing this problem? My skills are rather are limited so I'm sure I'm making some elementary mistake but I just can't spot it.
Title: Re: Conky Support, Codes and Screenshots
Post by: VastOne on January 27, 2014, 03:26:20 AM
Hi untune and welcome to VSIDO and the forum, we are glad you are here.... That looks like a #! installation, correct?

Are you sure that the MPRIS plugins are enabled in both GMB and VLC?

In VSIDO, GMusicBrowser is the default app and with it are hundreds of layouts that show the info on the desktop without Conky and is one of the reasons why many of us switched to GMB

Here is a screenshot of my desktop with GMB and it's own desktop widget

(http://www.zimagez.com/miniature/screenshot-01262014-092441pm.png) (http://www.zimagez.com/zimage/screenshot-01262014-092441pm.php)

I have all of these loaded and can help you trouble shoot this to the end.. I am guessing it is an MPRIS issue or a path issue

Running anyone of the pythons from terminal will tell us exactly what is missing and going wrong
Title: Re: Conky Support, Codes and Screenshots
Post by: untune on January 27, 2014, 04:27:53 AM
That was a quick reply! Well, I think you've identified the first problem: I don't think that the MPRIS plugins were enabled.
For VLC I saw this (http://www.webupd8.org/2012/02/how-to-add-vlc-to-ubuntu-sound-menu.html) and so I followed this:
QuoteBut the MPRIS v2 Dbus interface is not enabled by default in VLC 2.0, so here's how to enable it: in VLC go to Tools > Preferences, select "All" under "Show settings" (bottom left), then navigate to Interface > Control Interface and check the box next to "D-Bus control interface"
This doesn't seem to have affected the conky output though.

In GMB MPRIS v2 was enabled, not v1. I tried enabling v1 instead, which caused the text info to appear in conky, but not the artwork. Unfortunately GMB now keeps freezing!

The scripts in the terminal give:
@crunchbang:~/scripts/conky$ python conkyAmarok.py
Side B
@crunchbang:~/scripts/conky$ python conkyVlc.py
Unknown
Title: Re: Conky Support, Codes and Screenshots
Post by: VastOne on January 27, 2014, 12:26:41 PM
These scripts all depend on MPRIS 1 being enabled

I suggest that you go through this guide step by step ...  How To - Conky/Lua, Music and Cover Art - 2 Methods for 18 Apps (http://vsido.org/index.php?topic=7.0)
Title: Re: Conky Support, Codes and Screenshots
Post by: untune on January 27, 2014, 01:27:57 PM
How embarrassing.

sudo apt-get install mpdris

got gmb working as desired. Still no luck with vlc though. I checked and I have definitely enabled dbus as suggested.
Title: Re: Conky Support, Codes and Screenshots
Post by: VastOne on January 27, 2014, 01:47:06 PM
^ That makes no sense at all since mpdris is only needed for the mpd setup to work and has nothing at all to do with GMB

You might want to go through that How To step by step
Title: Re: Multiple Conkys on Multiple Desktops
Post by: orcrist on July 18, 2014, 06:03:11 PM
Thanks a lot Sector11!!!
I have been looking for a way to have different conkys in every one of my desktops of my Crunchbang Waldorf machine and your guide did exactly what I wanted.
I only noticed this:
In my first attempt, one conky (say conky1) started in the 1st desktop but the other one (say conky2) started on both desktops. I had erased "sticky" on both. Then I noticed that conky1 had the "own_window_type normal" option but conky2 (the bad guy) had it "own_window_type override". I changed "override" to "normal" and things are as I wanted them to be...
Title: Re: Conky Support, Codes and Screenshots
Post by: PackRat on November 19, 2014, 08:53:42 PM
One line conky, with colored output and configured to dock in the fluxbox slit. Should also work with openbox dock and pekwm harbor:

(http://en.zimagez.com/miniature/conkyshot.png) (http://en.zimagez.com/zimage/conkyshot.php)

In conky configuration, make sure to have this setting:

own_window_type dock

and have the fluxbox slit configured to have the conky output properly oriented. The advantage of having the conky docked is that maximized windows do not cover it; this way, I can see when the temps get too high, or the battery gets low - the battery % value is also configured to blink.

The code -

##############################################
# Settings
##############################################
background yes
use_xft yes
# xftfont Cursive Sans:bold:size=6
xftfont PT Sans Caption:bold:pixelsize=10
xftalpha 1.0
update_interval 1.0
update_interval_on_battery 30.0
total_run_times 0

own_window yes
own_window_colour 1E1D1D
own_window_transparent no
own_window_type dock
# own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_class FBoxConky
own_window_title fbox_conky
##############################################
# Compositing tips:
# Conky can play strangely when used with
# different compositors. I have found the
# following to work well, but your mileage
# may vary. Comment/uncomment to suit.
##############################################
##
own_window_argb_visual yes
#own_window_argb_value 2

## xcompmgr
# own_window_argb_visual yes
# own_window_argb_value 120

## cairo-compmgr
#own_window_type desktop
#own_window_argb_visual yes
##############################################

no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
short_units yes
imlib_cache_size 0
pad_percents 1
max_specials 2048
max_user_text 3200
text_buffer_size 1024
no_buffers yes
uppercase no
if_up_strictness address
double_buffer yes
minimum_size 1366 0
maximum_width 1366
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
border_inner_margin 1
border_outer_margin 1

default_color DAC79C
default_shade_color 000000
default_outline_color 828282
color0 FFFFFF
color1 000000
color2 FF0000 # - red
color3 FFFF00 # - yellow
color4 0000FF # - blue
color5 00FF00 # - green
color6 FFA500 # - orange
color7 00CDCD # - cyan3
color8 FFD700 # - gold
color9 F00F16 # - reddish

alignment tm
gap_x 0
gap_y 0

# -- doesn't seem to work when docked in the slit --#
# lua_load ~/conky/transbg.lua
# lua_draw_hook_pre draw_bg 0 0 0 0 0 0x140C0B 0.10

TEXT
${goto 12}Uptime:${offset 8}${uptime_short}${offset 16}|${offset 16}\
Core1:${offset 8}${if_match ${execpi 60 ~/conky/TCore0.sh}<=50}${color7}${else}${if_match ${execpi 60 ~/conky/TCore0.sh}<=70}${color8}${else}${if_match ${execpi 60 ~/conky/TCore0.sh}>70}${color9}${endif}${endif}${endif}${execpi 60 ~/conky/TCore0.sh}${offset 2}°C${color}${offset 16}\
Core2:${offset 8}${if_match ${execpi 60 ~/conky/TCore1.sh}<=50}${color7}${else}${if_match ${execpi 60 ~/conky/TCore1.sh}<=70}${color8}${else}${if_match ${execpi 60 ~/conky/TCore1.sh}>70}${color9}${endif}${endif}${endif}${execpi 60 ~/conky/TCore1.sh}${offset 2}°C${color}${offset 16}|${offset 16}\
CPU:${offset 8}${if_match ${cpu}<=50}${color7}${else}${if_match ${cpu}<=70}${color8}${else}${if_match ${cpu}>70}${color9}${endif}${endif}${endif}${cpu cpu0}%${color}${offset 8}${loadavg 1}${offset 8}${loadavg 2}${offset 8}${loadavg 3}${offset 16}\
Memory:${offset 8}${if_match ${memperc}<=50}${color7}${else}${if_match ${memperc}<=70}${color8}${else}${if_match ${memperc}>70}${color9}${endif}${endif}${endif}${memperc}%${color}${offset 16}|${offset 16}\
Battery:${offset 8}${execpi 60 acpi -b | awk '{print $3}' | cut -c1-4}${offset 8}${if_match ${battery_percent BAT0}<=15}${color9}${blink ${battery_percent BAT0}%}${color}${else}${if_match ${battery_percent BAT0}<=33}${color8}${battery_percent BAT0}%${else}${if_match ${battery_percent BAT0}>33}${color7}${battery_percent BAT0}%${endif}${endif}${endif}${color}${offset 16}|${offset 16}\
Wlan0:${if_up wlan0}${offset 8}${wireless_bitrate wlan0}${offset 16}${wireless_link_qual wlan0}/${wireless_link_qual_max wlan0}${offset 16}${if_match ${wireless_link_qual_perc wlan0}<=30}${color9}${blink ${wireless_link_qual_perc wlan0}%}${color}${else}${if_match ${wireless_link_qual_perc wlan0}<=50}${color8}${wireless_link_qual_perc wlan0}%${else}${if_match ${wireless_link_qual_perc wlan0}>50}${color7}${wireless_link_qual_perc wlan0}%${endif}${endif}${endif}${color}${offset 16}${if_up wlan0}Up:${offset 8}${upspeedf wlan0}${offset 16}Down:${offset 8}${downspeedf wlan0}${endif}${color}\
${alignr 12}${time %a  %e  %b}


Script for CPU temp -

#!/bin/sh
# exec sensors -f | awk '/Core0 Temp/ {gsub(/\+/,"",$3); gsub(/\..+/,"",$3); print $3}'
sensors | awk '/Core 0/ {gsub(/\+/,"",$3); gsub(/\..+/,"",$3); print $3}'


The "Core 0" will need to be modified to match your sensor output for each core.
Title: Re: Conky Support, Codes and Screenshots
Post by: Snap on December 06, 2014, 10:39:34 AM
@jedi mostly.

Please, can you share the code for this conky. This area specifically. I'm a lunatic...

(http://s28.postimg.org/czn6rs889/040714_C1.jpg) (http://postimg.org/image/czn6rs889/)

Cool tint2, BTW.

Title: Re: Conky Support, Codes and Screenshots
Post by: jedi on December 06, 2014, 06:13:07 PM
Hey Snap!  Been a while since we had a Conky 'Lunatic' in our midst!   ;D  Been a while since I used that particular conky layout.  I'll try to put it back together and post it ASAP!  Glad you liked.  It is not my design, but something I (cough-cough) borrowed from some other Conky Lunatic along the way.   :D
Title: Re: Conky Support, Codes and Screenshots
Post by: VastOne on December 06, 2014, 06:25:19 PM
Fuck Conky!

(@Snap, this is normal for me and nothing to do with you or your question... you will see these from me all through this forum)
Title: Re: Conky Support, Codes and Screenshots
Post by: PackRat on December 06, 2014, 06:53:54 PM
^ you should add:

own_window_class Fuck_Conky

to the VSIDO default as a sort of personal signature.  :D
Title: Re: Conky Support, Codes and Screenshots
Post by: VastOne on December 06, 2014, 06:55:56 PM
Excellent idea!
Title: Re: Conky Support, Codes and Screenshots
Post by: jedi on December 06, 2014, 07:32:51 PM
Quote from: Snap on December 06, 2014, 10:39:34 AM
@jedi mostly.

Please, can you share the code for this conky. This area specifically. I'm a lunatic...

(http://s28.postimg.org/czn6rs889/040714_C1.jpg) (http://postimg.org/image/czn6rs889/)

Cool tint2, BTW.



OK, here goes.  I'll try to get it right.  This is a Conky that is posted in post #374 above, however a couple of minor changes have occured.  The script that creates the horizontal numbered calendar has to use 'mono' type fonts.  Otherwise it will not line up properly and you'll eventually go insane trying to get it right.
You will also need conkyForecast installed for this to work.  It is a great script written by kaivalagi who has apparently fallen off of the Conky world map.
The Conky itself is called 'time'.

time;

######################
# - Conky settings - #
######################

background yes
update_interval .3
cpu_avg_samples 2
total_run_times 0
override_utf8_locale yes

double_buffer yes
#no_buffers yes

text_buffer_size 1024
#imlib_cache_size 0

minimum_size 950 0
maximum_width 950

gap_x 50
gap_y 58
#####################
# - Text settings - #
#####################
use_xft yes
xftfont monofur:size=15
xftalpha .8
uppercase no
alignment top_left
#############################
# - Window specifications - #
#############################
own_window yes
own_window_transparent yes
own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_class conky-semi
#own_window_argb_visual yes
#own_window_argb_value 255
border_inner_margin 0
border_outer_margin 0
#########################
# - Graphics settings - #
#########################
draw_shades no
#default_shade_color 292421
draw_outline no
draw_borders no
stippled_borders 0
draw_graph_borders no

#lua_load /home/jed/Conky/LUA/draw_bg.lua
#lua_draw_hook_post draw_bg 10 0 0 0 0 0x5C3434 0.4

TEXT
${execpi 36000 /home/jedi/Conky/Scripts/conkcal.sh}
${font CaviarDreams:size=40}${goto 60}${color 949494}${voffset 15}${time %l:%M %P}
${font CaviarDreams:size=15}${goto 45}${color 3881C7}${voffset -5}${time %A %B %d %Y} ${voffset -95}${color 949494}${font CaviarDreams:size=13}${goto 300}${execpi 1800 conkyForecast --datatype=CC}


${goto 450}${color 3881C7}${font CaviarDreams:size=13}${voffset 40}Current Moon Phase:
${goto 450}${color 949494}${execi 300 conkyForecast --imperial --datatype=MP}
${goto 485}${color 3881C7}${font CaviarDreams:size=13}${execi 1 conkyForecast-SunsetSunriseCountdown  -t} in:
${goto 450}${color 949494}${execi 1 conkyForecast-SunsetSunriseCountdown -L}
${execpi 1800 conkyForecast --location=USME0330 --imperial --template=$HOME/Conky/LUA/day-night2.template}


the 'calendar' script;

#!/bin/bash
cd $(dirname $0)
# horizontal and vertical calendar for conky by ans
# Updated by: mobilediesel, dk75, Bruce, Crinos512, et al.
# locale depend week day names
DOW=("Mo" "Tu" "We" "Th" "Fr" "Sa" "Su")
while getopts ":vl:" opts; do
case "$opts" in
l) lang=$OPTARG;;
v) orientation="$opts";;
esac
done
if [ -f lang ]; then
    . lang
fi
COLOROLD="445566" #MidSlateGrey
COLORTODAY="3881C7" #DeepSkyBlue
COLORREST="445566" #MidSlateGrey
COLORNEXT="778899" #LightSlateGrey
COLORSATURDAY="3881C7" #DeepSkyBlue
COLORSUNDAY="FFA07A" #LightSalmon
COLOR=("" "" "" "" "" "\${color $COLORSATURDAY}" "\${color $COLORSUNDAY}")
COLOREND=("" "" "" "" "" "" "\${color}")

TODAY=$(date +%-d)
LASTDAY=$(date -d "-$TODAY days +1 month" +%d)
FIRSTDAY=$(date -d "-$[$TODAY-1] days" +%u)

# horizontal function
h () {
# Build $TOPLINE
k=$FIRSTDAY
for j in {1..31}; do
  x=$[j+LASTDAY/j]
  case $j in
      ${j/#$x})    TOPLINE="$TOPLINE ${COLOR[$[k-1]]}${DOW[$[k-1]]}${COLOREND[$[k-1]]}";;
      $[LASTDAY+1])    TOPLINE="$TOPLINE \${color $COLORNEXT}${DOW[$[k-1]]}";;
      *)        TOPLINE="$TOPLINE ${DOW[$[k-1]]}";;
  esac
  k=$[${k/#7/0}+1]
done

BOTTOM="\${color $COLOROLD}$(seq -w -s ' ' $LASTDAY|sed "0,/[0-3]*$TODAY \?/s//\${color $COLORTODAY}&\${color $COLORREST}/") \${color $COLORNEXT}$(seq -w -s ' ' 0$[31-$LASTDAY])"

echo "${TOPLINE/# /}"
echo "$BOTTOM\${color}"
}

#vertical function
v () {
for i in $(seq 1 $[TODAY-1]); do
    TODAYC[$i]="\${color $COLOROLD}"
done
TODAYC[$TODAY]="\${color $COLORTODAY}"
for i in $(seq $[TODAY+1] $LASTDAY); do
    TODAYC[$i]="\${color $COLORREST}"
done

k=$FIRSTDAY
for j in $(seq $LASTDAY); do
      echo  "${COLOR[$[k-1]]}${DOW[$[k-1]]} ${TODAYC[$j]}$(printf "%02d" $j)\${color}"
  k=$[${k/#7/0}+1]
done
}

# call function based on "$orientation"
${orientation:-h}


and finally, the template that makes the weather and moon icons appear.
day-night2.template;

${image [--datatype=WI --night] -p 305,60 -s 100x100}${image [--location=USME0330 --datatype=MI] -p 455,40 -s 100x100}


All of this was designed for my laptop which has a screen res of 1920x1080.  If your screen resolution is different, you'll need to make some major adjustments.

(http://en.zimagez.com/miniature/120614c.png) (http://en.zimagez.com/zimage/120614c.php)
Title: Re: Conky Support, Codes and Screenshots
Post by: Snap on December 07, 2014, 10:20:16 AM
Quote from: VastOne on December 06, 2014, 06:25:19 PM
Fuck Conky!

Oooops... My bad... I already subscribed to this topic.  :P
Title: Re: Conky Support, Codes and Screenshots
Post by: Snap on December 07, 2014, 10:30:33 AM
@ jedi

Thanks!!! Some fun for a lazying sunday evening. I will steal the satellite part only, but will keep the whole thing in my conky code collection. (Apologies for that, VastOne  :D  )
Title: Re: Conky Support, Codes and Screenshots
Post by: jedi on January 14, 2015, 12:44:10 PM
This is my top horizontal version of VastOne's default Conky;



background yes
update_interval 2.0
text_buffer_size 1024
total_run_times 0
double_buffer yes

alignment top_left
gap_x 60
gap_y 0
minimum_size 1320 30
maximum_width 1320
own_window yes
own_window_type normal #override
own_window_transparent yes
own_window_hints undecorated,sticky,skip_taskbar,skip_pager
own_window_argb_visual yes
own_window_argb_value 255
# font defaults:
use_xft yes
xftfont Caviar Dreams:weight=bold:size=12
xftalpha 0.9
override_utf8_locale yes

## NOTE: Other fonts can be called up during the TEXT formatting
#  these fonts are found through the normal path, or ~/.fonts
#  OpenLogos

## images, buffering, shading
imlib_cache_size 60
double_buffer yes
draw_shades no
#default_shade_color 777777

## misc text formatting
short_units yes
pad_percents 0
border_inner_margin 0
uppercase no
use_spacer right

## outlines and borders
draw_outline no
draw_borders no
draw_graph_borders no
border_width 0

## stdout/console printing
out_to_ncurses no
out_to_console no

## process settings
top_name_width 5
#no_buffers yes

#### end config

#### Begin display information
## everything below 'TEXT' is drawn on screen

lua_load /home/jedi/Conky/LUA/draw-bg.lua
lua_draw_hook_pre draw_bg 15 0 15 0 25 0x000000 0.8
## color was 09ECC8 and 2D4863 and 021A30

TEXT
${voffset 15}${color #3881C7}${goto 10}Up: ${color 949494}$uptime  \
${color #3881C7}Kern: ${color 949494}${kernel}  \
${color #3881C7}CPU Use: ${color 949494}${cpu cpu0}%  \
${color #3881C7}CPU Temp: ${color 949494}${hwmon 2 temp 1}º \
${color #3881C7}MoBo Temp: ${color 949494}${hwmon 1 temp 1}º \
${color #3881C7}GPU Temp:${color 949494} ${nvidia temp}º \
${color #3881C7} MEM: ${color 949494}$memperc% $mem/$memmax \
${color #3881C7}NET:  \
${color #3881C7}Up: ${color 949494}${upspeed wlan0} k/s  \
${color #3881C7}Down: ${color 949494}${downspeed wlan0}k/s${color} \
#${color #3881C7} Battery: ${color 949494}${battery_percent BAT0}%  ${battery_time BAT0}



This is the top right weather Conky which depends on conkyForecast;


# conky configuration

# set to yes if you want Conky to be forked in the background
background yes

# Use Xft?
use_xft yes
xftfont mono:size=12
xftalpha 0.8

# Update interval in seconds
update_interval 1.0

# 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 normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_transparent yes

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no
draw_graph_borders no

# Stippled borders?
stippled_borders 0

# border margins
border_inner_margin 0

# border width
border_width 1

# Default colors and also border colors
default_color white
default_shade_color black
default_outline_color black

alignment tr
gap_x 10
gap_y 5
minimum_size 375 330
maximum_width 375

# Text alignment, other possible values are commented

#alignment top_right
#alignment bottom_left
#alignment bottom_right

# 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 1

# number of net samples to average
# set to 1 to disable averaging
net_avg_samples 1

# 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 none

# grey
color1 CCCCCC

# orange
#color2 DA7020
# blue
color2 7095BB

text_buffer_size 1024
max_specials 1024
own_window_title conky_forecast

TEXT
${color1}${execpi 900 conkyForecast --imperial USME0330 -t /home/jedi/Conky/Templates/conkyforecast.jed1}


and the template for the weather conky;


${alignc}[datatype=LF] | ${color FFA07A}[--datatype=CN], Your location here.
${color 547EC8}${stippled_hr 5 1}
Today's Forecast: ${color9}High: [--datatype=HT --startday=0] ${color7} Low: [--datatype=LT --startday=0]
${goto 15} ${color3}Current Temp: [--datatype=HT]   ${color}Feels Like: [--datatype=LT]
${goto 80}  ${color4}[--datatype=CC]
${alignc}${image [--datatype=WI --night] -p 125,80 -s 80x80}


${goto 100} ${color3}Hum: ${color}[--datatype=HM]
${goto 100} ${color3}Vis: ${color}[--datatype=VI]
${alignc} ${color3}Wind: ${color}[--datatype=WD] ${color3}@ ${color}[--datatype=WS]${color}
${color 547EC8} ${hr}
${goto 27}[--datatype=DW --startday=1] ${goto 170}[--datatype=DW --startday=2]${goto 295}[--datatype=DW --startday=3]
${goto 27}${color9}H: [--datatype=HT --startday=1]  ${goto 170}${color9}H: [--datatype=HT --startday=2]${goto 295}${color9}H: [--datatype=HT --startday=3]
${color7}${image [--datatype=WI --startday=1] -p 27,248 -s 40x40}${image [--datatype=WI --startday=2] -p 170,248 -s 40x40}${image [--datatype=WI --startday=3] -p 300,248 -s 40x40}

${goto 27}${color9}L: [--datatype=LT --startday=1]  ${goto 170}${color9}L: [--datatype=HT --startday=2]  ${goto 300}${color9}L: [--datatype=HT --startday=3]


Requested from Google+ by Yannik W. in regards to this scrot...
(http://www.zimagez.com/miniature/011415a.jpg) (http://www.zimagez.com/zimage/011415a.php)
Title: Re: Conky Support, Codes and Screenshots
Post by: VastOne on March 03, 2015, 11:33:01 PM
^ Jedi, what is that GMB widget you are using in that one?

I like it but do not recognize it.. it is similar to the Taped Paper but different

Edit - I took a closer look and realized it is one of mine... One of the Thin layouts

I am getting too old for this shit!
Title: Re: Conky Support, Codes and Screenshots
Post by: jedi on March 04, 2015, 12:09:42 AM
hehe, VastOne's Thin Layout II   ???
glad you like it!!!   :D
Title: Re: Conky Support, Codes and Screenshots
Post by: Snap on July 03, 2015, 04:58:16 AM
Got conky updated today (1.10.0). Got a warning about the new lua format used. I hardly ever use lua, so no concerns at first instance, but now conky shows like a regular window. The suggested doc /usr/share/doc/conky-all/conky.conf doesn't seem to help. Any suggestions to get back to a transparent borderless conky stuck to the background?

## For OpenBox
own_window yes
##own_window_type desktop
own_window_type normal
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below


I added this to my conky a while ago when I was living in OpenBox and Crunchbang, (Other WMs and DEs sometimes need different settings) It always worked for me in fluxbox until this update.
Title: Re: Conky Support, Codes and Screenshots
Post by: VastOne on July 03, 2015, 05:23:39 AM
I got the same update yet I have not seen any changes ...

These are my settings which are exactly what the default in VSIDO are, you might want to see what Jedi thinks of this as well


# .conkyrc - Edited from various examples across the 'net
# Used by VastOne on VSIDO

# Create own window instead of using desktop (required in nautilus)
#own_window yes
#own_window_type normal
#own_window_transparent no
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# fiddle with window
# use_spacer right

# Use Xft?
use_xft yes
xftfont Liberation Sans:size=13.8
xftalpha 0.9
text_buffer_size 2048

# Update interval in seconds
update_interval 1

# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
total_run_times 0

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# Minimum size of text area
#minimum_size 1024 0
#maximum_width 1024

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no
own_window_argb_visual yes
own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window yes
own_window_transparent yes
own_window_class conky-semi

# Stippled borders?
stippled_borders 0

# border margins
# border_margin 0

# border width
border_width 1

# Default colors and also border colors
#default_color grey
#color2=white
#color3=grey
#default_shade_color black
#default_outline_color grey
own_window_colour 000000

# Text alignment, other possible values are commented
#alignment top_middle
alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 0
gap_y 5
minimum_size 1250 29
maximum_width 1700
# Subtract file system buffers from used memory?
no_buffers yes

# set to yes if you want all text to be in uppercase
uppercase no

imlib_cache_size 0 

# 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 none

#lua_load ~/Conky/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.3
##    ${voffset -3} ${color 7D8C93}OD ${color 55688A} ${execi 600 inxi -W63882 | cut -c32-34}°
TEXT
${image /usr/local/bin/images/vsidoorb_blk.png -s 40x40 -p 1,-.5}       ${voffset 10} ${color 55688A} $kernel ${color 7D8C93} ${color lime green}${uptime_short} ${color 7D8C93} CPU ${color 55688A}${cpu cpu0}%  ${color 7D8C93}MEM ${color 55688A}${memperc}% ${mem} / ${memmax} ${color 7D8C93} CPU ${color 55688A}${platform it87.552 temp 2}° ${color 7D8C93} MB ${color 55688A}${platform it87.552 temp 1}° ${color 7D8C93} ${color 7D8C93}GPU ${color 55688A} ${execi 5 sensors nouveau-pci-0400 | grep temp1 | awk '{print $2}' | cut -c2-3}° ${color 7D8C93} HD${color 55688A} ${execi 5 hddtemp -n /dev/sdb}° ${color 7D8C93} NET${color 55688A}  ${voffset 2}${downspeedgraph bond0 12,90 000000 00ff00}  ${upspeedgraph bond0 12,90 000000 ff0000}${color 7D8C93}
Title: Re: Conky Support, Codes and Screenshots
Post by: Snap on July 03, 2015, 06:10:29 AM
Thanks, boss. That did it.  ;D
Title: Re: Conky Support, Codes and Screenshots
Post by: jedi on July 03, 2015, 07:55:05 AM
Totally lost and getting really tired of Debian BS...   :-[
Title: Re: Conky Support, Codes and Screenshots
Post by: PackRat on July 03, 2015, 04:06:11 PM
I installed conky-all from the repos and it worked as expected.

The version in the repos seems to be ahead the official released version (http://of%20the%20official%20released%20versionhttp://conky.sourceforge.net/) , or is there a different page - other than the git site which is 1.10.x - to download conky now?
Title: Re: Conky Support, Codes and Screenshots
Post by: jedi on July 04, 2015, 04:46:10 AM
Yes, Conky works fine, however, LUA is screwed...    ::)
Title: Re: Conky Support, Codes and Screenshots
Post by: VastOne on July 04, 2015, 04:59:41 AM
Those famous words by some hack keep ringing in my ears...

FUCK CONKY!

(perhaps I should trademark that)

T-shirt anyone?

(I hope a certain Someone11 is shitting bricks)
Title: Re: Conky Support, Codes and Screenshots
Post by: ozitraveller on July 04, 2015, 05:57:27 AM
Quote from: VastOne on July 04, 2015, 04:59:41 AM
Those famous words by some hack keep ringing in my ears...

FUCK CONKY!

(perhaps I should trademark that)

T-shirt anyone?

(I hope a certain Someone11 is shitting bricks)

+1

I've just looked down to the bottom of the screen, after read comments above, and the bloody things has gone just disappeared.

Haven't been around lately, been trying to get my own house in order.

I think my desktop looks better without it!
Title: Re: Conky Support, Codes and Screenshots
Post by: Snap on July 04, 2015, 08:52:18 AM
QuoteT-shirt anyone?

Send me one.  :D

Come on, guys. Conky is a nice system monitor to have on sight. If you don't get too crazy about it it's a great thingy. I just want the time and date, RAM and CPU usage. That's it. Don't over do it. Well, and a tiny and simplistic conkymoc just to see what moc is playing when it's on. I hate my desktop bloated. The default Vsido conky has already too much stuff and colors and it's too much in the way for me.
Title: Re: Conky Support, Codes and Screenshots
Post by: dizzie on July 04, 2015, 02:27:04 PM
Quote from: VastOne on July 04, 2015, 04:59:41 AM
(I hope a certain Someone11 is shitting bricks)


Bwahahaha!! I lost my shit there! THANKS  :D
Title: Re: Conky Support, Codes and Screenshots
Post by: VastOne on July 04, 2015, 04:12:33 PM
You are absolutely correct Snap  conky is perfect as a system monitor. It was how I found it years ago as a gkrellem replacement

As for the default in VSIDO I do need to change it and remove the network and the colors since there is no easy way to know the interface cards. Thanks Snap.

BTW, I am always open to any replacements in VSIDO. The conky default can be replaced at anytime, just shoot me the config and lets vote on it


Title: Re: Conky Support, Codes and Screenshots
Post by: PackRat on July 04, 2015, 09:19:48 PM
Quote(I hope a certain Someone11 is shitting bricks)

I was actually thinking that as well - or at least he will be.  :D

To add to dizzie's list there is also xosview - it's in the repos, highly customizable; but only vertical layout I believe.

Another option would be to get the conky 1.9.0 tarball and use that as the default install. Building from source would require adding the dev files; or could you not install the deb file (it's still in Debian Testing) and apt pin it so it will not get updated?
Title: Re: Conky Support, Codes and Screenshots
Post by: PackRat on July 04, 2015, 09:55:59 PM
QuoteBTW, I am always open to any replacements in VSIDO. The conky default can be replaced at anytime, just shoot me the config and lets vote on it

basic information, some color changes, no graphics, no lua (using lua messes it up if you decide the dock conky in the fluxbox slit):

##############################################
# Settings
##############################################
background yes
use_xft yes
# xftfont Cursive Sans:bold:size=6
xftfont Source Sans Pro:bold:size=10
xftalpha 1.0
update_interval 1.0
update_interval_on_battery 30.0
total_run_times 0

own_window yes
own_window_colour 1E1D1D
own_window_transparent no
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_class ConkyVsido
own_window_title ConkyInfo
##############################################
# Compositing tips:
# Conky can play strangely when used with
# different compositors. I have found the
# following to work well, but your mileage
# may vary. Comment/uncomment to suit.
##############################################
##
#own_window_argb_visual yes
#own_window_argb_value 2

## xcompmgr
# own_window_argb_visual yes
# own_window_argb_value 120

## cairo-compmgr
#own_window_type desktop
#own_window_argb_visual yes
##############################################

no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
short_units yes
imlib_cache_size 0
pad_percents 1
max_specials 2048
max_user_text 3200
text_buffer_size 1024
no_buffers yes
uppercase no
if_up_strictness address
double_buffer yes
minimum_size 800 0
maximum_width 800
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
border_inner_margin 1
border_outer_margin 1

default_color DAC79C
default_shade_color 000000
default_outline_color 828282
color0 FFFFFF
color1 000000
color2 FF0000 # - red
color3 FFFF00 # - yellow
color4 0000FF # - blue
color5 00FF00 # - green
color6 FFA500 # - orange
color7 00CDCD # - cyan3
color8 FFD700 # - gold
color9 F00F16 # - reddish

alignment tl
gap_x 0
gap_y 0

# -- doesn't seem to work when docked in the slit --#
# lua_load ~/conky/transbg.lua
# lua_draw_hook_pre draw_bg 0 0 0 0 0 0x140C0B 0.10

TEXT
${goto 24}${time %a  %e  %b %k:%M}${offset 24}|${offset 24}\
Uptime:${offset 8}${uptime_short}${offset 24}|${offset 24}\
CPU:${offset 8}${if_match ${cpu}<=50}${color7}${else}${if_match ${cpu}<=70}${color8}${else}${if_match ${cpu}>70}${color9}${endif}${endif}${endif}${cpu cpu0}%${color}${offset 8}${loadavg 1}${offset 8}${loadavg 2}${offset 8}${loadavg 3}${offset 16}${offset 24}|${offset 24}\
Memory:${offset 8}${if_match ${memperc}<=50}${color7}${else}${if_match ${memperc}<=70}${color8}${else}${if_match ${memperc}>70}${color9}${endif}${endif}${endif}${memperc}%${color}


(http://s22.postimg.org/wyjylzx99/July_1436046627_1600x900.jpg) (http://postimg.org/image/wyjylzx99/)

Edit - comment out own_window_argb_visual needs to be:

#own_window_argb_visual yes

for a transparent window to work.
Title: Re: Conky Support, Codes and Screenshots
Post by: zephyr on July 04, 2015, 10:03:41 PM
Xlent!:)
Title: Re: Conky Support, Codes and Screenshots
Post by: VastOne on July 04, 2015, 10:14:56 PM
I likes....

thanks RatMan
Title: Re: Conky Support, Codes and Screenshots
Post by: VastOne on July 05, 2015, 08:33:32 PM
I have made changes to the original .conkyrc so that they are what PackRat's conky shows... I have kept the colors and image the same

Building ISO's now and will post a scrot when done

Thanks
Title: Re: Conky Support, Codes and Screenshots
Post by: Snap on July 06, 2015, 07:00:15 AM
Great. I totally favor the change. Thanks, folks.
Title: Re: Conky Support, Codes and Screenshots
Post by: jedi on July 07, 2015, 03:36:53 AM
Minimal indeed!  Looks great...  8)
Title: Re: Conky Support, Codes and Screenshots
Post by: PackRat on July 08, 2015, 05:33:38 PM
Logged into dwm and spectrwm and conky was wacked - started the default conky.conf file. Tried a couple things and conky 1.10 apparently does not like the no-x configuration files for tiling wm's.

So it's good-bye to conky 1.10 from the repos and back to conky 1.9.x compiled from source.

So yeah, fanden Conky.
Title: Re: Conky Support, Codes and Screenshots
Post by: VastOne on July 09, 2015, 05:33:43 AM
Quote from: PackRat on July 08, 2015, 05:33:38 PM
So yeah, fanden Conky.

^ Caused a milk through the nose snort of laughter

8)
Title: Re: Conky Support, Codes and Screenshots
Post by: PackRat on July 13, 2015, 03:23:39 PM
Appears that the upgrade is not going too well -

Conky 1.10.0 upgrade on Arch Linux. (https://bbs.archlinux.org/viewtopic.php?id=199217)

Double buffering disabled by default - looks like it needs to be enabled when compiled; interesting decision there.

screenshot - conky 1.9 top, conky 1.10 right (working config from arch linux thread) -

(http://s2.postimg.org/75dub5hh1/Screenshot_2015_07_13_11_51_17.jpg) (http://postimg.org/image/75dub5hh1/)

if I get bored enough, I may translate my conkyrc's to lua format.
Title: Re: Conky Support, Codes and Screenshots
Post by: dizzie on July 13, 2015, 04:48:14 PM
(http://s14.postimg.org/71bn72rdp/2015_07_13_184501_3840x1080_scrot.jpg) (http://postimg.org/image/71bn72rdp/)


Config:



conky.config = {
alignment = 'top_left',
background = true,
color2 = '888888',
cpu_avg_samples = 2,
default_color = 'FFFFFF',
double_buffer = true,
font = 'Caviar Dreams:size=8',
gap_x = 25,
gap_y = 13,
minimum_width = 200,
no_buffers = true,
own_window = true,
own_window_type = 'override',
own_window_transparent = true,
update_interval = 1.0,
short_units = yes,
use_xft = true,
}
conky.text = [[


${voffset 8}$color2${font Caviar Dreams:size=16}${time %A}$font${voffset -8}$alignr$color${font Caviar Dreams:size=38}${time %e}$font
$color${voffset -30}$color${font Caviar Dreams:size=18}${time %b}$font${voffset -3} $color${font Caviar Dreams:size=20}${time %Y}$font$color2$hr
#
${voffset 20}${goto 40}${color}CPU${font Caviar Dreams:bold:size=8}$alignr$cpu%
${voffset 5}${goto 40}$font$color2${top name 1}$alignr$color${top cpu 1}%
${goto 40}$color2${top name 2}$alignr$color${top cpu 2}%
${goto 40}$color2${top name 3}$alignr$color${top cpu 3}%
${goto 40}$color2${top name 4}$alignr$color${top cpu 4}%
${goto 40}$color2${top name 5}$alignr$color${top cpu 5}%
#
${voffset 10}${goto 40}${color}RAM${font Caviar Dreams:bold:size=8}$alignr$mem$font
${goto 40}${voffset 5}$color2${top_mem name 1}$alignr$color${top_mem mem_res 1}
${goto 40}$color2${top_mem name 2}$alignr$color${top_mem mem_res 2}
${goto 40}$color2${top_mem name 3}$alignr$color${top_mem mem_res 3}
${goto 40}$color2${top_mem name 4}$alignr$color${top_mem mem_res 4}
${goto 40}$color2${top_mem name 5}$alignr$color${top_mem mem_res 5}
#
${voffset 20}${goto 40}${color}DRIVES${font Caviar Dreams:bold:size=8}$alignr
${voffset 5}${goto 40}${font}${color2}root $alignr$color${fs_size /} (${fs_used /})
${goto 40}${color2}home $alignr$color${fs_size /home} (${fs_used /home})
${goto 40}${color2}data $alignr$color${fs_size /mnt/data} (${fs_used /mnt/data})
${goto 40}${color2}NAS $alignr$color${fs_size /mnt/share} (${fs_used /mnt/share})
#
${voffset 20}${goto 40}${color}NET${font Caviar Dreams:bold:size=8}$alignr
${voffset 5}${goto 40}${font}${color2}down $alignr$color${downspeedf enp3s0} Kb/s
${goto 40}${color2}up $alignr$color${upspeedf enp3s0} Kb/s


#
${voffset 20}${goto 40}${color}WEATHER ${font Caviar Dreams:bold:size=8}$alignr
${voffset 5}${goto 40}${color2}Silkeborg $alignr$color${execi 300 curl -s "http://weather.yahooapis.com/forecastrss?w=556914&u=c" -o ~/.cache/weather.xml} ${execi 300 grep "yweather:condition" ~/.cache/weather.xml | grep -o "temp=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}°C




#${voffset 20}$alignr$color${execi 5000 awk -F= '/ID=/{printf $2" "} /RELEASE=/{printf $2" "} /NAME=/{print $2}' /etc/lsb-release}
${voffset 5}${color2}${alignr}${execi 1200 whoami}@${nodename}
${alignr}${color2}${font Caviar Dreams:size=8}uptime: ${color}${uptime_short}
${color2}${font Caviar Dreams:size=8}${alignr}kernel: ${color}4.1.1-1
]]


Title: Re: Conky Support, Codes and Screenshots
Post by: PackRat on July 13, 2015, 05:44:56 PM
(http://s29.postimg.org/tdahpv4f7/July_1436809325_1600x900.jpg) (http://postimg.org/image/tdahpv4f7/)

config

conky.config = {
out_to_console = true,
out_to_x = false,
background = false,
cpu_avg_samples = 2,
net_avg_samples = 2,
no_buffers = true,
out_to_stderr = false,
update_interval = 1.0,
uppercase = false,
use_spacer = 'none',
};

conky.text =
[[ Uptime: ${uptime_short}  |  CPU: ${hwmon 2 temp 1} °C   CPU: ${hwmon 2 temp 2} °C  |  CPU%: ${cpu cpu0}%  ${loadavg}  |  Mem: ${memperc}%  | Eth0: Down - ${downspeedf wlp3s0} kb/s  Up - ${upspeedf wlp3s0} kb/s   |   ${time %A %e %b  %k:%M} ]]


@dizzie - have you located any new documentation? Looks like some of the variables are no longer supported - wireless stuff in my configs.
Title: Re: Conky Support, Codes and Screenshots
Post by: dizzie on July 13, 2015, 06:54:27 PM
Try look here PackRat: http://conky.sourceforge.net/variables.html
Title: Re: Conky Support, Codes and Screenshots
Post by: PackRat on July 13, 2015, 07:31:36 PM
It seems to be a bug - objects like wireless_link_qual, wireless_bitrate, etc .. are not always working. The Arch users think it has to do with IPv6 being disabled (with the kernel parameter) but I'm not using that. Enabled wireless when I build conky-1.10 from source. Just looks to be a few bugs to worked out for conky 1.10.1.

I don't know if this script is installed from the deb repos so I'll post it. It's in the conky-1.10 tar file; lua script that will convert old .conkyrc to new lua format:

#! /usr/bin/lua

local usage = [[
Usage: convert.lua old_conkyrc [new_conkyrc]

Tries to convert conkyrc from the old v1.x format to the new, lua-based format.

Keep in mind that there is no guarantee that the output will work correctly
with conky, or that it will be able to convert every conkyrc. However, it
should provide a good starting point.

Altough you can use this script with only 1 arg and let it overwrite the old
config, it's suggested to use 2 args so that the new config is written in a new
file (so that you have backup if something went wrong).

For more information about the new format, read the wiki page
<http://wiki.conky.be/index.php?title=conky2rc_format>
]];

local function quote(s)
    if not s:find("[\n'\\]") then
        return "'" .. s .. "'";
    end;
    local q = '';
    while s:find(']' .. q .. ']', 1, true) do
        q = q .. '=';
    end;
    return string.format('[%s[\n%s]%s]', q, s, q);
end;

local bool_setting = {
    background = true, disable_auto_reload = true, double_buffer = true, draw_borders = true,
    draw_graph_borders = true, draw_outline = true, draw_shades = true, extra_newline = true,
    format_human_readable = true, no_buffers = true, out_to_console = true,
    out_to_ncurses = true, out_to_stderr = true, out_to_x = true, override_utf8_locale = true,
    own_window = true, own_window_argb_visual = true, own_window_transparent = true,
    short_units = true, show_graph_range = true, show_graph_scale = true,
    times_in_seconds = true, top_cpu_separate = true, uppercase = true, use_xft = true
};

local num_setting = {
    border_inner_margin = true, border_outer_margin = true, border_width = true,
    cpu_avg_samples = true, diskio_avg_samples = true, gap_x = true, gap_y = true,
    imlib_cache_flush_interval = true, imlib_cache_size = true,
    max_port_monitor_connections = true, max_text_width = true, max_user_text = true,
    maximum_width = true, mpd_port = true, music_player_interval = true, net_avg_samples = true,
    own_window_argb_value = true, pad_percents = true, stippled_borders = true,
    text_buffer_size = true, top_name_width = true, total_run_times = true,
    update_interval = true, update_interval_on_battery = true, xftalpha = true
};

local split_setting = {
    default_bar_size = true, default_gauge_size = true, default_graph_size = true,
    minimum_size = true
};

local colour_setting = {
    color0 = true, color1 = true, color2 = true, color3 = true, color4 = true, color5 = true,
    color6 = true, color7 = true, color8 = true, color9 = true, default_color = true,
    default_outline_color = true, default_shade_color = true, own_window_colour = true
};

local function alignment_map(value)
    local map = { m = 'middle', t = 'top', b = 'bottom', r = 'right', l = 'left' };
    if map[value] == nil then
        return value;
    else
        return map[value];
    end;
end;

local function handle(setting, value)
    setting = setting:lower();
    if setting == '' then
        return '';
    end;
    if split_setting[setting] then
        local x, y = value:match('^(%S+)%s*(%S*)$');
        local ret = setting:gsub('_size', '_width = ') .. x .. ',';
        if y ~= '' then
            ret = ret .. ' ' .. setting:gsub('_size', '_height = ') .. y .. ',';
        end;
        return '\t' .. ret;
    end;
    if bool_setting[setting] then
        value = value:lower();
        if value == 'yes' or value == 'true' or value == '1' or value == '' then
            value = 'true';
        else
            value = 'false';
        end;
    elseif not num_setting[setting] then
        if setting == 'alignment' and value:len() == 2 then
            value = alignment_map(value:sub(1,1)) .. '_' .. alignment_map(value:sub(2,2));
        elseif colour_setting[setting] and value:match('^[0-9a-fA-F]+$') then
            value = '#' .. value;
        elseif setting == 'xftfont' then
            setting = 'font';
        end;
        value = quote(value);
    end;
    return '\t' .. setting .. ' = ' .. value .. ',';
end;

local function convert(s)
    local setting, comment = s:match('^([^#]*)#?(.*)\n$');
    if comment ~= '' then
        comment = '--' .. comment;
    end;
    comment = comment .. '\n';
    return handle(setting:match('^%s*(%S*)%s*(.-)%s*$')) ..  comment;
end;

local input;
local output;

if conky == nil then --> standalone program
    -- 1 arg: arg is input and outputfile
    -- 2 args: 1st is inputfile, 2nd is outputfile
    -- 0, 3 or more args: print usage to STDERR and quit
    if #arg == 1 or #arg == 2 then
        input = io.input(arg[1]);
    else
        io.stderr:write(usage);
        return;
    end;
else
    -- we are called from conky, the filename is the first argument
    input = io.open(..., 'r');
end;


local config = input:read('*a');
input:close();

local settings, text = config:match('^(.-)TEXT\n(.*)$');

local converted = 'conky.config = {\n' .. settings:gsub('.-\n', convert) .. '};\n\nconky.text = ' ..
                quote(text) .. ';\n';

if conky == nil then
    if #arg == 2 then
        output = io.output(arg[2]);
    else
        output = io.output(arg[1]);
    end
    output:write(converted);
    output:close();
else
    return assert(loadstring(converted, 'converted config'));
end;


in terminal:

convert.lua old_conkyrc_file new_conkyrc_file

works well on basic conkyrc files.
Title: Re: Conky Support, Codes and Screenshots
Post by: jedi on July 13, 2015, 08:26:50 PM
Nice find PackRat!  It is indeed installed when doing a dist-upgrade.  It can be found in /usr/share/doc/conky-all/convert.lua (or /usr/share/doc/conky1.10*)
It needs to be set executable to use and it does a fairly good job converting your orig conkys to the new format.  I have a separate /home/jedi/Conky directory for example.  To use the convert.lua, I went into the above mentioned /usr* directory and changed the permissions to executable.  Then from the terminal, in my case, just as an example;

sudo /usr/share/doc/conky-all/convert.lua /home/jedi/Conky/Weather/.conkyrc

So far, it has successfully converted all my conkys EXCEPT for the arclance weather script which extensively uses lua.  I don't believe it to be a problem converting the conkyrc file, but rather a lua issue with how conky now calls it and the X configuration.  (my head is bleeding quite severely from the brick wall I've been banging it into trying to figure this out, so I've taken a time out to soothe my wounds!)  ???

IMO, this has been the stupidest conky upgrade since 1.81 (I think).  That they have so drastically changed the basics is to me inconceivable!!!  But hey, I'm just an end user, so what difference does what I think make?  ::)  >:(  :(  :'(
Title: Re: Conky Support, Codes and Screenshots
Post by: PackRat on July 13, 2015, 09:35:06 PM
All kinds of lua scripts are breaking. Multi core CPU scripts don't seem to work well either.

Do you have wireless jedi? Are the wireless objects working?

Edit - never mind; had some time and installed from the repos myself. All the objects are working so I missed something compiling myself.
Title: Re: Conky Support, Codes and Screenshots
Post by: jedi on July 13, 2015, 11:00:12 PM
@PackRat, yes I have wireless only actually.  No ethernet in the house due to laziness.  ::)
Here is my conkyrc that works with my wireless;


conky.config = {
-- By jedi, See me on VSIDO, nixnut.com or on Google+
background = false,
use_xft = true,
font = 'monofur:size=9',
xftalpha = 0.8,
update_interval = 1,
total_run_times = 0,
own_window = true,
own_window_type = 'normal',
own_window_transparent = true,
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
double_buffer = true,
draw_shades = false,
draw_outline = false,
draw_borders = false,
draw_graph_borders = false,
stippled_borders = 0,
border_width = 1,
default_color = '#000000',
color1 = '#212021',
color2 = '#00FF0E',--E8E1E6 B4AD3F 0FF605
color3 = '#ECEC34',--1BD0F5 3B64A0 B4AD3F
color4 = '#008EF3',--B43617
color5 = '#F3001A',--269E16
default_shade_color = '#000000',
default_outline_color = '#000000',
minimum_width = 620, minimum_height = 200,
maximum_width = 620,
gap_x = 155,
gap_y = 110,
alignment = 'top_right',
uppercase = false,
cpu_avg_samples = 2,
net_avg_samples = 2,
short_units = true,
text_buffer_size = 2048,
use_spacer = 'none',
override_utf8_locale = true,

};

conky.text = [[
${goto 200}${color2}${font ADELE:size=70}${time %l:%M %P}${font ADELE:size=22}${color2}
${goto 235}${time %B %d, %Y}
${font Caviar Dreams:size=11}${execi 2600 cat /etc/issue.net}: ${voffset -3}${font monofur:size=11}${color3}jedi${color2}  ${font Caviar Dreams:size=11}${color2}${goto 185}Kernel: ${color3}${kernel} ${color2}${goto 450}Up: ${color FF6100}${uptime}
${font Caviar Dreams:size=11}${color2}Cpu: ${color3}${cpu cpu0}%  ${color4}${hwmon 1 temp 1}º${color4}C  ${goto 130}Mem: ${color3}${memperc }% ${goto 205}${color2}Root: ${color3}${fs_used_perc /}%  ${color4}${hddtemp /dev/sda}º${color4}C ${goto 335}${color2}Home: ${color3}${fs_used_perc /home}% ${color3} ${goto 425}${color2}DATA: ${color3}${fs_used_perc /media/DATA}%  ${color4}${hddtemp /dev/sdb}º${color4}C
${font Caviar Dreams:size=9}${goto 125}${color3}${mem}${color2}/${color3}${memmax}${color2} ${goto 225}${color3}${fs_used /}${color2}/${color3}${fs_size /}${color2} ${goto 315}${color3}${fs_used /home}${color2}/${color3}${fs_size /home}${color2} ${goto 425}${color3}${fs_used /media/DATA}${color2}/${color3}${fs_size /media/DATA}${color2}

${goto 50}${font Caviar Dreams:size=11}WiFi: ${color3}${addr wlan0} ${color2} ${goto 200}Public IP: ${color3}${execi 300 wget -q -O - checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'} ${goto 380}${color2}${font Caviar Dreams:size=11} Dwn: ${color3}${font monofur:size=12}${downspeed wlan0} ${font Caviar Dreams:size=11}${color2} ${voffset -3}${goto 475}Up: ${color3}${font monofur:size=12} ${upspeed wlan0}   
${goto 250}${font Caviar Dreams:size=11}${color2}Pwr: ${color5}${battery_percent BAT0}%  ${color4}${battery_time BAT0}]];


Hope it helps...

(http://en.zimagez.com/miniature/07132015b.jpg) (http://en.zimagez.com/zimage/07132015b.php)
Title: Re: Conky Support, Codes and Screenshots
Post by: PackRat on July 14, 2015, 01:54:50 AM
thanks jedi

the up/down for my wireless always worked; it was just the other info - like signal strength that wasn't working. Whatever the debian maintainer had to do is working.
Title: Re: Conky Support, Codes and Screenshots
Post by: PackRat on July 16, 2015, 01:14:52 PM
Quote(I hope a certain Someone11 is shitting bricks)

Good call on that one.  8)
Title: Re: Conky Support, Codes and Screenshots
Post by: Snap on July 23, 2015, 09:37:17 AM
Need some help. I cannot make this work

./convert.lua ~/.conkyrc
bash: ./convert.lua: No such file or directory


Installed lua5.2 (had no lua previously installed), made /usr/share/doc/conky-all/convert.lua executable, got the result above.
Then copied the script into /usr/bin just in case. No luck.
Next made a copy into ~/bin. Again the same result.
Reverted all back to the starting point and tried again. Same same.

What am i missing?  ::)
Title: Re: Conky Support, Codes and Screenshots
Post by: Snap on July 23, 2015, 10:31:46 AM
Purged lua5.2 and installed 5.1. No difference....

So now lua is a kind of dependency for conky?

Fuck conky!!!!
Title: Re: Conky Support, Codes and Screenshots
Post by: PackRat on July 23, 2015, 12:28:32 PM
Verify that convert.lua is still executable after you copied it to /usr/bin and ~/bin

The try this:

/usr/bin/convert.lua ~/.conkyrc ~/.newconkyrc

or just

convert.lua ~/.conkyrc ~/.newconkyrc


I'm pretty sure that the ./ in:

./convert.lua

overrides your $PATH environment and restricts you to the current directory.
Title: Re: Conky Support, Codes and Screenshots
Post by: Snap on July 24, 2015, 06:01:18 AM
Quote./convert.lua.


overrides your $PATH environment and restricts you to the current directory

Every day learning something new. Didn't knew that about the dot slash way. Thanks, PackRat.
Title: Re: Conky Support, Codes and Screenshots
Post by: Snap on July 24, 2015, 09:01:47 AM
Now that use to have two conkys running most of the time The second one (conkyradio) behaves oddly.  Whe launched it gets placed where this dictates:

[app] (name=conky) (class=conky)
[Position] (TOPRIGHT) {13% 3%}
[Layer]        {12}
[end]


But when the first song ends and the parsed info changes to the next one it gets repositioned following the own conky configuration

alignment = "bottom_right",

I tried to fix this without success as follows. In conkyradio:

own_window_title = "conkyradio",

And in the apps file:

[app] (name=conky) (class=conky)
[Position] (TOPRIGHT) {13% 3%}
[Layer]        {12}
[end]
[app] (name=conkyradio) (class=conky)
[Position] (BOTTOMRIGHT) {13% 3%}
[Layer]        {12}
[end]


It keeps doing the same, at launch it displays at the top right following the apps file and then it switches to the own conky config placement.

Any tips to get the secondary conkyradio placed where I want it from the start?
Title: Re: Conky Support, Codes and Screenshots
Post by: PackRat on July 24, 2015, 12:22:58 PM
You might be getting some conflict between the name and class of the two conkies - when conky refreshes, it's like reopening the window (app).

Use both lines in each conkyrc and give them unique class and names

own_window_class <unique class #1>
own_window_title <unique class #1>

own_window_class <unique class #2>
own_window_title <unique name #2>


you can also try to comment out the line

own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

so that each conky window is fully decorated, then when you have them positioned where you want them, use the fluxbox window menu to remember their positions etc ... and auto write to the ~/.fluxbox apps file. Then uncoment the line to remove the decor.
Title: Re: Conky Support, Codes and Screenshots
Post by: PackRat on July 24, 2015, 12:27:04 PM
Quote from: Snap on July 24, 2015, 06:01:18 AM
Quote./convert.lua.


overrides your $PATH environment and restricts you to the current directory

Every day learning something new. Didn't knew that about the dot slash way. Thanks, PackRat.

Edit your user $PATH line in your .profile or .bashrc (wherever you have it) so it looks something like:

PATH=$PATH:$HOME/bin:$HOME/conky:./


and you will not have to place "./" before any commands when you're in a direcotry that is not in your $PATH.
Title: Re: Conky Support, Codes and Screenshots
Post by: Snap on July 25, 2015, 07:23:51 AM
Awesome tips, Ratman. My conkys are correctly placed now.

.profile edited too.

Thanks several bunches.
Title: Re: Conky Support, Codes and Screenshots
Post by: PackRat on September 08, 2016, 12:02:43 PM
drive by posting - been using this one line conky for quite a while; may need to change it up:

(http://en.zimagez.com/miniature/scrot-shot-thu81473336051.jpg) (http://en.zimagez.com/zimage/scrot-shot-thu81473336051.php)

conky.config = {
--#############################################
-- Settings
--#############################################
background = true,
use_xft = true,
-- font = 'Source Sans Pro:semibold:size=10',
font = 'Roboto Mono:Medium:size=10',
xftalpha = 1.0,
update_interval = 1.0,
-- update_interval_on_battery = 30.0,
total_run_times = 0,

own_window = true,
own_window_colour = '#1E1D1D',
own_window_transparent = false,
own_window_type = 'dock',
-- own_window_type desktop
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
own_window_class = 'ConkyFB',
own_window_title = 'ConkyFB',
--#############################################
-- Compositing tips:
-- Conky can play strangely when used with
-- different compositors. I have found the
-- following to work well, but your mileage
-- may vary. Comment/uncomment to suit.
--#############################################
--#
own_window_argb_visual = true,
--own_window_argb_value 2

--# xcompmgr
-- own_window_argb_visual yes
-- own_window_argb_value 120

--# cairo-compmgr
--own_window_type desktop
--own_window_argb_visual yes
--#############################################

no_buffers = true,
uppercase = false,
cpu_avg_samples = 2,
override_utf8_locale = true,
short_units = true,
imlib_cache_size = 0,
pad_percents = 1,
max_user_text = 3200,
text_buffer_size = 1024,
if_up_strictness = 'address',
double_buffer = true,
minimum_width = 1600, minimum_height = 18,
maximum_width = 1600,
draw_shades = false,
draw_outline = false,
draw_borders = false,
draw_graph_borders = false,
border_inner_margin = 1,
border_outer_margin = 1,

default_color = '#DAC79C',
default_shade_color = '#000000',
default_outline_color = '#828282',
color0 = '#FFFFFF',
color1 = '#000000',
color2 = '#FF0000',-- - red
color3 = '#FFFF00',-- - yellow
color4 = '#0000FF',-- - blue
color5 = '#00FF00',-- - green
color6 = '#FFA500',-- - orange
color7 = '#00CDCD',-- - cyan3
color8 = '#FFD700',-- - gold
color9 = '#F00F16',-- - reddish

alignment = 'top_middle',
gap_x = 0,
gap_y = 0,

-- -- doesn't seem to work when docked in the slit --#
--lua_load ~/conky/transbg.lua
--lua_draw_hook_pre draw_bg 8 0 0 0 0 0x140C0B 0.10

};

conky.text = [[
${voffset 2}${goto 24}Uptime:${offset 8}${uptime_short}${offset 32}\
Core1:${offset 8}${if_match ${hwmon 2 temp 2}<=50}${color7}${else}${if_match ${hwmon 2 temp 2}<=70}${color8}${else}${if_match ${hwmon 2 temp 2}>70}${color9}${endif}${endif}${endif}${hwmon 2 temp 2}${offset 2}°C${color}${offset 32}\
Core2:${offset 8}${if_match ${hwmon 2 temp 3}<=50}${color7}${else}${if_match ${hwmon 2 temp 3}<=70}${color8}${else}${if_match ${hwmon 2 temp 3}>70}${color9}${endif}${endif}${endif}${hwmon 2 temp 3}${offset 2}°C${color}${offset 32}\
CPU:${offset 8}${if_match ${cpu}<=50}${color7}${else}${if_match ${cpu}<=70}${color8}${else}${if_match ${cpu}>70}${color9}${endif}${endif}${endif}${cpu cpu0}%${color}${offset 16}${loadavg 1}${offset 8}${loadavg 2}${offset 8}${loadavg 3}${offset 32}\
Memory:${offset 8}${if_match ${memperc}<=50}${color7}${else}${if_match ${memperc}<=70}${color8}${else}${if_match ${memperc}>70}${color9}${endif}${endif}${endif}${memperc}%${color}${offset 32}\
Network:${if_up wlp3s0}${offset 8}${wireless_bitrate wlp3s0}${endif}${offset 16}${wireless_link_qual wlp3s0}/${wireless_link_qual_max wlp3s0}${offset 16}${if_match ${wireless_link_qual_perc wlp3s0}<=30}${color9}${blink ${wireless_link_qual_perc wlp3s0}%}${color}${else}${if_match ${wireless_link_qual_perc wlp3s0}<=50}${color8}${wireless_link_qual_perc wlp3s0}%${else}${if_match ${wireless_link_qual_perc wlp3s0}>50}${color7}${wireless_link_qual_perc wlp3s0}%${endif}${endif}${endif}${color}${offset 16}${if_up wlp3s0}Up:${offset 8}${upspeedf wlp3s0}${offset 16}Down:${offset 8}${downspeedf wlp3s0}${endif}${color}\
${alignr 20}${time %A  %e  %B}${offset 12}
]];
Title: Re: Conky Support, Codes and Screenshots
Post by: DrakarNoir on December 27, 2017, 08:48:17 PM
Holiday greetings to all,

I have been away for quite some time (truth...I switched to Arch). I am hoping some of those whe were here (or perhaps refugees from the old #! days) are still here (Sector11, Wlrouf, mrPechy, et al) and perhaps some new friends, as I could use some help on a conky. As some of you may remember, I am not a programmer. I understand just enough code to get into trouble!

This is what the finished conky is to look like (this is actually two conky running one atop the other):

(https://thumbs2.imgbox.com/68/f3/fGgxcfHj_t.png) (http://imgbox.com/fGgxcfHj)

What I wish to do is combine the two conky and the subsequent three lua scripts into one conky, one lua.

The main conky (clock face) (https://www.dropbox.com/s/0lga1ew69ti4l4s/clock.zip?dl=0)

The secondary (clock hands) conky (https://www.dropbox.com/s/vh6mx7noaeymv7z/cronograph_lgw.zip?dl=0)

TIA

-DrakarNoir
Title: Re: Conky Support, Codes and Screenshots
Post by: PackRat on December 29, 2017, 02:38:00 AM
Quote from: DrakarNoir on December 27, 2017, 08:48:17 PM
(or perhaps refugees from the old #! days) are still here (Sector11, Wlrouf, mrPechy, et al) and perhaps some new friends, a

TIA

-DrakarNoir

Most of them are here.... (https://forums.bunsenlabs.org/viewtopic.php?id=512)

You'll have better luck asking there; I took a look at the conkyrc files; easy enough to get the path information changed and tweak the x and y offsets so the clock hands are on the clock.

As is, run the clock face conky first, then the clock hands so the hands are on top of the face. Combining those two conkyrc files so the hands lua script runs after the clock face lua scripts is beyond my expertise. Getting it all together in one conkyrc and one lua script may require some serious effort.
Title: Re: Conky Support, Codes and Screenshots
Post by: DrakarNoir on December 30, 2017, 06:01:45 PM
^ Thanks!
Title: Re: Conky Support, Codes and Screenshots
Post by: PackRat on January 19, 2018, 02:37:02 AM
Revamped the default conky for laptop; battery blinks when low - 15% - (needs acpi for the battery state):

(http://en.zimagez.com/miniature/vsidojanconky.png) (http://en.zimagez.com/zimage/vsidojanconky.php)

conky.config = {
--#############################################
-- Settings
--#############################################
background = true,
use_xft = true,
font = 'Ubuntu:regular:size=10',
xftalpha = 1.0,
update_interval = 1.0,
-- update_interval_on_battery = 30.0,
total_run_times = 0,

own_window = true,
own_window_colour = '#141414',
own_window_transparent = true,
-- own_window_type = 'dock',
own_window_type = 'desktop' ,
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
own_window_class = 'ConkyFB',
own_window_title = 'ConkyFB',
--#############################################
-- Compositing tips:
-- Conky can play strangely when used with
-- different compositors. I have found the
-- following to work well, but your mileage
-- may vary. Comment/uncomment to suit.
--#############################################
--#
-- own_window_argb_visual = true,
-- own_window_argb_value = 2,

--# xcompmgr
-- own_window_argb_visual yes
-- own_window_argb_value 120

--# cairo-compmgr
--own_window_type desktop
--own_window_argb_visual yes
--#############################################

no_buffers = true,
uppercase = true,
cpu_avg_samples = 2,
override_utf8_locale = true,
short_units = true,
imlib_cache_size = 0,
pad_percents = 1,
max_user_text = 3200,
text_buffer_size = 1024,
if_up_strictness = 'address',
double_buffer = true,
draw_shades = false,
draw_outline = false,
draw_borders = false,
draw_graph_borders = false,
border_inner_margin = 1,
border_outer_margin = 1,

default_color = '#D1BF64',
default_shade_color = '#000000',
default_outline_color = '#828282',
color0 = '#FFFFFF',
color1 = '#000000',
color2 = '#73AEB4',-- - blue titles
color3 = '#FFFF00',-- - yellow
color4 = '#0000FF',-- - blue
color5 = '#00FF00',-- - green
color6 = '#FFA500',-- - orange
color7 = '#D1BF64',-- - cyan3
color8 = '#DAA520',-- - gold
color9 = '#F00A11',-- - reddish

minimum_width = 256, minimum_height = 0,
maximum_width = 256,
alignment = 'top_left',
gap_x = 12,
gap_y = 12,

};

conky.text = [[
${image $HOME/images/vsidoorb_blk.png -s 48x48 -p 1,-1} \
${voffset 12}${goto 60}${color2}Kernel:${goto 128}${color}${kernel}
${voffset 16}${goto 12}${color2}Uptime:${goto 128}${color}${uptime_short}
${voffset 12}${goto 12}${color2}CPU:${goto 128}${if_match ${cpu}<=50}${color7}${else}${if_match ${cpu}<=70}${color8}${else}${if_match ${cpu}>70}${color9}${endif}${endif}${endif}${cpu cpu0}%${color}
${voffset 6}${goto 128}${loadavg 1}${offset 10}${loadavg 2}${offset 10}${loadavg 3}
${voffset 12}${goto 12}${color2}RAM:${goto 128}${if_match ${memperc}<=50}${color7}${else}${if_match ${memperc}<=70}${color8}${else}${if_match ${memperc}>70}${color9}${endif}${endif}${endif}${memperc}%${color}
${voffset 12}${goto 12}${color2}Batt:${color}${goto 128}${if_match ${battery_percent BAT0}<=15}${blink ${battery_percent BAT0}%}${else}${battery_percent BAT0}%${endif}${offset 12}${execpi 60 acpi | awk '/Battery 0/ {print $3}' | cut -c1-4}
${voffset 12}${goto 12}${color2}Up:${color}${goto 128}${upspeedgraph wlan0 16,112 666666 ff0000}
${voffset 16}${goto 12}${color2}Down:${color}${goto 128}${downspeedgraph wlan0 16,112 000000 00ff00}
]];
Title: Re: Conky Support, Codes and Screenshots
Post by: PackRat on March 10, 2018, 05:48:12 PM
one line conky -

(https://cdn.scrot.moe/images/2018/03/10/conkyimage.th.png) (https://www.scrot.moe/image/6Q3np)

conky.config = {
--#############################################
-- Settings
--#############################################
background = true,
use_xft = true,
-- font = 'Office Code Pro:Medium:size=10',
-- font = 'Ubuntu:Medium:size=10',
font = 'Inconsolata LGC:regular:size=10',
xftalpha = 1.0,
update_interval = 1.0,
update_interval_on_battery = 30.0,
total_run_times = 0,

own_window = true,
own_window_colour = '#070707',
own_window_transparent = true,
    own_window_type = 'override',
--    own_window_type = 'dock',
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
own_window_class = 'ConkyHoriz',
own_window_title = 'ConkyHoriz',
--#############################################
-- Compositing tips:
-- Conky can play strangely when used with
-- different compositors. I have found the
-- following to work well, but your mileage
-- may vary. Comment/uncomment to suit.
--#############################################

-- own_window_argb_visual = true,
--own_window_argb_value 2

--#############################################

no_buffers = true,
uppercase = true,
cpu_avg_samples = 2,
override_utf8_locale = true,
short_units = true,
imlib_cache_size = 0,
pad_percents = 1,
-- max_specials = '2048',
max_user_text = 3200,
text_buffer_size = 1024,
no_buffers = true,
if_up_strictness = 'address',
double_buffer = true,
minimum_width = 1366, minimum_height = 0,
maximum_width = 1366,
draw_shades = false,
draw_outline = false,
draw_borders = false,
draw_graph_borders = false,
border_inner_margin = 1,
border_outer_margin = 1,

default_color = '#DAC79C',
default_shade_color = '#000000',
default_outline_color = '#828282',
color0 = '#FFFFFF',
color1 = '#000000',
color2 = '#FF0000',-- - red
color3 = '#FFFF00',-- - yellow
color4 = '#0000FF',-- - blue
color5 = '#00FF00',-- - green
color6 = '#FFA500',-- - orange
color7 = '#00CDCD',-- - cyan3
color8 = '#FFD700',-- - gold
color9 = '#F00F16',-- - reddish

alignment = 'top_middle',
gap_x = 0,
gap_y = 0,

-- -- doesn't seem to work when docked in the slit --#
lua_load = '~/conky/transbg.lua',
lua_draw_hook_pre = 'draw_bg 4 0 0 0 0 0x070707 0.58',

-- Mem:${offset 8}${if_match ${memperc}<=50}${color7}${else}${if_match ${memperc}<=70}${color8}${else}${if_match ${memperc}>70}${color9}${endif}${endif}${endif}${memperc}%${color}${offset 32}\

};

conky.text = [[
${goto 12}Uptime:${offset 8}${uptime_short} \
${goto 264}Core0:${offset 8}${if_match ${hwmon 0 temp 2}<=50}${color7}${else}${if_match ${hwmon 0 temp 2}<=70}${color8}${else}${if_match ${hwmon 0 temp 2}>70}${color9}${endif}${endif}${endif}${hwmon 0 temp 2}${offset 2}°C${color}${offset 16} \
Core1:${offset 8}${if_match ${hwmon 0 temp 4}<=50}${color7}${else}${if_match ${hwmon 0 temp 4}<=70}${color8}${else}${if_match ${hwmon 0 temp 4}>70}${color9}${endif}${endif}${endif}${hwmon 0 temp 4}${offset 2}°C${color}${offset 16} \
CPU:${offset 8}${if_match ${cpu}<=50}${color7}${else}${if_match ${cpu}<=70}${color8}${else}${if_match ${cpu}>70}${color9}${endif}${endif}${endif}${cpu cpu0}%${color}${offset 16}${loadavg 1}${offset 8}${loadavg 2}${offset 8}${loadavg 3}${offset 16} \
Batt:${offset 8}${execpi 60 acpi -b | awk '/Battery 0/ {print $3}' | cut -c1-4}${offset 8}${if_match ${battery_percent BAT0}<=15}${color9}${blink ${battery_percent BAT0}%}${color}${else}${if_match ${battery_percent BAT0}<=33}${color8}${battery_percent BAT0}%${else}${if_match ${battery_percent BAT0}>33}${color7}${battery_percent BAT0}%${endif}${endif}${endif}${color}${offset 16} \
Net:${if_up wlo1}${offset 8}${wireless_bitrate wlo1}${endif}${offset 16}${if_match ${wireless_link_qual_perc wlo1}<=30}${color9}${blink ${wireless_link_qual_perc wlo1}%}${color}${else}${if_match ${wireless_link_qual_perc wlo1}<=50}${color8}${wireless_link_qual_perc wlo1}%${else}${if_match ${wireless_link_qual_perc wlo1}>50}${color7}${wireless_link_qual_perc wlo1}%${endif}${endif}${endif}${color}${offset 16}${if_up wlo1}U:${offset 8}${upspeedf wlo1}${offset 24}D:${offset 8}${downspeedf wlo1}${endif}${color}\
${alignr 12}${time %a %e %b}
]];