Page 1876 of 2317 FirstFirst ... 876137617761826186618741875187618771878188619261976 ... LastLast
Results 18,751 to 18,760 of 23163

Thread: Post your .conkyrc files w/ screenshots

  1. #18751
    Join Date
    Mar 2010
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by BoredOutOfMyMind View Post
    # Usage:
    # .conkyrc: ${execi [time] /path/to/script/

    I am not sure which weather script you have in your conky.
    Thanks again BoredOutOfMyMind.
    So I put ${execi 999 /path/to/script/ here, it seems that's the max value I can use, otherwise conky goes mad!

    The weather script I'm using is slightly modified version of the accu-weather script from your linked thread.

    So, here are the final result for weather-conky:
    (I didn't add it to my main conky, which automatically starts at system boot, I'm afraid it will stall/break the main conky to as wget certainly can't run at system startup!)
    Code:
    # MY-CONKY - Weather
    # Based on conky-jc and the default .conkyrc and ubuntu forum
    #
    # -- d2btoo
    #
     
    # Create own window instead of using desktop (required in nautilus)
    own_window yes
    own_window_type normal
    own_window_argb_visual yes
    own_window_colour brown
    own_window_transparent yes
    #own_window_argb_value 40
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
     
    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes
    
    # Draw shades?
    draw_shades yes
     
    # fiddle with window
    use_spacer none
    
    # Use Xft?
    use_xft yes
    xftfont DejaVu Sans:size=10
    xftalpha 0.8
    override_utf8_locale yes
    text_buffer_size 2048
     
    # Update interval in seconds
    update_interval 999
     
    # Minimum size of text area
    # minimum_size 250 5
    
    # Text stuff
    draw_outline no # amplifies text if yes
    draw_borders no
    uppercase no # set to yes if you want all text to be in uppercase
     
    # Stippled borders?
    stippled_borders 3
    
    # border width
    border_width 10
     
    # Default colors and also border colors, grey90 == #e5e5e5
    default_color grey
    
    # Text alignment, other possible values are commented
    alignment top_left
    #alignment top_right
    #alignment bottom_left
    #alignment bottom_right
     
    # Gap between borders of screen and text
    gap_x 10
    gap_y 60
     
    # stuff after 'TEXT' will be formatted on screen
     
    TEXT
    ${color orange}WEATHER ${hr 2}$color
    ${execi 999 bash ~/accuweather_conky/accuw_script.sh}
    ${font conkyweather:size=40}${execi 999 sed -n '2p' ~/accuweather_conky/images}${font}${goto 85}${voffset -35}${execi 999 cat ~/accuweather_conky/msg}
    ${goto 85}${execi 999 cat ~/accuweather_conky/tmp}
    
    Feels Like: ${execi 999 cat ~/accuweather_conky/feel}
    Humidity : ${execi 999 cat ~/accuweather_conky/hum}
    Winds : ${execi 999 cat ~/accuweather_conky/winds}
    Sun Rise/Set : ${execi 999 sed -n '1p' ~/accuweather_conky/sun} - ${execi 999 sed -n '2p' ~/accuweather_conky/sun}
    Last edited by d2btoo; October 3rd, 2012 at 06:48 PM.

  2. #18752
    Join Date
    Apr 2007
    Beans
    195

    Re: Post your .conkyrc files w/ screenshots

    Don't mind me, I need a new backup post.

    .conkyrc.main
    Code:
    #-----Conky Settings
    background yes
    no_buffers yes
    out_to_console no
    top_cpu_separate no
    cpu_avg_samples 2
    net_avg_samples 3
    total_run_times 0
    update_interval 1
    
    #-----Text Settings
    uppercase no
    override_utf8_locale yes
    short_units no
    pad_percents 0
    text_buffer_size 4096
    max_user_text 65536
    use_xft yes
    xftalpha 0.5
    xftfont DiamondFantasy:size=16
    
    #-----Window Settings
    own_window yes
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    own_window_type normal
    
    #-----Graphics Settings
    double_buffer yes
    draw_borders no
    draw_graph_borders yes
    draw_shades no
    draw_outline no
    max_specials 4096
    imlib_cache_size 0
    
    #-----Layout Settings
    alignment top_right
    gap_x 75
    gap_y 0
    maximum_width 600
    minimum_size 360 250
    use_spacer right
    
    #-----Colors
    default_color 808080          #Grey Default
    default_outline_color ffffff  #White Outlines
    default_shade_color c0c0c0    #Silver Shade
    color0 ff0000									#Red
    color1 ffff00									#Yellow
    color2 ffffff									#White
    color3 808080									#Grey
    color4 008000									#Green
    color5 c0c0c0									#Silver
    color6 ffd700									#Gold
    color7 000080									#Navy
    color8 0000FF									#Blue
    color9 404040									#DarkGrey
    
    #-----Lua To Load
    lua_load /home/dorian/Conky/Scripts/mainrings.lua
    lua_draw_hook_pre draw_pos
    lua_draw_hook_post draw_neg
    
    #-----Required Fonts(For Use In This Conky. Google Search Or DaFont.com to Find Them)
    #-----Diamond Fantasy
    #-----TransponderAOE
    
    TEXT#-----System Header, Conky Version(Only When Needed), and Xubuntu Graphic
    ${font}${color1}${pre_exec cat ~/Conky/lsb-release | grep 'DISTRIB_ID=' | awk '{print $2}'} ${pre_exec cat ~/Conky/lsb-release | grep 'DISTRIB_RELEASE=' | awk '{print $2}'} (${pre_exec cat ~/Conky/lsb-release | grep 'DISTRIB_CODENAME=' | awk '{print $2,$3}'})
    ${sysname} ${kernel} on ${machine}
    ${color2}Uptime:${goto 100}${uptime}
    #${conky_version}
    #-----LEDs (Indicators)
    ${image ~/Conky/Icons/XubuntuLogoForConky.png -p 250,0 -s 90x90}${if_match "${exec xset q | grep LED | awk '{ print $10 }'}" < "00000002"}${image ~/Conky/Icons/NUMLEDW.png -p 100,57 -s 20x20}${else}${image ~/Conky/Icons/NUMLEDY.png -p 100,57 -s 20x20}${endif}${if_match "${exec xset q | grep LED | awk '{ print $10 }'}" < "00000003"}${image ~/Conky/Icons/CAPSLEDW.png -p 120,57 -s 20x20}${else}${image ~/Conky/Icons/CAPSLEDY.png -p 120,57 -s 20x20}${endif}
    ${if_match ${execi 60 ink -p usb | grep 'Photoblack' | awk '{print $2}' | sed 's/%//'}<50}${image ~/Conky/Icons/LowInkBlackLED.png -p 145,57 -s 20x20}${else}${if_match ${execi 60 ink -p usb | grep 'Photoblack' | awk '{print $2}' | sed 's/%//'}>=50}${if_match ${execi 60 ink -p usb | grep 'Photoblack' | awk '{print $2}' | sed 's/%//'}<60}${image ~/Conky/Icons/HalfInkBlackLED.png -p 145,57 -s 20x20}${else}${image ~/Conky/Icons/NormInkBlackLED.png -p 145,57 -s 20x20}${endif}${endif}${endif}${if_match ${execi 60 ink -p usb | grep 'Yellow' | awk '{print $2}' | sed 's/%//'}<50}${image ~/Conky/Icons/LowInkYellowLED.png -p 170,57 -s 20x20}${else}${if_match ${execi 60 ink -p usb | grep 'Yellow' | awk '{print $2}' | sed 's/%//'}>=50}${if_match ${execi 60 ink -p usb | grep 'Yellow' | awk '{print $2}' | sed 's/%//'}<60}${image ~/Conky/Icons/HalfInkYellowLED.png -p 170,57 -s 20x20}${else}${image ~/Conky/Icons/NormInkYellowLED.png -p 170,57 -s 20x20}${endif}${endif}${endif}${if_match ${execi 60 ink -p usb | grep 'Magenta' | awk '{print $2}' | sed 's/%//'}<50}${image ~/Conky/Icons/LowInkMagentaLED.png -p 195,57 -s 20x20}${else}${if_match ${execi 60 ink -p usb | grep 'Magenta' | awk '{print $2}' | sed 's/%//'}>=50}${if_match ${execi 60 ink -p usb | grep 'Magenta' | awk '{print $2}' | sed 's/%//'}<60}${image ~/Conky/Icons/HalfInkMagentaLED.png -p 195,57 -s 20x20}${else}${image ~/Conky/Icons/NormInkMagentaLED.png -p 195,57 -s 20x20}${endif}${endif}${endif}${if_match ${execi 60 ink -p usb | grep 'Cyan' | awk '{print $2}' | sed 's/%//'}<50}${image ~/Conky/Icons/LowInkCyanLED.png -p 220,57 -s 20x20}${else}${if_match ${execi 60 ink -p usb | grep 'Cyan' | awk '{print $2}' | sed 's/%//'}>=50}${if_match ${execi 60 ink -p usb | grep 'Cyan' | awk '{print $2}' | sed 's/%//'}<60}${image ~/Conky/Icons/HalfInkCyanLED.png -p 220,57 -s 20x20}${else}${image ~/Conky/Icons/NormInkCyanLED.png -p 220,57 -s 20x20}${endif}${endif}${endif}
    ${voffset -40}${font}Indicators:${voffset 20}
    ${font TransponderAOE:bold:size=8}${voffset -20}${goto 150}${execi 60 ink -p usb | grep 'Photoblack' | awk '{print $2}'}${goto 170}${execi 60 ink -p usb | grep 'Yellow' | awk '{print $2}'}${goto 195}${execi 60 ink -p usb | grep 'Magenta' | awk '{print $2}'}${goto 220}${execi 60 ink -p usb | grep 'Cyan' | awk '{print $2}'}${font}${voffset -15}
    #-----New Weather Section.
    ${color2}Weather${color0}${hr 1}${color2}${execi 600 bash /home/dorian/Conky/Scripts/conky_wunderground2/wunderground-script}
    ${color2}${goto 15}Today${goto 65}${execi 600  sed -n '9p' /home/dorian/Conky/Scripts/conky_wunderground2/messages.wun}${goto 115}${execi 600  sed -n '17p' /home/dorian/Conky/Scripts/conky_wunderground2/messages.wun}${goto 165}${execi 600  sed -n '25p' /home/dorian/Conky/Scripts/conky_wunderground2/messages.wun}${goto 215}${execi 600  sed -n '33p' /home/dorian/Conky/Scripts/conky_wunderground2/messages.wun}${goto 265}${execi 600  sed -n '41p' /home/dorian/Conky/Scripts/conky_wunderground2/messages.wun}${goto 315}${execi 600  sed -n '49p' /home/dorian/Conky/Scripts/conky_wunderground2/messages.wun}
    #-----High Temp
    H:${font TransponderAOE:bold:size=12}${goto 20}${color1}${execi 600 sed -n '3p' /home/dorian/Conky/Scripts/conky_wunderground2/messages.wun| awk '{print $2}'}°C${goto 70}${execi 600 sed -n '11p' /home/dorian/Conky/Scripts/conky_wunderground2/messages.wun| awk '{print $2}'}°C${goto 115}${execi 600 sed -n '19p' /home/dorian/Conky/Scripts/conky_wunderground2/messages.wun| awk '{print $2}'}°C${goto 165}${execi 600 sed -n '27p' /home/dorian/Conky/Scripts/conky_wunderground2/messages.wun| awk '{print $2}'}°C${goto 215}${execi 600 sed -n '35p' /home/dorian/Conky/Scripts/conky_wunderground2/messages.wun| awk '{print $2}'}°C${goto 265}${execi 600 sed -n '43p' /home/dorian/Conky/Scripts/conky_wunderground2/messages.wun| awk '{print $2}'}°C${goto 315}${execi 600 sed -n '51p' /home/dorian/Conky/Scripts/conky_wunderground2/messages.wun| awk '{print $2}'}°C${font}${color2}
    #-----Low Temp
    L:${font TransponderAOE:bold:size=12}${goto 20}${color1}${execi 600 sed -n '7p' /home/dorian/Conky/Scripts/conky_wunderground2/messages.wun| awk '{print $2}'}°C${goto 70}${execi 600 sed -n '15p' /home/dorian/Conky/Scripts/conky_wunderground2/messages.wun| awk '{print $2}'}°C${goto 115}${execi 600 sed -n '23p' /home/dorian/Conky/Scripts/conky_wunderground2/messages.wun| awk '{print $2}'}°C${goto 165}${execi 600 sed -n '31p' /home/dorian/Conky/Scripts/conky_wunderground2/messages.wun| awk '{print $2}'}°C${goto 215}${execi 600 sed -n '39p' /home/dorian/Conky/Scripts/conky_wunderground2/messages.wun| awk '{print $2}'}°C${goto 265}${execi 600 sed -n '47p' /home/dorian/Conky/Scripts/conky_wunderground2/messages.wun| awk '{print $2}'}°C${goto 315}${execi 600 sed -n '55p' /home/dorian/Conky/Scripts/conky_wunderground2/messages.wun| awk '{print $2}'}°C${color2}${font}
    #-----Day Conditions (Icon)
    DAY:${voffset 20}${color1}${font conkyweather:size=30}${goto 20}${execi 600  sed -n '1p' /home/dorian/Conky/Scripts/conky_wunderground2/weather_icons}${goto 70}${execi 600  sed -n '5p' /home/dorian/Conky/Scripts/conky_wunderground2/weather_icons}${goto 115}${execi 600  sed -n '9p' /home/dorian/Conky/Scripts/conky_wunderground2/weather_icons}${goto 165}${execi 600  sed -n '13p' /home/dorian/Conky/Scripts/conky_wunderground2/weather_icons}${goto 215}${execi 600  sed -n '17p' /home/dorian/Conky/Scripts/conky_wunderground2/weather_icons}${goto 265}${execi 600  sed -n '21p' /home/dorian/Conky/Scripts/conky_wunderground2/weather_icons}${goto 315}${execi 600  sed -n '25p' /home/dorian/Conky/Scripts/conky_wunderground2/weather_icons}${color2}${font}
    #-----Night Conditions (Icon)
    NIGHT:${voffset 20}${color1}${font conkyweather:size=30}${goto 20}${execi 600  sed -n '3p' /home/dorian/Conky/Scripts/conky_wunderground2/weather_icons}${goto 70}${execi 600  sed -n '7p' /home/dorian/Conky/Scripts/conky_wunderground2/weather_icons}${goto 115}${execi 600  sed -n '11p' /home/dorian/Conky/Scripts/conky_wunderground2/weather_icons}${goto 165}${execi 600  sed -n '15p' /home/dorian/Conky/Scripts/conky_wunderground2/weather_icons}${goto 215}${execi 600  sed -n '19p' /home/dorian/Conky/Scripts/conky_wunderground2/weather_icons}${goto 265}${execi 600  sed -n '23p' /home/dorian/Conky/Scripts/conky_wunderground2/weather_icons}${goto 315}${execi 600  sed -n '27p' /home/dorian/Conky/Scripts/conky_wunderground2/weather_icons}${color2}${font}
    #-----System/Drive Info
    ${voffset 25}${font}${color2}SYSTEM ${color0}${hr 1}${color2}
    CPU1:${goto 55}${font TransponderAOE:bold}${freq_g 1}Ghz${goto 125}${color1}${font}LOut:${goto 180}${color0}${font TransponderAOE:bold}${cpu cpu1}%${font}
    ${color2}CPU2:${goto 55}${font TransponderAOE:bold}${freq_g 2}Ghz${goto 125}${color1}${font}ROut:${goto 180}${color0}${font TransponderAOE:bold}${cpu cpu2}%${font}
    ${color2}RAM:${goto 55}${font TransponderAOE:bold}${memmax}${goto 125}${color}${font}LIn:${goto 180}${color2}${font TransponderAOE:bold}${memperc}%${font}
    ${color2}Tmp:${goto 55}${font TransponderAOE:bold}${fs_size /tmp}${goto 125}${color}${font}RIn:${goto 180}${color2}${font TransponderAOE:bold}${fs_used_perc /tmp}%${font}
    ${color2}SWAP:${goto 55}${font TransponderAOE:bold}${swapmax}${goto 125}${color5}${font}Centre:${goto 180}${color0}${font TransponderAOE:bold}${swapperc}%${color2}${font}
    #-----Main Drives
    ${color2}SYSTEM DRIVES ${color0}${hr 1}${color2}
    ${color2}Root:${goto 55}${font TransponderAOE:bold}${fs_size /}${goto 135}${color0}${fs_used_perc /}%${goto 175}${color2}${font}Used${goto 220}${color0}${fs_bar 5,120 /}
    ${color2}Home:${goto 55}${font TransponderAOE:bold}${fs_size /home}${goto 135}${color1}${fs_used_perc /home}%${goto 175}${color2}${font}Used${goto 220}${color1}${fs_bar 5,120 /home}
    ${color2}Test:${goto 55}${font TransponderAOE:bold}${fs_size /media/TestDrive}${goto 135}${color5}${fs_used_perc /media/TestDrive}%${goto 175}${color2}${font}Used${goto 220}${color5}${fs_bar 5,120 /media/TestDrive}
    ${color2}RAID1:${goto 55}${font TransponderAOE:bold}${fs_size /media/RAID1}${goto 135}${color5}${fs_used_perc /media/RAID1}%${goto 175}${color2}${font}Used${goto 220}${color5}${fs_bar 5,120 /media/RAID1}
    #-----USB Drives (Special because it checks to see if they're plugged in first.)
    ${color2}USB CONNECTED DRIVES ${color0}${hr 1}${color2}
    ${voffset -8}${font DiamondFantasy:size=12}NAME${goto 75}|${goto 85}SIZE${goto 140}|${goto 155}USED${font}
    ${if_mounted /media/8GBACKUP}${color2}8G1:${goto 85}${color1}${font TransponderAOE:bold}${fs_size /media/8GBACKUP}${goto 155}${color0}${fs_used_perc /media/8GBACKUP}%${font}${image ~/Conky/Icons/USB8G1Y.png -p 235,605 -s 40x40}${else}${color2}8G1:${goto 85}${color0}${font TransponderAOE:bold}N/C${font}${image ~/Conky/Icons/USB8G1R.png -p 235,605 -s 40x40}${endif}
    ${if_mounted /media/8GBACKUP2}${color2}8G2:${goto 85}${color1}${font TransponderAOE:bold}${fs_size /media/8GBACKUP2}${goto 155}${color0}${fs_used_perc /media/8GBACKUP2}%${font}${image ~/Conky/Icons/USB8G2Y.png -p 235,645 -s 40x40}${else}${color2}8G2:${goto 85}${color0}${font TransponderAOE:bold}N/C${font}${image ~/Conky/Icons/USB8G2R.png -p 235,645 -s 40x40}${endif}
    ${if_mounted /media/8GBACKUP3}${color2}8G3:${goto 85}${color1}${font TransponderAOE:bold}${fs_size /media/8GBACKUP3}${goto 155}${color0}${fs_used_perc /media/8GBACKUP3}%${font}${image ~/Conky/Icons/USB8G3Y.png -p 195,645 -s 40x40}${else}${color2}8G3:${goto 85}${color0}${font TransponderAOE:bold}N/C${font}${image ~/Conky/Icons/USB8G3R.png -p 195,645 -s 40x40}${endif}
    ${color2}${if_mounted /media/60}60:${goto 85}${color1}${font TransponderAOE:bold}${fs_size /media/60}${goto 155}${color0}${fs_used_perc /media/60}%${font}${image ~/Conky/Icons/USB60Y.png -p 195,605 -s 40x40}${else}${color2}60:${goto 85}${color0}${font TransponderAOE:bold}N/C${font}${image ~/Conky/Icons/USB60R.png -p 195,605 -s 40x40}${endif}
    ${color2}${if_match ${exec df -h | grep -c "SANSA CLIPP"} == 1}Sansa:${goto 85}${color1}${font TransponderAOE:bold}${execi 30 df -h | grep "SANSA CLIPP" | awk '{print $2}'}${goto 155}${color0}${execi 30 df -h | grep "SANSA CLIPP" | awk '{print $5}' | sed 's/%//'}%${font}${image ~/Conky/Icons/Sansa.png -p 300,595 -s 45x66}${else}${color2}Sansa:${goto 85}${color0}${font TransponderAOE:bold}N/C${font}${endif}
    ${color2}${if_mounted /media/OSUSB}OSUSB:${goto 85}${color1}${font TransponderAOE:bold}${fs_size /media/OSUSB}${goto 155}${color0}${fs_used_perc /media/OSUSB}%${font}${image ~/Conky/Icons/Tux.png -p 300,670 -s 40x40}${else}${color2}OSUSB:${goto 85}${font TransponderAOE:bold}${color0}N/C${font}${endif}
    ${if_mounted /media/16GBKUP}${color2}16GBKUP:${goto 85}${color1}${font TransponderAOE:bold}${fs_size /media/16GBKUP}${goto 155}${color0}${fs_used_perc /media/16GBKUP}%${font}${image ~/Conky/Icons/16GCrdY.png -p 240,705 -s 40x40}${else}${color2}16GBKUP:${goto 85}${color0}${font TransponderAOE:bold}N/C${font}${image ~/Conky/Icons/16GCrdR.png -p 240,705 -s 40x40}${endif}
    #-----Network Info
    ${color2}NETWORK TRAFFIC: ${nodename}${color0}${hr 1}${color2}
    ${color2}ADDRESS${goto 145}${font TransponderAOE:bold:size=12}|${font}${image ~/Conky/Icons/TrafficIn.png -p 160,770 -s 70x30}${goto 235}${font TransponderAOE:bold:size=12}|${font}${image ~/Conky/Icons/TrafficOut.png -p 245,770 -s 70x30}
    ${font TransponderAOE:bold:size=12}${addr eth0}${goto 145}|${goto 160}${color4}${downspeed eth0}${goto 215}/s${goto 235}${color2}|${goto 245}${color1}${upspeed eth0}${goto 300}/s${font}${image ~/Conky/Icons/Globe.png -p 330,800 -s 20x20}
    ${color2}${font TransponderAOE:bold:size=12}${addr eth1}${goto 145}|${goto 160}${color4}${downspeed eth1}${goto 215}/s${goto 235}${color2}|${goto 245}${color1}${upspeed eth1}${goto 300}/s${font}${image ~/Conky/Icons/Private.png -p 330,825 -s 20x20}
    ${color2}${font TransponderAOE:bold:size=12}${addr pan1}${goto 145}|${goto 160}${color4}${downspeed pan1}${goto 215}/s${goto 235}${color2}|${goto 245}${color1}${upspeed pan1}${goto 300}/s${font}${image ~/Conky/Icons/bluetooth.png -p 330,845 -s 20x20}
    #-----Monthly/Daily Bandwidth Usage
    ${color2}NETWORK DATA USE${color0}${hr 1}${color2}
    ${goto 35}${color2}Today${goto 125}Monthly 
    ${color2}${goto 15}U:${goto 30}${color1}${font TransponderAOE:bold:size=12}${execi 60 vnstat -d | grep "`date +"%D"`" | awk '{print $5}'}${goto 85}${execi 60 vnstat -d | grep "`date +"%D"`" | awk '{print $6}'}${goto 120}${if_match ${time %e}>=12}${execi 60 vnstat -m | grep "`date +"%b '%y"`" | awk '{print $6}'}${goto 175}${execi 60 vnstat -m | grep "`date +"%b '%y"`" | awk '{print $7}'}${endif}${if_match ${time %-e}<12}${if_match ${time %m}==01}${execi 60 vnstat -m | grep "Dec" | awk '{print $6}'}${goto 175}${execi 60 vnstat -m | grep "Dec" | awk '{print $7}'}${else}${if_match ${time %m}==02}${execi 60 vnstat -m | grep "Jan" | awk '{print $6}'}${goto 175}${execi 60 vnstat -m | grep "Jan" | awk '{print $7}'}${else}${if_match ${time %m}==03}${execi 60 vnstat -m | grep "Feb" | awk '{print $6}'}${goto 175}${execi 60 vnstat -m | grep "Feb" | awk '{print $7}'}${else}${if_match ${time %m}==04}${execi 60 vnstat -m | grep "Mar" | awk '{print $6}'}${goto 175}${execi 60 vnstat -m | grep "Mar" | awk '{print $7}'}${else}${if_match ${time %m}==05}${execi 60 vnstat -m | grep "Apr" | awk '{print $6}'}${goto 175}${execi 60 vnstat -m | grep "Apr" | awk '{print $7}'}${else}${if_match ${time %m}==06}${execi 60 vnstat -m | grep "May" | awk '{print $6}'}${goto 175}${execi 60 vnstat -m | grep "May" | awk '{print $7}'}${else}${if_match ${time %m}==07}${execi 60 vnstat -m | grep "Jun" | awk '{print $6}'}${goto 175}${execi 60 vnstat -m | grep "Jun" | awk '{print $7}'}${else}${if_match ${time %m}==08}${execi 60 vnstat -m | grep "Jul" | awk '{print $6}'}${goto 175}${execi 60 vnstat -m | grep "Jul" | awk '{print $7}'}${else}${if_match ${time %m}==09}${execi 60 vnstat -m | grep "Aug" | awk '{print $6}'}${goto 175}${execi 60 vnstat -m | grep "Aug" | awk '{print $7}'}${else}${if_match ${time %m}==10}${execi 60 vnstat -m | grep "Sep" | awk '{print $6}'}${goto 175}${execi 60 vnstat -m | grep "Sep" | awk '{print $7}'}${else}${if_match ${time %m}==11}${execi 60 vnstat -m | grep "Oct" | awk '{print $6}'}${goto 175}${execi 60 vnstat -m | grep "Oct" | awk '{print $7}'}${else}${if_match ${time %m}==12}${execi 60 vnstat -m | grep "Nov" | awk '{print $6}'}${goto 175}${execi 60 vnstat -m | grep "Nov" | awk '{print $7}'}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${color2}${font}${goto 265}25
    ${color2}${goto 15}D:${goto 30}${color4}${font TransponderAOE:bold:size=12}${execi 60 vnstat -d | grep "`date +"%D"`" | awk '{print $2}'}${goto 85}${execi 60 vnstat -d | grep "`date +"%D"`" | awk '{print $3}'}${goto 120}${if_match ${time %e}>=12}${execi 60 vnstat -m | grep "`date +"%b '%y"`" | awk '{print $3}'}${goto 175}${execi 60 vnstat -m | grep "`date +"%b '%y"`" | awk '{print $4}'}${endif}${if_match ${time %-e}<12}${if_match ${time %m}==01}${execi 60 vnstat -m | grep "Dec" | awk '{print $3}'}${goto 175}${execi 60 vnstat -m | grep "Dec" | awk '{print $4}'}${else}${if_match ${time %m}==02}${execi 60 vnstat -m | grep "Jan" | awk '{print $3}'}${goto 175}${execi 60 vnstat -m | grep "Jan" | awk '{print $4}'}${else}${if_match ${time %m}==03}${execi 60 vnstat -m | grep "Feb" | awk '{print $3}'}${goto 175}${execi 60 vnstat -m | grep "Feb" | awk '{print $4}'}${else}${if_match ${time %m}==04}${execi 60 vnstat -m | grep "Mar" | awk '{print $3}'}${goto 175}${execi 60 vnstat -m | grep "Mar" | awk '{print $4}'}${else}${if_match ${time %m}==05}${execi 60 vnstat -m | grep "Apr" | awk '{print $3}'}${goto 175}${execi 60 vnstat -m | grep "Apr" | awk '{print $4}'}${else}${if_match ${time %m}==06}${execi 60 vnstat -m | grep "May" | awk '{print $3}'}${goto 175}${execi 60 vnstat -m | grep "May" | awk '{print $4}'}${else}${if_match ${time %m}==07}${execi 60 vnstat -m | grep "Jun" | awk '{print $3}'}${goto 175}${execi 60 vnstat -m | grep "Jun" | awk '{print $4}'}${else}${if_match ${time %m}==08}${execi 60 vnstat -m | grep "Jul" | awk '{print $3}'}${goto 175}${execi 60 vnstat -m | grep "Jul" | awk '{print $4}'}${else}${if_match ${time %m}==09}${execi 60 vnstat -m | grep "Aug" | awk '{print $3}'}${goto 175}${execi 60 vnstat -m | grep "Aug" | awk '{print $4}'}${else}${if_match ${time %m}==10}${execi 60 vnstat -m | grep "Sep" | awk '{print $3}'}${goto 175}${execi 60 vnstat -m | grep "Sep" | awk '{print $4}'}${else}${if_match ${time %m}==11}${execi 60 vnstat -m | grep "Oct" | awk '{print $3}'}${goto 175}${execi 60 vnstat -m | grep "Oct" | awk '{print $4}'}${else}${if_match ${time %m}==12}${execi 60 vnstat -m | grep "Nov" | awk '{print $3}'}${goto 175}${execi 60 vnstat -m | grep "Nov" | awk '{print $4}'}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${color2}${font}${goto 265}GB
    ${color2}${goto 15}T:${goto 30}${color5}${font TransponderAOE:bold:size=12}${execi 60 vnstat -d | grep "`date +"%D"`" | awk '{print $8}'}${goto 85}${execi 60 vnstat -d | grep "`date +"%D"`" | awk '{print $9}'}${goto 120}${if_match ${time %e}>=12}${execi 60 vnstat -m | grep "`date +"%b '%y"`" | awk '{print $9}'}${goto 175}${execi 60 vnstat -m | grep "`date +"%b '%y"`" | awk '{print $10}'}${endif}${if_match ${time %-e}<12}${if_match ${time %m}==01}${execi 60 vnstat -m | grep "Dec" | awk '{print $9}'}${goto 175}${execi 60 vnstat -m | grep "Dec" | awk '{print $10}'}${else}${if_match ${time %m}==02}${execi 60 vnstat -m | grep "Jan" | awk '{print $9}'}${goto 175}${execi 60 vnstat -m | grep "Jan" | awk '{print $10}'}${else}${if_match ${time %m}==03}${execi 60 vnstat -m | grep "Feb" | awk '{print $9}'}${goto 175}${execi 60 vnstat -m | grep "Feb" | awk '{print $10}'}${else}${if_match ${time %m}==04}${execi 60 vnstat -m | grep "Mar" | awk '{print $9}'}${goto 175}${execi 60 vnstat -m | grep "Mar" | awk '{print $10}'}${else}${if_match ${time %m}==05}${execi 60 vnstat -m | grep "Apr" | awk '{print $9}'}${goto 175}${execi 60 vnstat -m | grep "Apr" | awk '{print $10}'}${else}${if_match ${time %m}==06}${execi 60 vnstat -m | grep "May" | awk '{print $9}'}${goto 175}${execi 60 vnstat -m | grep "May" | awk '{print $10}'}${else}${if_match ${time %m}==07}${execi 60 vnstat -m | grep "Jun" | awk '{print $9}'}${goto 175}${execi 60 vnstat -m | grep "Jun" | awk '{print $10}'}${else}${if_match ${time %m}==08}${execi 60 vnstat -m | grep "Jul" | awk '{print $9}'}${goto 175}${execi 60 vnstat -m | grep "Jul" | awk '{print $10}'}${else}${if_match ${time %m}==09}${execi 60 vnstat -m | grep "Aug" | awk '{print $9}'}${goto 175}${execi 60 vnstat -m | grep "Aug" | awk '{print $10}'}${else}${if_match ${time %m}==10}${execi 60 vnstat -m | grep "Sep" | awk '{print $9}'}${goto 175}${execi 60 vnstat -m | grep "Sep" | awk '{print $10}'}${else}${if_match ${time %m}==11}${execi 60 vnstat -m | grep "Oct" | awk '{print $9}'}${goto 175}${execi 60 vnstat -m | grep "Oct" | awk '{print $10}'}${else}${if_match ${time %m}==12}${execi 60 vnstat -m | grep "Nov" | awk '{print $9}'}${goto 175}${execi 60 vnstat -m | grep "Nov" | awk '{print $10}'}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${font}${color2}${goto 220}Total Allowance${font}
    .conkyrc.clock
    Code:
    #-----Conky Settings
    background yes
    no_buffers yes
    out_to_console no
    top_cpu_separate no
    cpu_avg_samples 2
    net_avg_samples 3
    total_run_times 0
    update_interval 1
    
    #-----Text Settings
    uppercase yes
    override_utf8_locale yes
    short_units no
    pad_percents 0
    text_buffer_size 4096
    max_user_text 32768
    use_xft yes
    xftalpha 0.5
    xftfont AGaramond:size=32
    
    #-----Window Settings
    own_window yes
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    own_window_type normal
    
    #-----Graphics Settings
    double_buffer yes
    draw_borders no
    draw_graph_borders yes
    draw_shades no
    draw_outline no
    max_specials 1024
    imlib_cache_size 0
    
    #-----Layout Settings
    alignment bottom_left
    gap_x 0
    gap_y 30
    maximum_width 420
    minimum_size 350 10
    use_spacer right
    
    #-----Lua Script
    lua_load ~/Conky/Scripts/calendar.lua
    lua_draw_hook_pre conky_draw_fig
    lua_draw_hook_post conky_draw_box
    
    #-----Required Fonts(For Use In This Conky. Google Search Or DaFont.com to Find Them)
    #-----AGaramond
    #-----TransponderAOE
    
    #-----Colors
    default_color 000000          #Black
    default_outline_color ffffff  #White Outlines
    default_shade_color c0c0c0    #Grey Shade
    color0 FF0000                 #Red
    color1 FFFF00		              #Yellow
    color2 FFFFFF                 #White
    color3 808080                 #Grey
    color4 00FF00									#Green
    color5 C0C0C0									#Silver
    color6 FFD700									#Gold
    color7 0000FF									#Blue
    color8 000080									#Navy
    
    TEXT#-----This Entire Conky Script Is For a Clock.  Yes.  I Have Wasted an Entire Conky for this drivel.
    ${font AGaramond:bold:size=25}${goto 130}${color0}Time
    ${voffset -30}${color6}${hr 1}${color2}
    ${font TransponderAOE:size=60}${color7}${voffset -25}${goto 12}${time %l:%M:%S %p}
    #-----Calendar by dk75: date box/mrpeachy: calendar body
    ${voffset -65}${font AGaramond:bold:size=16}${color0}${goto 5}Calendar:${goto 140}${execpi 60 date +'%B${offset 6}%Y'}
    ${voffset -15}${color6}${hr 1}${color2}
    ${voffset 155}${color6}${hr 1}${color2}
    mainrings.lua
    Code:
    require 'cairo'
    function draw_ring_pos(co, across, down, rad, inlw, rstart, rend, bgr, bgg, bgb, bga, inr, ing, inb, ina, direction)
    
    local angle_0=rstart*(2*math.pi/360)-math.pi/2
    local angle_f=rend*(2*math.pi/360)-math.pi/2
    local t_arc=(co/100)*(angle_f-angle_0)
    -- Draw background ring
    cairo_arc(cr,across,down,rad,angle_0,angle_f)
    cairo_set_source_rgba(cr,bgr,bgg,bgb,bga)
    cairo_set_line_width(cr,inlw)
    cairo_stroke(cr)
    -- Draw indicator ring
    cairo_arc(cr,across,down,rad,angle_0,angle_0+t_arc)
    cairo_set_source_rgba(cr,inr,ing,inb,ina)
    cairo_stroke(cr)
    end
    
    function conky_draw_pos()
    if conky_window == nil then return end
    if cs == nil or cairo_xlib_surface_get_width(cs) ~= conky_window.width or cairo_xlib_surface_get_height(cs) ~= conky_window.height then
    		if cs then cairo_surface_destroy(cs) end
    		cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
    	end
    	if cr then cairo_destroy(cr) end
    cr = cairo_create(cs)
    local updates=tonumber(conky_parse('${updates}'))
    if updates>=5 then
    --NETRING SETUP-------------------------------------------------------------------------------------
    wtimer=(updates % 30)+1
    months = {"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"}
    monthnum=tonumber(os.date('%m'))
    monthname=os.date('%b')
    day=tonumber(os.date('%d'))
    if day<12 then
        if monthnum==1 then
        monthbeforenum=12
        else
        monthbeforenum=monthnum-1
        end
    month=months[monthbeforenum]
    else    
    month=monthname
    end
    if updates==6 or wtimer==1 then    
    co=(conky_parse("${exec vnstat -m | grep -n '" .. month .. "' | sed -n 1p | awk -F'|' '{print $3}'}"))
    co=string.gsub(co," ","")
    num=tonumber((string.gsub(co,"%a","")))
    units=(string.gsub(co,"[%p%d]",""))
    end
    if num==nil then num=0 end
    --max number--------------------------
    if units=="GB" or units=="GiB" then max=25 end
    if units =="MB" or units=="MiB"  then max=25600 end
    if units =="KB" or units=="KiB"  then max=26214400 end
    if max==nil then max=0 end
    --position-----------------------------
    across=275
    down=930
    --radius of ring-----------------------
    rad=30
    --ring width---------------------------
    inlw=15
    --start and end angles---------------
    rstart=-135
    rend=135
    --color and alpha for indicator----
    inr,ing,inb,ina=255,0,0,1
    --background ring color and alpha-----
    bgr,bgg,bgb,bga=255,255,0,1
    --calculation, do not edit below---------
    co=(num/max)*100
    draw_ring_pos(co, across, down, rad, inlw, rstart, rend, bgr, bgg, bgb, bga, inr, ing, inb, ina)
    --END NETRING SETUP---------------------------------------------------------------------------------
    --SETUP:CPU1 Ring-----------------------------------------------------------------------------
    --conky object to be displayed-----
    co=tonumber(conky_parse('${cpu cpu1}'))
    if co==nil then co=0 end
    --max number--------------------------
    max=100
    --position-----------------------------
    across=290
    down=405
    --radius of ring-----------------------
    rad=50
    --ring width---------------------------
    inlw=10
    --start and end angles---------------
    rstart=180
    rend=360
    --color and alpha for indicator----
    inr,ing,inb,ina=1,0,0,1
    --background ring color and alpha-----
    bgr,bgg,bgb,bga=1,1,0,1
    --calculation, do not edit below---------
    co=(co/max)*100
    draw_ring_pos(co, across, down, rad, inlw, rstart, rend, bgr, bgg, bgb, bga, inr, ing, inb, ina, direction)
    --END SETUP---------------copy setup section and paste for additional rings----------
    --SETUP:RAM Ring-----------------------------------------------------------------------------
    --conky object to be displayed-----
    co=tonumber(conky_parse('${memperc}'))
    if co==nil then co=0 end
    --max number--------------------------
    max=100
    --position-----------------------------
    across=290
    down=405
    --radius of ring-----------------------
    rad=35
    --ring width---------------------------
    inlw=10
    --start and end angles---------------
    rstart=-180
    rend=0
    --color and alpha for indicator----
    inr,ing,inb,ina=1,1,1,1.0
    --background ring color and alpha-----
    bgr,bgg,bgb,bga=0.5,0.5,0.5,1.0
    --calculation, do not edit below---------
    co=(co/max)*100
    draw_ring_pos(co, across, down, rad, inlw, rstart, rend, bgr, bgg, bgb, bga, inr, ing, inb, ina, direction)
    --END SETUP---------------copy setup section and paste for additional rings----------
    --SETUP:SWAP Ring-----------------------------------------------------------------------------
    --conky object to be displayed-----
    co=tonumber(conky_parse('${swapperc}'))
    if co==nil then co=0 end
    --max number--------------------------
    max=100
    --position-----------------------------
    across=290
    down=405
    --radius of ring-----------------------
    rad=12
    --ring width---------------------------
    inlw=24
    --start and end angles---------------
    rstart=-180
    rend=180
    --color and alpha for indicator----
    inr,ing,inb,ina=1,0,0,1.0
    --background ring color and alpha-----
    bgr,bgg,bgb,bga=1,1,1,0.75
    --calculation, do not edit below---------
    co=(co/max)*100
    draw_ring_pos(co, across, down, rad, inlw, rstart, rend, bgr, bgg, bgb, bga, inr, ing, inb, ina, direction)
    --END SETUP---------------copy setup section and paste for additional rings----------
    --SETUP:8GBACKUP3 Ring-----------------------------------------------------------------------------
    --conky object to be displayed-----
    mounted=conky_parse('${if_mounted /media/8GBACKUP3}1${else}0${endif}')
    if tonumber(mounted)==1 then
    co=tonumber(conky_parse('${fs_used_perc /media/8GBACKUP3}'))
    else
    co=0
    end
    if co==nil then co=0 end
    --max number--------------------------
    max=100
    --position-----------------------------
    across=240
    down=650
    --radius of ring-----------------------
    rad=45
    --ring width---------------------------
    inlw=5
    --start and end angles---------------
    rstart=180
    rend=270
    --color and alpha for indicator----
    inr,ing,inb,ina=1,0,0,1.0
    --background ring color and alpha-----
    mounted=conky_parse('${if_mounted /media/8GBACKUP3}1${else}0${endif}')
    if tonumber(mounted)==1 then
    bgr,bgg,bgb,bga=0.75,0.75,0,1.0
    else
    bgr,bgg,bgb,bga=1,1,1,1.0
    end
    --calculation, do not edit below---------
    co=(co/max)*100
    draw_ring_pos(co, across, down, rad, inlw, rstart, rend, bgr, bgg, bgb, bga, inr, ing, inb, ina, direction)
    --END SETUP---------------copy setup section and paste for additional rings----------
    --SETUP:60 Ring-----------------------------------------------------------------------------
    --conky object to be displayed-----
    mounted=conky_parse('${if_mounted /media/60}1${else}0${endif}')
    if tonumber(mounted)==1 then
    co=tonumber(conky_parse('${fs_used_perc /media/60}'))
    else
    co=0
    end
    if co==nil then co=0 end
    --max number--------------------------
    max=100
    --position-----------------------------
    across=240
    down=650
    --radius of ring-----------------------
    rad=45
    --ring width---------------------------
    inlw=5
    --start and end angles---------------
    rstart=270
    rend=360
    --color and alpha for indicator----
    inr,ing,inb,ina=1,0,0,1.0
    --background ring color and alpha-----
    mounted=conky_parse('${if_mounted /media/60}1${else}0${endif}')
    if tonumber(mounted)==1 then
    bgr,bgg,bgb,bga=0.75,0.75,0,1.0
    else
    bgr,bgg,bgb,bga=1,1,1,1.0
    end
    --calculation, do not edit below---------
    co=(co/max)*100
    draw_ring_pos(co, across, down, rad, inlw, rstart, rend, bgr, bgg, bgb, bga, inr, ing, inb, ina, direction)
    --END SETUP---------------copy setup section and paste for additional rings----------
    --SETUP:Sansa Ring-----------------------------------------------------------------------------
    --conky object to be displayed-----
    wtimer=(updates % 30)+1
    if updates>=6 or wtimer==1 then
    mounted=conky_parse("${if_match ${exec df -h | grep -c 'SANSA CLIPP'} == 1}1${else}0${endif}")
    end
    if tonumber(mounted)==1 then
    co=tonumber(conky_parse("${exec df -h | grep 'SANSA CLIPP' | awk '{print $5}' | sed 's/%//'}"))
    else
    co=0
    end
    if co==nil then co=0 end
    --max number--------------------------
    max=100
    --position-----------------------------
    across=328
    down=645
    --radius of ring-----------------------
    rad=5
    --ring width---------------------------
    inlw=5
    --start and end angles---------------
    rstart=-180
    rend=180
    --color and alpha for indicator----
    inr,ing,inb,ina=1,0.75,0,1.0
    --background ring color and alpha-----
    bgr,bgg,bgb,bga=0,0,0,0.0
    --calculation, do not edit below---------
    co=(co/max)*100
    draw_ring_pos(co, across, down, rad, inlw, rstart, rend, bgr, bgg, bgb, bga, inr, ing, inb, ina, direction)
    --END SETUP---------------copy setup section and paste for additional rings----------
    --SETUP:OS USB Stick Ring-----------------------------------------------------------------------------
    --conky object to be displayed-----
    mounted=conky_parse('${if_mounted /media/OSUSB}1${else}0${endif}')
    if tonumber(mounted)==1 then
    co=tonumber(conky_parse('${fs_used_perc /media/OSUSB}'))
    else
    co=0
    end
    if co==nil then co=0 end
    --max number--------------------------
    max=100
    --position-----------------------------
    across=325
    down=700
    --radius of ring-----------------------
    rad=5
    --ring width---------------------------
    inlw=5
    --start and end angles---------------
    rstart=-180
    rend=180
    --color and alpha for indicator----
    inr,ing,inb,ina=1,0,0,1.0
    --background ring color and alpha-----
    bgr,bgg,bgb,bga=0,0,0,0.0
    --calculation, do not edit below---------
    co=(co/max)*100
    draw_ring_pos(co, across, down, rad, inlw, rstart, rend, bgr, bgg, bgb, bga, inr, ing, inb, ina, direction)
    --END SETUP---------------copy setup section and paste for additional rings----------
    --SETUP:16GBKUP Card Ring-----------------------------------------------------------------------------
    --conky object to be displayed-----
    mounted=conky_parse('${if_mounted /media/16GBKUP}1${else}0${endif}')
    if tonumber(mounted)==1 then
    co=tonumber(conky_parse('${fs_used_perc /media/16GBKUP}'))
    else
    co=0
    end
    if co==nil then co=0 end
    --max number--------------------------
    max=100
    --position-----------------------------
    across=265
    down=730
    --radius of ring-----------------------
    rad=25
    --ring width---------------------------
    inlw=5
    --start and end angles---------------
    rstart=180
    rend=540
    --color and alpha for indicator----
    inr,ing,inb,ina=1,0,0,1.0
    --background ring color and alpha-----
    mounted=conky_parse('${if_mounted /media/16GBKUP}1${else}0${endif}')
    if tonumber(mounted)==1 then
    bgr,bgg,bgb,bga=0.75,0.75,0,1.0
    else
    bgr,bgg,bgb,bga=1,1,1,1.0
    end
    --calculation, do not edit below---------
    co=(co/max)*100
    draw_ring_pos(co, across, down, rad, inlw, rstart, rend, bgr, bgg, bgb, bga, inr, ing, inb, ina, direction)
    --END SETUP---------------copy setup section and paste for additional rings----------
    end
    end
    
    --NEGATIVE ARCS-------------------------------------------------------------------------------------------
    
    require 'cairo'
    function draw_ring_neg(co, across, down, rad, inlw, rstart, rend, bgr, bgg, bgb, bga, inr, ing, inb, ina, direction)
    
    local angle_0=rstart*(2*math.pi/360)-math.pi/2
    local angle_f=rend*(2*math.pi/360)-math.pi/2
    local t_arc=(co/100)*(angle_f-angle_0)
    -- Draw background ring
    cairo_arc(cr,across,down,rad,angle_0,angle_f)
    cairo_set_source_rgba(cr,bgr,bgg,bgb,bga)
    cairo_set_line_width(cr,inlw)
    cairo_stroke(cr)
    -- Draw indicator ring
    local angle_0_r=rend*(2*math.pi/360)-math.pi/2
    local angle_f_r=rstart*(2*math.pi/360)-math.pi/2
    local t_arc=(co/100)*(angle_f_r-angle_0_r)
    cairo_arc_negative(cr,across,down,rad,angle_0_r,angle_0_r+t_arc)
    cairo_set_source_rgba(cr,inr,ing,inb,ina)
    cairo_stroke(cr)
    end
    
    function conky_draw_neg()
    if conky_window == nil then return end
    if cs == nil or cairo_xlib_surface_get_width(cs) ~= conky_window.width or cairo_xlib_surface_get_height(cs) ~= conky_window.height then
    		if cs then cairo_surface_destroy(cs) end
    		cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
    	end
    	if cr then cairo_destroy(cr) end
    cr = cairo_create(cs)
    local updates=tonumber(conky_parse('${updates}'))
    if updates>=5 then
    --SETUP:CPU2 Ring-----------------------------------------------------------------------------
    --conky object to be displayed-----
    co=tonumber(conky_parse('${cpu cpu2}'))
    if co==nil then co=0 end
    --max number--------------------------
    max=100
    --position-----------------------------
    across=290
    down=405
    --radius of ring-----------------------
    rad=50
    --ring width---------------------------
    inlw=10
    --start and end angles---------------
    rstart=0
    rend=180
    --color and alpha for indicator----
    inr,ing,inb,ina=1,0,0,1
    --background ring color and alpha-----
    bgr,bgg,bgb,bga=1,1,0,1
    --calculation, do not edit below---------
    co=(co/max)*100
    draw_ring_neg(co, across, down, rad, inlw, rstart, rend, bgr, bgg, bgb, bga, inr, ing, inb, ina, direction)
    --END SETUP---------------copy setup section and paste for additional rings----------
    --SETUP:TMP Ring-----------------------------------------------------------------------------
    --conky object to be displayed-----
    co=tonumber(conky_parse('${fs_used_perc /tmp}'))
    if co==nil then co=0 end
    --max number--------------------------
    max=100
    --position-----------------------------
    across=290
    down=405
    --radius of ring-----------------------
    rad=35
    --ring width---------------------------
    inlw=10
    --start and end angles---------------
    rstart=0
    rend=180
    --color and alpha for indicator----
    inr,ing,inb,ina=1,1,1,1.0
    --background ring color and alpha-----
    bgr,bgg,bgb,bga=0.5,0.5,0.5,1.0
    --calculation, do not edit below---------
    co=(co/max)*100
    draw_ring_neg(co, across, down, rad, inlw, rstart, rend, bgr, bgg, bgb, bga, inr, ing, inb, ina, direction)
    --END SETUP---------------copy setup section and paste for additional rings----------
    --SETUP:8GBACKUP Ring-----------------------------------------------------------------------------
    --conky object to be displayed-----
    mounted=conky_parse('${if_mounted /media/8GBACKUP}1${else}0${endif}')
    if tonumber(mounted)==1 then
    co=tonumber(conky_parse('${fs_used_perc /media/8GBACKUP}'))
    else
    co=0
    end
    if co==nil then co=0 end
    --max number--------------------------
    max=100
    --position-----------------------------
    across=240
    down=650
    --radius of ring-----------------------
    rad=45
    --ring width---------------------------
    inlw=5
    --start and end angles---------------
    rstart=0
    rend=90
    --color and alpha for indicator----
    inr,ing,inb,ina=1,0,0,1.0
    --background ring color and alpha-----
    mounted=conky_parse('${if_mounted /media/8GBACKUP}1${else}0${endif}')
    if tonumber(mounted)==1 then
    bgr,bgg,bgb,bga=0.75,0.75,0,1.0
    else
    bgr,bgg,bgb,bga=1,1,1,1.0
    end
    --calculation, do not edit below---------
    co=(co/max)*100
    draw_ring_neg(co, across, down, rad, inlw, rstart, rend, bgr, bgg, bgb, bga, inr, ing, inb, ina, direction)
    --END SETUP---------------copy setup section and paste for additional rings----------
    --SETUP:8GBACKUP2 Ring-----------------------------------------------------------------------------
    --conky object to be displayed-----
    mounted=conky_parse('${if_mounted /media/8GBACKUP2}1${else}0${endif}')
    if tonumber(mounted)==1 then
    co=tonumber(conky_parse('${fs_used_perc /media/8GBACKUP2}'))
    else
    co=0
    end
    if co==nil then co=0 end
    --max number--------------------------
    max=100
    --position-----------------------------
    across=240
    down=650
    --radius of ring-----------------------
    rad=45
    --ring width---------------------------
    inlw=5
    --start and end angles---------------
    rstart=90
    rend=180
    --color and alpha for indicator----
    inr,ing,inb,ina=1,0,0,1.0
    --background ring color and alpha-----
    mounted=conky_parse('${if_mounted /media/8GBACKUP2}1${else}0${endif}')
    if tonumber(mounted)==1 then
    bgr,bgg,bgb,bga=0.75,0.75,0,1.0
    else
    bgr,bgg,bgb,bga=1,1,1,1.0
    end
    --calculation, do not edit below---------
    co=(co/max)*100
    draw_ring_neg(co, across, down, rad, inlw, rstart, rend, bgr, bgg, bgb, bga, inr, ing, inb, ina, direction)
    --END SETUP---------------copy setup section and paste for additional rings----------
    end
    end
    calendar.lua
    Code:
    --lua calendar script by mrpeachy version 3, 03/04/2011
    --fixed issue where months beginning on saturday would not have last dates printed
    --added previous and next month dates within calendar
    --condensed code, hopefully will run lighter also
    --fixed ability to rotate and keep box in right place
    require 'cairo'
    --------------------------------------------------------------------------------
    function conky_draw_fig(cs, cr)
    if conky_window == nil then return end
    if cs == nil or cairo_xlib_surface_get_width(cs) ~= conky_window.width or cairo_xlib_surface_get_height(cs) ~= conky_window.height then
    		if cs then cairo_surface_destroy(cs) end
    		cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
    	end
    	if cr then cairo_destroy(cr) end
    cr = cairo_create(cs)
    local updates=tonumber(conky_parse('${updates}'))
    --####################################################################################################
    if updates>5 then -- starts the display
    --####################################################################################################
    --title text color
    tred,tgreen,tblue,talpha=1,0,0,1
    --title text font
    tfont="TransponderAOE"
    --title text size
    tfontsize=20
    --title font bold? Set to 1 for bold font
    tfbold=1
    --###################################################
    --main body text color
    bred,bgreen,bblue,balpha=0,0,0.753,1
    --main body text font
    mfont="TransponderAOE"
    --main body text size
    mfontsize=20
    --main body font bold? Set to 1 for bold font
    mfbold=1
    --###################################################
    --highlight text color
    hred,hgreen,hblue,halpha=1,1,0,1
    --highlight font
    hfont="TransponderAOE"
    --highlight size
    hfontsize=20
    --Highlight font bold? Set to 1 for bold font
    hfbold=1
    --###################################################
    --surrounding numbers 1=on, 0=off
    surround=1
    --surrounding dates text color
    sred,sgreen,sblue,salpha=1,0.723,0,1
    --surrounding font
    sfont="TransponderAOE"
    --surounding size
    sfontsize=20
    --bold?
    sfbold=0
    --###################################################
    --indicator box enter 1 for box or 0 for no box
    box=1
    --use the following 2 numbers to adjust box position
    xadjust=2.5
    yadjust=5
    --set the box dimensions
    width=28
    height=22
    --box color
    bxred,bxgreen,bxblue,bxalpha=1,0,0,1
    --###################################################
    --calendar this month ###############################
    --###################################################
    --position
    across=140
    down=180
    --rotate - this will require repositioning above
    rotate=0
    --###################################################
    --horizontal gap between dates
    gaph=32
    --###################################################
    --gap between day titles and first line
    gapt=25
    --###################################################
    --gap between calendar line
    gapl=25
    --###################################################
    --spacer -- this can help with alignment enter 0, 1 space or 2 spaces between the ""
    spacer=" "
    --###################################################
    --calendar calcs
    year=os.date("%G")
    today=tonumber(os.date("%d"))
    t1 = os.time( {    year=year,month=03,day=01,hour=00,min=0,sec=0} );
    t2 = os.time( {    year=year,month=02,day=01,hour=00,min=0,sec=0} );
    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
    local day_num = today
    local remainder=day_num % 7
    start_day=day-(day_num % 7)
    if start_day<0 then start_day=7+start_day end     
    month=os.date("%m")
    mdays=monthdays[tonumber(month)]
    mdaystm=mdays
    x=mdays+start_day
    dnum={}
    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_rotate (cr,(math.pi/180)*(rotate))
    --print calendar titles
    --###################################################
    if tfbold==1 then
    cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
    else
    cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    end
    cairo_set_font_size (cr, tfontsize);
    cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
    dys={"SU","MO","TU","WE","TH","FR","SA"}
    --------------------------------
    --use these settings to mess around with positioning
    turn=0
    ta=0
    move=0
    rot=0
    --------------------------------
    for i=1,7 do
    cairo_move_to (cr, across+(gaph*(i-1)), down+(i*move))
    cairo_rotate (cr,(math.pi/180)*(rot))
    cairo_show_text (cr, dys[i])
    cairo_stroke (cr)
    cairo_rotate (cr,(math.pi/180)*(rot*-1))
    end
    if mfbold==1 then
    cairo_select_font_face (cr, mfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
    else
    cairo_select_font_face (cr, mfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    end
    cairo_set_font_size (cr, mfontsize);
    cairo_set_source_rgba (cr,bred,bgreen,bblue,balpha)
    for i=1,plen,7 do
    fn=i
    for i=fn,fn+6 do
    cairo_move_to (cr, across+(gaph*(i-fn))-((((fn-1)/7)+ta)*turn), (i*move)+down+gapt+(gapl*((fn-1)/7)))
    cairo_rotate (cr,(math.pi/180)*(rot))
    cairo_show_text (cr, dnum[i])
    cairo_stroke (cr)
    cairo_rotate (cr,(math.pi/180)*(rot*-1))
    end
    end
    if hfbold==1 then
    cairo_select_font_face (cr, hfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
    else
    cairo_select_font_face (cr, hfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    end
    cairo_set_font_size (cr, hfontsize);
    cairo_set_source_rgba (cr,hred,hgreen,hblue,halpha)
    for i=1,plen,7 do
    fn=i
    for i=fn,fn+6 do
    cairo_move_to (cr, across+(gaph*(i-fn))-((((fn-1)/7)+ta)*turn), (i*move)+down+gapt+(gapl*((fn-1)/7)))
    cairo_rotate (cr,(math.pi/180)*(rot))
    cairo_show_text (cr, dnumh[i])
    cairo_stroke (cr)
    cairo_rotate (cr,(math.pi/180)*(rot*-1))
    end
    end
    --###############################################################################
    if surround==1 then
    thisstart=tonumber(start_day)+1
    thisend=tonumber(start_day)+mdays
    previous=tonumber(start_day)
    nextmon=dlen-thisend
    pmon=tonumber(month)-1
    if pmon==0 then pmon=12 end
    pmon=monthdays[pmon]
    snum={}
    for i=1,dlen do
    snum[i]=""
    end
    for i=tonumber(thisend)+1,tonumber(thisend)+nextmon do
    snum[i]=i-tonumber(thisend)
    end
    for i=1,previous do
    snum[i]=pmon-(previous-(i))
    end
    if sfbold==1 then
    cairo_select_font_face (cr, sfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
    else
    cairo_select_font_face (cr, sfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    end
    cairo_set_font_size (cr, sfontsize);
    cairo_set_source_rgba (cr,sred,sgreen,sblue,salpha)
    for i=1,plen,7 do
    fn=i
    for i=fn,fn+6 do
    cairo_move_to (cr, across+(gaph*(i-fn))-((((fn-1)/7)+ta)*turn), (i*move)+down+gapt+(gapl*((fn-1)/7)))
    cairo_rotate (cr,(math.pi/180)*(rot))
    cairo_show_text (cr, snum[i])
    cairo_stroke (cr)
    cairo_rotate (cr,(math.pi/180)*(rot*-1))
    end
    end
    end
    --box aound
    if box==1 then
    cairo_set_source_rgba (cr,bxred,bxgreen,bxblue,bxalpha)
    cairo_set_line_width (cr,1)
    if place>0 and place<8 then
    cy=down+gapt
    elseif
    place>7 and place<15 then
    cy=down+gapt+gapl
    elseif
    place>14 and place<22 then
    cy=down+gapt+gapl+gapl
    elseif
    place>21 and place<29 then
    cy=down+gapt+gapl+gapl+gapl
    elseif
    place>28 and place<36 then
    cy=down+gapt+gapl+gapl+gapl+gapl
    end
    placey=place %7
    if placey==1 then
    cx=across
    elseif
    placey==2 then
    cx=across+(gaph*1)
    elseif
    placey==3 then
    cx=across+(gaph*2)
    elseif
    placey==4 then
    cx=across+(gaph*3)
    elseif
    placey==5 then
    cx=across+(gaph*4)
    elseif
    placey==6 then
    cx=across+(gaph*5)
    elseif
    placey==0 then
    cx=across+(gaph*6)
    end
    cairo_rectangle (cr,cx-xadjust,cy+yadjust,width,-height)
    cairo_stroke (cr)
    end
    --###################################################
    cairo_rotate (cr,(math.pi/180)*(rotate*-1))
    --end of calendar
    --###################################################
    --#################################################################################
    end--end if 5
    cairo_destroy(cr)
    cairo_surface_destroy(cs)
    cr=nil
    end--end main function
    
    --################################################################################
    --Box Function
    --################################################################################
    do
    
    require "cairo"
    local cs, cr = nil
    
    local function conky_set_the_font(cr, fface, fsize, fbold)
    		if fbold == 1 then
    			cairo_select_font_face(cr, fface, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD)
    		else
    			cairo_select_font_face(cr, fface, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL)
    		end
    		cairo_set_font_size(cr, fsize)
    end
    
    local function conky_draw_date(cr, extents, string, fred, fgreen ,fblue, falpha, tacross, down)
    		cairo_set_source_rgba(cr, fred, fgreen, fblue, falpha)
    		cairo_move_to(cr, tacross - (extents.width /2 ), down)
    		cairo_show_text(cr, string)
    end
    
    function conky_draw_box(cs, cr)
    	if conky_window == nil then return end
    	if cs == nil or cairo_xlib_surface_get_width(cs) ~= conky_window.width or cairo_xlib_surface_get_height(cs) ~= conky_window.height then
    		if cs then cairo_surface_destroy(cs) end
    		cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
    	end
    	if cr then cairo_destroy(cr) end
    	cr = cairo_create(cs)
    	local updates = tonumber(conky_parse('${updates}'))
    	--####################################################################################################
    	if updates>5 then -- starts the display
    	--####################################################################################################
    		--Weekday text color
    		local wred, wgreen, wblue, walpha = 1, 1, 1, 1
    		--Weekday text font
    		local wfont = "TransponderAOE"
    		--Weekday text size
    		local wfontsize = 16
    		--Weekday font bold? Set to 1 for bold font
    		local wfbold = 1
    		--###################################################
    		--Month text color
    		local mred, mgreen, mblue, malpha = 1, 0, 0, 1
    		--Month text font
    		local mfont = "TransponderAOE"
    		--Month text size
    		local mfontsize = 18
    		--Month font bold? Set to 1 for bold font
    		local mfbold = 1
    		--###################################################
    		--Day text color
    		local dred, dgreen, dblue, dalpha = 1, 1, 0, 1
    		--Day font
    		local dfont = "TransponderAOE"
    		--Day size
    		local dfontsize = 30
    		--Day font bold? Set to 1 for bold font
    		local dfbold = 1
    		--###################################################
    		--Year text color
    		local yred, ygreen, yblue, yalpha = 1, 1, 1, 1
    		--year font
    		local yfont = "TransponderAOE"
    		--Year size
    		local yfontsize = 18
    		--Year font bold? Set to 1 for bold font
    		local yfbold = 1
    		--###################################################
    		--indicator box enter 1 for box or 0 for no box
    		local box = 1
    		--use the following 2 numbers to adjust box position
    		local xadjust = 20
    		local yadjust = 180
    		--set the box dimensions
    		local width = 104
    		local height = 110
    		--box thickness
    		local bthick = 5
    		--box color
    		local bxred, bxgreen, bxblue, bxalpha = 1, 0, 0, 1
    		--###################################################
    		--Today's Date Box ###############################
    		--###################################################
    		--position
    		local down = yadjust + bthick
    		--###################################################
    		--gap from sides
    		local gaph = 10
    		--###################################################
    		--variables (need to set font face, font size and text string in order to populate text extents structure with text measurements)
    		-- Weekday
    		local wdays = os.date("%A")
    		local ext_wdays = cairo_text_extents_t:create()
    		conky_set_the_font(cr, wfont, wfontsize, wfbold)
    		cairo_text_extents(cr, wdays, ext_wdays)
    		-- Month
    		local month = os.date("%B")
    		local ext_month = cairo_text_extents_t:create()
    		conky_set_the_font(cr, mfont, mfontsize, mfbold)
    		cairo_text_extents(cr, month, ext_month)
    		-- Today
    		local today = tonumber(os.date("%d"))
    		local ext_today = cairo_text_extents_t:create()
    		conky_set_the_font(cr, dfont, dfontsize, dfbold)
    		cairo_text_extents(cr, today, ext_today)
    		-- Year
    		local year = os.date("%G")
    		local ext_year = cairo_text_extents_t:create()
    		conky_set_the_font(cr, yfont, yfontsize, yfbold)
    		cairo_text_extents(cr, year, ext_year)
    		-- text across box center axis
    		local tacross = xadjust + (width / 2)
    		-- gap between lines (with 4 lines it will be 3 gaps)
    		local gapl = (height - (bthick * 2) - (gaph * 2) - ext_wdays.height - ext_month.height - ext_today.height - ext_year.height) / 3
    		--###################################################
    		--print box 
    		--###################################################
    		--Weekday
    		down = down + gaph + ext_wdays.height
    		conky_set_the_font(cr, wfont, wfontsize, wfbold)
    		conky_draw_date(cr, ext_wdays, wdays, wred, wgreen ,wblue, walpha, tacross, down)
    		--Month
    		down = down + gapl + ext_month.height
    		conky_set_the_font(cr, mfont, mfontsize, mfbold)
    		conky_draw_date(cr, ext_month, month, mred, mgreen ,mblue, malpha, tacross, down)
    		--Day
    		down = down + gapl + ext_today.height
    		conky_set_the_font(cr, dfont, dfontsize, dfbold)
    		conky_draw_date(cr, ext_today, today, dred, dgreen ,dblue, dalpha, tacross, down)
    		--Year
    		down = down + gapl + ext_year.height
    		conky_set_the_font(cr, yfont, yfontsize, yfbold)
    		conky_draw_date(cr, ext_year, year, yred, ygreen ,yblue, yalpha, tacross, down)
    		--box around
    		if box == 1 then
    			cairo_set_source_rgba(cr, bxred, bxgreen, bxblue, bxalpha)
    			cairo_rectangle(cr, xadjust, yadjust, width, height)
    			cairo_set_line_width(cr, bthick)
    			cairo_stroke(cr)
    		end
    		cairo_stroke(cr)
    		--#################################################################################
    	end--end if 5
    end--end box function
    cairo_destroy(cr)
    cairo_surface_destroy(cs)
    cr=nil
    end
    wunderground-script
    Code:
    #!/bin/bash
    
    #function: test_weather_message
    test_weather_message () {
      if [[ $1 == "Chance of Flurries" || $1 == Flurries ]]; then
          echo p
        elif [[ $1 == "Chance of Rain" ]]; then
          echo h
    	elif [[ $1 == "Chance of Freezing Rain" || $1 == "Light Freezing Rain" || $1 == "Freezing Rain" ]]; then
          echo v
    	elif [[ $1 == "Chance of Sleet" || $1 == Sleet ]]; then
          echo w
    	elif [[ $1 == "Chance of Snow" ]]; then
          echo q 
    	elif [[ $1 ==  "Chance of Thunderstorms" || $1 == Thunderstorms || $1 == Thunderstorm ]]; then
          echo n
    	elif [[ $1 ==  "Chance of a Thunderstorm" ]]; then
          echo m
    	elif [[ $1 ==  Clear || $1 == Sunny ]]; then
          echo a
    	elif [[ $1 ==  Cloudy ]]; then
          echo d
    	elif [[ $1 ==  Fog || $1 == Haze ]]; then
          echo 0
    	elif [[ $1 ==  "Mostly Cloudy" || $1 == "Partly Cloudy" || $1 == "Partly Sunny" ]]; then
          echo c
    	elif [[ $1 ==  "Mostly Sunny" || $1 == "Scattered Clouds" ]]; then
          echo b
    	elif [[ $1 ==  Rain ]]; then
          echo i
    	elif [[ $1 ==  Snow ]]; then
          echo r
    	elif [[ $1 ==  Overcast ]]; then
          echo e
        else echo -
      fi	
    } 
    
    #function: test_weather_message_night
    test_weather_message_night () {
      if [[ $1 == "Chance of Flurries" || $1 == Flurries || $1 == "Chance of Snow" || $1 ==  Snow ]]; then
          echo O
        elif [[ $1 == "Chance of Rain" || $1 == "Chance of Freezing Rain" || $1 == "Light Freezing Rain" || $1 == "Freezing Rain" || $1 == "Chance of Sleet" || $1 == Sleet || $1 ==  Rain ]]; then
          echo G
    	elif [[ $1 ==  "Chance of Thunderstorms" || $1 == Thunderstorms || $1 == Thunderstorm ]]; then
          echo K
    	elif [[ $1 ==  "Chance of a Thunderstorm" ]]; then
          echo m
    	elif [[ $1 ==  Clear || $1 == Sunny ]]; then
          echo A
    	elif [[ $1 ==  Cloudy ]]; then
          echo D
    	elif [[ $1 ==  Fog || $1 == Haze ]]; then
          echo 0
    	elif [[ $1 ==  "Mostly Cloudy" || $1 == "Partly Cloudy" || $1 == "Partly Sunny" ]]; then
          echo C
    	elif [[ $1 ==  "Mostly Sunny" || $1 == "Scattered Clouds" ]]; then
          echo B
    	elif [[ $1 ==  Overcast ]]; then
          echo D
        else echo -
      fi	
    } 
    
    #function: test_wind_message
    test_wind_message () {
      if [[ $1 == Sou ]]; then
          echo 1
        elif [[ $1 == SSW ]]; then
          echo 2
    	elif [[ $1 == "SW " ]]; then
          echo 3
    	elif [[ $1 == WSW || $1 == Sleet ]]; then
          echo 4
    	elif [[ $1 == Wes ]]; then
          echo 5 
    	elif [[ $1 ==  WNW ]]; then
          echo 6
    	elif [[ $1 ==  "NW " ]]; then
          echo 7
    	elif [[ $1 ==  NNW ]]; then
          echo 8
    	elif [[ $1 ==  Nor ]]; then
          echo 9
    	elif [[ $1 ==  NNE ]]; then
          echo ":"
    	elif [[ $1 ==  "NE " ]]; then
          echo ";"
    	elif [[ $1 ==  ENE ]]; then
          echo "<"
    	elif [[ $1 ==  Eas ]]; then
          echo "="
    	elif [[ $1 ==  ESE ]]; then
          echo ">"
    	elif [[ $1 ==  "SE " ]]; then
          echo "?"
        elif [[ $1 ==  SSE ]]; then
          echo "@"
        else echo "-"
      fi	
    } 
    
    
    rm ~/Conky/Scripts/conky_wunderground2/yes
    rm ~/Conky/Scripts/conky_wunderground2/weather_icons
    wget -O ~/Conky/Scripts/conky_wunderground2/ics http://ical.wunderground.com/auto/ical/global/stations/71639.ics?units=metric
    egrep -i 'DESCRIPTION' ~/Conky/Scripts/conky_wunderground2/ics > ~/Conky/Scripts/conky_wunderground2/messages.wun
    sed -i 's/\\n/\n/g' ~/Conky/Scripts/conky_wunderground2/messages.wun
    sed -i 's/DESCRIPTION://g' ~/Conky/Scripts/conky_wunderground2/messages.wun
    sed -i 's/ - /\n/g' ~/Conky/Scripts/conky_wunderground2/messages.wun
    sed -i 's/High/\nHigh/g' ~/Conky/Scripts/conky_wunderground2/messages.wun
    sed -i 's/Low/\nLow/g' ~/Conky/Scripts/conky_wunderground2/messages.wun
    sed -i 's/Wind /\n/g' ~/Conky/Scripts/conky_wunderground2/messages.wun
    sed -i 's/\..*//g' ~/Conky/Scripts/conky_wunderground2/messages.wun
    #-----Comment out next line for full weekday names.
    sed -i -e 's/Monday/Mon/' -e 's/Tuesday/Tue/' -e 's/Wednesday/Wed/' -e 's/Thursday/Thurs/' -e 's/Friday/Fri/' -e 's/Saturday/Sat/' -e 's/Sunday/Sun/' ~/Conky/Scripts/conky_wunderground2/messages.wun
    
    for (( i=2; i<=100; i+=8 ))
      do
       test_line=$(sed -n "${i}p" ~/Conky/Scripts/conky_wunderground2/messages.wun)
       if [[ $test_line == "" ]]; then
         break
       fi
       test_weather_message "$test_line" >> ~/Conky/Scripts/conky_wunderground2/weather_icons
       j=$((i+2))
       test_line=$(sed -n "${j}p" ~/Conky/Scripts/conky_wunderground2/messages.wun|cut -c1-3)
       if [[ $test_line == "" ]]; then
         break
       fi
       test_wind_message "$test_line" >> ~/Conky/Scripts/conky_wunderground2/weather_icons
       j=$((i+4))
       test_line=$(sed -n "${j}p" ~/Conky/Scripts/conky_wunderground2/messages.wun)
       if [[ $test_line == "" ]]; then
         break
       fi
       test_weather_message_night "$test_line" >> ~/Conky/Scripts/conky_wunderground2/weather_icons
       j=$((i+6))
       test_line=$(sed -n "${j}p" ~/Conky/Scripts/conky_wunderground2/messages.wun|cut -c1-3)
       if [[ $test_line == "" ]]; then
         break
       fi
       test_wind_message "$test_line" >> ~/Conky/Scripts/conky_wunderground2/weather_icons
      done
    days_no=$(($(cat ~/Conky/Scripts/conky_wunderground2/weather_icons|wc -l)/4))
    if [[ $days_no == 8 ]]; then
       touch ~/Conky/Scripts/conky_wunderground2/yes
    fi
    And here's screenshots. Before and after some drives are unplugged. Plus, a copy of my background image. Just for completion's sake. Comments and criticisms acceptable.
    Attached Images Attached Images

  3. #18753
    Join Date
    Oct 2008
    Location
    Down Under
    Beans
    1,566
    Distro
    Xubuntu 12.10 Quantal Quetzal

    Re: Post your .conkyrc files w/ screenshots

    Code:
    #!/usr/bin/conky -d -c
    alignment tr
    background yes
    border_width 5
    cpu_avg_samples 2
    default_color 000000		
    default_outline_color 000000 	
    default_shade_color 000000	
    double_buffer yes
    draw_borders no
    draw_graph_borders no
    draw_outline no
    draw_shades yes
    gap_x 12
    gap_y  -20
    maximum_width 250
    minimum_size 210
    net_avg_samples 2
    no_buffers yes
    override_utf8_locale yes
    own_window yes
    own_window_colour 000000	
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    own_window_transparent yes
    own_window_type own
    short_units yes			
    stippled_borders 3
    text_buffer_size 8000
    total_run_times 0
    update_interval 1.0
    use_xft yes
    xftalpha 1
    xftfont ubuntucondensed:pixelsize=16
    
    TEXT
    ${offset 65}${voffset 27}${font Limelight:size=30}${color #fff}${time %I} : ${time %M}${font}
    ${offset 65}${voffset 3}${font Limelight:size=18}${color #fff}${execi 3600 date +%A}${font}
    ${offset 65}${voffset 3}${font Limelight:size=16}${color #fff}${execi 3600 date +%d-%m-%Y}${font}
    ${offset 65}${voffset 15}Host : ${exec hostname}
    ${offset 65}Kernel : ${kernel}
    ${offset 65}Uptime : $uptime_short
    ${offset 65}${voffset 9}CPU : ${cpu cpu1} % - ${cpu cpu2} %
    ${offset 65}Memory : $mem - ${memperc} %
    ${offset 65}${voffset 9}Space :${offset 5}root: ${fs_free /}
    ${offset 65}${offset 40}home : ${fs_free /home}
    #${offset 65}${offset 40}Data : ${fs_free /media/Data}
    ##### eth0= LAN | wlan0=modem/cellular | wlan0=Wireless LAN #####
    #${offset 70}${voffset 40}${addr eth0}
    ${offset 60}${voffset 10}${addr wlan0} ${offset 10}UL : ${upspeed wlan0}
    ${offset 142}DL : ${downspeed wlan0}
    #${offset 70}${voffset 40}${addr wlan0}
    ${offset 65}${voffset 5}${color #fff}Weather  ${hr 2}${color #fff}
    ${execi 600 bash /home/rodney/accuweather_conky/accuw_script}
    ${font conkyweather:size=30}${execi 600  sed -n '5p' ~/accuweather_conky/images}${font}${goto 75}${voffset -40}Currently:
    ${goto 75}${execpi 600 sed -n '1p' /home/rodney/accuweather_conky/messages|fold -w22}
    ${goto 75}${execpi 600 sed -n '1p' /home/rodney/accuweather_conky/temperatures}C
    
    
    ${font conkyweather:size=30}${execi 600  sed -n '6p' ~/accuweather_conky/images}${font}${goto 75}${voffset -40}${execpi 600 sed -n '1p' /home/rodney/accuweather_conky/days}:
    ${goto 75}${execpi 600 sed -n '3p' /home/rodney/accuweather_conky/messages|fold -w22}
    ${goto 75}High: ${execpi 600 sed -n '2p' /home/rodney/accuweather_conky/temperatures}C  Low: ${execpi 600 sed -n '3p' /home/rodney/accuweather_conky/temperatures}C
    
    
    ${font conkyweather:size=30}${execi 600  sed -n '7p' ~/accuweather_conky/images}${font}${goto 75}${voffset -40}${execpi 600 sed -n '3p' /home/rodney/accuweather_conky/days}:
    ${goto 75}${execpi 600 sed -n '5p' /home/rodney/accuweather_conky/messages|fold -w22}
    ${goto 75}High: ${execpi 600 sed -n '4p' /home/rodney/accuweather_conky/temperatures}C  Low: ${execpi 600 sed -n '5p' /home/rodney/accuweather_conky/temperatures}C
    
    
    ${font conkyweather:size=30}${execi 600  sed -n '8p' ~/accuweather_conky/images}${font}${goto 75}${voffset -40}${execpi 600 sed -n '5p' /home/rodney/accuweather_conky/days}:
    ${goto 75}${execpi 600 sed -n '7p' /home/rodney/accuweather_conky/messages|fold -w22}
    ${goto 75}High: ${execpi 600 sed -n '6p' /home/rodney/accuweather_conky/temperatures}C  Low: ${execpi 600 sed -n '7p' /home/rodney/accuweather_conky/temperatures}C
    
    
    
    ${image ~/rodney/bg.png -p 0,0}
    Attached Images Attached Images

  4. #18754
    Join Date
    Aug 2009
    Location
    East of Atlantic
    Beans
    81
    Distro
    Ubuntu

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by foutes View Post
    I am in need of some help with my conky.

    I have added code to switch the network portion between wlan0 and easytether0 depending on which has an ip address.

    easytether is the program which I use to tether my rooted driod to my laptop via usb.


    The problem is the alignment of the weather portion, it is fine when wlan0 is showing but cant keep same alignment when easytether0 is connected as seen in the pictures below.

    Also need some help with the lua to not show link bar when easytether0 is connected.

    If anyone knows how to have the easytether portion keep track to total up and down for the month would be a plus since this connection is shared from my cellphone.

    Oh and on more thing since you guys are in such a giving mood
    I can not find a way to show the duplex link speed for the easytether connection,any ideas?

    conkyrc.
    Code:
    ##############################
    #     Conky by FOUTES.       #
    #     Fonts required-        #
    #      ConkySymbols          #
    #         Poky               #
    #     PizzaDude Bullets      #
    #       KR_A_Round           #
    ##############################
    
    # Create own window instead of using desktop (required in nautilus)
    background no
    own_window yes
    own_window_type override
    own_window_transparent yes
    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 no
    
    # Update interval in seconds
    update_interval 1.5
    
    # Minimum size of text area
    minimum_size  170 730
    
    # Draw shades?
    draw_shades no
    
    
    # Default colors and also border colors, grey90 == #ffffff
    default_color white
    default_outline_color white
    
    # Text alignment, other possable values are commented
    #alignment top_left
    alignment top_right
    #alignment bottom_left
    #alignment bottom_right
    
    # Gap between borders of screen and text
    gap_x 6
    gap_y 32
    
    # font
    use_xft yes
    xftfont Sazanami Gothic:size=8
    override_utf8_locale yes
    
    # Load Lua for shading and bargraphs
    lua_load /home/linus/.scripts/combined.lua
    lua_draw_hook_pre draw_lua
    
    # stuff after 'TEXT' will be formatted on screen
    short_units yes
    pad_percents 2
    TEXT
    ##############################
    # Kernel/Updates/Mail/Uptime #
    ##############################
    ${voffset 5}${font ConkySymbols:size=16}O${font}${goto 34}${voffset -7}$kernel 
    ${voffset 7}${font Poky:size=16}w${font}${goto 35}${voffset -7}${execi 3600 aptitude search "~U" | wc -l | tail} Packages
    ${voffset 5}${goto 6}${font ConkySymbols:size=17}c${font}${goto 35}${voffset -8}${execpi 1800 python /home/linus/.scripts/gmail.py}
    ${voffset 6}${goto 6}${font PizzaDude Bullets:size=17}L${font}${goto 36}${voffset -2}$uptime_short
    ###########
    # Battery #
    ###########
    ${voffset 7}${goto 2}${font Poky:size=22}R${font}${goto 40}${voffset -17}${battery_short} ${battery_time BAT0}
    #########
    #  Cpu  #
    #########
    ${voffset 32}${goto 4}${font ConkySymbols:size=22}f${font}${goto 42}${voffset -29}${cpu cpu1}%${voffset -7}${goto 89}${font ConkySymbols:size=14}H${font}${goto 105}${voffset -2}${execpi 5 sensors | grep 'temp1' | cut --characters 15-16}C${voffset 22}${goto 42}${cpu cpu2}%
    ${voffset 30}${goto 7}${font PizzaDude Bullets:size=12}C${font}${goto 27}${voffset -2}${top name 1}${goto 116}${voffset -18}CPU${goto 110}${voffset 17}${top cpu 1}${goto 150}${voffset -17}MEM${goto 146}${voffset 17}${top mem 1}
    ${voffset 6}${goto 7}${font PizzaDude Bullets:size=12}C${font}${goto 27}${voffset -2}${top name 2}${goto 110}${top cpu 2}${goto 146}${top mem 2}
    ${voffset 5}${goto 7}${font PizzaDude Bullets:size=12}C${font}${goto 27}${voffset -2}${top name 3}${goto 110}${top cpu 3}${goto 146}${top mem 3}
    ############
    #  Memory  #
    ############
    ${voffset 18}${goto 4}${font ConkySymbols:size=22}J${font}${goto 40}${voffset -14}$memperc% $mem/$memmax
    ##############
    # Hard Drive #
    ##############
    ${voffset 30}${goto 5}${font ConkySymbols:size=20}k${font}${voffset -10}${goto 40}IN/OUT=${goto 89}${diskio /dev/sda}${voffset -9}${goto 120}${font ConkySymbols:size=14}H${font}${voffset -2}${hddtemp /dev/sda}°C 
    ${voffset 15}${goto 9}${font PizzaDude Bullets:size=12}u${font}${goto 27}${voffset -1}Boot:${voffset -10}${goto 64}${fs_used /boot}/${fs_size /boot}/${fs_type /boot}
    ${voffset 20}${goto 9}${font PizzaDude Bullets:size=12}u${font}${goto 27}${voffset -1}Root:${voffset -10}${goto 67}${fs_used /}/${fs_size /}/${fs_type /}
    ${voffset 20}${goto 9}${font PizzaDude Bullets:size=12}u${font}${goto 27}${voffset -1}Home:${voffset -10}${goto 67}${fs_used /home}/${fs_size /home}/${fs_type /home}
    ${voffset 20}${goto 9}${font PizzaDude Bullets:size=12}u${font}${goto 27}${voffset -1}Swap:${voffset -10}${goto 69}${swap} / ${swapmax}
    ############
    # Wireless #
    ############
    ${if_existing /sys/class/net/wlan0/operstate up}
    ${voffset 17}${font ConkySymbols:size=20}g${font}${voffset -14}${goto 52}${wireless_essid wlan0}
    ${voffset 20}${goto 9}${font PizzaDude Bullets:size=12}b${font}${goto 29}${voffset -1}Bitrate:${goto 68}${wireless_bitrate wlan0}
    ${voffset 8}${goto 9}${font PizzaDude Bullets:size=12}b${font}${goto 29}${voffset -1}Local  IP:${goto 78}${addr wlan0}
    ${voffset 8}${goto 9}${font PizzaDude Bullets:size=12}b${font}${goto 29}${voffset -1}Public IP:${goto 78}${execi 1800 wget -q -O - checkip.dyndns.org | sed -e 's/[^[:digit:]\|.]//g'}
    ${voffset 8}${goto 9}${font PizzaDude Bullets:size=12}U${font}${goto 29}${voffset -1}Speed Down:${downspeed wlan0}
    ${voffset 8}${goto 9}${font PizzaDude Bullets:size=12}O${font}${goto 29}${voffset -1}Speed Up:${upspeed wlan0}
    ${voffset 8}${goto 9}${font PizzaDude Bullets:size=12}m${font}${goto 29}${voffset -1}Total Down:${totaldown wlan0}
    ${voffset 8}${goto 9}${font PizzaDude Bullets:size=12}m${font}${goto 29}${voffset -1}Total Up:${totalup wlan0}
    ${endif}
    ${if_existing /sys/class/net/easytether0/operstate unknown}
    ${voffset -5}${font Poky:size=22}Y${font}${voffset -7}${goto 65}EASYTETHER
    ${voffset 20}${goto 9}${font PizzaDude Bullets:size=12}b${font}${goto 29}${voffset -1}Duplex:10
    ${voffset 8}${goto 9}${font PizzaDude Bullets:size=12}b${font}${goto 29}${voffset -1}Local  IP:${goto 78}${addr easytether0}
    ${voffset 8}${goto 9}${font PizzaDude Bullets:size=12}b${font}${goto 29}${voffset -1}Public IP:${goto 78}${execi 1800 wget -q -O - checkip.dyndns.org | sed -e 's/[^[:digit:]\|.]//g'}
    ${voffset 8}${goto 9}${font PizzaDude Bullets:size=12}U${font}${goto 29}${voffset -1}Speed Down:${downspeed easytether0}
    ${voffset 8}${goto 9}${font PizzaDude Bullets:size=12}O${font}${goto 29}${voffset -1}Speed Up:${upspeed easytether0}
    ${voffset 8}${goto 9}${font PizzaDude Bullets:size=12}m${font}${goto 29}${voffset -1}Total Down:${totaldown easytether0}
    ${voffset 8}${goto 9}${font PizzaDude Bullets:size=12}m${font}${goto 29}${voffset -1}Total Up:${totalup easytether0}
    ${endif}
    ############
    # Weather #
    ############
    ${voffset -7}${goto 12}${font Weather:size=35}y${font}
    ${voffset -42}${goto 40}${font RadioSpace:size=26}${if_match ${execi 1800 conkyForecast -d HT -uix}<=99}${execi 1800 conkyForecast -d HT -i}${else}${if_match ${execi 1800 conkyForecast -d HT -uix}>=100}${execi 1800 conkyForecast -d HT -i}${endif}${endif}${font}
    ${voffset -33}${goto 140}${font DroidSansFallback:bold:size=7.55}${color6}H:${offset 0}${execpi 1800 conkyForecast -d HT -s 0 -ui | sed -e 's/N\/A'/'\$\{color7\}TBA\$\{color6\}/g'}${voffset 15}${goto 140}L:${offset 1}${execi 1800 conkyForecast -d LT -s 0 -ui}${font}
    ${voffset -40}${font KRARound:size=37}${color7}${goto 126}I${font}
    .lua
    Code:
    --[[ this script combines the background drawing lua (originally by londonali1010, modified by VinDSL)
    with a script that emulates only the gradient bars portion of the script by wlourf
    call in conkyrc above TEXT like so
    lua_load /path to file/filename.lua
    lua_draw_hook_pre draw_lua
    ]]
    require 'cairo'
    function conky_draw_lua()
    if conky_window == nil then return end
    local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
    cr = cairo_create(cs)
    local updates=tonumber(conky_parse('${updates}'))
    if updates>5 then
    --#########################################################################################################
    --#########################################################################################################
    --background setup -- make sure this comes first-----------
    settings={--CONKY BACKGROUND
    corner_r=50,--corner radius
    bg_color={0x222222,0.9},--color and alpha inside {}
    bg_height=-2,--negative number reduces height of bg
    w=conky_window.width,
    h=conky_window.height,
    };background(settings)
    --end background setup-------------------------------------
    
    bar_adjust=-20
    
    --bar setup------------------------------------------------
    settings={--BATTERY GRAPH BATTERY
    number=tonumber(conky_parse("${battery_percent}")),--conky object to read
    number_max=100,--max value of conky object
    bar_startx=41,--x coordinate
    bar_starty=152+bar_adjust,--y coordinate
    divisions=45,--number of blocks
    div_width=2,--horizontal size
    div_height=6,--vertical size
    div_gap=1,--space between bits
    bg_color={0xFFFFFF,0.25},--background color, color and alpha inside {}
    st_color={0xFF0000,1},--start color for gradient, green
    end_color={0x00FF00,1},--end color for gradient
    mid_color={0xFFFF00,1},--middle color for gradient, yellow
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --bar setup------------------------------------------------
    settings={--CPU GRAPH CPU1
    number=tonumber(conky_parse("${cpu cpu1}")),
    number_max=100,
    bar_startx=42,
    bar_starty=188+bar_adjust,
    divisions=45,
    div_width=2,
    div_height=6,
    div_gap=1,
    bg_color={0xFFFFFF,0.25},
    st_color={0x00FF00,1},
    mid_color={0xFFFF00,1},
    end_color={0xFF0000,1},
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --bar setup------------------------------------------------
    settings={--CPU GRAPH CPU2
    number=tonumber(conky_parse("${cpu cpu2}")),
    number_max=100,
    bar_startx=42,
    bar_starty=210+bar_adjust,
    divisions=45,
    div_width=2,
    div_height=6,
    div_gap=1,
    bg_color={0xFFFFFF,0.25},
    st_color={0x00FF00,1},
    mid_color={0xFFFF00,1},
    end_color={0xFF0000,1},
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --bar setup------------------------------------------------
    settings={--MEMPERC GRAPH
    number=tonumber(conky_parse("${memperc}")),
    number_max=100,
    bar_startx=40,
    bar_starty=330+bar_adjust,
    divisions=45,
    div_width=2,
    div_height=6,
    div_gap=1,
    bg_color={0xFFFFFF,0.25},
    st_color={0x00FF00,1},
    mid_color={0xFFFF00,1},
    end_color={0xFF0000,1},
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --bar setup------------------------------------------------
    settings={--BOOT FILESYSTEM USED GRAPH
    number=tonumber(conky_parse("${fs_used_perc /boot}")),
    number_max=100,
    bar_startx=57,
    bar_starty=400+bar_adjust,
    divisions=40,
    div_width=2,
    div_height=6,
    div_gap=1,
    bg_color={0xFFFFFF,0.25},
    st_color={0x00FF00,1},
    mid_color={0xFFFF00,1},
    end_color={0xFF0000,1},
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --bar setup------------------------------------------------
    settings={--ROOT FILESYSTEM USED GRAPH
    number=tonumber(conky_parse("${fs_used_perc /}")),
    number_max=100,
    bar_startx=58,
    bar_starty=425+bar_adjust,
    divisions=40,
    div_width=2,
    div_height=6,
    div_gap=1,
    bg_color={0xFFFFFF,0.25},
    st_color={0x00FF00,1},
    mid_color={0xFFFF00,1},
    end_color={0xFF0000,1},
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --bar setup------------------------------------------------
    settings={--HOME FILESYSTEM USED GRAPH
    number=tonumber(conky_parse("${fs_used_perc /home}")),
    number_max=100,
    bar_startx=63,
    bar_starty=450+bar_adjust,
    divisions=38,
    div_width=2,
    div_height=6,
    div_gap=1,
    bg_color={0xFFFFFF,0.25},
    st_color={0x00FF00,1},
    mid_color={0xFFFF00,1},
    end_color={0xFF0000,1},
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --bar setup------------------------------------------------
    settings={--SWAP FILESYSTEM USED GRAPH
    number=tonumber(conky_parse("${swapperc}")),
    number_max=100,
    bar_startx=63,
    bar_starty=475+bar_adjust,
    divisions=38,
    div_width=2,
    div_height=6,
    div_gap=1,
    bg_color={0xFFFFFF,0.25},
    st_color={0x00FF00,1},
    mid_color={0xFFFF00,1},
    end_color={0xFF0000,1},
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --bar setup------------------------------------------------
    settings={--WIRELESS NETWORK GRAPH
    number=tonumber(conky_parse("${wireless_link_qual wlan0}")),
    number_max=100,
    bar_startx=42,
    bar_starty=523+bar_adjust,
    divisions=45,
    div_width=2,
    div_height=6,
    div_gap=1,
    bg_color={0xFFFFFF,0.25},
    st_color={0xFF0000,1},
    end_color={0x00FF00,1},
    mid_color={0xFFFF00,1},
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --#########################################################################################################
    --#########################################################################################################
    end-- if updates>5
    cairo_destroy(cr)
    cairo_surface_destroy(cs)
    cr=nil
    end-- end main function
    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 bars(t)
    local bar_startx=t.bar_startx
    local bar_starty=t.bar_starty
    local divisions=t.divisions
    local div_width=t.div_width
    local div_height=t.div_height
    local div_gap=t.div_gap
    local br,bg,bb,ba=rgb_to_r_g_b(t.bg_color)
    local sr,sg,sb,sa=rgb_to_r_g_b(t.st_color)
    local mr,mg,mb,ma=rgb_to_r_g_b(t.mid_color)
    local er,eg,eb,ea=rgb_to_r_g_b(t.end_color)
    if t.number==nil then number=0 else number=t.number end
    local number_max=t.number_max
    local number_divs=(number/number_max)*divisions
    cairo_set_line_width (cr,div_width)
    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--function bars
    function background(t)
    local corner_r=t.corner_r
    local br,bg,bb,ba=rgb_to_r_g_b(t.bg_color)
    local v=t.bg_height
    local h=t.h
    local w=t.w
    cairo_move_to(cr,corner_r,0)
    cairo_line_to(cr,w-corner_r,0)
    cairo_curve_to(cr,w,0,w,0,w,corner_r)
    cairo_line_to(cr,w,h+v-corner_r)
    cairo_curve_to(cr,w,h+v,w,h+v,w-corner_r,h+v)
    cairo_line_to(cr,corner_r,h+v)
    cairo_curve_to(cr,0,h+v,0,h+v,0,h+v-corner_r)
    cairo_line_to(cr,0,corner_r)
    cairo_curve_to(cr,0,0,0,0,corner_r,0)
    cairo_close_path(cr)
    cairo_set_source_rgba(cr,br,bg,bb,ba)
    cairo_fill(cr)
    end--function background
    You ask : "also need some help with the lua to not show link bar when easytether0 is connected."

    Try to add this code after the settings for the wlan0 bar :
    Code:
            local f = io.open('/sys/class/net/wlan0/operstate')
            if f:read() == "down" then
                bars(settings)
            end
            f:close()
    Just change "/sys/class/net/wlan0/operstate" with the file corresponding to easyteher0, otherwise.

    The full script should be like this :

    Code:
    --[[ this script combines the background drawing lua (originally by londonali1010, modified by VinDSL)
    with a script that emulates only the gradient bars portion of the script by wlourf
    call in conkyrc above TEXT like so
    lua_load /path to file/filename.lua
    lua_draw_hook_pre draw_lua
    ]]
    require 'cairo'
    function conky_draw_lua()
    if conky_window == nil then return end
    local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
    cr = cairo_create(cs)
    local updates=tonumber(conky_parse('${updates}'))
    if updates>5 then
    --#########################################################################################################
    --#########################################################################################################
    --background setup -- make sure this comes first-----------
    settings={--CONKY BACKGROUND
    corner_r=50,--corner radius
    bg_color={0x222222,0.9},--color and alpha inside {}
    bg_height=-2,--negative number reduces height of bg
    w=conky_window.width,
    h=conky_window.height,
    };background(settings)
    --end background setup-------------------------------------
    
    bar_adjust=-20
    
    --bar setup------------------------------------------------
    settings={--BATTERY GRAPH BATTERY
    number=tonumber(conky_parse("${battery_percent}")),--conky object to read
    number_max=100,--max value of conky object
    bar_startx=41,--x coordinate
    bar_starty=152+bar_adjust,--y coordinate
    divisions=45,--number of blocks
    div_width=2,--horizontal size
    div_height=6,--vertical size
    div_gap=1,--space between bits
    bg_color={0xFFFFFF,0.25},--background color, color and alpha inside {}
    st_color={0xFF0000,1},--start color for gradient, green
    end_color={0x00FF00,1},--end color for gradient
    mid_color={0xFFFF00,1},--middle color for gradient, yellow
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --bar setup------------------------------------------------
    settings={--CPU GRAPH CPU1
    number=tonumber(conky_parse("${cpu cpu1}")),
    number_max=100,
    bar_startx=42,
    bar_starty=188+bar_adjust,
    divisions=45,
    div_width=2,
    div_height=6,
    div_gap=1,
    bg_color={0xFFFFFF,0.25},
    st_color={0x00FF00,1},
    mid_color={0xFFFF00,1},
    end_color={0xFF0000,1},
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --bar setup------------------------------------------------
    settings={--CPU GRAPH CPU2
    number=tonumber(conky_parse("${cpu cpu2}")),
    number_max=100,
    bar_startx=42,
    bar_starty=210+bar_adjust,
    divisions=45,
    div_width=2,
    div_height=6,
    div_gap=1,
    bg_color={0xFFFFFF,0.25},
    st_color={0x00FF00,1},
    mid_color={0xFFFF00,1},
    end_color={0xFF0000,1},
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --bar setup------------------------------------------------
    settings={--MEMPERC GRAPH
    number=tonumber(conky_parse("${memperc}")),
    number_max=100,
    bar_startx=40,
    bar_starty=330+bar_adjust,
    divisions=45,
    div_width=2,
    div_height=6,
    div_gap=1,
    bg_color={0xFFFFFF,0.25},
    st_color={0x00FF00,1},
    mid_color={0xFFFF00,1},
    end_color={0xFF0000,1},
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --bar setup------------------------------------------------
    settings={--BOOT FILESYSTEM USED GRAPH
    number=tonumber(conky_parse("${fs_used_perc /boot}")),
    number_max=100,
    bar_startx=57,
    bar_starty=400+bar_adjust,
    divisions=40,
    div_width=2,
    div_height=6,
    div_gap=1,
    bg_color={0xFFFFFF,0.25},
    st_color={0x00FF00,1},
    mid_color={0xFFFF00,1},
    end_color={0xFF0000,1},
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --bar setup------------------------------------------------
    settings={--ROOT FILESYSTEM USED GRAPH
    number=tonumber(conky_parse("${fs_used_perc /}")),
    number_max=100,
    bar_startx=58,
    bar_starty=425+bar_adjust,
    divisions=40,
    div_width=2,
    div_height=6,
    div_gap=1,
    bg_color={0xFFFFFF,0.25},
    st_color={0x00FF00,1},
    mid_color={0xFFFF00,1},
    end_color={0xFF0000,1},
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --bar setup------------------------------------------------
    settings={--HOME FILESYSTEM USED GRAPH
    number=tonumber(conky_parse("${fs_used_perc /home}")),
    number_max=100,
    bar_startx=63,
    bar_starty=450+bar_adjust,
    divisions=38,
    div_width=2,
    div_height=6,
    div_gap=1,
    bg_color={0xFFFFFF,0.25},
    st_color={0x00FF00,1},
    mid_color={0xFFFF00,1},
    end_color={0xFF0000,1},
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --bar setup------------------------------------------------
    settings={--SWAP FILESYSTEM USED GRAPH
    number=tonumber(conky_parse("${swapperc}")),
    number_max=100,
    bar_startx=63,
    bar_starty=475+bar_adjust,
    divisions=38,
    div_width=2,
    div_height=6,
    div_gap=1,
    bg_color={0xFFFFFF,0.25},
    st_color={0x00FF00,1},
    mid_color={0xFFFF00,1},
    end_color={0xFF0000,1},
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --bar setup------------------------------------------------
    settings={--WIRELESS NETWORK GRAPH
    number=tonumber(conky_parse("${wireless_link_qual wlan0}")),
    number_max=100,
    bar_startx=42,
    bar_starty=523+bar_adjust,
    divisions=45,
    div_width=2,
    div_height=6,
    div_gap=1,
    bg_color={0xFFFFFF,0.25},
    st_color={0xFF0000,1},
    end_color={0x00FF00,1},
    mid_color={0xFFFF00,1},
    };
    
            local f = io.open('/sys/class/net/wlan0/operstate')
            if f:read() == "down" then
                bars(settings)
            end
            f:close()
    
    bars(settings)
    
    --copy and paste above for new bar-------------------------
    --#########################################################################################################
    --#########################################################################################################
    end-- if updates>5
    cairo_destroy(cr)
    cairo_surface_destroy(cs)
    cr=nil
    end-- end main function
    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 bars(t)
    local bar_startx=t.bar_startx
    local bar_starty=t.bar_starty
    local divisions=t.divisions
    local div_width=t.div_width
    local div_height=t.div_height
    local div_gap=t.div_gap
    local br,bg,bb,ba=rgb_to_r_g_b(t.bg_color)
    local sr,sg,sb,sa=rgb_to_r_g_b(t.st_color)
    local mr,mg,mb,ma=rgb_to_r_g_b(t.mid_color)
    local er,eg,eb,ea=rgb_to_r_g_b(t.end_color)
    if t.number==nil then number=0 else number=t.number end
    local number_max=t.number_max
    local number_divs=(number/number_max)*divisions
    cairo_set_line_width (cr,div_width)
    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--function bars
    function background(t)
    local corner_r=t.corner_r
    local br,bg,bb,ba=rgb_to_r_g_b(t.bg_color)
    local v=t.bg_height
    local h=t.h
    local w=t.w
    cairo_move_to(cr,corner_r,0)
    cairo_line_to(cr,w-corner_r,0)
    cairo_curve_to(cr,w,0,w,0,w,corner_r)
    cairo_line_to(cr,w,h+v-corner_r)
    cairo_curve_to(cr,w,h+v,w,h+v,w-corner_r,h+v)
    cairo_line_to(cr,corner_r,h+v)
    cairo_curve_to(cr,0,h+v,0,h+v,0,h+v-corner_r)
    cairo_line_to(cr,0,corner_r)
    cairo_curve_to(cr,0,0,0,0,corner_r,0)
    cairo_close_path(cr)
    cairo_set_source_rgba(cr,br,bg,bb,ba)
    cairo_fill(cr)
    end--function background
    hth

  5. #18755
    Join Date
    Dec 2008
    Location
    The Desert
    Beans
    281
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by dk75 View Post
    How about this way
    Code:
    --[[custom bars by mrpeachy (2010)]]
    require "cairo"
    
    --interval in which aptitude updates are checked - in seconds
    local update_status_interval = 15 * 60
    
    local table = {
    {
    --conky object for output
    co='battery_percent BAT0',
    --rectangle width
    rw=83,
    --rectangle height
    rh=20,
    --NOTE about width and height.  For a bordered rectangle with line width lw (specified below)
    --the border is drawn 1/2 lw inside and 1/2 lw outside the boundary of the rectangle, so that
    --final width=rw+lw and final height=rh+lw.  I did not automate this below as it is possible 
    --to specify a line width (lw) greater than either width (rw) or height (rh).  
    --eg if you want a rectangle 200 pixels long and a border line width of 8, then rw=100-8=92
    
    --background rectangle color set
    bg_red=0,
    bg_green=0,
    bg_blue=0,
    --background rectangle alpha
    rab=0.8,
    --indicator rectangle color set
    in_red=1,
    in_green=0,
    in_blue=0,
    --indicator rectangle alpha
    rai=1,
    --border line width
    lw=2,
    --border line color set
    l_red=0,
    l_green=0,
    l_blue=0,
    --border line alpha
    la=0.9,
    --position, x and y
    rx=-241,
    ry=318,
    --set rotation in degrees (will require x and y to be reconfigured)
    rot=270
    },
    {
    --conky object for output
    co='cpu',
    --rectangle width
    rw=59,
    --rectangle height
    rh=25,
    --background rectangle color set
    bg_red=0,
    bg_green=0,
    bg_blue=0,
    --background rectangle alpha
    rab=0.2,
    --indicator rectangle color set
    in_red=0,
    in_green=1,
    in_blue=0,
    --indicator rectangle alpha
    rai=1,
    --border line width
    lw=1,
    --border line color set
    l_red=0,
    l_green=0,
    l_blue=0,
    --border line alpha
    la=0.9,
    --position, x and y
    rx=604,
    ry=23,
    --set rotation in degrees (will require x and y to be reconfigured)
    rot=0
    },
    {
    --conky object for output
    co='fs_used_perc /',
    --rectangle width
    rw=103,
    --rectangle height
    rh=15,
    --background rectangle color set
    bg_red=0,
    bg_green=0,
    bg_blue=0,
    --background rectangle alpha
    rab=0.8,
    --indicator rectangle color set
    in_red=0,
    in_green=1,
    in_blue=0,
    --indicator rectangle alpha
    rai=1,
    --border line width
    lw=1,
    --border line color set
    l_red=0,
    l_green=0,
    l_blue=0,
    --border line alpha
    la=0.9,
    --position, x and y
    rx=149,
    ry=242,
    --set rotation in degrees (will require x and y to be reconfigured)
    rot=0
    },
    {
    --conky object for output
    co='memperc',
    --rectangle width
    rw=103,
    --rectangle height
    rh=15,
    --background rectangle color set
    bg_red=0.2,
    bg_green=0,
    bg_blue=0,
    --background rectangle alpha
    rab=0.8,
    --indicator rectangle color set
    in_red=1,
    in_green=0,
    in_blue=0,
    --indicator rectangle alpha
    rai=1,
    --border line width
    lw=1,
    --border line color set
    l_red=0,
    l_green=0,
    l_blue=0,
    --border line alpha
    la=0.9,
    --position, x and y
    rx=149,
    ry=258,
    --set rotation in degrees (will require x and y to be reconfigured)
    rot=0
    },
    {
    --conky object for output
    co='upspeedf eht1',
    value=0,
    --rectangle width
    rw=40,
    --rectangle height
    rh=30,
    --background rectangle color set
    bg_red=.5,
    bg_green=0,
    bg_blue=.5,
    --background rectangle alpha
    rab=0.8,
    --indicator rectangle color set
    in_red=0,
    in_green=1,
    in_blue=0,
    --indicator rectangle alpha
    rai=0.6,
    --border line width
    lw=1,
    --border line color set
    l_red=0,
    l_green=0,
    l_blue=0,
    --border line alpha
    la=0.9,
    --position, x and y
    rx=302,
    ry=250,
    --set rotation in degrees (will require x and y to be reconfigured)
    rot=0
    },
    {
    --conky object for output
    co='aptitude',
    --rectangle width
    rw=103,
    --rectangle height
    rh=15,
    --background rectangle color set
    bg_red=.5,
    bg_green=.5,
    bg_blue=0,
    --background rectangle alpha
    rab=0.8,
    --indicator rectangle color set
    in_red=1,
    in_green=0,
    in_blue=0,
    --indicator rectangle alpha
    rai=0.6,
    --border line width
    lw=1,
    --border line color set
    l_red=0,
    l_green=0,
    l_blue=0,
    --border line alpha
    la=0.9,
    --position, x and y
    rx=149,
    ry=274,
    --set rotation in degrees (will require x and y to be reconfigured)
    rot=0
    },}
    
    local function draw_table(cr, pt, value)
       local width=pt['rw']
       local height=pt['rh']
       local bgalpha=pt['rab']
       local indalpha=pt['rai']
       local across=pt['rx']
       local down=pt['ry']
       local lwide=pt['lw']
       local lalpha=pt['la']
       local bgcolr=pt['bg_red']
       local bgcolg=pt['bg_green']
       local bgcolb=pt['bg_blue']
       local incolr=pt['in_red']
       local incolg=pt['in_green']
       local incolb=pt['in_blue']
       local lcolr=pt['l_red']
       local lcolg=pt['l_green']
       local lcolb=pt['l_blue']
       local rotate=pt['rot']
       --indicator calculation
       local inum=(((width-lwide)/100)*value)
       --set initial rotation
       cairo_rotate (cr, rotate*math.pi/180)
       --background bar
       cairo_rectangle (cr, (across+(lwide/2)), (down+(lwide/2)), (width-lwide), (height-lwide))
       cairo_set_source_rgba (cr, bgcolr, bgcolg, bgcolb, bgalpha);
       cairo_fill (cr)
       --indicator bar
       cairo_rectangle (cr, (across+(lwide/2)), (down+(lwide/2)), inum, (height-lwide))
       cairo_set_source_rgba (cr, incolr, incolg, incolb, indalpha);
       cairo_fill (cr)
       --indicator bar
       cairo_set_line_width (cr, lwide);
       cairo_rectangle (cr, across, down, width, height)
       cairo_set_source_rgba (cr, lcolr, lcolg, lcolb, lalpha);
       cairo_stroke (cr)
       --resets rotation
       cairo_rotate (cr, (rotate*-1)*math.pi/180)
    end
    
    local function get_updates()
       local ud=io.popen("aptitude search '~U'  | wc -l")
       local status = ud:read("*all")
       ud:close()
       status=tonumber(status)
       if status > 0 then status=100 else status=0 end
       return status
    end
    
    local function parse(cr,pt)
       local str=''
       local value=0
       str=string.format('${%s}',pt['co'])
       if str == "${aptitude}" then
          updates_int, updates_fract = math.modf(update_num/update_status_interval)
          if updates_fract == 0
          then
             str=get_updates()
             pt['value']=str
          else
             str=pt['value']
          end
       else str=conky_parse(str) end
       value=tonumber(str)
       if value == nil then value = 0 end
       draw_table(cr,pt,value)
    end
    
    
    
    function conky_draw_shape()
       local updates=conky_parse('${updates}')
       local update_num=tonumber(updates)
       if update_num < 5 then return end
       if conky_window==nil then return end
       local w=conky_window.width
       local h=conky_window.height
       local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, w, h)
       cr=cairo_create(cs)
    
       for i in pairs(table) do
          parse(cr, table[i])
       end
    
    end
    nope. I get no bar at all now. with or without updates. This is the new error:
    Code:
    Conky: llua_do_call: function conky_draw_shape execution failed: /home/djyoung4/Documents/code/luabars:235: attempt to perform arithmetic on global 'update_num' (a nil value)

    Code:
    --[[custom bars by mrpeachy (2010)]]
    require "cairo"
    
    --interval in which aptitude updates are checked - in seconds
    local update_status_interval = 15 * 60
    
    local table = {
    {
    --conky object for output
    co='battery_percent BAT0',
    --rectangle width
    rw=83,
    --rectangle height
    rh=20,
    --NOTE about width and height.  For a bordered rectangle with line width lw (specified below)
    --the border is drawn 1/2 lw inside and 1/2 lw outside the boundary of the rectangle, so that
    --final width=rw+lw and final height=rh+lw.  I did not automate this below as it is possible 
    --to specify a line width (lw) greater than either width (rw) or height (rh).  
    --eg if you want a rectangle 200 pixels long and a border line width of 8, then rw=100-8=92
    
    --background rectangle color set
    bg_red=0,
    bg_green=0,
    bg_blue=0,
    --background rectangle alpha
    rab=0.8,
    --indicator rectangle color set
    in_red=1,
    in_green=0,
    in_blue=0,
    --indicator rectangle alpha
    rai=1,
    --border line width
    lw=2,
    --border line color set
    l_red=0,
    l_green=0,
    l_blue=0,
    --border line alpha
    la=0.9,
    --position, x and y
    rx=-241,
    ry=318,
    --set rotation in degrees (will require x and y to be reconfigured)
    rot=270
    },
    {
    --conky object for output
    co='cpu5',
    --rectangle width
    rw=59,
    --rectangle height
    rh=25,
    --background rectangle color set
    bg_red=0,
    bg_green=0,
    bg_blue=0,
    --background rectangle alpha
    rab=0.2,
    --indicator rectangle color set
    in_red=0,
    in_green=1,
    in_blue=0,
    --indicator rectangle alpha
    rai=1,
    --border line width
    lw=1,
    --border line color set
    l_red=0,
    l_green=0,
    l_blue=0,
    --border line alpha
    la=0.9,
    --position, x and y
    rx=604,
    ry=23,
    --set rotation in degrees (will require x and y to be reconfigured)
    rot=0
    },
    {
    --conky object for output
    co='fs_used_perc /',
    --rectangle width
    rw=103,
    --rectangle height
    rh=15,
    --background rectangle color set
    bg_red=0,
    bg_green=0,
    bg_blue=0,
    --background rectangle alpha
    rab=0.8,
    --indicator rectangle color set
    in_red=0,
    in_green=1,
    in_blue=0,
    --indicator rectangle alpha
    rai=1,
    --border line width
    lw=1,
    --border line color set
    l_red=0,
    l_green=0,
    l_blue=0,
    --border line alpha
    la=0.9,
    --position, x and y
    rx=149,
    ry=242,
    --set rotation in degrees (will require x and y to be reconfigured)
    rot=0
    },
    {
    --conky object for output
    co='upspeed eht1',
    --rectangle width
    rw=40,
    --rectangle height
    rh=30,
    --background rectangle color set
    bg_red=0,
    bg_green=0,
    bg_blue=0,
    --background rectangle alpha
    rab=0.8,
    --indicator rectangle color set
    in_red=0,
    in_green=1,
    in_blue=0,
    --indicator rectangle alpha
    rai=0.6,
    --border line width
    lw=1,
    --border line color set
    l_red=0,
    l_green=0,
    l_blue=0,
    --border line alpha
    la=0.9,
    --position, x and y
    rx=302,
    ry=250,
    --set rotation in degrees (will require x and y to be reconfigured)
    rot=0
    },
    {
    --conky object for output
    co='aptitude',
    --rectangle width
    rw=103,
    --rectangle height
    rh=15,
    --background rectangle color set
    bg_red=0,
    bg_green=0,
    bg_blue=0,
    --background rectangle alpha
    rab=0.8,
    --indicator rectangle color set
    in_red=1,
    in_green=0,
    in_blue=0,
    --indicator rectangle alpha
    rai=0.6,
    --border line width
    lw=1,
    --border line color set
    l_red=0,
    l_green=0,
    l_blue=0,
    --border line alpha
    la=0.9,
    --position, x and y
    rx=0,
    ry=0,
    --set rotation in degrees (will require x and y to be reconfigured)
    rot=0
    },
    }
    
    local function draw_table(cr, pt, value)
       local width=pt['rw']
       local height=pt['rh']
       local bgalpha=pt['rab']
       local indalpha=pt['rai']
       local across=pt['rx']
       local down=pt['ry']
       local lwide=pt['lw']
       local lalpha=pt['la']
       local bgcolr=pt['bg_red']
       local bgcolg=pt['bg_green']
       local bgcolb=pt['bg_blue']
       local incolr=pt['in_red']
       local incolg=pt['in_green']
       local incolb=pt['in_blue']
       local lcolr=pt['l_red']
       local lcolg=pt['l_green']
       local lcolb=pt['l_blue']
       local rotate=pt['rot']
       --indicator calculation
       local inum=(((width-lwide)/100)*value)
       --set initial rotation
       cairo_rotate (cr, rotate*math.pi/180)
       --background bar
       cairo_rectangle (cr, (across+(lwide/2)), (down+(lwide/2)), (width-lwide), (height-lwide))
       cairo_set_source_rgba (cr, bgcolr, bgcolg, bgcolb, bgalpha);
       cairo_fill (cr)
       --indicator bar
       cairo_rectangle (cr, (across+(lwide/2)), (down+(lwide/2)), inum, (height-lwide))
       cairo_set_source_rgba (cr, incolr, incolg, incolb, indalpha);
       cairo_fill (cr)
       --indicator bar
       cairo_set_line_width (cr, lwide);
       cairo_rectangle (cr, across, down, width, height)
       cairo_set_source_rgba (cr, lcolr, lcolg, lcolb, lalpha);
       cairo_stroke (cr)
       --resets rotation
       cairo_rotate (cr, (rotate*-1)*math.pi/180)
    end
    
    local function get_updates()
       local ud=io.popen("aptitude search '~U'  | wc -l")
       local status = ud:read("*all")
       ud:close()
       status=tonumber(status)
       if status > 0 then status=100 else status=0 end
       return status
    end
    
    local function parse(cr,pt)
       local str=''
       local value=0
       str=string.format('${%s}',pt['co'])
       if str == "${aptitude}" then
          updates_int, updates_fract = math.modf(update_num/update_status_interval)
          if updates_fract == 0
          then
             str=get_updates()
             pt['value']=str
          else
             str=pt['value']
          end
       else str=conky_parse(str) end
       value=tonumber(str)
       if value == nil then value = 0 end
       draw_table(cr,pt,value)
    end
    
    
    
    function conky_draw_shape()
       local updates=conky_parse('${updates}')
       local update_num=tonumber(updates)
       if update_num < 5 then return end
       if conky_window==nil then return end
       local w=conky_window.width
       local h=conky_window.height
       local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, w, h)
       cr=cairo_create(cs)
    
       for i in pairs(table) do
          parse(cr, table[i])
       end
    
    end
    I'm a super power user

  6. #18756
    Join Date
    Jan 2007
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    sorry, change
    Code:
    local update_num=tonumber(updates)
    to
    Code:
    update_num=tonumber(updates)
    It should be done by making it local anyway and parse it to parse function but this way is easiest to explain.
    Linux Debian Sid (Minted) x86_64/3.12.10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Lenovo T61, Intel X3100, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
    Linux user No.: 483055 | My Conky Pitstop corner | One4All project

  7. #18757
    Join Date
    Dec 2008
    Location
    The Desert
    Beans
    281
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by dk75 View Post
    sorry, change
    Code:
    local update_num=tonumber(updates)
    to
    Code:
    update_num=tonumber(updates)
    It should be done by making it local anyway and parse it to parse function but this way is easiest to explain.
    Thank you dk75. I appreciate all the work greatly
    I'm a super power user

  8. #18758
    Join Date
    Jul 2010
    Location
    Ubuntu Land
    Beans
    52
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by wlourf View Post
    You ask : "also need some help with the lua to not show link bar when easytether0 is connected."

    Try to add this code after the settings for the wlan0 bar :
    Code:
            local f = io.open('/sys/class/net/wlan0/operstate')
            if f:read() == "down" then
                bars(settings)
            end
            f:close()
    Just change "/sys/class/net/wlan0/operstate" with the file corresponding to easyteher0, otherwise.

    The full script should be like this :

    Code:
    --[[ this script combines the background drawing lua (originally by londonali1010, modified by VinDSL)
    with a script that emulates only the gradient bars portion of the script by wlourf
    call in conkyrc above TEXT like so
    lua_load /path to file/filename.lua
    lua_draw_hook_pre draw_lua
    ]]
    require 'cairo'
    function conky_draw_lua()
    if conky_window == nil then return end
    local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
    cr = cairo_create(cs)
    local updates=tonumber(conky_parse('${updates}'))
    if updates>5 then
    --#########################################################################################################
    --#########################################################################################################
    --background setup -- make sure this comes first-----------
    settings={--CONKY BACKGROUND
    corner_r=50,--corner radius
    bg_color={0x222222,0.9},--color and alpha inside {}
    bg_height=-2,--negative number reduces height of bg
    w=conky_window.width,
    h=conky_window.height,
    };background(settings)
    --end background setup-------------------------------------
    
    bar_adjust=-20
    
    --bar setup------------------------------------------------
    settings={--BATTERY GRAPH BATTERY
    number=tonumber(conky_parse("${battery_percent}")),--conky object to read
    number_max=100,--max value of conky object
    bar_startx=41,--x coordinate
    bar_starty=152+bar_adjust,--y coordinate
    divisions=45,--number of blocks
    div_width=2,--horizontal size
    div_height=6,--vertical size
    div_gap=1,--space between bits
    bg_color={0xFFFFFF,0.25},--background color, color and alpha inside {}
    st_color={0xFF0000,1},--start color for gradient, green
    end_color={0x00FF00,1},--end color for gradient
    mid_color={0xFFFF00,1},--middle color for gradient, yellow
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --bar setup------------------------------------------------
    settings={--CPU GRAPH CPU1
    number=tonumber(conky_parse("${cpu cpu1}")),
    number_max=100,
    bar_startx=42,
    bar_starty=188+bar_adjust,
    divisions=45,
    div_width=2,
    div_height=6,
    div_gap=1,
    bg_color={0xFFFFFF,0.25},
    st_color={0x00FF00,1},
    mid_color={0xFFFF00,1},
    end_color={0xFF0000,1},
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --bar setup------------------------------------------------
    settings={--CPU GRAPH CPU2
    number=tonumber(conky_parse("${cpu cpu2}")),
    number_max=100,
    bar_startx=42,
    bar_starty=210+bar_adjust,
    divisions=45,
    div_width=2,
    div_height=6,
    div_gap=1,
    bg_color={0xFFFFFF,0.25},
    st_color={0x00FF00,1},
    mid_color={0xFFFF00,1},
    end_color={0xFF0000,1},
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --bar setup------------------------------------------------
    settings={--MEMPERC GRAPH
    number=tonumber(conky_parse("${memperc}")),
    number_max=100,
    bar_startx=40,
    bar_starty=330+bar_adjust,
    divisions=45,
    div_width=2,
    div_height=6,
    div_gap=1,
    bg_color={0xFFFFFF,0.25},
    st_color={0x00FF00,1},
    mid_color={0xFFFF00,1},
    end_color={0xFF0000,1},
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --bar setup------------------------------------------------
    settings={--BOOT FILESYSTEM USED GRAPH
    number=tonumber(conky_parse("${fs_used_perc /boot}")),
    number_max=100,
    bar_startx=57,
    bar_starty=400+bar_adjust,
    divisions=40,
    div_width=2,
    div_height=6,
    div_gap=1,
    bg_color={0xFFFFFF,0.25},
    st_color={0x00FF00,1},
    mid_color={0xFFFF00,1},
    end_color={0xFF0000,1},
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --bar setup------------------------------------------------
    settings={--ROOT FILESYSTEM USED GRAPH
    number=tonumber(conky_parse("${fs_used_perc /}")),
    number_max=100,
    bar_startx=58,
    bar_starty=425+bar_adjust,
    divisions=40,
    div_width=2,
    div_height=6,
    div_gap=1,
    bg_color={0xFFFFFF,0.25},
    st_color={0x00FF00,1},
    mid_color={0xFFFF00,1},
    end_color={0xFF0000,1},
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --bar setup------------------------------------------------
    settings={--HOME FILESYSTEM USED GRAPH
    number=tonumber(conky_parse("${fs_used_perc /home}")),
    number_max=100,
    bar_startx=63,
    bar_starty=450+bar_adjust,
    divisions=38,
    div_width=2,
    div_height=6,
    div_gap=1,
    bg_color={0xFFFFFF,0.25},
    st_color={0x00FF00,1},
    mid_color={0xFFFF00,1},
    end_color={0xFF0000,1},
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --bar setup------------------------------------------------
    settings={--SWAP FILESYSTEM USED GRAPH
    number=tonumber(conky_parse("${swapperc}")),
    number_max=100,
    bar_startx=63,
    bar_starty=475+bar_adjust,
    divisions=38,
    div_width=2,
    div_height=6,
    div_gap=1,
    bg_color={0xFFFFFF,0.25},
    st_color={0x00FF00,1},
    mid_color={0xFFFF00,1},
    end_color={0xFF0000,1},
    };bars(settings)
    --copy and paste above for new bar-------------------------
    --bar setup------------------------------------------------
    settings={--WIRELESS NETWORK GRAPH
    number=tonumber(conky_parse("${wireless_link_qual wlan0}")),
    number_max=100,
    bar_startx=42,
    bar_starty=523+bar_adjust,
    divisions=45,
    div_width=2,
    div_height=6,
    div_gap=1,
    bg_color={0xFFFFFF,0.25},
    st_color={0xFF0000,1},
    end_color={0x00FF00,1},
    mid_color={0xFFFF00,1},
    };
    
            local f = io.open('/sys/class/net/wlan0/operstate')
            if f:read() == "down" then
                bars(settings)
            end
            f:close()
    
    bars(settings)
    
    --copy and paste above for new bar-------------------------
    --#########################################################################################################
    --#########################################################################################################
    end-- if updates>5
    cairo_destroy(cr)
    cairo_surface_destroy(cs)
    cr=nil
    end-- end main function
    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 bars(t)
    local bar_startx=t.bar_startx
    local bar_starty=t.bar_starty
    local divisions=t.divisions
    local div_width=t.div_width
    local div_height=t.div_height
    local div_gap=t.div_gap
    local br,bg,bb,ba=rgb_to_r_g_b(t.bg_color)
    local sr,sg,sb,sa=rgb_to_r_g_b(t.st_color)
    local mr,mg,mb,ma=rgb_to_r_g_b(t.mid_color)
    local er,eg,eb,ea=rgb_to_r_g_b(t.end_color)
    if t.number==nil then number=0 else number=t.number end
    local number_max=t.number_max
    local number_divs=(number/number_max)*divisions
    cairo_set_line_width (cr,div_width)
    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--function bars
    function background(t)
    local corner_r=t.corner_r
    local br,bg,bb,ba=rgb_to_r_g_b(t.bg_color)
    local v=t.bg_height
    local h=t.h
    local w=t.w
    cairo_move_to(cr,corner_r,0)
    cairo_line_to(cr,w-corner_r,0)
    cairo_curve_to(cr,w,0,w,0,w,corner_r)
    cairo_line_to(cr,w,h+v-corner_r)
    cairo_curve_to(cr,w,h+v,w,h+v,w-corner_r,h+v)
    cairo_line_to(cr,corner_r,h+v)
    cairo_curve_to(cr,0,h+v,0,h+v,0,h+v-corner_r)
    cairo_line_to(cr,0,corner_r)
    cairo_curve_to(cr,0,0,0,0,corner_r,0)
    cairo_close_path(cr)
    cairo_set_source_rgba(cr,br,bg,bb,ba)
    cairo_fill(cr)
    end--function background
    hth

    I am not getting any errors in terminal when I use this but the bar is(Yes I changed it to easytether0) still there.I am man enough to admit that I am over my head with Lua,I have been reading alot on the subject but it is way more complicated than a simple conky..
    Attached Images Attached Images
    Eee Pc 1215N notebook-12in Screen-Ubnutu 12.10
    Dual core 1.8 Atom
    2 gig DDR3
    Nvidia Ion(Yes it works,even have HDMI out working)

  9. #18759
    Join Date
    Aug 2009
    Location
    East of Atlantic
    Beans
    81
    Distro
    Ubuntu

    Re: Post your .conkyrc files w/ screenshots

    Ok, I see, then try up instead down :
    Code:
    if f:read() == "up" then

  10. #18760
    Join Date
    Dec 2008
    Location
    The Desert
    Beans
    281
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Post your .conkyrc files w/ screenshots

    Data dump for my Formula 1 HUD. thanks to mrpeachy, wlourf, and dk75.
    .conkyrc:
    Code:
    # Conky sample configuration
    #USAZ0233, USHI0026
    # the list of variables has been removed from this file in favour
    # of keeping the documentation more maintainable.
    # Check http://conky.sf.net for an up-to-date-list.
    
    # set to yes if you want Conky to be forked in the background
    background yes
    
    # 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-*-*-*-*-*-*-*
    
    # Use Xft?
    use_xft yes
    
    # Xft font when Xft is enabled
    xftfont Deja Vu Sans Mono:size=18
    
    # Text alpha when using Xft
    xftalpha 0.8
    
    # Print everything to stdout?
    # out_to_console no
    
    # MPD host/port
    # mpd_host localhost
    # mpd_port 6600
    # mpd_password tinker_bell
    
    # Print everything to console?
    # out_to_console no
    
    # mail spool
    mail_spool $MAIL
    
    # 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
    
    # Create own window instead of using desktop (required in nautilus)
    own_window no
    
    # If own_window is yes, you may use type normal, desktop or override
    own_window_type desktop
    
    # Use pseudo transparency with own_window?
    own_window_transparent yes
    
    # If own_window_transparent is set to no, you can set the background colour here
    own_window_colour black
    
    # If own_window is yes, these window manager hints may be used
    #own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    
    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes
    
    # Minimum size of text area
    minimum_size 280 5
    
    # Maximum width
    maximum_width 10000
    
    # Draw shades?
    draw_shades no
    
    # Draw outlines?
    draw_outline no
    
    # Draw borders around text
    draw_borders no
    
    # Draw borders around graphs
    draw_graph_borders no
    
    # Stippled borders?
    stippled_borders 8
    
    # border margins
    border_inner_margin 4
    
    # border width
    border_width 1
    
    # Default colors and also border colors
    default_color black
    #default_shade_color black
    #default_outline_color black
    
    # Text alignment, other possible values are commented
    alignment top_left
    #alignment top_right
    #alignment bottom_left
    #alignment bottom_right
    #alignment top_middle
    #alignment bottom_middle
    #alignment none
    
    # Gap between borders of screen and text
    # same thing as passing -x at command line
    gap_x 20
    gap_y 1
    
    # 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
    
    # Shows the maximum value in scaled graphs.
    show_graph_scale no
    
    # Shows the time range covered by a graph.
    show_graph_range no
    
    # Allow each port monitor to track at most this many connections (if 0 or not set, default is 256)
    #max_port_monitor_connections 256
    
    # Maximum number of special things, e.g. fonts, offsets, aligns, etc.
    #max_specials 512
    
    # Maximum size of buffer for user text, i.e. below TEXT line.
    max_user_text 16384
    
    # Timing interval for music player thread, e.g. mpd, audacious
    #music_player_interval (update_interval is default)
    
    # Strictness of if_up. One of: up, link or address. The later ones imply the further ones.
    # Defaults to up.
    #if_up_strictness address
      #-d DATATYPE, --datatype=DATATYPE
                            #[default: HT] The data type options are: DW (Day of
                            #Week), WF (Weather Font output), WI (Weather Icon
                            #Path), LT (Forecast:Low Temp,Current:Feels Like Temp),
                            #HT (Forecast:High Temp,Current:Current Temp), CC
                            #(Current Conditions), CT (Conditions Text), PC
                            #(Precipitation Chance), HM (Humidity), VI
                            #(Visibility), WD (Wind Direction), WA (Wind Angle - in
                            #degrees), WS (Wind Speed), WG (Wind Gusts), BF
                            #(Bearing Font), BI (Bearing Icon Path), BS (Bearing
                            #font with Speed), CN (City Name), CO (Country), OB
                            #(Observatory), SR (SunRise), SS (SunSet), DL
                            #(DayLight), MP (Moon Phase), MF (Moon Font), MI (Moon
                            #Icon Path), BR (Barometer Reading), BD (Barometer
                            #Description), UI (UV Index), UT (UV Text), DP (Dew
                            #Point), LU (Last Update at weather.com), LF (Last
                            #Fetch from weather.com). Not applicable at command
                            #line when using templates.
    
    
    # variable is given either in format $variable or in ${variable}. Latter
    # allows characters right after the variable and must be used in network
    # stuff because of an argument
    
    # stuff after 'TEXT' will be formatted on screen
    # -- Lua Load -- #
    lua_load ~/Documents/code/luarings
    lua_draw_hook_pre draw_shape
    lua_load ~/Documents/code/luabars
    lua_draw_hook_post draw_hud
    
    TEXT
    ${goto 170}${voffset 279}${font Humnst777 Cn BT:size=10}${color dark grey}x1000 RPM
    ${font Humnst777 Cn BT:size=11}${goto 120}${voffset -52}4
    ${goto 98}${voffset -70}6
    ${goto 104}${voffset -72}8
    ${goto 138}${voffset -63}10
    ${goto 193}${voffset -35}12
    ${goto 246}${voffset -4}14
    ${goto 283}${voffset 26}16
    ${goto 291.5}${voffset 34}18
    ${goto 269}${voffset 32}20
    ${goto 173}${voffset -145}${font Humnst777 Cn BT:size=40}${if_match ${memperc} > 90}${color red}${memperc}${color}${else}${if_match ${memperc} < 70}${color green}${memperc}${else}${color yellow}${memperc}${endif}${endif}
    ${goto 181}${voffset -50}${color 747170}${font Humnst777 Cn BT:size=14}km/h
    ${goto 133}${execpi 3600 ~/Documents/code/simpledaycalender.sh}
    ${goto 318}${voffset -70}${font Humnst777 Cn BT:size=17}${color white}+
    ${goto 322}${voffset 23}_
    ${goto 163}${voffset -3}${font Humnst777 Cn BT:size=10}T H R O T T L E
    ${goto 176}${voffset -2}B R A K E
    ${goto 305}${voffset -19}${font Humnst777 Cn BT:size=12}${if_match ${downspeedf eth1} > 1}${color white}D R S${else}${color black}D R S${endif}
    ${goto 608}${voffset -250}${font Humnst777 Cn BT:size=11}${color light grey}${time %H:%M:%S}
    ${goto 299}${if_match ${upspeedf eth1} > 1}${image /home/djyoung4/UP.png -p 283,250 -s 38x28 -n}${else}${endif}
    luabars:
    Code:
    --[[custom bars by mrpeachy (2010)]]
    require "cairo"
    
    --interval in which aptitude updates are checked - in seconds
    local update_status_interval = 1 * 60
    
    local table = {
    {
    --conky object for output
    co='battery_percent BAT0',
    --rectangle width
    rw=83,
    --rectangle height
    rh=20,
    --NOTE about width and height.  For a bordered rectangle with line width lw (specified below)
    --the border is drawn 1/2 lw inside and 1/2 lw outside the boundary of the rectangle, so that
    --final width=rw+lw and final height=rh+lw.  I did not automate this below as it is possible 
    --to specify a line width (lw) greater than either width (rw) or height (rh).  
    --eg if you want a rectangle 200 pixels long and a border line width of 8, then rw=100-8=92
    
    --background rectangle color set
    bg_red=0,
    bg_green=0,
    bg_blue=0,
    --background rectangle alpha
    rab=0.8,
    --indicator rectangle color set
    in_red=1,
    in_green=0,
    in_blue=0,
    --indicator rectangle alpha
    rai=1,
    --border line width
    lw=2,
    --border line color set
    l_red=0,
    l_green=0,
    l_blue=0,
    --border line alpha
    la=0.9,
    --position, x and y
    rx=-241,
    ry=318,
    --set rotation in degrees (will require x and y to be reconfigured)
    rot=270
    },
    {
    --conky object for output
    co='cpu5',
    --rectangle width
    rw=59,
    --rectangle height
    rh=25,
    --background rectangle color set
    bg_red=0,
    bg_green=0,
    bg_blue=0,
    --background rectangle alpha
    rab=0.2,
    --indicator rectangle color set
    in_red=0,
    in_green=1,
    in_blue=0,
    --indicator rectangle alpha
    rai=1,
    --border line width
    lw=1,
    --border line color set
    l_red=0,
    l_green=0,
    l_blue=0,
    --border line alpha
    la=0.9,
    --position, x and y
    rx=604,
    ry=23,
    --set rotation in degrees (will require x and y to be reconfigured)
    rot=0
    },
    {
    --conky object for output
    co='fs_used_perc /',
    --rectangle width
    rw=103,
    --rectangle height
    rh=15,
    --background rectangle color set
    bg_red=0,
    bg_green=0,
    bg_blue=0,
    --background rectangle alpha
    rab=0.8,
    --indicator rectangle color set
    in_red=0,
    in_green=1,
    in_blue=0,
    --indicator rectangle alpha
    rai=1,
    --border line width
    lw=1,
    --border line color set
    l_red=0,
    l_green=0,
    l_blue=0,
    --border line alpha
    la=0.9,
    --position, x and y
    rx=149,
    ry=242,
    --set rotation in degrees (will require x and y to be reconfigured)
    rot=0
    },
    {
    --conky object for output
    co='upspeed eht1',
    --rectangle width
    rw=40,
    --rectangle height
    rh=30,
    --background rectangle color set
    bg_red=0,
    bg_green=0,
    bg_blue=0,
    --background rectangle alpha
    rab=0.1,
    --indicator rectangle color set
    in_red=0,
    in_green=1,
    in_blue=0,
    --indicator rectangle alpha
    rai=0.2,
    --border line width
    lw=1,
    --border line color set
    l_red=0,
    l_green=0,
    l_blue=0,
    --border line alpha
    la=0.9,
    --position, x and y
    rx=302,
    ry=250,
    --set rotation in degrees (will require x and y to be reconfigured)
    rot=0
    },
    {
    --conky object for output
    co='aptitude',
    --rectangle width
    rw=103,
    --rectangle height
    rh=15,
    --background rectangle color set
    bg_red=0.2,
    bg_green=0,
    bg_blue=0,
    --background rectangle alpha
    rab=0.8,
    --indicator rectangle color set
    in_red=1,
    in_green=0,
    in_blue=0,
    --indicator rectangle alpha
    rai=1,
    --border line width
    lw=1,
    --border line color set
    l_red=0,
    l_green=0,
    l_blue=0,
    --border line alpha
    la=0.9,
    --position, x and y
    rx=149,
    ry=258,
    --set rotation in degrees (will require x and y to be reconfigured)
    rot=0
    },
    }
    
    local function draw_table(cr, pt, value)
       local width=pt['rw']
       local height=pt['rh']
       local bgalpha=pt['rab']
       local indalpha=pt['rai']
       local across=pt['rx']
       local down=pt['ry']
       local lwide=pt['lw']
       local lalpha=pt['la']
       local bgcolr=pt['bg_red']
       local bgcolg=pt['bg_green']
       local bgcolb=pt['bg_blue']
       local incolr=pt['in_red']
       local incolg=pt['in_green']
       local incolb=pt['in_blue']
       local lcolr=pt['l_red']
       local lcolg=pt['l_green']
       local lcolb=pt['l_blue']
       local rotate=pt['rot']
       --indicator calculation
       local inum=(((width-lwide)/100)*value)
       --set initial rotation
       cairo_rotate (cr, rotate*math.pi/180)
       --background bar
       cairo_rectangle (cr, (across+(lwide/2)), (down+(lwide/2)), (width-lwide), (height-lwide))
       cairo_set_source_rgba (cr, bgcolr, bgcolg, bgcolb, bgalpha);
       cairo_fill (cr)
       --indicator bar
       cairo_rectangle (cr, (across+(lwide/2)), (down+(lwide/2)), inum, (height-lwide))
       cairo_set_source_rgba (cr, incolr, incolg, incolb, indalpha);
       cairo_fill (cr)
       --indicator bar
       cairo_set_line_width (cr, lwide);
       cairo_rectangle (cr, across, down, width, height)
       cairo_set_source_rgba (cr, lcolr, lcolg, lcolb, lalpha);
       cairo_stroke (cr)
       --resets rotation
       cairo_rotate (cr, (rotate*-1)*math.pi/180)
    end
    
    local function get_updates()
       local ud=io.popen("aptitude search '~U'  | wc -l")
       local status = ud:read("*all")
       ud:close()
       status=tonumber(status)
       if status > 0 then status=100 else status=0 end
       return status
    end
    
    local function parse(cr,pt)
       local str=''
       local value=0
       str=string.format('${%s}',pt['co'])
       if str == "${aptitude}" then
          updates_int, updates_fract = math.modf(update_num/update_status_interval)
          if updates_fract == 0
          then
             str=get_updates()
             pt['value']=str
          else
             str=pt['value']
          end
       else str=conky_parse(str) end
       value=tonumber(str)
       if value == nil then value = 0 end
       draw_table(cr,pt,value)
    end
    
    
    
    function conky_draw_shape()
       local updates=conky_parse('${updates}')
       update_num=tonumber(updates)
       if update_num < 5 then return end
       if conky_window==nil then return end
       local w=conky_window.width
       local h=conky_window.height
       local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, w, h)
       cr=cairo_create(cs)
    
       for i in pairs(table) do
          parse(cr, table[i])
       end
    
    end
    luarings:
    Code:
    --[[call in conkrc like so
    lua_load ~/lua/racehud.lua
    lua_draw_hook_pre draw_hud
    ]]
    require 'cairo'
    
    function conky_draw_hud()
    if conky_window == nil then return end
    local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
    cr = cairo_create(cs)
    local updates=tonumber(conky_parse('${updates}'))
    if updates>5 then
    --#########################################################################################################
    --#########################################################################################################
    --main circle width
    mcw=20
    --main circle color
    mcr,mcg,mcb,mca=0,0,0,0.6
    --main circle fill color
    mcfr,mcfg,mcfb,mcfa=0,0,0,0.2
    --center
    mcx=200
    mcy=200
    --radius
    mcrad=100
    --side boxes---------------------------------
    --line width
    sblw=1
    --top box width
    sbtw=mcrad/2.5
    --corner rad
    sbcrad=10
    --top box height
    sbth=mcrad/1.5
    --top box, top angle, bottom angle
    sbta=65
    sbba=115
    --bottom of second box angle
    sbba2=140
    --scale---------------------------------------
    --line width
    sclw=2
    --color
    scr,scg,scb,sca=1,1,1,1
    --start,end angle
    scsa,scea=230,130
    --number of division lines
    divs=8
    divl=10
    --blue------------------------------------------
    --line width
    blw=30
    --color
    br,bg,bb,ba=0,0.2,1,1
    ---------------------------------------------------------
    --drawing
    cairo_set_line_width (cr,mcw)
    cairo_set_source_rgba (cr,mcr,mcg,mcb,mca)
    cairo_arc (cr,mcx,mcy,mcrad,0,2*math.pi)
    cairo_stroke (cr)
    -------------
    cairo_set_line_width (cr,mcw)
    cairo_set_source_rgba (cr,mcfr,mcfg,mcfb,mcfa)
    cairo_arc (cr,mcx,mcy,mcrad+(mcw/2),0,2*math.pi)
    cairo_fill (cr)
    ---------------------------------------
    sbrad=mcrad+(mcw/2)
    arc=(math.pi/180)*sbta
    x=0+sbrad*(math.sin(arc))
    y=0-sbrad*(math.cos(arc))
    sbtx=mcx+x
    sbty=mcy+y
    --------------------
    sbrad=mcrad+(mcw/2)
    arc=(math.pi/180)*sbba
    x=0+sbrad*(math.sin(arc))
    y=0-sbrad*(math.cos(arc))
    sbbx=mcx+x
    sbby=mcy+y
    --------------------
    cairo_set_line_width (cr,sblw)
    cairo_set_source_rgba (cr,mcfr,mcfg,mcfb,mcfa)
    cairo_move_to (cr,sbtx+sbtw+sbcrad,sbty+sbcrad)
    cairo_arc_negative (cr,sbtx+sbtw,sbty+sbcrad,sbcrad,(2*math.pi/4)*4,(2*math.pi/4)*3)
    cairo_line_to (cr,sbtx,sbty)
    cairo_arc (cr,mcx,mcy,mcrad+(mcw/2),(math.pi/180)*(65-90),(math.pi/180)*(115-90))
    cairo_line_to (cr,sbbx+sbtw,sbby)
    cairo_arc_negative (cr,sbbx+sbtw,sbby-sbcrad,sbcrad,(2*math.pi/4)*1,(2*math.pi/4)*4)
    cairo_close_path (cr)
    cairo_fill (cr)
    ------------------------------
    cairo_set_line_width (cr,sblw)
    cairo_set_source_rgba (cr,mcr,mcg,mcb,mca)
    cairo_move_to (cr,sbtx+sbtw+sbcrad,sbty+sbcrad)
    cairo_arc_negative (cr,sbtx+sbtw,sbty+sbcrad,sbcrad,(2*math.pi/4)*4,(2*math.pi/4)*3)
    cairo_line_to (cr,sbtx,sbty)
    cairo_arc (cr,mcx,mcy,mcrad+(mcw/2),(math.pi/180)*(sbta-90),(math.pi/180)*(sbba-90))
    cairo_line_to (cr,sbbx+sbtw,sbby)
    cairo_arc_negative (cr,sbbx+sbtw,sbby-sbcrad,sbcrad,(2*math.pi/4)*1,(2*math.pi/4)*4)
    cairo_close_path (cr)
    cairo_stroke (cr)
    --------------------
    sbrad=mcrad+(mcw/2)
    arc=(math.pi/180)*sbba2
    x=0+sbrad*(math.sin(arc))
    y=0-sbrad*(math.cos(arc))
    sbbx2=mcx+x
    sbby2=mcy+y
    --------------------
    cairo_set_line_width (cr,sblw)
    cairo_set_source_rgba (cr,mcfr,mcfg,mcfb,mcfa)
    cairo_move_to (cr,sbtx+sbtw+sbcrad,sbby+sbcrad)
    cairo_arc_negative (cr,sbtx+sbtw,sbby+sbcrad,sbcrad,(2*math.pi/4)*4,(2*math.pi/4)*3)
    cairo_line_to (cr,sbbx,sbby)
    cairo_arc (cr,mcx,mcy,mcrad+(mcw/2),(math.pi/180)*(sbba-90),(math.pi/180)*(sbba2-90))
    cairo_line_to (cr,sbtx+sbtw,sbby2)
    cairo_arc_negative (cr,sbtx+sbtw,sbby2-sbcrad,sbcrad,(2*math.pi/4)*1,(2*math.pi/4)*4)
    cairo_close_path (cr)
    cairo_fill (cr)
    --------------------
    cairo_set_line_width (cr,sblw)
    cairo_set_source_rgba (cr,mcr,mcg,mcb,mca)
    cairo_move_to (cr,sbtx+sbtw+sbcrad,sbby+sbcrad)
    cairo_arc_negative (cr,sbtx+sbtw,sbby+sbcrad,sbcrad,(2*math.pi/4)*4,(2*math.pi/4)*3)
    cairo_line_to (cr,sbbx,sbby)
    cairo_arc (cr,mcx,mcy,mcrad+(mcw/2),(math.pi/180)*(sbba-90),(math.pi/180)*(sbba2-90))
    cairo_line_to (cr,sbtx+sbtw,sbby2)
    cairo_arc_negative (cr,sbtx+sbtw,sbby2-sbcrad,sbcrad,(2*math.pi/4)*1,(2*math.pi/4)*4)
    cairo_close_path (cr)
    cairo_stroke (cr)
    --------------------------------------------
    bsa=scsa
    value=tonumber(conky_parse("${cpu cpu0}"))
    if value<=(100*((divs-1)/divs)) then
    bea=bsa+((((scea+360)-bsa))/(100)*value)
    --gradient-----------------------------------------------------------
    pat = cairo_pattern_create_radial (mcx,mcy,mcrad,mcx,mcy,mcrad-blw);
    cairo_pattern_add_color_stop_rgba (pat,1,br,bg,bb,0)
    cairo_pattern_add_color_stop_rgba (pat,0,br,bg,bb,1)
    cairo_set_source (cr,pat)
    cairo_set_line_width (cr,blw)
    cairo_arc (cr,mcx,mcy,mcrad-(mcw/2)-(blw/2),(math.pi/180)*(bsa-90),(math.pi/180)*(bea-90))
    cairo_stroke (cr)
    cairo_pattern_destroy (pat);
    end
    if value>(100*((divs-1)/divs)) then
    bea=bsa+((((scea+360)-bsa)/divs)*(divs-1))
    --gradient-----------------------------------------------------------
    pat = cairo_pattern_create_radial (mcx,mcy,mcrad,mcx,mcy,mcrad-blw);
    cairo_pattern_add_color_stop_rgba (pat,1,br,bg,bb,0)
    cairo_pattern_add_color_stop_rgba (pat,0,br,bg,bb,1)
    cairo_set_source (cr,pat)
    cairo_set_line_width (cr,blw)
    cairo_arc (cr,mcx,mcy,mcrad-(mcw/2)-(blw/2),(math.pi/180)*(bsa-90),(math.pi/180)*(bea-90))
    cairo_stroke (cr)
    cairo_pattern_destroy (pat);
    bsa=bsa+((((scea+360)-bsa)/divs)*(divs-1))
    p1=(((scea+360)-scsa)/divs)
    p2=p1/(100*(1/divs))
    value=value-(100*((divs-1)/divs))
    bea=bsa+(p2*value)
    --gradient-----------------------------------------------------------
    pat = cairo_pattern_create_radial (mcx,mcy,mcrad,mcx,mcy,mcrad-blw);
    cairo_pattern_add_color_stop_rgba (pat,1,1,0,0,0)
    cairo_pattern_add_color_stop_rgba (pat,0,1,0,0,1)
    cairo_set_source (cr,pat)
    cairo_set_line_width (cr,blw)
    cairo_arc (cr,mcx,mcy,mcrad-(mcw/2)-(blw/2),(math.pi/180)*(bsa-90),(math.pi/180)*(bea-90))
    cairo_stroke (cr)
    cairo_pattern_destroy (pat);
    end
    
    cairo_set_line_width (cr,sclw)
    cairo_set_source_rgba (cr,scr,scg,scb,sca)
    cairo_arc (cr,mcx,mcy,mcrad-(mcw/2)-(sclw/2),(math.pi/180)*(scsa-90),(math.pi/180)*(scea-90))
    cairo_stroke (cr)
    --------------------------------
    for i=1,divs+1 do
    scrad=mcrad-(mcw/2)
    arc=(math.pi/180)*(scsa+(((scea+360)-scsa)/(divs))*(i-1))
    x=0+scrad*(math.sin(arc))
    y=0-scrad*(math.cos(arc))
    scdox=mcx+x
    scdoy=mcy+y
    scrad=mcrad-(mcw/2)-divl
    arc=(math.pi/180)*(scsa+(((scea+360)-scsa)/(divs))*(i-1))
    x=0+scrad*(math.sin(arc))
    y=0-scrad*(math.cos(arc))
    scdix=mcx+x
    scdiy=mcy+y
    cairo_move_to (cr,scdox,scdoy)
    cairo_line_to (cr,scdix,scdiy)
    cairo_stroke (cr)
    end
    
    
    
    --#########################################################################################################
    --#########################################################################################################
    end-- if updates>5
    cairo_destroy(cr)
    cairo_surface_destroy(cs)
    cr=nil
    end-- end main function
    with everything off:

    Brake bar is updates. DRS lettering means downloading and green behind means uploading. Outside ring indicator is CPU:

    screenshot of Fernando Alonso and the green box too
    Attached Images Attached Images
    Last edited by djyoung4; October 28th, 2011 at 01:16 AM.
    I'm a super power user

Page 1876 of 2317 FirstFirst ... 876137617761826186618741875187618771878188619261976 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •