Conky Support, Codes and Screenshots

falldown

Sorry that I have not posted on this panel for awhile, but I have hit a roadblock with one significant area..
Lua for some strange reason does not recognize "~/" as "/home/username". So I am thinking that all paths should be in our root directory. Which makes sense considering all other theming files are stored there.     

dizzie

Quote from: falldown on February 12, 2013, 05:19:15 PM
Sorry that I have not posted on this panel for awhile, but I have hit a roadblock with one significant area..
Lua for some strange reason does not recognize "~/" as "/home/username". So I am thinking that all paths should be in our root directory. Which makes sense considering all other theming files are stored there.   

Try use $HOME (yes with caps)
Reclaim your culture, it's within your reach!

My Blog | Facebook | Twitter | G+ | VSIDO |

falldown

Hmmm.. that is a no go dizzie. lua is being a jerk.  ;D

dizzie

Reclaim your culture, it's within your reach!

My Blog | Facebook | Twitter | G+ | VSIDO |

lwfitz




You can find the config here

And the wallpaper here
Don't Be A Dick!

Sector11

@ falldown ...

Dizzie's link:  Under 5.3 - String Manipulation just above Pattern I see:

Here are some examples:

   x = string.gsub("hello world", "(%w+)", "%1 %1")
   --> x="hello hello world world"

   x = string.gsub("hello world", "(%w+)", "%1 %1", 1)
   --> x="hello hello world"

   x = string.gsub("hello world from Lua", "(%w+)%s*(%w+)", "%2 %1")
   --> x="world hello Lua from"

   x = string.gsub("home = $HOME, user = $USER", "%$(%w+)", os.getenv)
   --> x="home = /home/roberto, user = roberto"

   x = string.gsub("4+5 = $return 4+5$", "%$(.-)%$", function (s)
         return loadstring(s)()
       end)
   --> x="4+5 = 9"

   local t = {name="lua", version="5.0"}
   x = string.gsub("$name_$version.tar.gz", "%$(%w+)", function (v)
         return t[v]
       end)
   --> x="lua_5.0.tar.gz"


Will that help?
Stay Home

VastOne

Isn't there a standard CPU temp and MB temp Conky variable that works across all systems?  I thought we had discussed this and made it the default but I must have lost it along the way.

I want to standardize the conky's so that the kernel, uptime, cpu%, mem%, CPU temp MB Temp HD Temp and NET are consistent on every install
VSIDO      VSIDO Change Blog    

    I dev VSIDO

jedi

MB & CPU temps will differ by manufacturer.  Also, some laptops don't have the same sensors.  I don't think (assumption) that SSD drives have internal temp sensors.  (the last two I've had did not)  The NET part will be dependent on eth0 or wlan0, so not all the same there either.  I think the 'safe' across-the-board settings will probably be the Kernel, Uptime, CPU%, Mem% and Time and Date.  I also think this is one of those "Sector11" Conky questions!  But here's my two coppers anyway!
Forum Netiquette

"No matter how smart you are you can never convince someone stupid that they are stupid."  Anonymous

VastOne

I realize that Jedi.  I probably should have asked this...

Didn't we come up with a conky default that did not include CPU and MB temperatures...

My bad
VSIDO      VSIDO Change Blog    

    I dev VSIDO

Sector11

I came up with a few. That have since had temps added.

My new default - no internet conky! which started without temps or fan speed as well.

and the dark one here: Dark or Light wallpapers with different tint2 although the idea here wasn't the conkys so much as the changing backgrounds.

falldown asked me about a set of "Generic" system info commands for conky that would work with every install, so I came up with a list

The one temp I thought that might be safe not longer is - hddtemp for /dev/sda because of SDD
Network connections are not safe ... ethX wlanX ppaX (or something like that).

So a basic conky to show system info from the list I made for falldown.
Stay Home

Sector11

And it doesn't have to be that dull either:
A few formatting tricks - a mono font (highly recommended) and it can look nice, clean or a bit more complex.

It's all about options!
Stay Home

dizzie

^ loves simplicity


*dizzie approves*


;D
Reclaim your culture, it's within your reach!

My Blog | Facebook | Twitter | G+ | VSIDO |

Sector11

#237
I've been playing with it ... try this:


# killall conky && conky -c /media/5/Conky/S11_Disk_Activity-2.conky &
###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes

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

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

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

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

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

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

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

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

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

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

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
default_shade_color 000000
default_outline_color 000000

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

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

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

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

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

# change GiB to G and MiB to M
short_units yes

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

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

## default bar size
default_bar_size 200 20

## Width for $top name value (defaults to 15 characters).
top_name_width 8

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

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

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

# stuff after 'TEXT' will be formatted on screen
TEXT
${alignc}${time %x}
${time %X}${alignr 15}${uptime_short}

${alignc}Hosted by: ${nodename}
${alignc}${color}${kernel}
${goto 10}${diskiograph_read 50,250 FFFF00 BBFF00 -t -l}${goto 10}${diskiograph_write 50,250 0000FF FF0000 -t -l}${goto 10}${color6}${cpubar cpu4 50,250}${color}\
${voffset -35}${goto 80}SDA: R: ${diskio_read /dev/sda}
${goto 80}     W: ${diskio_write /dev/sda}
${voffset 5}${goto 60}${color1}${fs_bar /}${color}
${voffset -30}/Root   ${fs_size /}${goto 170}Used${goto 220}${fs_used_perc /}%
${goto 60}${color1}${fs_bar_free /}${color}
${voffset -30}${goto 170}Free${goto 220}${fs_free_perc /}%
${goto 60}${color1}${fs_bar /home}${color}
${voffset -30}/Home   ${fs_size /home}${goto 170}Used${goto 220}${fs_used_perc /home}%
${goto 60}${color1}${fs_bar_free /home}${color}
${voffset -30}${goto 170}Free${goto 220}${fs_free_perc /home}%${font monofur:pixelsize=3}

${font}${goto 60}${color1}${cpubar cpu1}${goto 60}${cpugraph cpu1 -t 20,200 FF0000 FFFF00}${color}
${voffset -30}${goto 10}CPU1${goto 70}${freq_g} GHz${goto 220}${color}${if_match ${cpu cpu1}<10}  ${cpu cpu1}\
${else}${if_match ${cpu cpu1}<100} ${cpu cpu1}\
${else}${cpu cpu1}${endif}${endif}%${font monofur:pixelsize=3}

${font}${goto 60}${color1}${cpubar cpu0}${goto 60}${cpugraph cpu0 -t 20,200 FF0000 FFFF00}${color}
${voffset -30}${goto 10}CPU0${goto 70}${freq} MHz${goto 220}${color}${if_match ${cpu cpu0}<10}  ${cpu cpu0}\
${else}${if_match ${cpu cpu0}<100} ${cpu cpu0}\
${else}${cpu cpu0}${endif}${endif}%${font monofur:pixelsize=20}
${font}RAM: ${mem}/${memmax}${alignr 5}Swap: ${swap}/${swapmax}
SDA: Read: ${diskio_read /dev/sda}${goto 160}Write: ${diskio_write /dev/sda}

Memory ${color5}${hr}${color}
${goto 10}${color1}${membar 50,260}${color6}${goto 10}${memgraph 50,260 00BFFF FF0000}${goto 10}${color}${memgauge 50,260}${color}
${voffset -55}  ${color5}Total ${memmax} ${goto 150}In Use    ${mem}
  Free  ${memfree}${goto 150}Free Easy ${memeasyfree}${color}

Name${goto 120}PID    CPU     MEM
${color5}${stippled_hr 2}${color}
${top name 1}   ${top pid 1} ${top cpu 1}  ${top mem 1}
${top name 2}   ${top pid 2} ${top cpu 2}  ${top mem 2}
${top name 3}   ${top pid 3} ${top cpu 3}  ${top mem 3}
${top name 5}   ${top pid 5} ${top cpu 5}  ${top mem 5}
${top name 6}   ${top pid 6} ${top cpu 6}  ${top mem 6}
${top name 7}   ${top pid 7} ${top cpu 7}  ${top mem 7}
${top name 8}   ${top pid 8} ${top cpu 8}  ${top mem 8}
${top name 9}   ${top pid 9} ${top cpu 9}  ${top mem 9}
${color9}${hr}${color}
${goto 40}${color5}open ports: ${tcp_portmon 1 65535 count}
${goto 40}IP${alignr 5}DPORT${color}
${goto 40}${tcp_portmon 1 65535 rip  0}${alignr 1}${tcp_portmon 1 65535 rport  0}
${tcp_portmon 1 65535 rhost 0}
${goto 40}${tcp_portmon 1 65535 rip  1}${alignr 1}${tcp_portmon 1 65535 rport  1}
${tcp_portmon 1 65535 rhost 1}
${goto 40}${tcp_portmon 1 65535 rip  2}${alignr 1}${tcp_portmon 1 65535 rport  2}
${tcp_portmon 1 65535 rhost 2}
${goto 40}${tcp_portmon 1 65535 rip  3}${alignr 1}${tcp_portmon 1 65535 rport  3}
${tcp_portmon 1 65535 rhost 3}
${goto 40}${tcp_portmon 1 65535 rip  4}${alignr 1}${tcp_portmon 1 65535 rport  4}
${tcp_portmon 1 65535 rhost 4}
${goto 40}${tcp_portmon 1 65535 rip  5}${alignr 1}${tcp_portmon 1 65535 rport  5}
${tcp_portmon 1 65535 rhost 5}


NOTE:  it is setup for monofur font.
Comment these out if you don't use the LUA background - or change path  if you do.
lua_load /media/5/Conky/LUA/draw-bg.lua
lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.1


And just so you know, I don't have a CPU4 - I just want the box to be a different colour.
Stay Home

lwfitz



conky_weather2

### Thanks to everyone at the VSIDO Forums #####
### Thanks to TeoBigusGeekus for the accuweather script #####
### Accuweather images edited by lwfitz ####
### allcombined.lua written by mrpeachy ####
### clock background image by Doruletz ####
max_specials 10000
max_user_text 15000
background no
use_xft yes
xftfont sans:size=9
xftalpha 1
total_run_times 0
own_window yes
own_window_argb_visual yes
own_window_transparent yes
own_window_type normal
own_window_title conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 375 1020
maximum_width 375
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_shade_color black
default_outline_color white
alignment top_left
gap_x 15
gap_y 20
no_buffers yes
uppercase no
cpu_avg_samples 6
override_utf8_locale yes
text_buffer_size 100000
top_name_width 5
update_interval 1
default_color FFFFFF
temperature_unit fahrenheit
# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2
format_human_readable yes
short_units yes
update_interval 1
imlib_cache_size 0

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

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

----------------------------

################### LUA #######################################

lua_load ~/Conky/allcombined_2.lua


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

##############################  End LUA  ###
TEXT
${image $HOME/Conky/Clock-Flip.png -p 85,-5 -s 100x110}${image $HOME/Conky/Clock-Flip.png -p 185,-5 -s 100x110}
#########################################################################################################
# (RO) TIME
${font Helvetica LT Std :style=bold:size=58}${color 737373}${goto 100}${time %H}${goto 175}${goto 200}${color 737373}${time %M}${font}${color}
#########################################################################################################

# LOCATION (CITY NAMES) #

${voffset -10}${goto 85}${font Bitstream Vera Sans Mono:style=Bold:size=24:locale=ro}Monrovia,CA${font}${color}

#${lua tex_bg {20,4,20,365,540,"/home/luke/Conky/brushed.png"}}
${lua draw_bg {20,8,23,365,1020,0x737373,.15,2,8}}${voffset -10}${font WhiteRabbit:size=15}${goto 30}Temp ${goto 288}Feels${voffset 10}
${font WhiteRabbit:size=20}${goto 25}${execpi 600 sed -n '4p' $HOME/Accuweather_Conky_USA_Images/curr_cond}°F ${goto 286}${execpi 600 sed -n '5p' $HOME/Accuweather_Conky_USA_Images/curr_cond}°F
${font WhiteRabbit:size=11}${texeci 500 bash $HOME/Accuweather_Conky_USA_Images/acc_usa_images}${image $HOME/Accuweather_Conky_USA_Images/cc.png -p 75,118 -s 240x225}




${font WhiteRabbit:size=15}${goto 30}Dawn ${goto 285}Dusk
${voffset 10}${font WhiteRabbit:size=17}${goto 15}${execpi 600 sed -n '15p' $HOME/Accuweather_Conky_USA_Images/curr_cond}${goto 262}${execpi 600 sed -n '16p' $HOME/Accuweather_Conky_USA_Images/curr_cond}${voffset -10}

${font WhiteRabbit:size=13}${goto 30}${execpi 600 sed -n '6p' $HOME/Accuweather_Conky_USA_Images/tod_ton}${goto 145}${execpi 600 sed -n '11p' $HOME/Accuweather_Conky_USA_Images/tod_ton}${goto 265}${execpi 600 sed -n '16p' $HOME/Accuweather_Conky_USA_Images/tod_ton}

${font WhiteRabbit:size=10}${goto 100}${execpi 600 sed -n '9p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 215}${execpi 600 sed -n '14p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 330}${execpi 600 sed -n '19p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F
${voffset 5}${font WhiteRabbit:size=10}${goto 100}${execpi 600 sed -n '10p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 215}${execpi 600 sed -n '15p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 330}${execpi 600 sed -n '20p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${image $HOME/Accuweather_Conky_USA_Images/7.png -p 20,318 -s 80x67}${image $HOME/Accuweather_Conky_USA_Images/12.png -p 138,318 -s 80x67}${image $HOME/Accuweather_Conky_USA_Images/17.png -p 256,318 -s 80x67}${voffset -5}



${font WhiteRabbit:size=13}${goto 30}${execpi 600 sed -n '21p' $HOME/Accuweather_Conky_USA_Images/tod_ton}${goto 145}${execpi 600 sed -n '1p' $HOME/Accuweather_Conky_USA_Images/last_days}${goto 265}${execpi 600 sed -n '6p' $HOME/Accuweather_Conky_USA_Images/last_days}

${font WhiteRabbit:size=10}${goto 100}${execpi 600 sed -n '24p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 215}${execpi 600 sed -n '4p' $HOME/Accuweather_Conky_USA_Images/last_days}°F${goto 330}${execpi 600 sed -n '9p' $HOME/Accuweather_Conky_USA_Images/last_days}°F
${voffset 5}${font WhiteRabbit:size=10}${goto 100}${execpi 600 sed -n '25p' $HOME/Accuweather_Conky_USA_Images/tod_ton}°F${goto 215}${execpi 600 sed -n '5p' $HOME/Accuweather_Conky_USA_Images/last_days}°F${goto 330}${execpi 600 sed -n '10p' $HOME/Accuweather_Conky_USA_Images/last_days}°F${image $HOME/Accuweather_Conky_USA_Images/22.png -p 20,405 -s 80x67}${image $HOME/Accuweather_Conky_USA_Images/N2.png -p 138,405 -s 80x67}${image $HOME/Accuweather_Conky_USA_Images/N7.png -p 256,405 -s 80x67}${voffset -5}
#
#
#
#${font WhiteRabbit:size=13}${goto 30}${execpi 600 sed -n '11p' $HOME/Accuweather_Conky_USA_Images/last_days}${goto 145}${execpi 600 sed -n '16p' $HOME/Accuweather_Conky_USA_Images/last_days}${goto 265}${execpi 600 sed -n '21p' $HOME/Accuweather_Conky_USA_Images/last_days}
#
#${font WhiteRabbit:size=10}${goto 100}${execpi 600 sed -n '14p' $HOME/Accuweather_Conky_USA_Images/last_days}°F${goto 215}${execpi 600 sed -n '19p' $HOME/Accuweather_Conky_USA_Images/last_days}°F${goto 330}${execpi 600 sed -n '24p' $HOME/Accuweather_Conky_USA_Images/last_days}°F
#${voffset 5}${font WhiteRabbit:size=10}${goto 100}${execpi 600 sed -n '15p' $HOME/Accuweather_Conky_USA_Images/last_days}°F${goto 215}${execpi 600 sed -n '20p' $HOME/Accuweather_Conky_USA_Images/last_days}°F${goto 330}${execpi 600 sed -n '25p' $HOME/Accuweather_Conky_USA_Images/last_days}°F${image $HOME/Accuweather_Conky_USA_Images/N12.png -p 20,492 -s 80x67}${image $HOME/Accuweather_Conky_USA_Images/N17.png -p 138,492 -s 80x67}${image $HOME/Accuweather_Conky_USA_Images/N22.png -p 256,492 -s 80x67}${voffset -5}


${color 737373}${goto 15}${cpubar 1,350 cpu0}${color}

${font WhiteRabbit:size=25}${goto 80}Now Playing





${color 737373}${goto 15}${cpubar 1,350 cpu0}${color}
${image ~/Conky/grey_bar2.png -s 50x90 -p 168,660}
${voffset -30}${goto 15}${font WhiteRabbit:size=13}CPU1${goto 65}${cpu cpu1}%${goto 110}CPU2 ${cpu cpu2}%${goto 207}${font WhiteRabbit:size=20}Memory ${alignr 22}${memperc}%
${goto 15}${font WhiteRabbit:size=13}CPU3${goto 65}${cpu cpu3}%${goto 110}CPU4 ${cpu cpu4}%${voffset 20}${goto 207}${font WhiteRabbit:size=20}Swap ${alignr 22}${swapperc}%${voffset -20}
${goto 15}${font WhiteRabbit:size=13}CPU5${goto 65}${cpu cpu5}%${goto 110}CPU6 ${cpu cpu6}%

${color 737373}${goto 15}${cpubar 1,350 cpu0}${color}

#${font WhiteRabbit:size=25}${goto 125}Storage
${goto 15}${font WhiteRabbit:size=13}/Root${goto 130}${fs_used /}${goto 180} / ${fs_size /} ${alignr 25}${fs_used_perc /}%
${voffset 8}${goto 15}${font WhiteRabbit:size=13}/Home${goto 130}${fs_used /home}${goto 180} / ${fs_size /home} ${alignr 25}${fs_used_perc /home}%
${voffset 8}${goto 15}${font WhiteRabbit:size=13}Backup${goto 130}${fs_used /media/storage}${goto 180} / ${fs_size /media/storage} ${alignr 25}${fs_used_perc /media/storage}%
${voffset 8}${goto 15}${font WhiteRabbit:size=13}Music${goto 130}${fs_used /media/sde6}${goto 180} / ${fs_size /media/sde6} ${alignr 25}${fs_used_perc /media/sde6}%
${voffset 8}${goto 15}${font WhiteRabbit:size=13}External${goto 130}${fs_used /media/sde5}${goto 180} / ${fs_size /media/sde5} ${alignr 25}${fs_used_perc /media/sde5}%
${voffset 8}${goto 15}${font WhiteRabbit:size=13}Videos${goto 130}${fs_used /media/sdc1}${goto 180} / ${fs_size /media/sdc1} ${alignr 25}${fs_used_perc /media/sdc1}%
${voffset 8}${goto 15}${font WhiteRabbit:size=13}Software${goto 130}${fs_used /media/sdb1}${goto 180} / ${fs_size /media/sdb1} ${alignr 25}${fs_used_perc /media/sdb1}%
#${voffset 8}${goto 15}${font WhiteRabbit:size=13}/Home${goto 130}${fs_used /home}${goto 180} / ${fs_size /home} ${alignr 25}${fs_used_perc /home}%

${color 737373}${goto 15}${cpubar 1,350 cpu0}${color}

${goto 15}${voffset -3}Down Speed${goto 175}${downspeed eth0} ${goto 275}${voffset -8}${downspeedgraph eth0 20,75 99CCFF 000099}${color}
${goto 15}${voffset 8}Up Speed${goto 175}${upspeed eth0} ${goto 275}${voffset -8}${upspeedgraph eth0 20,75 99CCFF 000099}${color}


allcombined_2.lua

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

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

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

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

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

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

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

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


Teos weather accuweather script w/ my edited images and the clock background
image can be found here

The wallpaper can be found here
Don't Be A Dick!

jedi

Forum Netiquette

"No matter how smart you are you can never convince someone stupid that they are stupid."  Anonymous