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
1b)Accuweather - USA USERS - conditions: font defunct


1d1)Accuweather - Images - INTERNATIONAL USERS - conditions: images


1d1.1)Accuweather - Images - INTERNATIONAL USERS_Hourly_Forecast


1d2)Accuweather - ConkyWeather font - INTERNATIONAL USERS


1e)Accuweather - Images - USA USERS


2)WUnderground ICAL - International users - conditions: font


NWS XML - USA users - NOAA Weather Service - conditions: images (Opinion alert: YUK on those images)


Weather.com conky script - all users - conditions: images


The differences in images between Accuweather and Weather·com
(http://t.imgbox.com/adkbpksH.jpg) (http://imgbox.com/adkbpksH)


In the directory for each of Teo's scripts you'll see a couple of PDF files.

If you look at, for example: 1d1_Output_of_the_script.pdf you will see numbers on the left.

1, 2, 3, 4 etc

those are the 1p, 2p, 3p, 4p etc in the conky commands:
Code: [Select]
↑ ${execi 600 sed -n '19p' /media/5/Conky/accuweather_conky/tod_ton}°
if you look at "tod_ton" you will see 19 is a number ... in representing the high temperature

Sorry about that Jed ...
I need a coffee!

Love what you are doing!!!  You and VastOne have the space for larger fonts, that makes a BIG difference.

Opinion: Since pictures speak a thousand words, I don't use text for the conditions.

For a few reasons really:
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
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
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?

Quote
Coffee'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: folti
when 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:
Code: [Select]
Total CPU:
 ${cpu cpu0}%${goto 40}${color 597DB2}${cpubar cpu0}${color}${goto 40}${cpugraph cpu0 -t 20,210 FF0000 FFFF33}
to
Code: [Select]
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
Code: [Select]
# 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:

Code: [Select]
${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
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:
Code: [Select]
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:
Code: [Select]
###  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:
Code: [Select]
color5 NavajoWhite
color6 DeepSkyBlue


There is one more in the own_window section:
Code: [Select]
own_window_colour grayNOTE: 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}

${color colorname}

${color xxxxxx}

Where does one find these codes and names.  Most colour pickers have them, like "color2", the colour chooser in geany is almost the same but no drop down list.
color2geany
(http://t.imgbox.com/aduTnIRf.jpg) (http://imgbox.com/aduTnIRf)(http://t.imgbox.com/adwXoITf.jpg) (http://imgbox.com/adwXoITf)

Then there is my favourite - a text file: Web_Safe_Colours.txt
Code: [Select]
Hex       Decimal        142 colours
code      code           HTML name

    Red colors
CD5C5C    205  92  92    IndianRed
F08080    240 128 128    LightCoral
FA8072    250 128 114    Salmon
E9967A    233 150 122    DarkSalmon
FFA07A    255 160 122    LightSalmon
DC143C    220  20  60    Crimson
FF0000    255   0   0    Red
B22222    178  34  34    FireBrick
8B0000    139   0   0    DarkRed

    Pink colors
FFC0CB    255 192 203    Pink
FFB6C1    255 182 193    LightPink
FF69B4    255 105 180    HotPink
FF1493    255  20 147    DeepPink
C71585    199  21 133    MediumVioletRed
DB7093    219 112 147    PaleVioletRed

    Orange colors
FFA07A    255 160 122    LightSalmon
FF7F50    255 127  80    Coral
FF6347    255  99  71    Tomato
FF4500    255  69   0    OrangeRed
FF8C00    255 140   0    DarkOrange
FFA500    255 165   0    Orange

    Yellow colors
FFD700    255 215   0    Gold
FFFF00    255 255   0    Yellow
FFFFE0    255 255 224    LightYellow
FFFACD    255 250 205    LemonChiffon
FAFAD2    250 250 210    LightGoldenrodYellow
FFEFD5    255 239 213    PapayaWhip
FFE4B5    255 228 181    Moccasin
FFDAB9    255 218 185    PeachPuff
EEE8AA    238 232 170    PaleGoldenrod
F0E68C    240 230 140    Khaki
BDB76B    189 183 107    DarkKhaki

    Purple colors
E6E6FA    230 230 250    Lavender
D8BFD8    216 191 216    Thistle
DDA0DD    221 160 221    Plum
EE82EE    238 130 238    Violet
DA70D6    218 112 214    Orchid
FF00FF    255   0 255    Fuchsia
FF00FF    255   0 255    Magenta
BA55D3    186  85 211    MediumOrchid
9370DB    147 112 219    MediumPurple
8A2BE2    138  43 226    BlueViolet
9400D3    148   0 211    DarkViolet
9932CC    153  50 204    DarkOrchid
8B008B    139   0 139    DarkMagenta
800080    128   0 128    Purple
4B0082     75   0 130    Indigo
6A5ACD    106  90 205    SlateBlue
483D8B     72  61 139    DarkSlateBlue
7B68EE    123 104 238    MediumSlateBlue

    Green colors
ADFF2F    173 255  47    GreenYellow
7FFF00    127 255   0    Chartreuse
7CFC00    124 252   0    LawnGreen
00FF00      0 255   0    Lime
32CD32     50 205  50    LimeGreen
98FB98    152 251 152    PaleGreen
90EE90    144 238 144    LightGreen
00FA9A      0 250 154    MediumSpringGreen
00FF7F      0 255 127    SpringGreen
3CB371     60 179 113    MediumSeaGreen
2E8B57     46 139  87    SeaGreen
228B22     34 139  34    ForestGreen
008000      0 128   0    Green
006400      0 100   0    DarkGreen
9ACD32    154 205  50    YellowGreen
6B8E23    107 142  35    OliveDrab
808000    128 128   0    Olive
556B2F     85 107  47    DarkOliveGreen
66CDAA    102 205 170    MediumAquamarine
8FBC8F    143 188 143    DarkSeaGreen
20B2AA     32 178 170    LightSeaGreen
008B8B      0 139 139    DarkCyan
008080      0 128 128    Teal

    Blue/Cyan colors
00FFFF      0 255 255    Aqua
00FFFF      0 255 255    Cyan
E0FFFF    224 255 255    LightCyan
AFEEEE    175 238 238    PaleTurquoise
7FFFD4    127 255 212    Aquamarine
40E0D0     64 224 208    Turquoise
48D1CC     72 209 204    MediumTurquoise
00CED1      0 206 209    DarkTurquoise
5F9EA0     95 158 160    CadetBlue
4682B4     70 130 180    SteelBlue
B0C4DE    176 196 222    LightSteelBlue
B0E0E6    176 224 230    PowderBlue
ADD8E6    173 216 230    LightBlue
87CEEB    135 206 235    SkyBlue
87CEFA    135 206 250    LightSkyBlue
00BFFF      0 191 255    DeepSkyBlue
1E90FF     30 144 255    DodgerBlue
6495ED    100 149 237    CornflowerBlue
7B68EE    123 104 238    MediumSlateBlue
4169E1     65 105 225    RoyalBlue
0000FF      0   0 255    Blue
0000CD      0   0 205    MediumBlue
00008B      0   0 139    DarkBlue
000080      0   0 128    Navy
191970     25  25 112    MidnightBlue

    Brown colors
FFF8DC    255 248 220    Cornsilk
FFEBCD    255 235 205    BlanchedAlmond
FFE4C4    255 228 196    Bisque
FFDEAD    255 222 173    NavajoWhite
F5DEB3    245 222 179    Wheat
DEB887    222 184 135    BurlyWood
D2B48C    210 180 140    Tan
BC8F8F    188 143 143    RosyBrown
F4A460    244 164  96    SandyBrown
DAA520    218 165  32    Goldenrod
B8860B    184 134  11    DarkGoldenrod
CD853F    205 133  63    Peru
D2691E    210 105  30    Chocolate
8B4513    139  69  19    SaddleBrown
A0522D    160  82  45    Sienna
A52A2A    165  42  42    Brown
800000    128   0   0    Maroon

    White colors
FFFFFF    255 255 255    White
FFFAFA    255 250 250    Snow
F0FFF0    240 255 240    Honeydew
F5FFFA    245 255 250    MintCream
F0FFFF    240 255 255    Azure
F0F8FF    240 248 255    AliceBlue
F8F8FF    248 248 255    GhostWhite
F5F5F5    245 245 245    WhiteSmoke
FFF5EE    255 245 238    Seashell
F5F5DC    245 245 220    Beige
FDF5E6    253 245 230    OldLace
FFFAF0    255 250 240    FloralWhite
FFFFF0    255 255 240    Ivory
FAEBD7    250 235 215    AntiqueWhite
FAF0E6    250 240 230    Linen
FFF0F5    255 240 245    LavenderBlush
FFE4E1    255 228 225    MistyRose

    Gray colors
DCDCDC    220 220 220    Gainsboro
D3D3D3    211 211 211    LightGrey
C0C0C0    192 192 192    Silver
A9A9A9    169 169 169    DarkGray
808080    128 128 128    Gray
696969    105 105 105    DimGray
778899    119 136 153    LightSlateGray
708090    112 128 144    SlateGray
2F4F4F     47  79  79    DarkSlateGray
000000      0   0   0    Black

Or if you prefer alpha-sorted by name:
Code: [Select]
aliceblue             #F0F8FF
antiquewhite          #FAEBD7
aqua                  #00FFFF
aquamarine            #7FFFD4
azure                 #F0FFFF
beige                 #F5F5DC
bisque                #FFE4C4
black                 #000000
blanchedalmond        #FFEBCD
blue                  #0000FF
blueviolet            #8A2BE2
brown                 #A52A2A
burlywood             #DEB887
cadetblue             #5F9EA0
chartreuse            #7FFF00
chocolate             #D2691E
coral                 #FF7F50
cornflowerblue        #6495ED
cornsilk              #FFF8DC
crimson               #DC143C
cyan                  #00FFFF
darkblue              #00008B
darkcyan              #008B8B
darkgoldenrod         #B8860B
darkgray              #A9A9A9
darkgreen             #006400
darkgrey              #A9A9A9
darkkhaki             #BDB76B
darkmagenta           #8B008B
darkolivegreen        #556B2F
darkorange            #FF8C00
darkorchid            #9932CC
darkred               #8B0000
darksalmon            #E9967A
darkseagreen          #8FBC8F
darkslateblue         #483D8B
darkslategray         #2F4F4F
darkslategrey         #2F4F4F
darkturquoise         #00CED1
darkviolet            #9400D3
deeppink              #FF1493
deepskyblue           #00BFFF
dimgray               #696969
dimgrey               #696969
dodgerblue            #1E90FF
firebrick             #B22222
floralwhite           #FFFAF0
forestgreen           #228B22
fuchsia               #FF00FF
gainsboro             #DCDCDC
ghostwhite            #F8F8FF
goldenrod             #DAA520
gold                  #FFD700
gray                  #808080
green                 #008000
greenyellow           #ADFF2F
grey                  #808080
honeydew              #F0FFF0
hotpink               #FF69B4
indianred             #CD5C5C
indigo                #4B0082
ivory                 #FFFFF0
khaki                 #F0E68C
lavenderblush         #FFF0F5
lavender              #E6E6FA
lawngreen             #7CFC00
lemonchiffon          #FFFACD
lightblue             #ADD8E6
lightcoral            #F08080
lightcyan             #E0FFFF
lightgoldenrodyellow  #FAFAD2
lightgray             #D3D3D3
lightgreen            #90EE90
lightgrey             #D3D3D3
lightpink             #FFB6C1
lightsalmon           #FFA07A
lightseagreen         #20B2AA
lightskyblue          #87CEFA
lightslategray        #778899
lightslategrey        #778899
lightsteelblue        #B0C4DE
lightyellow           #FFFFE0
lime                  #00FF00
limegreen             #32CD32
linen                 #FAF0E6
magenta               #FF00FF
maroon                #800000
mediumaquamarine      #66CDAA
mediumblue            #0000CD
mediumorchid          #BA55D3
mediumpurple          #9370D8
mediumseagreen        #3CB371
mediumslateblue       #7B68EE
mediumspringgreen     #00FA9A
mediumturquoise       #48D1CC
mediumvioletred       #C71585
midnightblue          #191970
mintcream             #F5FFFA
mistyrose             #FFE4E1
moccasin              #FFE4B5
navajowhite           #FFDEAD
navy                  #000080
oldlace               #FDF5E6
olive                 #808000
olivedrab             #6B8E23
orange                #FFA500
orangered             #FF4500
orchid                #DA70D6
palegoldenrod         #EEE8AA
palegreen             #98FB98
paleturquoise         #AFEEEE
palevioletred         #D87093
papayawhip            #FFEFD5
peachpuff             #FFDAB9
peru                  #CD853F
pink                  #FFC0CB
plum                  #DDA0DD
powderblue            #B0E0E6
purple                #800080
red                   #FF0000
rosybrown             #BC8F8F
royalblue             #4169E1
saddlebrown           #8B4513
salmon                #FA8072
sandybrown            #F4A460
seagreen              #2E8B57
seashell              #FFF5EE
sienna                #A0522D
silver                #C0C0C0
skyblue               #87CEEB
slateblue             #6A5ACD
slategray             #708090
slategrey             #708090
snow                  #FFFAFA
springgreen           #00FF7F
steelblue             #4682B4
tan                   #D2B48C
teal                  #008080
thistle               #D8BFD8
tomato                #FF6347
turquoise             #40E0D0
violet                #EE82EE
wheat                 #F5DEB3
white                 #FFFFFF
whitesmoke            #F5F5F5
yellow                #FFFF00
yellowgreen           #9ACD32

Have fun with colours.

On a side note:  The colour names work here as well, so you are not limited to the pull-down menu choices

aliceblue, bisque, chocolate, darkgoldenrod, darksalmon, hotpink, lightgoldenrodyellow, mediumspringgreen, plum, silver

olive <<--- look jedi
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: GrouchyGaijin
Cool 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: stinkeye
Scripts 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: GrouchyGaijin
For 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.

Code: [Select]
#!/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: arclance
Why not use?
Code: [Select]
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: stinkeye
Could't find a solution so I added a sed command to change
background yes
to
background no
in any pasted in configs.

Code: [Select]
#!/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:
Code: [Select]
"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
Code: [Select]
#!/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
Code: [Select]
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
ggsia - Super script #2
Code: [Select]
#!/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 stop & re-start

if pgrep -f "conky -c $1"
then
pkill -xf "conky -c $1"
(sleep 2s && conky -c "$1") &
exit
else
conky -c "$1"
exit
fi

Nice stuff guys!

stinkeye points out a weakness of the above above a question:

HA!!!!  jedi has compition!
Along comes: CapMan

Quote from: stinkeye
Hi Sector11,
just a bit confused as to what the $1 variable is
and how to use the script.
Do I just add the path to a conkyrc as a variable to the script?

It may appear I know what I'm doing but I'm essentially a copy and paste man.
CapMan :P

$1 for a bash script is a command line variable.

stinki
Code: [Select]
#!/bin/bash
echo $1 $2

Code: [Select]
sector11 @ sector11
 21 Jan 13 | 11:52:44 ~
         $ stinki something
something
 sector11 @ sector11
 21 Jan 13 | 11:52:46 ~
         $ stinki something else
something else
 sector11 @ sector11
 21 Jan 13 | 11:52:50 ~
         $ stinki Hi stinkeye
Hi stinkeye
 sector11 @ sector11
 21 Jan 13 | 11:54:16 ~
         $

To continue: 
Yea, me too, I gotta use that line, CapMan sounds like a superhero!
Maybe change it to C&PDude so as not to interfere with any © you may have.

The top of 90% of my conkys have something like this:
Code: [Select]
# killall conky && conky -c /media/5/Conky/S11_VSIDO_v9.conkyrc &
I copy that line - less the hash - to kill all conkys and restart the one I'm working on.  BUT it does what you said a while back:
Quote from: stinkeye
All or nuttin'. Go hard or go home. ;)

So now at the top of my conkys I'll do:
Code: [Select]
# ggsia /media/5/Conky/S11_VSIDO_v9.conkyrc
then I'll pull a CapMan in the terminal
Code: [Select]
sector11 @ sector11
 21 Jan 13 | 11:25:16 ~
         $ ggsia /media/5/Conky/S11_VSIDO_v9.conkyrc

Like I said earlier in this post,
Perfect for editing!

Now to do a search and replace on "all files" in my conky directories:
Search: "# killall conky && conky -c"
Replace: "# ggsia"

Hmmmm, that will take a while, I'll probably have to watch a movie.

Thanks GrouchyGaijin ǝʎǝʞuıʇs sʞuɐɥʇ & arclance
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:
Code: [Select]
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:
Code: [Select]
${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
What is important: I show the font used because of what is below TEXT
Code: [Select]
xftfont OCR A Extended:bold:pixelsize=18
TEXT
L 1 = time H:M${goto 930}${time %H:%M}
L 2 = time x\
${goto 930}${font OCR A Extended:bold:pixelsize=16}${time %x}
${font}L 3\
${goto 350}L 3\
${goto 570}L 3\
${goto 930}L 3
L 4${goto 350}L 4${goto 570}L 4
L 5${goto 350}L 5${goto 570}L 5
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
L 8${goto 350}L 8${goto 940}L 8
${goto 350}L 9${goto 940}L 9
${goto 350}L 10${goto 730}L 10${goto 940}L 10
${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
${goto 730}L 13${goto 940}L 13
${goto 940}L 14
${goto 940}L 15
${goto 940}L 16
${goto 940}L 17
${goto 520}L 18${goto 940}L 18
${goto 520}L 19
${goto 520}L 20
${goto 520}L 21
${goto 520}L 22
${goto 520}L 23
${goto 520}L 24
${goto 520}L 25
${goto 520}L 26
${goto 520}L 27
${goto 520}L 28
${goto 520}L 29


${goto 200}L 32
${goto 200}L 33
${goto 200}L 34
${goto 200}L 35
${goto 200}L 36
${goto 200}L 37
${goto 200}L 38
${goto 200}L 39
${goto 200}L 40
${goto 200}L 41
${goto 200}L 42

Like I said - another option.

Something else you might find interesting:

  • xftfont OCR A Extended:bold:pixelsize=18, and
  • xftfont OCR A Extended:bold:size=18
     (http://t.imgbox.com/actE1DLT.jpg) (http://imgbox.com/actE1DLT)
do not produce the same font output
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:
Code: [Select]
${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

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

Code: [Select]
chmod +x gmail_parser.py
Step 3

In terminal

Code: [Select]
sudo apt-get install python-feedparser
Step 4

Download the attached conkyGoogleReader.py

Make it executable,  in terminal run

Code: [Select]
chmod +x conkyGoogleReader.py
Step 5

You should now be able to start this conky this way

Code: [Select]
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:
Code: [Select]
# 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
Code: [Select]
${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
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/
]]
_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]
Code: [Select]
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:
Code: [Select]
# 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:
Code: [Select]
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:
Code: [Select]
# 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:
Code: [Select]
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):
Code: [Select]
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:
Code: [Select]
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:

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

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

Code: [Select]
#!/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
Code: [Select]
#!/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
I am using the:

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

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

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

@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/)