VSIDO Community

VSIDO Support => Conky => Topic started by: Sector11 on January 14, 2013, 06:51:03 PM

Title: Conky Tips and Tricks
Post by: Sector11 on January 14, 2013, 06:51:03 PM
Teo's Scripts in a nutshell

Teo's scripts use 4 different weather sites (http://crunchbang.org/forums/viewtopic.php?id=19235)

Some for USA users, others for International Users

Accuweather's pages are different for US and International users.  Which strikes me as halarious because for me The USA has always held "International" status.  Yea yea, I know Accuweather is a US site!

However, to continue

1a)Accuweather - INTERNATIONAL USERS -  conditions: font
1a)Accuweather - ALL USERS -  conditions: font
Title: Re: Teo's Scripts in a nutshell
Post by: TeoBigusGeekus on January 14, 2013, 10:10:41 PM
Teo's scripts suck!!!
Title: Re: Teo's Scripts in a nutshell
Post by: lwfitz on January 14, 2013, 10:16:47 PM
Quote from: TeoBigusGeekus on January 14, 2013, 10:10:41 PM
Teo's scripts suck!!!

HAHA! From the man himself!
Title: Re: Teo's Scripts in a nutshell
Post by: jedi on January 14, 2013, 11:30:37 PM
Quote from: lwfitz on January 14, 2013, 10:16:47 PM
Quote from: TeoBigusGeekus on January 14, 2013, 10:10:41 PM
Teo's scripts suck!!!

No way they suck!  Awesome weather scripts Teo!!!!
Title: Re: Teo's Scripts in a nutshell
Post by: VastOne on January 15, 2013, 12:49:00 AM
@ Teo

Well done mate!   ;D
Title: Re: Teo's Scripts in a nutshell
Post by: Sector11 on January 15, 2013, 01:23:46 AM
See I have to agree with Teo!  In fact there is no doubt in my mine they suck!

They suck the weather info right outta the web and splatter all over your conky ... kinda like cod liver oil and .... What's that?

QuoteCoffee's ready ...
... coming

... Bye!
Title: Re: Teo's Scripts in a nutshell
Post by: TeoBigusGeekus on January 15, 2013, 11:37:38 AM
Hi everyone! Thanks for the honour Sector11.
Title: Re: Teo's Scripts in a nutshell
Post by: Sector11 on January 15, 2013, 01:50:29 PM
No Teo, the honour is mine!

Your scripts:
Not all scripts can say that!
Title: Re: Teo's Scripts in a nutshell
Post by: Sector11 on January 17, 2013, 06:08:59 PM
Yesterday I helped folti over on the Ubuntu forums with two conkys he wanted to merge. One as he describe it is an:htc-like weather report that used conkyForecast.  The post if you care to see the original codes (http://ubuntuforums.org/showpost.php?p=12458017&postcount=21459).  OPINION ALERT! The code is .. ummm .. less than good  So, since I had an I'm in, I'm out, I'm in, I'm out, kinda day I worked on it ... below is the result of what I did.

I think it's pretty nice that conkyForecast is still working despite what one person said about all of kaivalagi's scripts (http://ubuntuforums.org/showthread.php?t=969521), and specifically referring to conkyForecast, "having had their day, are now dead"

After doing that, I though I'll one of Teo's scripts to do the same.  Doruletz beat me to it. (http://crunchbang.org/forums/viewtopic.php?pid=283998#p283998)  I think the clock is popular!

Quote from: foltiwhen merged, without arguments for weather report, conkyrc looks like this:

It is something that can be done ... but spacing (width) needs working on.

I have to go out now ... will come up with a better solution later.

                      conky In progress:                EDIT! the finished conky
                      (http://t.imgbox.com/aczLyXGV.jpg) (http://imgbox.com/aczLyXGV)            (http://t.imgbox.com/adrbtBCj.jpg) (http://imgbox.com/adrbtBCj)

One change I made was to put the cpugraph over the "Total CPU" bar, that why it has a white border.  The graph is red the bar is blue.
The same can be done for the CPU bars 1 and 2, maker a graph for them in the same way.


If you don't like it change:
Total CPU:
${cpu cpu0}%${goto 40}${color 597DB2}${cpubar cpu0}${color}${goto 40}${cpugraph cpu0 -t 20,210 FF0000 FFFF33}

to
Total CPU:
${cpu cpu0}%${goto 40}${color 597DB2}${cpubar cpu0}${color}
${goto 40}${cpugraph cpu0 -t 20,210 FF0000 FFFF33}



The conky: Note the path that will need changing:
/media/5/conky/folti/folti_m.conky
# killall conky && conky -c /media/5/conky/folti/folti_m.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_class Conky
own_window_title folti

# 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 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 ## width, height
#maximum_width 270 ## width

minimum_size 250 0 #310 700 #310 ## width, height
maximum_width 250 #310 ## width

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

alignment tr
####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont monofur:bold:size=12
#xftfont Helvetica LT Std:size=8
#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 2048

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

top_name_width 8
short_units yes
pad_percents 2

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

#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
${voffset 30}${font Helvetica LT Std:style=Condensed:size=60}${color 434343}${goto 40}${time %H}${goto 145}${color 434343}${time %M}${font Helvetica LT Std Condensed:size=15}${color 808080}${goto 230}${time %S}
${voffset 55}${color whitesmoke}${font Helvetica LT Std:size=8}${alignc}${time %A},${time %e} ${time %B} ${time %G}\
${image /media/5/conky/folti/images/base.png -p 12,30 -s 238x140}\
${image /media/5/conky/folti/images/base.png -p 12,190 -s 238x40}\
${image /media/5/conky/folti/images/flip_bg.png -p 30,10 -s 100x110}\
${image /media/5/conky/folti/images/flip_bg.png -p 130,10 -s 100x110}\
${execpi 1800 conkyForecast --location=HRXX0005 --template=/media/5/conky/folti/vreme.template}



${color CC9900}SYSTEM ${color}${sysname} on ${machine} ${color CC9900}${hr 2}
${color}${nodename}    ${kernel}

${color CC9900}CPU ${hr 2}${color}
  AMD Athlon(tm) 64 Socket 939
  X2 Dual Core CPU 4200+

Total CPU:
${cpu cpu0}%${goto 40}${color 597DB2}${cpubar cpu0}${color}${goto 40}${cpugraph cpu0 -t 20,210 FF0000 FFFF33}
Core 1: ${freq 1} MHz        Temprature: ${color} ${exec sensors|grep 'Core0'|awk '{print $3}'}
${cpu cpu1}%${goto 40}${color 597DB2}${cpubar cpu1}${color}
Core 2: ${freq 2} MHz        Temprature: ${color} ${exec sensors|grep 'Core1'|awk '{print $3}'}
${cpu cpu2}%${goto 40}${color 597DB2}${cpubar cpu2}${color}

NAME${goto 90}PID${goto 150}CPU%${goto 215}MEM%
${color CCFFFF}${top name 1}${goto 90}${top pid 1}${goto 150}${top cpu 1}${goto 215}${top mem 1}
${top name 2}${goto 90}${top pid 2}${goto 150}${top cpu 2}${goto 215}${top mem 2}
${top name 3}${goto 90}${top pid 3}${goto 150}${top cpu 3}${goto 215}${top mem 3}
${top name 4}${goto 90}${top pid 4}${goto 150}${top cpu 4}${goto 215}${top mem 4}${color}

${color CC9900}MEMORY ${hr 2}${color}
RAM Used: ${mem}${goto 120}RAM Free: ${memfree}/ ${memmax}
RAM: ${memperc}%${goto 75}${color FF6600}${membar 6,175}${color}
Swap: ${swapperc}%${goto 75}${color FF6600}${swapbar 6,175}${color}

${color CC9900}DISK ${hr 2}${color}
sdc5 ${fs_type} (Root): ${fs_free_perc /}%${goto 132}${color FFFF33}${fs_bar 6,118 /}${color}
sdc1 NTFS (Data): ${fs_free_perc /media/data}%${goto 132}${color FFFF33}${fs_bar 6,118 /media/data}${color}

${color CC9900}NETWORK (${addr eth1}) ${hr 2}${color}
Down: ${color}${downspeed eth1} k/s ${alignr 10}Up: ${upspeed eth1} k/s
${downspeedgraph eth1 25,100 000000 ff0000}${alignr 10}${upspeedgraph eth1
25,100 000000 00ff00}${color}
Total: ${totaldown eth1}${alignr 10}Total: ${totalup eth1}
Inbound: ${tcp_portmon 1 32767 count}${goto 105}Outbound: ${tcp_portmon 32768 61000 count}${alignr 10}Total: ${tcp_portmon 1 65535 count}
${color CC9900}LOGGING ${hr 2}${color}
${color 339900}${execi 30 tail -n3 /var/log/messages | fold -s -w48}${color}


And the /media/5/conky/folti/vreme.template - path will need changing as well:

${voffset -45}${goto 22}${font Helvetica LT Std:size=8}${color 909090}[--datatype=CN]
${font Helvetica LT Std:size=8}${color whitesmoke}${goto 24}[--datatype=CT]${voffset -10}${goto 200}${font Helvetica LT Std:size=25}${color d4d4d4}[--datatype=HT --hideunits]${font}




${font Helvetica LT Std:size=8}${color white}${goto 25}[--datatype=HT --hideunits --startday=1]/${color 707070}[--datatype=LT --hideunits --startday=1]${color white}${goto 70}[--datatype=HT --hideunits --startday=2]/${color 707070}[--datatype=LT --hideunits --startday=2]${color white}${goto 115}[--datatype=HT --hideunits --startday=3]/${color 707070}[--datatype=LT --hideunits --startday=3]${color white}${goto 160}[--datatype=HT --hideunits --startday=4]/${color 707070}[--datatype=LT --hideunits --startday=4]
${color 707070}${goto 25}[--datatype=DW --shortweekday --startday=1]${color 707070}${goto 70}[--datatype=DW --shortweekday --startday=2]${color 707070}${goto 115}[--datatype=DW --shortweekday --startday=3]${color 707070}${goto 160}[--datatype=DW --shortweekday --startday=4]
${voffset -10}${color 707070}${goto 205}[--datatype=DW --shortweekday --startday=5]
${voffset -23}${color white}${goto 205}[--datatype=HT --hideunits --startday=5]/${color 707070}[--datatype=LT --hideunits --startday=5]${image [--datatype=WI] -p 80,70 -s 113x113}${image [--datatype=WI --startday=1] -p 20,175 -s 43x43}${image [--datatype=WI --startday=2] -p 65,175 -s 43x43}${image [--datatype=WI --startday=3] -p 113,175 -s 43x43}${image [--datatype=WI --startday=4] -p 158,175 -s 43x43}${image [--datatype=WI --startday=5] -p 200,175 -s 43x43}


Title: Re: Teo's Scripts in a nutshell
Post by: lwfitz on January 18, 2013, 02:41:21 AM
  ???  BEAUTIFUL!

I love when theres more code to ste........... do research with  ;D

Title: Re: Teo's Scripts in a nutshell
Post by: jedi on January 18, 2013, 06:08:27 AM
IMO, kaivalagi's conkyForecast will hopefully never die.  Whoever said that wasn't thinking it through.  All the different weather scripts out there are good for different groups and skill levels of users!  I learned a lot with conkyForecast, and still switch back and forth between the different scripts available for weather.  ATM I'm using arclance's weather, but tomorrow, it may be back to conkyForecast, or Teo's for that matter.  Or mrpeachy's v9000 which is also exemplary!  Long live conkyForecast!!!
Title: Re: Teo's Scripts in a nutshell
Post by: Sector11 on January 18, 2013, 06:31:10 PM
Quote from: jedi on January 18, 2013, 06:08:27 AM
IMO, kaivalagi's conkyForecast will hopefully never die.  Whoever said that wasn't thinking it through.

The guy that said that is not around anymore due to his "bad attitude".  And you are right. There are a lot more scripts out there than we know.  They come in forms that are simple to use up to the you need a Master Degree in Programming to do anything with them.

conkyForecast is like a third hand for me, I've used it since the beginning.
Teo's scripts are easy to use and there are various sites you can use.
mrperachy's v9000 require a bit more thinking but once done looks a lot like conkyForecast

I'll bet I could take my current conky with mrpeachy's v9000 script and make one very similar with Teo's script and in my sleep do one for conkyForecast.

The beauty of cF is it's use of a template - one "execpi" hets it all, v9000 does the same, but Teo's require a call for each but of info ... it is however reading from the HDD as it gets everything from the net with one call, set's it up and then reads from local files.  VERY light on resources as well.

cF in a terminal ---- I love it:
Today Fri, 18 Jan 2013                  Today Continues
----------------------------------      ----------------------------------
C 26°   ± 28°   Hum 78%  CoR 0%         H N/A   L 17°   SR 06:00 SS 20:08
Clear                                   Bar 1014.9mb steady     Day 14:08

Sat, 19 Jan 2013                        Sun, 20 Jan 2013
----------------------------------      ----------------------------------
H 27°   L 16°   Hum 55%  CoR 0%         H 27°   L 19°   Hum 53%  CoR 0%
Partly Cloudy                           Partly Cloudy

Mon, 21 Jan 2013                        Tue, 22 Jan 2013
----------------------------------      ----------------------------------
H 28°   L 21°   Hum 53%  CoR  0%        H 29°   L 21°   Hum 53%  CoR 0%
Fair                                    Partly Cloudy

Wed, 23 Jan 2013                        Thu, 24 Jan 2013
----------------------------------      ----------------------------------
H 32°   L 23°   Hum 50%  CoR  0%        H 33°   L 21°   Hum 53%  CoR 60%
Partly Cloudy                           Scattered Thunderstorms



sector11 @ sector11
18 Jan 13 | 15:26:18 ~
         $


I know I know, I mentioned it before but it's just so neat
Title: Re: Teo's Scripts in a nutshell
Post by: jedi on January 18, 2013, 07:52:33 PM
Yeah, I agree, the terminal forecast is pretty sweet.
Title: Re: Teo's Scripts in a nutshell
Post by: Sector11 on January 19, 2013, 03:55:53 AM
Sometime I have to run it twice because it's just a bit faster then my connection.  :D
Title: Re: Teo's Scripts in a nutshell
Post by: Sector11 on January 20, 2013, 07:32:14 PM
Anyone that has used conky for a while, or even once, knows there are various conky commands that use colours.  The start is found above text where we can define various defaults - if we choose - they are all optional.

Above TEXT:


colorN
    Predefine a color for use inside TEXT segments. Substitute N by a digit between 0 and 9, inclusively. When specifying the color value in hex, omit the leading hash (#).

default_color
    Default color and border color

default_outline_color
    Default outline color

default_shade_color
    Default shading color and border's shading color



NOTE: See that "omit the leading hash (#)" with colorN, it's only mentioned there, however it should be applied throughout your conky.

An example from one of my conkys:
###  Color Settings  #########################################################
draw_shades no
default_shade_color 000000 #  0   0   0   Black
draw_outline no # amplifies text if yes
default_outline_color 000000 #  0   0   0   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   DarkOrangeh
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  ###



One can also use the colour names - ie:
color5 NavajoWhite
color6 DeepSkyBlue



There is one more in the own_window section:
own_window_colour gray
NOTE: the British English spelling. This is the ONLY place where colour is spelled with British spelling (I'm a Canuck, we use it as well.)


Below TEXT
The color command to use in it's various forms is:

${color}
${colorN}
Title: Re: Teo's Scripts in a nutshell
Post by: VastOne on January 21, 2013, 12:29:19 AM
Very nice Sector11!

Well done on creating this Child Board as well

I use gpick to help me with colors when I am developing something and need to match a color exactly.  It has saved me a few times! I like gpick because it allows you to find the color with a click of a mouse outside of the application
Title: Re: Teo's Scripts in a nutshell
Post by: Sector11 on January 21, 2013, 03:13:33 PM
Oh ... gpick ... I'll have to check that out.
Thanks for the tip.
Title: Re: Teo's Scripts in a nutshell
Post by: Sector11 on January 21, 2013, 04:59:59 PM
I'd be remiss if I didn't give everyone the full story or at least a fairly good running break down of what this is and how it came about.

We can all thank GrouchyGaijin for this!

I love it when someone says "Nope, not possible" and the answer is "Oh yea, watch this!" type of thing.

This started when GrouchyGaijin asked stinkeye this question regarding the "start stop conky" script (ssc.sh (http://conky.pitstop.free.fr/wiki/index.php5?title=Start/Stop_Conky_%28en%29))

Quote from: GrouchyGaijinCool idea. Thanks for sharing. I have a question though, does the toggle script allow you to kill the conkies one at a time or is it all or nothing?
stinkeye responded:
Quote from: stinkeyeScripts been around a while. Not my idea.
All or nuttin'. Go hard or go home. ;)

A little while later GrouchyGaijin came back with:
Quote from: GrouchyGaijinFor what it is worth, I wrote a script that will find the PID of a particular conky, then kill it.

I'm sure this could be done more efficiently. But this works on my system.

#!/bin/bash
##This is something like the 5th script I've ever written ##                     
var1=$(ps xu | grep calendar-conky | grep -v grep | awk '{ print $2 }')
echo "$var1"
kill $var1


Change calendar-conky to the name of your conkyrc file.
Then, make a launcher, put it in a quick list or whatever.

arclance piped up:
Quote from: arclanceWhy not use?

pkill -f "conky.*-c.*calendar-conky"
That will kill conky process running with the "calendar-conky" .conkyrc.
It should also not kill certain text editors if you have your .conkyrc open in them.

Can you see where this is going?

After a discussion between arclance and stinkeye, about it not working with a conky in a terminal stinkeye has a version that will work with his demo conky in a terminal:
Quote from: stinkeyeCould't find a solution so I added a sed command to change
background yes
to
background no
in any pasted in configs.

#!/bin/bash
## click to start, click to stop

if pgrep -f "conky -c /home/glen/conky/configs/demo-conkyrc"
then
pkill -xf "conky -c /home/glen/conky/configs/demo-conkyrc"
else
[B]sed -i 's/background yes/background no/g' /home/glen/conky/configs/demo-conkyrc &[/B]
gnome-terminal -e "conky -c /home/glen/conky/configs/demo-conkyrc"
fi

From GrouchyGaijin's "oh yea, watch this post!" I started playing ... incorporating things as it happened.

All my conkys start with "conky -c /path/to/the/conkyrc", I don't run conkys in a terminal, start them yes, run them no!

I played with this a lot yesterday getting "ERROR" here an "Oops!" there, but not before one tweak restarted my entire session.
Now that was an Oops!

The second last line is the fix it was:
"conky -c $1"

Here's the 'first' working version, - "SUPER" script
that requires two clicks, or twice in a terminal:

ggsia <<-- the bash script  for GrouchyGaijin, Stinkeye and arclance
#!/bin/bash
## Original idea by: GrouchyGaijin
## This idea by: Stinkeye - Jan 2013
## With another tweak by: arclance
## Final tweak by: Sector11
## click to start, click to re-start

if pgrep -f "conky -c $1"
then
pkill -xf "conky -c $1"
else
conky -c "$1"
fi


Terminal output
sector11 @ sector11
21 Jan 13 | 09:29:06 ~
         $ ggsia /media/5/Conky/S11_VSIDO_v9.conkyrc
18708
sector11 @ sector11
21 Jan 13 | 09:29:48 ~
         $ ggsia /media/5/Conky/S11_VSIDO_v9.conkyrc
Conky: forked to background, pid is 19627
sector11 @ sector11
21 Jan 13 | 09:29:50 ~
         $
Conky: desktop window (260) is root window
Conky: window type - normal
Conky: drawing to created window (0x1c00001)
Conky: drawing to double buffer
gathering data with curl
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 71036  100 71036    0     0  81086      0 --:--:-- --:--:-- --:--:--   99k
not checking for alerts
processing complete

sector11 @ sector11
21 Jan 13 | 09:30:06 ~
         $


Stopped it and started it like it was meant to do!
but it took one to kill it, one to start it

Thank you GrouchyGaijin, stinkeye & arclance

I didn't stop there ... I have another version of ssc.sh that uses "exit" .... hmmmmmmmmm!!!

So here it is, the new improved ggsia that is even better, this is for "conky addicts", because sometimes just "saving a conky" isn't enough, you need to kill it and restart it!

If you are developing a conky and
Title: Re: Teo's Scripts in a nutshell
Post by: Sector11 on January 26, 2013, 06:16:43 PM
easysid came up with a full screen conky and posted it over on CrunchBang (http://crunchbang.org/forums/viewtopic.php?pid=285695#p285695), complete with a link to the wallpaper.

Screenshot:
(http://t.imgbox.com/acraZdr3.jpg) (http://imgbox.com/acraZdr3)
He calles it: Cubes

It re-kindled something I had started but never completed.

I've been playing with full screen conkys for a bit and over time I found a way to do it without a single ${voffset}.

Why? - because I can. - it also controls the real conky window size better. An opinion.

His first command ${voffset 590}\ prints to the bottom of the screen then he uses a negative voffset to bring it up
Then two positive voffsets in a row to move text down again ... and it continues.
Conky is printing all over the place

There are 1001 ways of doing things, what follows is just other way.
It's all a matter of personal choice

so.....
(http://t.imgbox.com/actym9n4.jpg) (http://imgbox.com/actym9n4)

A bit more work but I find if I set the lines first the conky code is easy to add in.

Line 6 uses the small font last the ${goto} places it properly:
L 6\
${goto 570}L 6 plus\
${goto 350}${font OCR A Extended:bold:pixelsize=12}L 6
${font}L 7${goto 350}L 7${goto 940}L 7

... and doesn't turn the font off until the beginning of line 7

Line 11 does the same with larger font but with a twist:
${goto 350}L 11\
${goto 940}L 11\
${goto 730}${font OCR A Extended:bold:pixelsize=24}L 11${font OCR A Extended:pixelsize=1}
${font}${goto 350}L 12${goto 940}L 12

Title: Re: Teo's Scripts in a nutshell
Post by: Sector11 on February 07, 2013, 01:32:07 PM
A new weather conky with an old favourite; conkyForecast.

For years I have known about the '--night' option, never really used it before now.

(http://t.imgbox.com/abnllNSt.jpg) (http://imgbox.com/abnllNSt)        (http://t.imgbox.com/abbVaOyC.jpg) (http://imgbox.com/abbVaOyC)

Some things explained.  While developing this (killing and restarting conky a lot) I did not force a cache '--refresh' so as to use the info that was here locally as much as possible, no sense in flooding weather·com with requests for weather in the development stage.  After all this is now working free.  This morning with I booted up I saw there were some errors, I has forgotten to add the '--refetch' option to the command to get the weather:
${execpi 1800 conkyForecast --refetch --hideunits --template=/media/5/Conky/templates/cF-2013.template}


1. Under NOW - 1019.0 = barometer and the 2 is the UV index
Below that is a small 'steady' pretty self explanatory.

2. Under 'steady' is the wind direction ENE and 10km/h - I'm not showing units because this is my conky I know the units it's using (km/h | °C | etc).

3. Under Forecast and Tonight are the forecast high and low temperatures for today and that sequence is repeated with the temperatures in the lower portion of the forecast.  I have put them closer to the centre, in the lower section, as I plan on adding the sunrise and sunset time in there as well

4. Drawn first the VSIDO orb sits behind the 'moon' as it shows it's phases.  The orb will not be seen during a full moon and will be 100% visible during a new moon, this Sunday.

5. I am using ${if_match} statements to get rid of displays of 'N/A' and or '0%' with the 'chance of precipitation' option.  I picked up that little gem from PetroDawg just recently. Thanks PetroDawg.  I'm using ${if_match} in other places as well.

6. On the left is last nights capture.  Notice the line:


Sunrise 06.19   08:09:44   Sunset 19:55


While sunrise and sunset are true conkyForecast options, that number in the middle is using a program that comes with conkyForecast; conkyForecast-SunsetSunriseCountdown.py.  It calculates the time left to sundown or sunrise, whichever is coming next.  It's grey because the sun has set and will rise in 8 hours 9 minutes and 44 seconds.

Some may argue that it should be yellow to indicate that the sun will rise in that time.  That's an option too, I chose to indicate the sun's position with the colour not the action that will happen. As you see in this mornings shot on the right, there is 10:22:26 left before sunset, the yellow indicating the sun is up.

Not finished yet, still have some things I want to do.

Oh yea, I added my OpenBox menu in there just because.  Optical illusion - does it seem to get narrower at the bottom?
Title: Re: Teo's Scripts in a nutshell
Post by: jedi on February 08, 2013, 01:10:41 AM
Wow Sector11!!!  That is awesome work!  8)
Title: Re: Teo's Scripts in a nutshell
Post by: Sector11 on February 08, 2013, 01:22:48 AM
Thatks jedi ... felt a bit strange using conkyForecast again for a major conky.

Main thing is my wife likes it.  She has this fixation on the weather lately.
Title: Re: Teo's Scripts in a nutshell
Post by: jedi on February 08, 2013, 01:26:12 AM
Hmmmm.  Wishful thinking on my part; Wife, Conky, Happy,  nahhhhhh!!!  Never gonna happen.  :'(
Title: Re: Teo's Scripts in a nutshell
Post by: Sector11 on February 08, 2013, 01:32:48 AM
  :D  :D  :D  :D

You need to build a conky that would interest her!

Title: Re: Teo's Scripts in a nutshell
Post by: VastOne on February 10, 2013, 01:24:50 AM
This How To will setup a conky that will grab your gmail from google and rss feeds from google reader and display it on your desktop. This is what it will look like

(http://www.zimagez.com/miniature/screenshot-02112013-101453am.php) (http://www.zimagez.com/zimage/screenshot-02112013-101453am.php)

Save everything to /home/yourusername

Step 1

Copy this and save it as .conkyrc2 or whatever you want it to be named

# .conkyrc2 - Edited from various examples across the 'net
# Used by VastOne on #!

# Create own window instead of using desktop (required in nautilus)
#own_window yes
#own_window_type normal
#own_window_transparent no
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

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

# fiddle with window
use_spacer right

# Use Xft?
use_xft yes
xftfont Liberation Sans:size=16
xftalpha 0.9
text_buffer_size 4096

# Update interval in seconds
update_interval 1

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

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

# Minimum size of text area
minimum_size 336 400
maximum_width 336
#maximum_width 1024

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

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

# Stippled borders?
stippled_borders 0

# border margins
# border_margin 0

# border width
border_width 1

# Default colors and also border colors
#default_color grey
#color2=white
# color3=grey
#default_shade_color black
#default_outline_color grey
# own_window_colour 070809

# 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 1
gap_y 74

# 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
## ${color sky blue}${time %a %b %d %Y}       ${color #dfdfdf}${time %I:%M}${time %P}
# ${image /home/vastone/images/debian2.png -s 40x40 -p 211,195}
# ${image /home/vastone/images/debian3.png -s 125x30 -p 140,198}
TEXT

${color 7D8C93}             ${time %I:%M}${time %P}
${color 7D8C93}         ${voffset 5}${time %a %b %d %Y}
${color 7D8C93}${voffset 5}Gmail  - ${execpi 15 python ~/gmail_parser.py yourgmailname yourgmailpassword 3}

${color 7D8C93}RSS${font}
${color 7D8C93}${voffset 11}${execi 60 python ~/conkyGoogleReader.py -S -u yourgmail@gmail.com -p yourgmailpasswd| fold -s -w35}


Note - the yourgmailname and yourgmailpassword needs to be changed.  This yourgmailname, is not the complete email address, just the name.  For me it is vastone, since my address is vastone @ gmail dot com

Step 2

Download the attached gmail_parser.py

Make it executable,  in terminal run

chmod +x gmail_parser.py

Step 3

In terminal

sudo apt-get install python-feedparser

Step 4

Download the attached conkyGoogleReader.py

Make it executable,  in terminal run

chmod +x conkyGoogleReader.py

Step 5

You should now be able to start this conky this way

conky -c /home/yourusername/.conkyrc2

Let me know how it goes, good luck!
Title: Re: Teo's Scripts in a nutshell
Post by: jedi on February 10, 2013, 02:18:11 AM
Thanks VastOne, had the gmail_parser, but for some reason I'd missed out on the rss feed one.  Got it now!  Thanks a lot...
Title: Re: Teo's Scripts in a nutshell
Post by: falldown on February 10, 2013, 04:39:55 PM
Much appreciated VastOne  :)
Title: Re: Teo's Scripts in a nutshell
Post by: lwfitz on February 11, 2013, 09:20:08 AM
VERY NICE VastOne!

Thanks!
Title: Re: Teo's Scripts in a nutshell
Post by: Sector11 on March 11, 2013, 12:21:32 AM
(http://t.imgbox.com/ads2H8mf.jpg) (http://imgbox.com/ads2H8mf)

If you need an explanation of what is what ... it's here someplace ... I'll find it or explain again.  ;)

Conky:
# killall conky && conky -c /media/5/Conky/ConkyForecast_2013 &
# ${font DS\-Digital:bold:size=24}
# OS: ${pre_exec lsb_release -d | cut -c14-50}

###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent no ##yes
#own_window_hints below,skip_taskbar,skip_pager
own_window_colour 000000
own_window_class Conky
own_window_title Tiempo!

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

minimum_size 340 0  ##420 420   ## width, height
maximum_width 340     ##420       ## width

gap_x 0 ### left &right
gap_y 100 ### up & down

alignment tm #ml
####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont Monofur:bold:size=12
#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 yes
default_shade_color black

draw_outline no # amplifies text if yes
default_outline_color black

default_color DCDCDC #220 220 220 Gainsboro
color0 48D1CC # 72 209 204    MediumTurquoise
color1 778899 #119 136 153 LightSlateGray
color2 FF8C00 #255 140   0 DarkOrange
color3 7FFF00 #127 255   0 Chartreuse
color4 FFA07A #255 160 122 LightSalmon
color5 FFDEAD #255 222 173 NavajoWhite
color6 00BFFF #  0 191 255 DeepSkyBlue
color7 00FFFF #  0 255 255 Cyan
color8 FFFF00 #255 255   0 Yellow
color9 FF0000 #255   0   0 Red
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes #no
#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 6144

# 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

# Imlib2 image cache size, in bytes. Default 4MiB Increase this value if you use
# $image lots. Set to 0 to disable the image cache.

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

##############################################  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.2}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
#--------------------------------
#lua_load /media/5/Conky/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 20 0 0 0 0 0x000000 0.2
#lua_draw_hook_post draw_bg 20 0 0 0 0 0x000000 0.2
#
# TEXT
# ${lua conky_draw_bg 20 0 0 0 0 0x000000 0.2}
##
#
############### 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/cF-2013.template.lua
#######################################################  End LUA Settings  ###

update_interval 1

TEXT
${image /media/5/Conky/images/yellow_1.png -p 169,152 -s 1x378}\
${image /media/5/Conky/images/yellow_1.png -p 1,530 -s 340x1}\
${image /media/5/Conky/images/CanAr_Roundel_2.png -p 258,18 -s 83x83}\
${execpi 1800 conkyForecast --refetch --hideunits --template=/media/5/Conky/templates/cF-2013.template}


conkyForecast template: cF-2013.template
${font monofur:bold:size=9}   NOW           Forecast       Tonight${alignr}[--datatype=MP]${font}
[--datatype=BR] ${color2}${if_match "[datatype=UI]" == "N/A"}${else}[--datatype=UI]${endif}${goto 90}${color7}${if_match "[datatype=PC --startday=0]" == "N/A"}${else}${if_match "[datatype=PC --startday=0]" == "0%"}${else}[datatype=PC --startday=0]${endif}${endif}${goto 180}${if_match "[datatype=PC --night --startday=0]" == "N/A"}${else}${if_match "[datatype=PC --night --startday=0]" == "0%"}${else}[datatype=PC --night --startday=0]${endif}${endif}
${font monofur:bold:size=9}${color5}${if_match "[datatype=BD]" == "N/A"}${else}[--datatype=BD]${endif}${color}${font}

[--datatype=WD]${goto 55}[--datatype=HT]
[--datatype=WS]${goto 55}${color2}[--datatype=LT]${goto 122}${color2}${if_match "[--datatype=HT --startday=0]" == "N/A"}${else}[--datatype=HT --startday=0]${endif}${goto 210}${color7}[--datatype=LT --startday=0]${color}${font monofur:pixelsize=0}
${image [--datatype=WI] -p 0,20 -s 80x80}
${image [--datatype=WI --startday=0] -p 86,20 -s 80x80}
${image [--datatype=WI --startday=0 --night] -p 173,20 -s 80x80}
${image [--datatype=MI] -p 259,20 -s 80x80}
${font}Dew Pt [--datatype=DP]${goto 102}Hum [--datatype=HM]${goto 175}Rain ${color7}${if_match "[datatype=PC --startday=1]" == "N/A"}0%${else}[--datatype=PC --startday=1]${endif}${color}${goto 255}Vis [--datatype=VI]
${color5}Sunrise [datatype=SR]${goto 145}${if_match "${execpi 1 conkyForecast-SunsetSunriseCountdown -t}"=="Sunrise"}${color1}${execpi 1 conkyForecast-SunsetSunriseCountdown}${else}${color5}${execpi 1 conkyForecast-SunsetSunriseCountdown}${endif}${alignr 5}${color}Sunset [datatype=SS]${font monofur:pixelsize=4}

${font monofur:bold:size=16}${color6}${goto 50}[--datatype=DW --shortweekday --startday=1]${goto 230}[--datatype=DW --shortweekday --startday=2]${color}${font monofur:bold:size=11}${goto 5}${color5}[--datatype=SR --startday=1]${goto 130}${color}[--datatype=SS --startday=1]${goto 185}${color5}[--datatype=SR --startday=2]${goto 310}${color}[--datatype=SS --startday=2]${font}
${color7}${if_match "[datatype=PC --startday=1]" == "N/A"}${else}${if_match "[datatype=PC --startday=1]" == "0%"}${else}[datatype=PC --startday=1]${endif}${endif}${goto 90}${if_match "[datatype=PC --startday=1 --night]" == "N/A"}${else}${if_match "[datatype=PC --startday=1 --night]" == "0%"}${else}[datatype=PC --startday=1 --night]${endif}${endif}${goto 178}${if_match "[datatype=PC --startday=2]" == "N/A"}${else}${if_match "[datatype=PC --startday=2]" == "0%"}${else}[datatype=PC --startday=2]${endif}${endif}${goto 266}${if_match "[datatype=PC --startday=2 --night]" == "N/A"}${else}${if_match "[datatype=PC --startday=2 --night]" == "0%"}${else}[datatype=PC --startday=2 --night]${endif}${endif}${color}

${color5}${goto 70}[--datatype=DL --startday=1]${goto 242}[--datatype=DL --startday=2]
${goto 60}${color2}[--datatype=HT --startday=1]${goto 95}${color7}[--datatype=LT --startday=1]${goto 233}${color2}[--datatype=HT --startday=2]${goto 270}${color7}[--datatype=LT --startday=2]${color}${font monofur:pixelsize=0}
${image [--datatype=WI --startday=1] -p 0,160 -s 80x80}
${image [--datatype=WI --startday=1 --night] -p 86,160 -s 80x80}
${image [--datatype=WI --startday=2] -p 173,160 -s 80x80}
${image [--datatype=WI --startday=2 --night] -p 258,160 -s 80x80}
${font}${font monofur:bold:size=16}${color6}${goto 50}[--datatype=DW --shortweekday --startday=3]${goto 230}[--datatype=DW --shortweekday --startday=4]${color}${font monofur:bold:size=11}${goto 5}${color5}[--datatype=SR --startday=3]${goto 130}${color}[--datatype=SS --startday=3]${goto 185}${color5}[--datatype=SR --startday=4]${goto 310}${color}[--datatype=SS --startday=4]${font}
${color7}${if_match "[datatype=PC --startday=3]" == "N/A"}${else}${if_match "[datatype=PC --startday=3]" == "0%"}${else}[datatype=PC --startday=3]${endif}${endif}${goto 90}${if_match "[datatype=PC --startday=3 --night]" == "N/A"}${else}${if_match "[datatype=PC --startday=3 --night]" == "0%"}${else}[datatype=PC --startday=3 --night]${endif}${endif}${goto 178}${if_match "[datatype=PC --startday=4]" == "N/A"}${else}${if_match "[datatype=PC --startday=4]" == "0%"}${else}[datatype=PC --startday=4]${endif}${endif}${goto 266}${if_match "[datatype=PC --startday=4 --night]" == "N/A"}${else}${if_match "[datatype=PC --startday=4 --night]" == "0%"}${else}[datatype=PC --startday=4 --night]${endif}${endif}${color}

${color5}${goto 70}[--datatype=DL --startday=3]${goto 242}[--datatype=DL --startday=4]
${goto 60}${color2}[--datatype=HT --startday=3]${goto 95}${color7}[--datatype=LT --startday=3]${goto 233}${color2}[--datatype=HT --startday=4]${goto 270}${color7}[--datatype=LT --startday=4]${color}${font monofur:pixelsize=0}
${image [--datatype=WI --startday=3] -p 0,256 -s 80x80}
${image [--datatype=WI --startday=3 --night] -p 86,256 -s 80x80}
${image [--datatype=WI --startday=4] -p 173,256 -s 80x80}
${image [--datatype=WI --startday=4 --night] -p 259,256 -s 80x80}
${font}${font monofur:bold:size=16}${color6}${goto 50}[--datatype=DW --shortweekday --startday=5]${goto 230}[--datatype=DW --shortweekday --startday=6]${color}${font monofur:bold:size=11}${goto 5}${color5}[--datatype=SR --startday=5]${goto 130}${color}[--datatype=SS --startday=5]${goto 185}${color5}[--datatype=SR --startday=6]${goto 310}${color}[--datatype=SS --startday=6]${font}
${color7}${if_match "[datatype=PC --startday=5]" == "N/A"}${else}${if_match "[datatype=PC --startday=5]" == "0%"}${else}[datatype=PC --startday=5]${endif}${endif}${goto 90}${if_match "[datatype=PC --startday=5 --night]" == "N/A"}${else}${if_match "[datatype=PC --startday=5 --night]" == "0%"}${else}[datatype=PC --startday=5 --night]${endif}${endif}${goto 178}${if_match "[datatype=PC --startday=6]" == "N/A"}${else}${if_match "[datatype=PC --startday=6]" == "0%"}${else}[datatype=PC --startday=6]${endif}${endif}${goto 266}${if_match "[datatype=PC --startday=6 --night]" == "N/A"}${else}${if_match "[datatype=PC --startday=6 --night]" == "0%"}${else}[datatype=PC --startday=6 --night]${endif}${endif}${color}

${color5}${goto 70}[--datatype=DL --startday=5]${goto 242}[--datatype=DL --startday=6]
${goto 60}${color2}[--datatype=HT --startday=5]${goto 95}${color7}[--datatype=LT --startday=5]${goto 233}${color2}[--datatype=HT --startday=6]${goto 270}${color7}[--datatype=LT --startday=6]${color}${font monofur:pixelsize=0}
${image [--datatype=WI --startday=5] -p 0,352 -s 80x80}
${image [--datatype=WI --startday=5 --night] -p 86,352 -s 80x80}
${image [--datatype=WI --startday=6] -p 173,352 -s 80x80}
${image [--datatype=WI --startday=6 --night] -p 259,352 -s 80x80}
${font}${font monofur:bold:size=16}${color6}${goto 50}[--datatype=DW --shortweekday --startday=7]${goto 230}[--datatype=DW --shortweekday --startday=8]${color}${font monofur:bold:size=11}${goto 5}${color5}[--datatype=SR --startday=7]${goto 130}${color}[--datatype=SS --startday=7]${goto 185}${color5}[--datatype=SR --startday=8]${goto 310}${color}[--datatype=SS --startday=8]${font}
${color7}${if_match "[datatype=PC --startday=7]" == "N/A"}${else}${if_match "[datatype=PC --startday=7]" == "0%"}${else}[datatype=PC --startday=7]${endif}${endif}${goto 90}${if_match "[datatype=PC --startday=7 --night]" == "N/A"}${else}${if_match "[datatype=PC --startday=7 --night]" == "0%"}${else}[datatype=PC --startday=7 --night]${endif}${endif}${goto 178}${if_match "[datatype=PC --startday=8]" == "N/A"}${else}${if_match "[datatype=PC --startday=8]" == "0%"}${else}[datatype=PC --startday=8]${endif}${endif}${goto 266}${if_match "[datatype=PC --startday=8 --night]" == "N/A"}${else}${if_match "[datatype=PC --startday=8 --night]" == "0%"}${else}[datatype=PC --startday=8 --night]${endif}${endif}${color}

${color5}${goto 70}[--datatype=DL --startday=7]${goto 242}[--datatype=DL --startday=8]
${goto 60}${color2}[--datatype=HT --startday=7]${goto 95}${color7}[--datatype=LT --startday=7]${goto 233}${color2}[--datatype=HT --startday=8]${goto 270}${color7}[--datatype=LT --startday=8]${color}${font monofur:pixelsize=0}
${image [--datatype=WI --startday=7] -p 0,449 -s 80x80}
${image [--datatype=WI --startday=7 --night] -p 86,449 -s 80x80}
${image [--datatype=WI --startday=8] -p 173,449 -s 80x80}
${image [--datatype=WI --startday=8 --night] -p 259,449 -s 80x80}${font}


LUA v9000template: cF-2013.template.lua
--[[
The latest script is a lua only weather script. aka: v9000
http://crunchbanglinux.org/forums/topic/16100/weather-in-conky/

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

mrppeachys LUA Tutorial
http://crunchbanglinux.org/forums/topic/17246/how-to-using-lua-scripts-in-conky/
]]
_G.weather_script = function()--#### DO NOT EDIT THIS LINE ##############
--#######################################################################
-- 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=18
default_color=0xffffff--white
default_alpha=1--fully opaque
default_image_width=50
default_image_height=50
-- ## New Options ###
default_face="bold"
-- "normal" for normal/normal
-- "bold" for normal/bold
-- "italic" for italic/normal
-- "bolditalic" for italic/bold
--END OF DEFAULTS #######################################################
--START OF WEATHER CODE -- START OF WEATHER CODE -- START OF WEATHER CODE

-- ### Today Moon
out({c=0x000000,a=1,x=286,y=31,fs=14,txt=moon_rise_24[1]})
  out({c=0x48D1CC,a=1,x=285,y=30,fs=14,txt=moon_rise_24[1]})
out({c=0x000000,a=1,x=286,y=111,fs=14,txt=moon_set_24[1]})
  out({c=0x48D1CC,a=1,x=285,y=110,fs=14,txt=moon_set_24[1]})

-- ### Forcast - Day numbers and Moon Rise Set times ####################

-- Day Numbers
-- left right
tdx= 100 tdxx=175
tdy=173 tdyy=96

-- Moon Rise Set
-- rise set | rise set
tmx= 5 tmx1=125   tmx2=185 tmx3=300
tmy=242 tmyy=96

-- ### DAY - 2 & 3 #############################################################
out({c=0x000000,a=1,x=tdx+1,y=tdy+1,txt=forecast_date[2]})
  out({c=0x00BFFF,a=1,x=tdx,y=tdy,txt=forecast_date[2]})
out({c=0x000000,a=1,x=tdx+tdxx+1,y=tdy+1,txt=forecast_date[3]})
  out({c=0x00BFFF,a=1,x=tdx+tdxx,y=tdy,txt=forecast_date[3]})
-- ### MOON day 2
out({c=0x000000,a=1,x=tmx+1,y=tmy+1,fs=14,txt=moon_rise_24[2]})
  out({c=0xDCDCDC,a=1,x=tmx,y=tmy,fs=14,txt=moon_rise_24[2]})
out({c=0x000000,a=1,x=tmx+tmx1+1,y=tmy+1,fs=14,txt=moon_set_24[2]})
  out({c=0xB0C4DE,a=1,x=tmx+tmx1,y=tmy,fs=14,txt=moon_set_24[2]})
-- ### MOON day 3
out({c=0x000000,a=1,x=tmx2+1,y=tmy+1,fs=14,txt=moon_rise_24[3]})
  out({c=0xDCDCDC,a=1,x=tmx2,y=tmy,fs=14,txt=moon_rise_24[3]})
out({c=0x000000,a=1,x=tmx+tmx3+1,y=tmy+1,fs=14,txt=moon_set_24[3]})
  out({c=0xB0C4DE,a=1,x=tmx+tmx3,y=tmy,fs=14,txt=moon_set_24[3]})

-- ### DAY - 4 & 5 #############################################################
out({c=0x000000,a=1,x=tdx+1,y=tdy+(tdyy*1)+1,txt=forecast_date[4]})
  out({c=0x00BFFF,a=1,x=tdx,y=tdy+(tdyy*1),txt=forecast_date[4]})
out({c=0x000000,a=1,x=tdx+tdxx+1,y=tdy+(tdyy*1)+1,txt=forecast_date[5]})
  out({c=0x00BFFF,a=1,x=tdx+tdxx,y=tdy+(tdyy*1),txt=forecast_date[5]})
-- ### MOON day 4
out({c=0x000000,a=1,x=tmx+1,y=tmy+(tmyy*1)+1,fs=14,txt=moon_rise_24[4]})
  out({c=0xDCDCDC,a=1,x=tmx,y=tmy+(tmyy*1),fs=14,txt=moon_rise_24[4]})
out({c=0x000000,a=1,x=tmx+tmx1+1,y=tmy+(tmyy*1)+1,fs=14,txt=moon_set_24[4]})
  out({c=0xB0C4DE,a=1,x=tmx+tmx1,y=tmy+(tmyy*1),fs=14,txt=moon_set_24[4]})
-- ### MOON day 5
out({c=0x000000,a=1,x=tmx2+1,y=tmy+(tmyy*1)+1,fs=14,txt=moon_rise_24[5]})
  out({c=0xDCDCDC,a=1,x=tmx2,y=tmy+(tmyy*1),fs=14,txt=moon_rise_24[5]})
out({c=0x000000,a=1,x=tmx+tmx3+1,y=tmy+(tmyy*1)+1,fs=14,txt=moon_set_24[5]})
  out({c=0xB0C4DE,a=1,x=tmx+tmx3,y=tmy+(tmyy*1),fs=14,txt=moon_set_24[5]})

-- ### DAY - 6 & 7 #############################################################
out({c=0x000000,a=1,x=tdx+1,y=tdy+(tdyy*2)+1,txt=forecast_date[6]})
  out({c=0x00BFFF,a=1,x=tdx,y=tdy+(tdyy*2),txt=forecast_date[6]})
out({c=0x000000,a=1,x=tdx+tdxx+1,y=tdy+(tdyy*2)+1,txt=forecast_date[7]})
  out({c=0x00BFFF,a=1,x=tdx+tdxx,y=tdy+(tdyy*2),txt=forecast_date[7]})
-- ### MOON day 6
out({c=0x000000,a=1,x=tmx+1,y=tmy+(tmyy*2)+1,fs=14,txt=moon_rise_24[6]})
  out({c=0xDCDCDC,a=1,x=tmx,y=tmy+(tmyy*2),fs=14,txt=moon_rise_24[6]})
out({c=0x000000,a=1,x=tmx+tmx1+1,y=tmy+(tmyy*2)+1,fs=14,txt=moon_set_24[6]})
  out({c=0xB0C4DE,a=1,x=tmx+tmx1,y=tmy+(tmyy*2),fs=14,txt=moon_set_24[6]})
-- ### MOON day 7
out({c=0x000000,a=1,x=tmx2+1,y=tmy+(tmyy*2)+1,fs=14,txt=moon_rise_24[7]})
  out({c=0xDCDCDC,a=1,x=tmx2,y=tmy+(tmyy*2),fs=14,txt=moon_rise_24[7]})
out({c=0x000000,a=1,x=tmx+tmx3+1,y=tmy+(tmyy*2)+1,fs=14,txt=moon_set_24[7]})
  out({c=0xB0C4DE,a=1,x=tmx+tmx3,y=tmy+(tmyy*2),fs=14,txt=moon_set_24[7]})

-- ### DAY - 8 & 9 #############################################################
out({c=0x000000,a=1,x=tdx+1,y=tdy+(tdyy*3)+1,txt=forecast_date[8]})
  out({c=0x00BFFF,a=1,x=tdx,y=tdy+(tdyy*3),txt=forecast_date[8]})
out({c=0x000000,a=1,x=tdx+tdxx+1,y=tdy+(tdyy*3)+1,txt=forecast_date[9]})
  out({c=0x00BFFF,a=1,x=tdx+tdxx,y=tdy+(tdyy*3),txt=forecast_date[9]})
-- ### MOON day 8
out({c=0x000000,a=1,x=tmx+1,y=tmy+(tmyy*3)+1,fs=14,txt=moon_rise_24[8]})
  out({c=0xDCDCDC,a=1,x=tmx,y=tmy+(tmyy*3),fs=14,txt=moon_rise_24[8]})
out({c=0x000000,a=1,x=tmx+tmx1+1,y=tmy+(tmyy*3)+1,fs=14,txt=moon_set_24[8]})
  out({c=0xB0C4DE,a=1,x=tmx+tmx1,y=tmy+(tmyy*3),fs=14,txt=moon_set_24[8]})
-- ### MOON day 9
out({c=0x000000,a=1,x=tmx2+1,y=tmy+(tmyy*3)+1,fs=14,txt=moon_rise_24[9]})
  out({c=0xDCDCDC,a=1,x=tmx2,y=tmy+(tmyy*3),fs=14,txt=moon_rise_24[9]})
out({c=0x000000,a=1,x=tmx+tmx3+1,y=tmy+(tmyy*3)+1,fs=14,txt=moon_set_24[9]})
  out({c=0xB0C4DE,a=1,x=tmx+tmx3,y=tmy+(tmyy*3),fs=14,txt=moon_set_24[9]})

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


Title: Re: Teo's Scripts in a nutshell
Post by: Sector11 on March 20, 2013, 02:40:13 PM
conkymisc_1.06_all.deb (http://dl.dropbox.com/u/16070765/Ks_apps/conkymisc_1.06_all.deb)" can help.  It's a bunch of python scripts ... I use them with VSIDO so trust me they are OK.
muawhahahaha

You'll end up with:
I've used them all except for conkySlideshow - so if you feel daring.  :D

Anyway onto the date time reminders

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

On the left is the older conkyDatetimeDiff.py in action.  the seconds do want to work in examples 1 or 2 but starting in samples 7 and on they work just fine.

It's easy to use:
[/list] 20 Mar 13 | 09:51:32 ~
         $ conkyDatetimeDiff --help
Usage: conkyDatetimeDiff.py [options]

Options:
  -h, --help            show this help message and exit
  -s DATETIME, --startdatetime=DATETIME
                        [Mandatory] Start datetime to use for difference
                        output
  -e DATETIME, --enddatetime=DATETIME
                        End datetime to use for difference output, if omitted
                        then the current datetime is used.
  -i FORMAT, --inputformat=FORMAT
                        default:[%Y%m%d]Specify the format of the input date
                        time fields. See python docs for formatting options:
                        http://docs.python.org/library/datetime.html#strftime-
                        and-strptime-behavior
  -o OPTION, --outputformat=OPTION
                        default:[DIFF]Specify the format of the output date
                        time difference values, options are either DIFF,
                        YEARS, MONTHS, WEEKS, DAYS, HOURS, MINUTES, SECONDS
  -S, --shortoutput     Specify if short output is required resulting in ':'
                        separated string values where complex or a number
                        where not rather than plain english
  -n, --displaynegatives
                        Specify if a negative value should be output, normally
                        only the positive time difference is displayed
  -v, --verbose         Request verbose output, not a good idea when running
                        through conky!
  --errorlogfile=FILE   If a filepath is set, the script appends errors to the
                        filepath.
  --infologfile=FILE    If a filepath is set, the script appends info to the
                        filepath.

20 Mar 13 | 10:16:51 ~
         $


The conky for that display on the left:
# killall conky && conky -c /media/5/Conky/conkyDatetimeDiff.conkyrc &
# conky configuration - edited by kaivalagi
# tweaked by Sector11

###  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 brown
own_window_class Conky
own_window_title Dates

# 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
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
# # own_window_argb_value 0

minimum_size 500 0    ## width, height
maximum_width 500       ## width, usually a good idea to equal minimum 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 Andale Mono: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

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
draw_shades yes # amplifies text if yes
default_shade_color 000000

draw_outline no # amplifies text if yes
default_outline_color 000000

#default_color 000000 #  0   0   0 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 10
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders no
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################

# yes
background yes

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

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

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

# change GiB to G and MiB to M
short_units yes

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

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
## lua_load /media/5/Conky/LUA/draw-bg.lua
## TEXT
## ${lua conky_draw_bg 10 0 0 0 0 0x000000 0.2}
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
##
## OR Both above TEXT (No composite manager required - no blinking!)
lua_load /media/5/Conky/LUA/draw-bg.lua
lua_draw_hook_pre draw_bg 15 0 0 0 0 0x000000 0.2
##
#######################################################  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 84600 ## or 1 then testing
update_interval 1 ## or 1 then testing

## box chars ─ plus ─ works on #! Statler
## Inspired by Arpinux, Box Chars by Aphelion & Sector11
## http://crunchbanglinux─fr.org/forum/viewtopic.php?pid=15355#p15355
## not with all fonts... test first .. these work:
## xftfont monospace:size=8.5
## xftfont DejaVu Sans Mono:size=8.5

## │ ─ ┌ ┬ ┐ └ ┴ ┘ ├ ┼ ┤
## ║ ═ ╔ ╦ ╗ ╚ ╩ ╝ ╠ ╬ ╣

## ↑ ↓ → ← ↔ ► ◄ ▲ ▼ « »
## ░  ▒  ▓ ☺ ☻ ♥ ♦ ♣ ♠
## • ◘ ○ ◙ ♂ ♀ ♪ ♫ ☼
## ¼ ½ ¾ ® ©

#  M&P: 24/10/58: ${execi 600 conkyDateDiff 19581024} or ${color0}${execi 600 conkyDaysDiff 19581024}
#  P02: 30/06/30: ${execi 600 conkyDateDiff 19300630} or ${color0}${execi 600 conkyDaysDiff 19300630}

TEXT
1) Just a start datetime so defaults all
(i.e. a PAST date): 20111225 (seconds do not work)
${exec conkyDatetimeDiff -s 20111225}

2) Same as above but with short output option:
   20111225 -S
${exec conkyDatetimeDiff -s 20111225 -S}

3) Days difference from new year of 2000 to now:
   20000101 -o DAYS
${exec conkyDatetimeDiff -s 20000101 -o DAYS}

4) same but with end date and in seconds:
${exec conkyDatetimeDiff -s 20100101 -e 20110401 -o SECONDS} (does not count down/up)

5) Or how about weeks:
${exec conkyDatetimeDiff -s 20100101 -e 20110401 -o WEEKS}

6) Or months:
${exec conkyDatetimeDiff -s 20100101 -e 20110401 -o MONTHS}

7) How about a different datetime format giving date and time
   (spaces so quotes needed!):
   -s "12/02/2009 18:25:12" -i "%d/%m/%Y %H:%M:%S"
${exec conkyDatetimeDiff -s "12/02/2009 18:25:12" -i "%d/%m/%Y %H:%M:%S"}

8) How about the short form of it (above):
${exec conkyDatetimeDiff -s "12/02/2009 18:25:12" -i "%d/%m/%Y %H:%M:%S" -S}

9) Just a time, the date element is auto filled rather than
   left to the default of the start of time (1900 in this
   case), -n option gives the same: -s 18:25:12 -i %H:%M:%S
${exec conkyDatetimeDiff -s 18:25:12 -i %H:%M:%S}

10) and between two times: s 18:25:12 -e 21:05:14 -i %H:%M:%S
${exec conkyDatetimeDiff -s 18:25:12 -e 21:05:14 -i %H:%M:%S}

11) Just for kicks added a month number on the front to show
    the diversity of input allowed:
    -s 02-18:25:12 -i %m-%H:%M:%S
${exec conkyDatetimeDiff -s 02-18:25:12 -i %m-%H:%M:%S}

${color5}${alignc}============================
${alignc}${color}Using Nº7 as a sample and assuning I was born at
${alignc}10:13:46 on 12 May 1949

${alignc}${color5}${exec conkyDatetimeDiff -s "12/05/1949 10:13:46" -i "%d/%m/%Y %H:%M:%S"}

${color}I don't think so, at my age I count by decades because 6.3
sounds younger than 63 years old

This is just too much of a reminder:
${alignc}${color5}${exec conkyDatetimeDiff -s "12/05/1949 10:13:46" -i "%d/%m/%Y %H:%M:%S"}
${alignc}${color5}${exec conkyDatetimeDiff -s "12/05/1949 10:13:46" -i "%d/%m/%Y %H:%M:%S" -S}
${alignc}${color5}


An on the right we have the newer versions of: conkyDateDiff.py and conkyDaysDiff.py in action.  This is use a whole bunch.

They are SUPER easy to use:
20 Mar 13 | 11:25:04 ~
         $ conkyDaysDiff --help
Usage: conkyDaysDiff <startdate> [<enddate>]
  If no end date given it is assumed to be today.

  examples:

    $ conkyDaysDiff 20080105 20091225
    720

20 Mar 13 | 11:25:12 ~
         $ conkyDateDiff --help
Usage: conkyDateDiff <startdate> [<enddate>]
  If no end date given it is assumed to be today.

  examples:

    $ conkyDateDiff 20080105 20091225
    1 year, 11 months, 20 days

20 Mar 13 | 11:25:20 ~
         $


The conky that did the display on the right:
# To use #! in a conky use: ${exec echo '#!'}
# killall conky && conky -c /media/5/Conky/Dates.conky &
# by Sector11

###  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 brown
own_window_class Dates
own_window_title Dates

# 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
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
# # own_window_argb_value 0

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

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

alignment top_right
###################################################  End Window Settings  ###
###  Font Settings  ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont Andale Mono:bold:size=12

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

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
draw_shades yes # amplifies text if yes
default_shade_color 000000

draw_outline no # amplifies text if yes
default_outline_color 000000

#default_color 000000 #  0   0   0 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 10
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders no
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################

# yes
background yes

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

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

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

# change GiB to G and MiB to M
short_units yes

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

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
## lua_load /media/5/Conky/LUA/draw-bg.lua
## TEXT
## ${lua conky_draw_bg 10 0 0 0 0 0x000000 0.2}
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
##
## OR Both above TEXT (No composite manager required - no blinking!)
lua_load /media/5/Conky/LUA/draw-bg.lua
lua_draw_hook_pre draw_bg 15 0 0 0 0 0x000000 0.2
##
#######################################################  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 84600 ## or 1 then testing
update_interval 1 ## or 1 then testing

## box chars ─ plus ─ works on #! Statler
## Inspired by Arpinux, Box Chars by Aphelion & Sector11
## http://crunchbanglinux─fr.org/forum/viewtopic.php?pid=15355#p15355
## not with all fonts... test first .. these work:
## xftfont monospace:size=8.5
## xftfont DejaVu Sans Mono:size=8.5

## │ ─ ┌ ┬ ┐ └ ┴ ┘ ├ ┼ ┤
## ║ ═ ╔ ╦ ╗ ╚ ╩ ╝ ╠ ╬ ╣

## ↑ ↓ → ← ↔ ► ◄ ▲ ▼ « »
## ░  ▒  ▓ ☺ ☻ ♥ ♦ ♣ ♠
## • ◘ ○ ◙ ♂ ♀ ♪ ♫ ☼
## ¼ ½ ¾ ® ©

#  M&P: 24/10/58: ${execi 600 conkyDateDiff 19581024} or ${color0}${execi 600 conkyDaysDiff 19581024}
#  P02: 30/06/30: ${execi 600 conkyDateDiff 19300630} or ${color0}${execi 600 conkyDaysDiff 19300630}

TEXT

The Mayans said the world will end on ${color5}21 Dec 2012
${color}That was ${color6}${execi 600 conkyDaysDiff 20121221} ${color}days ago and we are still here.
Or ${color5}${execi 600 conkyDateDiff 20121221} ${color}- doomsday my butt!


${color5}5 May 1646: ${color6}${execi 600 conkyDateDiff 16460505} or ${color0}${execi 600 conkyDaysDiff 16460505} days.
${color}Charles I surrenders to the Scottish Army at Newark

${color5}2 Feb 1709: ${color6}${execi 600 conkyDateDiff 17090202} or ${color0}${execi 600 conkyDaysDiff 17090202} days.
${color}Alexander Selkirk rescued from shipwreck
on a desert island, inspiring the book
Robinson Crusoe (published in 1719)
by Daniel Defoe

${alignc}${color5}=======================================
${alignc}${color}Unwittingly I selected two dates where
${alignc}months and days are the same....
${alignc}Be careful the format is: YYYYMMDD
${alignc}${color5}=======================================

${color5}30 Mar 1867:${color6} ${execi 600 conkyDateDiff 18670330} or ${color0}${execi 600 conkyDaysDiff 18670330} days.
${color}USA buys Alaska from Russia

${color5}6 Dec 1917: ${color6}${execi 600 conkyDateDiff 19171206} or ${color0}${execi 600 conkyDaysDiff 19171206} days.
${color}Halifax (Nova Scotia) Explosion, one of the
world's largest artificial non-nuclear explosions
to date: a ship loaded with wartime explosives
blew up after a collision, obliterating buildings
and structures within two square kilometres
of the explosion

${alignc}${color5}======================================
${alignc}${color}Sector11
AA: ${color5}15/01/86: ${color6}${execi 600 conkyDateDiff 19860115} or ${color0}${execi 600 conkyDaysDiff 19860115} days.
${color}BD: ${color5}12/05/49: ${color6}${execi 600 conkyDateDiff 19490512} or ${color0}${execi 600 conkyDaysDiff 19490512} days.

${alignc}${color}And ${color5}12 May 2525 ${color}is:

${alignc}${color6}${execi 600 conkyDateDiff 25250512} ${color}into the future.
${alignc}That's another ${color0}${execi 600 conkyDaysDiff 25250512} ${color}days to go!
${alignc}I'll be ${color6}${execi 600 conkyDateDiff 19490512 25250512}${color} years old or ${color0}${execi 600 conkyDaysDiff 19491205 25250512} ${color}days.
${alignc}Doubt I'll be here for that!
${alignc}But just think, I'd sober for:
${alignc}${color5}${execi 600 conkyDateDiff 19860115 25251205} ${color}or ${color0}${execi 600 conkyDaysDiff 19860115 25251205} days.
Title: Re: Teo's Scripts in a nutshell
Post by: lwfitz on March 21, 2013, 06:13:43 PM
Exactly what I was looking for! Thanks buddy!
Title: Re: Teo's Scripts in a nutshell
Post by: Sector11 on March 21, 2013, 11:54:13 PM
You're welcome.

Maybe others will get something out of this as well.
Title: Re: Conky Tips and Tricks
Post by: Sector11 on April 29, 2013, 05:34:51 PM
loadgraph

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

Dobbie03 over on CrunchBang asked if anyone knew how to get a graph for RAM and CPU  - CPU was easy: cpugraph  ... but ram?  Then he edited his post and said he found it: loadgraph.  I have never seen that command used before and never gave it the light of day until today.  I did some reading and discovered things I had never really knew about "load average" (http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages) ... interesting.  The noob in me surfaces again!

Anyway I made a test conky and had to work with it a bit and discovered a few things.  "Scale" isn't really explained and that it does matter whether you use the -t -l function AND in what order you use them.  I have added "loadgraph" to my daily conky on the right as well.  Also I stressed out my CPU usage a bit just to see results.

Another thing I found out: above TEXT:
Quote# Specify a default width and height for graphs.
# Example: 'default_graph_size 0 25'.
# reverse to what is used under TEXT where it is height and width
# does not work with "loadgraph"
# default_graph_size 100 50

The business portion of the test conky on the left:
TEXT
loadgraph:
(height),(width) (gradient colour 1) (gradient colour 2) (scale) (-t) (-l)

Load1 average graph, similar to xload, with optional colours in hex, minus
the "hash". Uses a logarithmic scale (to see small numbers) when you use the -l
switch. Takes the switch '-t' to use a temperature gradient, which makes the
gradient values change depending on the amplitude of a particular graph value
(try it and see).

Clean
${loadgraph 30,518 0000ff fff000}
-t -l${goto 280}-tl
${loadgraph 30,250 0000ff fff000 -t -l}  ${loadgraph 30,250 0000ff fff000 -tl}
-l -t${goto 280}-lt
${loadgraph 30,250 0000ff fff000 -l -t}  ${loadgraph 30,250 0000ff fff000 -lt}
just -l${goto 280}just -t
${loadgraph 30,250 0000ff fff000 -l}  ${loadgraph 30,250 0000ff fff000 -t}


And from my daily conky (messed up my vnstats have to fix that):
Load Average ${color5}(minutes)
${alignc}1: ${color}${loadavg 1}  ${color5}5: ${color}${loadavg 2}  ${color5}15: ${color}${loadavg 3}
${alignc}${loadgraph 14,220 00ffff fff000 .2 -lt}


Maybe someone will find it useful.
Title: Re: Conky Tips and Tricks
Post by: lwfitz on April 29, 2013, 05:50:03 PM
Ohhhhhhh! I like it, in fact this is the exact idea I had but was wording the question wrong about having more than two colors in a network graph. Thanks Sector11, great work as always my friend!
Title: Re: Conky Tips and Tricks
Post by: Sector11 on April 29, 2013, 07:47:18 PM
You're welcome.  I don't recall you asking the question.

Mind reader I'm not!   ;D <-- Edit an oops!
Title: Re: Conky Tips and Tricks
Post by: Sector11 on May 15, 2013, 03:10:00 PM
Colour Coding Conky

New Medit v1.1.1 does things differently.

The old conkyrc.lang file is in the wrong spot and outdated.  Seems the new version of Medit wants to call conky a:
Document » Language » Scientific » Octive

The new conky.lang file location should be placed in:

/usr/share/medit/language-specs/conky.lang

It has been redone to include all Variables and Setting as they exist at Conky Docs (http://conky.sourceforge.net/docs.html) as of 15 may 2013

- it will recognize and conky file with "conky" in the name IE: ~/.conkyrc, /media/conky/VSIDO.conky
(http://t.imgbox.com/adqubgQC.jpg) (http://imgbox.com/adqubgQC)

- it will recognize a conky file that has "conky" in the first line of the file: IE: /media/5/my_weather
(http://t.imgbox.com/acfSnpC9.jpg) (http://imgbox.com/acfSnpC9)

The new updated file conky.lang file is attached
EDIT:  If you use gedit could you test it please and let me know.
Title: Re: Conky Tips and Tricks
Post by: VastOne on May 15, 2013, 04:13:22 PM
^ Thanks for the update, the new conky.lang will be included in the next ISO's

It seems they are reverting back to the original placement of the file. When I first found and implemented the conky.lang, it was also required to be placed in

/usr/share/medit/language-specs

I also did not have to choose anything in settings to have the lang file work on all conky files once I restarted Medit
Title: Re: Conky Tips and Tricks
Post by: Sector11 on May 15, 2013, 05:12:44 PM
YUP, just plain works as advertised.

There are new commands added and some that are old (indented) along with other commands that while not something a user may use it is something conky uses.

Some Examples:

      <keyword>texeci</keyword>
         <keyword>text_and_other_conky_vars</keyword>
         <keyword>textfile</keyword>
         <keyword>thebittorrentportrange</keyword>
      <keyword>threads</keyword>



and some new stuff that will now show colour coded (there is more) where it didn't before:

      <keyword> +fahrenheit</keyword>
      <keyword> +celsius</keyword>


as in:
temperature_unit fahrenheit
TEXT



Title: Re: Conky Tips and Tricks
Post by: PackRat on May 18, 2013, 04:46:13 PM
Using the most recent VSIDO build and have discovered that, with Sid, update-notifier has a whole bunch of gnome dependencies now - like pulseaudio - that weren't included before (not that I recall anyway). So to check for updates, I am using the:

aptitude search "~U" | wc -l

method in conky that many are familiar with. Found a variation a while back that I like though - these are not my scripts:

This script checks for updates:

chkupdates.sh

#!/bin/bash

sudo apt-get -qy update > /dev/null
NUMOFUPDATES=$(aptitude search "~U" | wc -l)
echo $NUMOFUPDATES System Updates Available
if [ "$NUMOFUPDATES" -ge "1" ]
then uxterm -e ~/bin/ask-aptitude-updates.sh
fi
exit


and for the purpose of this example, will launch uxterm if there is more than 1 update available - change the "1" to "20" for 20 updates and so on ...

ask-aptitude-updates.sh

#!/bin/bash

echo "Aptitude Update System? y or n"
read -t 12 userconfirm
if [ "$userconfirm" != "y" ]; then
echo "Aptitude Update Cancelled"
exit 1
else
echo "aptitude updating system..."
sudo aptitude update
# sudo aptitude -y safe-upgrade
sudo aptitude safe-upgrade
echo ""
killall -SIGUSR1 conky
echo "aptitude update complete. Will now exit..."
sleep 3s
fi
exit


will launch uxterm (any terminal will work) and has a 12 second usercomfirm to update the system or it terminates. So the whole process is interactive and will not update your system unless prompted to do so.

If you just want to check for updates:

apt-update.sh
#!/bin/bash

sudo apt-get -qy update > /dev/null
NUMOFUPDATES=$(aptitude search "~U" | wc -l)
echo $NUMOFUPDATES

exit


Since the output is an integer only, it can be used with if_match, else, endif to give it some colour.

The result:

(http://s15.postimg.org/6isftfqyf/May_1368894847_1366x768.jpg) (http://postimg.org/image/6isftfqyf/)

I suspect an interactive conky could be made out of these so that clicking on the updates would launch the update terminal.

Edit - changed " sudo aptitude -y safe-upgrade" to "sudo aptitude safe-upgrade"
Normally use this script with stable/testing; the -y flag probably not wise with sid.
Title: Re: Conky Tips and Tricks
Post by: VastOne on May 18, 2013, 05:05:36 PM
^ Nice conky tips and even better examples of the greater powers of aptitude

Thanks for sharing these...  8)
Title: Re: Conky Tips and Tricks
Post by: Sector11 on May 18, 2013, 08:21:45 PM
Quote from: PackRat on May 18, 2013, 04:46:13 PM
I am using the:

aptitude search "~U" | wc -l

I suspect an interactive conky could be made out of these so that clicking on the updates would launch the update terminal.

I'd bet money mrpeachy or falldown could do that too.

Made me go looking in my aliases file, and there they were, hold outs from years back when I used aptitude, lines 138, 139 and 140:

alias search='aptitude search'
alias show='aptitude show'
alias avail='aptitude search "~U" | wc -l | tail'


not being "bash literate" I would never have thought of a bash script ... must look at that closer.

18 May 13 | 17:15:34 ~
    $ avail
2

18 May 13 | 17:20:56 ~
    $

NOTE: The two being held back
Title: Re: Conky Tips and Tricks
Post by: lwfitz on May 23, 2013, 06:06:18 AM
New one Im working on..... Ill post the config once its done  ;D

(http://en.zimagez.com/miniature/screenshot-05222013-110141pm.png) (http://en.zimagez.com/zimage/screenshot-05222013-110141pm.php)
Title: Re: Conky Tips and Tricks
Post by: VastOne on May 23, 2013, 06:10:18 AM
^ WOW.. that is very cool!

Nice one lwfitz...!
Title: Re: Conky Tips and Tricks
Post by: lwfitz on May 23, 2013, 06:21:43 AM
Thanks buddy..... just realized I posted in the wrong thread  ??? ??? Oops
Title: Re: Conky Tips and Tricks
Post by: VastOne on June 25, 2013, 03:01:08 PM
FluxBox and 2 Conky's

(http://www.zimagez.com/miniature/screenshot-06252013-095551am.php) (http://www.zimagez.com/zimage/screenshot-06252013-095551am.php)
Title: Re: Conky Tips and Tricks
Post by: PackRat on June 25, 2013, 08:14:25 PM
@vastone - nice one.

I'll see your scrot and raise you one conky:

(http://s12.postimg.org/une4u0s1l/2013_06_25_scrot.jpg) (http://postimg.org/image/une4u0s1l/)

The Tao phrase is using a semitransparent lua background, the weather uses conky argb settings so that it will be transparent with a compositor - compton in this case. Same one line system info conky that I've used for years. Fluxbox, VSIDO.
Title: Re: Conky Tips and Tricks
Post by: Sector11 on June 25, 2013, 08:35:30 PM
Quote from: PackRat on June 25, 2013, 08:14:25 PM
The Tao phrase is using a semitransparent lua background, the weather uses conky argb settings so that it will be transparent with a compositor - compton in this case. Same one line system info conky that I've used for years. Fluxbox, VSIDO.

Curious as to why you can't use draw-bg.lua(??) with weather conky?
I use compton and use draw-bg.lua with all my conkys. EDIT: OOPS! less one.

I see your 3 and raise you 1!

(http://s20.postimg.org/ivqpqt0nd/2013_06_25_17_26_49_1920x1080_Sector11.jpg) (http://postimg.org/image/ivqpqt0nd/)
*
S = cpu1
E = cpu2
C = cpu3
T = cpu0
O = fs_free_perc - root
R = fs_used_perc - root
- = memperc
1 = fs_free_perc - home
1 = fs_used_perc - home
Title: Re: Conky Tips and Tricks
Post by: PackRat on June 25, 2013, 09:08:17 PM
I can use the lua background with the weather -

(http://s17.postimg.org/sp19ay6nf/June_1372194152_1366x768.jpg) (http://postimg.org/image/sp19ay6nf/)

but the image files are washed out, or behind the background. I think it's the same issue that dobbie at #! was having. Since VSIDO has Xfce installed by default, I tried it with the argb settings just for comparison. Transparency is no big deal for for me since I only bring up the weather for a few minutes to get the forecaast, then kill it so I never really looked for a solution for the use of lua.
Title: Re: Conky Tips and Tricks
Post by: VastOne on June 25, 2013, 09:12:44 PM
^ That is why I  switched from a Conky weather to a IW/FF addon ... I spend a lot more time in a browser and have it available immediately

I am curious as to what you see within Xfce vs FluxBox?  Same washout?
Title: Re: Conky Tips and Tricks
Post by: Sector11 on June 25, 2013, 09:48:18 PM
Quote from: PackRat on June 25, 2013, 09:08:17 PM
I can use the lua background with the weather -

(http://s17.postimg.org/sp19ay6nf/June_1372194152_1366x768.jpg) (http://postimg.org/image/sp19ay6nf/)

but the image files are washed out, or behind the background.

It's how you use the LUA script ...

Clean crisp images (on the right):
lua_load /media/5/Conky/LUA/draw-bg.lua
TEXT
${lua conky_draw_bg 10 0 0 0 0 0x000000 0.3}\


washed out (on the left):
lua_load /media/5/Conky/LUA/draw-bg.lua
lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.2
TEXT


(http://s20.postimg.org/gi8rzsm89/2013_06_25_18_42_25_1920x1080_Sector11.jpg) (http://postimg.org/image/gi8rzsm89/)

I've never used VSIDO with Xfce - just OpenBox - tested Xfce but used OB.
Title: Re: Conky Tips and Tricks
Post by: jedi on June 25, 2013, 11:40:23 PM
Changed the "bargraph.lua" to suit me.  Gave up further tweaking when I discovered I couldn't place the 'bars' horizontally in the x y positions like I wanted to across the top...

(http://www.zimagez.com/miniature/screenshot-06252013-073210pm.png) (http://www.zimagez.com/zimage/screenshot-06252013-073210pm.php)
Title: Re: Conky Tips and Tricks
Post by: VastOne on June 25, 2013, 11:48:11 PM
^ Looks great Jedi!

Glad to see you are feeling better!  :)
Title: Re: Conky Tips and Tricks
Post by: PackRat on June 26, 2013, 12:28:45 AM
Quote from: VastOne on June 25, 2013, 09:12:44 PM
^ That is why I  switched from a Conky weather to a IW/FF addon ... I spend a lot more time in a browser and have it available immediately

I am curious as to what you see within Xfce vs FluxBox?  Same washout?

It's washed out in Xfce, Fluxbox, and Fvwm. Using the conky argb settings with Xfce compositing worked just fine so I tried it with compton - works as intended with fluxbox and fvwm.

@Sector11 - I tried that method when I was tracking the issues/fixes with dobbie on the #! forum, if I use that method, the background doesn't show at all. I never bothered to delve any deeper into the script or configuration since I just check the weather every now and then.
Title: Re: Conky Tips and Tricks
Post by: Sector11 on June 26, 2013, 12:33:53 AM
^ OK, just curious anyway.
Title: Re: Conky Tips and Tricks
Post by: VastOne on June 26, 2013, 12:36:14 AM
@Rat Man

If I could find a way to rip out the compositor from Xfce, it would be the default in VSIDO.  It is by far the best compositor I have ever seen and used.  I do like Compton though, it is easily configured and works almost as well
Title: Re: Conky Tips and Tricks
Post by: jst_joe on June 26, 2013, 10:11:57 PM
@PackRat
Can you post this wall or a link to it?
I'd like to play with it a little.

Quote from: PackRat on June 25, 2013, 08:14:25 PM
@vastone - nice one.

I'll see your scrot and raise you one conky:

(http://s12.postimg.org/une4u0s1l/2013_06_25_scrot.jpg) (http://postimg.org/image/une4u0s1l/)

The Tao phrase is using a semitransparent lua background, the weather uses conky argb settings so that it will be transparent with a compositor - compton in this case. Same one line system info conky that I've used for years. Fluxbox, VSIDO.
Title: Re: Conky Tips and Tricks
Post by: PackRat on June 27, 2013, 12:51:00 AM
Here you go:

(http://s9.postimg.org/3w85cj417/3d_view_desktop_3200x1200_hd_wallpaper_995573.jpg) (http://postimg.org/image/3w85cj417/)

I believe I found it here -  http://onlyhdwallpapers.com/ (http://onlyhdwallpapers.com/)

that is the original file name so you can search other wallpaper sites if you're so inclined.

Title: Re: Conky Tips and Tricks
Post by: jst_joe on June 27, 2013, 01:05:02 AM
^ Thank You Sir!
Title: Re: Conky Tips and Tricks
Post by: PackRat on June 27, 2013, 01:29:41 AM
no problem

link to original - http://onlyhdwallpapers.com/3d/3d-view-desktop-hd-wallpaper-995573/ (http://onlyhdwallpapers.com/3d/3d-view-desktop-hd-wallpaper-995573/)