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:

The conky on the left comes to you because of mrpeachy's hard work with LUA.
Code: [Select]
# To use #! in a conky use: ${exec echo '#!'}
# ${font DS\-Digital:bold:size=24}
# OS: ${pre_exec lsb_release -d | cut -c14-50}
# killall conky && conky -c /media/5/Conky/Chronograph_mrpeachy.conky &
# Thank you - mrpeachy

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

# 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 no # Options: yes or no

### 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 340 700  ##420 420   ## width, height
maximum_width 340     ##420       ## 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 Monofur:bold:size=9
#xftfont CorporateMonoExtraBold:size=9
#xftfont White Rabbit:size=9

# 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 ## CCAA7A # chronograph-mrpeachy
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 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

#   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 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}
##
#
################### chronograph-mrpeachy #######################################
#lua_load /media/5/Conky/LUA/chronograph-mrpeachy.lua
lua_load /media/5/Conky/LUA/chronograph-mrpeachy_24.lua
lua_draw_hook_post main
#lua_draw_hook_pre main

### v9000 Weather ############################################################
lua_load ~/v9000/v9000.lua
lua_draw_hook_pre weather
#lua_draw_hook_post weather
lua_load /media/5/Conky/LUA/crono_mrp.template.lua
############################################################ v9000 Weather ###
### mount.lua ################################################################
lua_load /media/5/Conky/LUA/mounted.lua
### mount.lua ### INSTRUCTIONS ##############################################
#load script
#lua_load ~/path_to/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


# ${color6}${lua mount 7 fsys 9}${goto 100}${color8}${lua mount 7 size}${goto 150}${color7}${lua mount 7 free}${goto 200}${color1}${lua mount 7 use%}${goto 260}${color}${lua mount 7 mount}
# ${color6}${lua mount 8 fsys 9}${goto 100}${color8}${lua mount 8 size}${goto 150}${color7}${lua mount 8 free}${goto 200}${color1}${lua mount 8 use%}${goto 260}${color}${lua mount 8 mount}

################################################################ mount.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
# ${lua conky_draw_bg 20 0 0 0 0 0x000000 0.5}
TEXT
${lua get_mounted_data 3}${lua conky_draw_bg 20 0 0 0 0 0x000000 0.5}












































${color1}${cpubar cpu4 1,340}${color}
${color3}Hosted by: ${color}${nodename}${goto 160}${color3}for the past: ${color}${uptime_short}
${alignc}${color3}Kernel: ${color}${kernel}
${alignc}${color3}CPU Usage ${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}${
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:
Code: [Select]
~/.conkyrc and that will be the conky that
Code: [Select]
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
Code: [Select]
#!/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:
Code: [Select]
(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:
Code: [Select]
## Start conkys
(sleep 2s && /media/5/Conky/OBMenuS/ssc.sh) &
exit

You can assign it to a tint2 clock click function:
Code: [Select]
clock_rclick_command = /media/5/Conky/OBMenuS/ssc.sh  ## start/stop all my conkys
you can put an entry in OpenBox:
Code: [Select]
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:

Code: [Select]
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pagerA 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.
Code: [Select]
own_window_hints undecorated,below,skip_taskbar,skip_pager
Next ... Install wmctrl
Code: [Select]
sudo apt-get install wmctrl
Quote
Wmctrl 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:

Code: [Select]
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.
Code: [Select]
#!/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
Code: [Select]
#!/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
Code: [Select]
#!/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:
Code: [Select]
label: Dark
Execute ~/bin/dark

Code: [Select]
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&amp;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|), français (http://lua.gts-stolberg.de/fr/index.php|), español (http://lua.gts-stolberg.de/es/index.php|), 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&amp;p=1) (forum Ubuntu - closed)
(2) Conky : Postez vos conkyrc ou certaines parties intéressantes (http://forum.ubuntu-fr.org/viewtopic.php?id=285039&amp;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&amp;highlight=Conky)

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

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:
Code: [Select]
-- horizontal calc added to each days "X" values
dataxp=85 -- ???+(dataxp*1)

change that one number:
Code: [Select]
-- 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:
Code: [Select]
# 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
Code: [Select]
--[[
 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
Code: [Select]
# 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:
Code: [Select]
# 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
Code: [Select]
#!/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:
Code: [Select]
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
Code: [Select]
# 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
Code: [Select]
#!/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
Code: [Select]
# 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).
Code: [Select]
--[[
 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:
Code: [Select]
# 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.
Code: [Select]
--[[ 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
Code: [Select]
--[[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)

Code: [Select]
##### 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:
Code: [Select]
${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.
Code: [Select]
##### 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:
Code: [Select]
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:
Code: [Select]
# 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:
Code: [Select]
# 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
Code: [Select]
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
Code: [Select]
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
Code: [Select]
# 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
Code: [Select]
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
Code: [Select]
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
Code: [Select]
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
Code: [Select]
# -- 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
Code: [Select]
--==============================================================================
--                            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
Code: [Select]
--[[
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
Code: [Select]
--[[ 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: Sector11
That'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: VastOne
Gotta 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
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)
Code: [Select]
--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)
Code: [Select]
##############################################
#  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)
Code: [Select]
--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
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
: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
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
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........

Code: [Select]
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
Code: [Select]
{d="arc_c",q=4,r=10,degs=90},is the top left corner of that box.

Also
Code: [Select]
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
Code: [Select]
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
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.
Code: [Select]
# 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
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
??? ??? 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
Code: [Select]
--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..
Code: [Select]
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..
Code: [Select]
--######################################################################
--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
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
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
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.
Code: [Select]
${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
(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

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:
Code: [Select]
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
Code: [Select]
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
Code: [Select]
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
Code: [Select]
--[[ 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)
Code: [Select]
--[[ 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
Code: [Select]
# 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)
Code: [Select]
--[[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.

Code: [Select]
${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
Code: [Select]
#!/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
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;
Code: [Select]
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
Code: [Select]
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
Code: [Select]
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" Cleaver
Gee 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: falldown
I 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
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:

Code: [Select]
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)

Code: [Select]
# 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.
Code: [Select]
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
Code: [Select]
### 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

Code: [Select]
--[[ 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:

And if you are interested, the conky:
Code: [Select]
background no
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
# own_window_colour black
own_window_title Conkymain
double_buffer yes
use_spacer left
override_utf8_locale yes
use_xft yes
xftfont Monofur:bold:size=11
xftalpha 2.5
update_interval 1.0
uppercase no  # set to yes if you want all text to be in uppercase
stippled_borders 0
# border_inner_margin 0
# border_outer_margin 0
border_width 0
default_outline_color black
default_shade_color black
draw_borders no
draw_outline no #yes  # amplifies text if yes
draw_shades yes  # shadecolor black

default_color DCDCDC #Gainsboro
color0 7FFFD4 #Aquamarine
color1 00CED1 #DarkTurquoise #FFA07A LightSalmon #00FFFF Cyan
color2 DEB887 #BurlyWood
color3 7FFF00 #Chartreuse
color4 778899 #LightSlateGrey
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 48D1CC #MediumTurquoise
color8 FFFF00 #Yellow
color9 CD5C5C #IndianRed FF0000 #Red

alignment tr  # Aligned position on screen: tl, tr, tm, bl, br, bm, ml, mr
gap_x 10
gap_y 10
text_buffer_size 512 # use 1024 for the forecast
no_buffers yes  # Subtract file system buffers from used memory?
short_units yes
pad_percents 2

#max_specials 512  ## new
#max_user_text 20000  ## new
minimum_size 260 0
maximum_width 260

TEXT
${font Woodbadge:size=15}${color2}Timeline:${color}${font WW Digital:size=15} ${uptime}${font}
${color7}${cpubar cpu0 1,255}${color}
${goto 115}${font LCDMono2:bold:size=15}:${time %S}${goto 35}${font LCDMono2:size=56}${time %R}${font}
${color7}${cpubar cpu0 1,255}${color}
${font LCDMono2:size=18}${goto 5}SU MO  ${color6}${time %b %y}${color}  FR SA
${goto 5}${execpi 3600 CPS=`date +%-d`; cal -h | sed '2d' | sed -e '1d' -e 's/\<'"$CPS"'\>/${color6}&${color}/'}${font}
${color7}${cpubar cpu0 1,255}${color}
${font Woodbadge:size=15}${color2}Kernel:${color}${font}
${alignc}${kernel}${font monofur:pixelsize=16}
${font Woodbadge:size=15}${color2}CPU Load:${color}${font}
${goto 20}${color3}CPU ${color}%${goto 84}${color3}1 ${color}${cpu cpu1}\
${goto 148}${color3}2 ${color}${cpu cpu2}\
${goto 212}${color3}3 ${color}${cpu cpu3}\
${goto 276}${color3}Avg ${color}${cpu cpu0}${font monofur:pixelsize=16}
${font Woodbadge:size=15}${color2}Temperatures:${color}${font}
${color3}CPU ${color}${platform f71882fg.2560 temp 1}°\
  ${color3}SDA ${color}${execi 15 hddtemp -n /dev/sda}°\
  ${color3}MB ${color}${platform f71882fg.2560 temp 2}°\
  ${color3}GPU ${color}${nvidia temp}°${color}${font monofur:pixelsize=16}
${font Woodbadge:size=15}${color2}Speeds:${font}
${color3}CPU ${color}${freq_g}GHz${goto 100}${color3}GPU ${color}${nvidia gpufreq}MHz${alignr 5}${color3}MEM ${color}${nvidia memfreq}MHz${font monofur:pixelsize=16}
${font Woodbadge:size=15}${color2}Processes:${color}${font} ${running_processes} of${processes}${color}
${color3}Load:${goto 70}${color}${loadavg 1}${goto 140}${loadavg 2}${alignr 5}${loadavg 3}${color}${font monofur:pixelsize=16}
${font Woodbadge:size=15}${color2}RAM:${font}  ${color}${memmax}${goto 140}${color3}Used ${color}${mem}${alignr 5}${memperc}%
${color3}Buffered: ${color}${buffers}${alignr 5}${color3}Cached:${color} ${cached}${font monofur:pixelsize=16}
${font Woodbadge:size=15}${color2}SWAP:${font}  ${color}${swapmax}${goto 140}${color3}Used ${color}${swap}${alignr 5}${swapperc}%${font monofur:pixelsize=16}
${font Woodbadge:size=15}${color2}HDD SDA:${color}${font}
     Total${goto 100}Used${goto 195}Free
${color}Root ${color7}${fs_size /}${goto 100}${color9}${fs_used /} ${fs_used_perc /}%${goto 195}${color3}${fs_free /} ${fs_free_perc /}%
${color}Home ${color7}${fs_size /home}${goto 100}${color9}${fs_used /home} ${fs_used_perc /home}%${goto 195}${color3}${fs_free /home} ${fs_free_perc /home}%
 ${color}M/5 ${color7}${fs_size /media/5}${goto 100}${color9}${fs_used /media/5} ${fs_used_perc /media/5}%${goto 195}${color3}${fs_free /media/5} ${fs_free_perc /media/5}%
${color}Swap ${color7}${swapmax}${goto 100}${color9}${swap} ${swapperc}%${goto 195}${color3}${swapfree}
${color7}${cpubar cpu0 1,255}${color}
${font Woodbadge:size=15}${color2}NET:${font} ${color}In ${tcp_portmon 1 32767 count}${goto 125}Out ${tcp_portmon 32768 61000 count}${alignr 5}Total: ${tcp_portmon 1 65535 count}${font monofur:pixelsize=16}
${font}${alignc}${color3}Dn     ${totaldown eth0}     ${downspeed eth0} k/s
${alignc}${color9}Up     ${totalup eth0}     ${upspeed eth0} k/s${color}${font monofur:pixelsize=16}
${font Woodbadge:size=15}${color2}VNSTATS:${font}
${color}       Down      Up         Total${font monofur:pixelsize=16}
${font}${color}${time %b %y} ${color3}${execi 300 vnstat -m | grep "`date +"%b %y"`" | awk '{print $3 $4}'}${goto 125}${color9}${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}'}${color3} ${execi 300 vnstat | grep "today" | awk '{print $2 $3}'}${goto 125}${color9}${execi 300 vnstat | grep "today" | awk '{print $5 $6}'}${goto 200}${color}${execi 300 vnstat | grep "today" | awk '{print $8 $9}'}
${color}${exec date --date="-1 day" | awk '{print $3" "$2}'}${color3} ${execi 300 vnstat | grep "yesterday" | awk '{print $2 $3}'}${goto 125}${color9}${execi 300 vnstat | grep "yesterday" | awk '{print $5 $6}'}${goto 200}${color}${execi 300 vnstat | grep "yesterday" | awk '{print $8 $9}'}
${color}Last 7 ${color3}${execi 300 vnstat -w | grep "last 7 days" | awk '{print $4 $5}'}${goto 125}${color9}${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}'}

Still a work in progress - Like that SWAP above HDD SDA has to come out.  ;D
Note - I got rid of the 'orange' for a more realistic colour for Woodbadge.
falldown's wallpaper is a natural for this conky.
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;

Code: [Select]
## 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;

Code: [Select]
--[[ 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;

Code: [Select]
######################
# - 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

Code: [Select]
--[[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

Code: [Select]
--[[ 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

Code: [Select]
#!/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
Code: [Select]
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
Code: [Select]
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
Code: [Select]
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
Code: [Select]
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
Code: [Select]
--[[ 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
Code: [Select]
# 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
Code: [Select]
--==============================================================================
--  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
Code: [Select]
#!/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
Code: [Select]
--[[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...
Quote
vrkalak 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
Code: [Select]
# 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:

but they don't seem to be working.

Any help would be gratefully accepted.   8)
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:
Code: [Select]
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;

Code: [Select]
# 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)

Code: [Select]
--[[
 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
Code: [Select]
--[[
 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

Code: [Select]
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
Code: [Select]
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
Code: [Select]
#!/bin/bash
gksu /usr/sbin/pm-suspend

python bits
lowbat
Code: [Select]
#!/usr/bin/env python2
import pynotify
pynotify.init("foo")
pynotify.Notification("Power warning", "Battery capacity is low.", "battery-low").show()

criticalbat
Code: [Select]
#!/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
Code: [Select]
#!/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" />'