Registered Ubuntu User #29430
For those rocket scientist types:
Thanks na12 for inspiration.
So that means that "10" would be like: onoff or yesno, or more commonly put:
Either: "how the heck do I know!" or "Description of Bo Derek in her prime", which is not to say that 10 is a prime number!
Seriously:
BINGO! I just learned something.
Thanks Crinos.
CHIMO!
Bruce
Last edited by Bruce M.; January 22nd, 2010 at 11:46 PM.
Opps...
na12.luaCode:# -- Conky settings -- # background no update_interval 1 cpu_avg_samples 2 net_avg_samples 2 override_utf8_locale yes double_buffer yes no_buffers yes text_buffer_size 2048 imlib_cache_size 0 # -- Window specifications -- # own_window yes own_window_type override own_window_transparent yes own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below border_inner_margin 0 border_outer_margin 0 minimum_size 320 800 maximum_width 800 alignment top_left gap_x 0 gap_y 0 # -- Graphics settings -- # draw_shades no draw_outline no draw_borders no draw_graph_borders yes # -- Text settings -- # use_xft yes xftfont MaiandraGD:size=24 xftalpha 0.4 uppercase no default_color 000000 temperature_unit fahrenheit # -- Lua Load -- # lua_load ~/conky/scripts/na12.lua lua_draw_hook_pre ring_stats TEXT ${voffset 5}${goto 10}${font MaiandraGD:size=11}${time %A, %d %B %Y} ${voffset 10}${goto 68}${font MaiandraGD:size=16}${time %H:%M} ${voffset -50}${goto 16}${font MaiandraGD:size=10}Kernel:${offset 80}Uptime: ${goto 10}${font MaiandraGD:size=9}$kernel${offset 20}$uptime ${voffset 40}${goto 40}${font snap:size=8}${cpu cpu0}% ${goto 40}${cpu cpu1}% ${goto 40}CPU ${voffset 12}${goto 70}${memperc}% ${goto 70}$swapperc% ${goto 70}MEM ${voffset 12}${goto 100}${upspeed eth0} ${goto 100}${downspeed eth0} ${goto 100}NET ${voffset 12}${goto 115}${fs_used /home} ${goto 115}${fs_used /} ${goto 130}DISK ${goto 16}${font MaiandraGD:size=9}Conky Ver: $conky_version ${goto 16}Conky Build: $conky_build_date ${goto 16}${font MaiandraGD:size=10}GMail: You have ${texeci 100 python ~/conky/scripts/gmail.py} new email(s). ${voffset 1}${goto 15}${execpi 600 /usr/share/conkyforecast/conkyForecast.py --location=USAL0287 --imperial --template=~/conky/scripts/weather-7.template} ${goto 10}${font MaiandraGD:size=16}${rss http://www.mda.mil/RSS/mdanews.xml 120 feed_title }: ${goto 10}${font MaiandraGD:size=9}${rss http://www.mda.mil/RSS/mdanews.xml 120 item_titles 8 }
weather-7.templateCode:--[[ Ring Meters by londonali1010 (2009) This script draws percentage meters as rings. It is fully customisable; all options are described in the script. IMPORTANT: if you are using the 'cpu' function, it will cause a segmentation fault if it tries to draw a ring straight away. The if statement on line 145 uses a delay to make sure that this doesn't happen. It calculates the length of the delay by the number of updates since Conky started. Generally, a value of 5s is long enough, so if you update Conky every 1s, use update_num > 5 in that if statement (the default). If you only update Conky every 2s, you should change it to update_num > 3; conversely if you update Conky every 0.5s, you should use update_num > 10. ALSO, if you change your Conky, is it best to use "killall conky; conky" to update it, otherwise the update_num will not be reset and you will get an error. To call this script in Conky, use the following (assuming that you save this script to ~/scripts/rings.lua): lua_load ~/scripts/rings-v1.2.1.lua lua_draw_hook_pre ring_stats Changelog: + v1.2.1 -- Fixed minor bug that caused script to crash if conky_parse() returns a nil value (20.10.2009) + v1.2 -- Added option for the ending angle of the rings (07.10.2009) + v1.1 -- Added options for the starting angle of the rings, and added the "max" variable, to allow for variables that output a numerical value rather than a percentage (29.09.2009) + v1.0 -- Original release (28.09.2009) ]] settings_table = { { -- Edit this table to customise your rings. -- You can create more rings simply by adding more elements to settings_table. -- "name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'. name='time', -- "arg" is the argument to the stat type, e.g. if in Conky you would write ${cpu cpu0}, 'cpu0' would be the argument. If you would not use an argument in the Conky variable, use ''. arg='%I.%M', -- "max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100. max=12, -- "bg_colour" is the colour of the base ring. bg_colour=0x000000, -- "bg_alpha" is the alpha value of the base ring. bg_alpha=0.3, -- "fg_colour" is the colour of the indicator part of the ring. fg_colour=0x000000, -- "fg_alpha" is the alpha value of the indicator part of the ring. fg_alpha=0.5, -- "x" and "y" are the x and y coordinates of the centre of the ring, relative to the top left corner of the Conky window. x=100, y=100, -- "radius" is the radius of the ring. radius=35, -- "thickness" is the thickness of the ring, centred around the radius. thickness=4, -- "start_angle" is the starting angle of the ring, in degrees, clockwise from top. Value can be either positive or negative. start_angle=0, -- "end_angle" is the ending angle of the ring, in degrees, clockwise from top. Value can be either positive or negative, but must be larger (e.g. more clockwise) than start_angle. end_angle=360 }, { name='time', arg='%M.%S', max=60, bg_colour=0x000000, bg_alpha=0.3, fg_colour=0x000000, fg_alpha=0.5, x=100, y=100, radius=40, thickness=4, start_angle=0, end_angle=360 }, { name='time', arg='%S', max=60, bg_colour=0x000000, bg_alpha=0.3, fg_colour=0x000000, fg_alpha=0.5, x=100, y=100, radius=45, thickness=4, start_angle=0, end_angle=360 }, { name='time', arg='%d', max=31, bg_colour=0x000000, bg_alpha=0.3, fg_colour=0x000000, fg_alpha=0.5, x=100, y=100, radius=55, thickness=5, start_angle=-140, end_angle=-30 }, { name='time', arg='%m', max=12, bg_colour=0x000000, bg_alpha=0.3, fg_colour=0x000000, fg_alpha=0.5, x=100, y=100, radius=55, thickness=5, start_angle=30, end_angle=140 }, { name='cpu', arg='cpu0', max=100, bg_colour=0x000000, bg_alpha=0.3, fg_colour=0x000000, fg_alpha=0.5, x=70, y=220, radius=26, thickness=5, start_angle=-90, end_angle=180 }, { name='cpu', arg='cpu1', max=100, bg_colour=0x000000, bg_alpha=0.3, fg_colour=0x000000, fg_alpha=0.5, x=70, y=220, radius=20, thickness=5, start_angle=-90, end_angle=180 }, { name='memperc', arg='', max=100, bg_colour=0x000000, bg_alpha=0.3, fg_colour=0x000000, fg_alpha=0.5, x=100, y=270, radius=26, thickness=5, start_angle=-90, end_angle=180 }, { name='swapperc', arg='', max=100, bg_colour=0x000000, bg_alpha=0.3, fg_colour=0x000000, fg_alpha=0.5, x=100, y=270, radius=20, thickness=5, start_angle=-90, end_angle=180 }, { name='fs_used_perc', arg='/', max=100, bg_colour=0x000000, bg_alpha=0.3, fg_colour=0x000000, fg_alpha=0.5, x=130, y=320, radius=26, thickness=5, start_angle=-90, end_angle=180 }, { name='fs_used_perc', arg='/home', max=100, bg_colour=0x000000, bg_alpha=0.3, fg_colour=0x000000, fg_alpha=0.5, x=130, y=320, radius=20, thickness=5, start_angle=-90, end_angle=180 }, { name='upspeedf', arg='eth0', max=50, bg_colour=0x000000, bg_alpha=0.3, fg_colour=0x000000, fg_alpha=0.5, x=160, y=370, radius=20, thickness=5, start_angle=-90, end_angle=180 }, { name='downspeedf', arg='eth0', max=100, bg_colour=0x000000, bg_alpha=0.3, fg_colour=0x000000, fg_alpha=0.5, x=160, y=370, radius=26, thickness=5, start_angle=-90, end_angle=180 }, } require 'cairo' function rgb_to_r_g_b(colour,alpha) return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha end function draw_ring(cr,t,pt) local w,h=conky_window.width,conky_window.height local xc,yc,ring_r,ring_w,sa,ea=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['start_angle'],pt['end_angle'] local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha'] local angle_0=sa*(2*math.pi/360)-math.pi/2 local angle_f=ea*(2*math.pi/360)-math.pi/2 local t_arc=t*(angle_f-angle_0) -- Draw background ring cairo_arc(cr,xc,yc,ring_r,angle_0,angle_f) cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga)) cairo_set_line_width(cr,ring_w) cairo_stroke(cr) -- Draw indicator ring cairo_arc(cr,xc,yc,ring_r,angle_0,angle_0+t_arc) cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga)) cairo_stroke(cr) end function conky_ring_stats() local function setup_rings(cr,pt) local str='' local value=0 str=string.format('${%s %s}',pt['name'],pt['arg']) str=conky_parse(str) value=tonumber(str) if value == nil then value = 0 end pct=value/pt['max'] draw_ring(cr,pct,pt) end if conky_window==nil then return end local cs=cairo_xlib_surface_create(conky_window.display,conky_window.drawable,conky_window.visual, conky_window.width,conky_window.height) local cr=cairo_create(cs) local updates=conky_parse('${updates}') update_num=tonumber(updates) if update_num>5 then for i in pairs(settings_table) do setup_rings(cr,settings_table[i]) end end end
Code:${image [--datatype=WI] -p 12,480 -s 90x90}${image [--datatype=MI] -p 12,610 -s 50x50} ${voffset 65}${goto 25}${font MaiandraGD:size=12}[--datatype=HT --hideunits --centeredwidth=3]/[--datatype=LT --hideunits --centeredwidth=3] ${voffset -70}${goto 120}[--datatype=CT] ${voffset 10}${goto 120}${font MaiandraGD:size=10}Station: Huntsville, AL ${goto 120}Rain: [--datatype=PC] ${goto 120}UV: [--datatype=UI] - [--datatype=UT] ${goto 120}Humidity: [--datatype=HM] ${goto 120}Dew Point: [--datatype=DP] ${goto 120}Sunrise/Set: [--datatype=SR] / [--datatype=SS] ${goto 120}Bar: [--datatype=BR] - [--datatype=BD] ${goto 120}Moon: [--datatype=MP] ${font MaiandraGD:size=7}${goto 120}Last Update: [--datatype=LU]${font MaiandraGD:size=14} ${voffset 5}${goto 28}[--datatype=DW --startday=1 --shortweekday]${goto 72}[--datatype=DW --startday=2 --shortweekday]${goto 120}[--datatype=DW --startday=3 --shortweekday]${goto 170}[--datatype=DW --startday=4 --shortweekday]${goto 220}[--datatype=DW --startday=5 --shortweekday]${goto 270}[--datatype=DW --startday=6 --shortweekday]${goto 320}[--datatype=DW --startday=7 --shortweekday] ${image [--datatype=WI --startday=1] -p 20,740 -s 40x40}${image [--datatype=WI --startday=2] -p 70,740 -s 40x40}${image [--datatype=WI --startday=3] -p 120,740 -s 40x40}${image [--datatype=WI --startday=4] -p 170,740 -s 40x40}${image [--datatype=WI --startday=5] -p 220,740 -s 40x40}${image [--datatype=WI --startday=6] -p 270,740 -s 40x40}${image [--datatype=WI --startday=7] -p 320,740 -s 40x40} ${voffset 22}${goto 27}${font MaiandraGD:size=8}[--datatype=HT --startday=1 --hideunits --centeredwidth=3]/[--datatype=LT --startday=1 --hideunits --centeredwidth=3]${goto 74}[--datatype=HT --startday=2 --hideunits --centeredwidth=3]/[--datatype=LT --startday=2 --hideunits --centeredwidth=3]${goto 122}[--datatype=HT --startday=3 --hideunits --centeredwidth=3]/[--datatype=LT --startday=3 --hideunits --centeredwidth=3]${goto 170}[--datatype=HT --startday=4 --hideunits --centeredwidth=3]/[--datatype=LT --startday=4 --hideunits --centeredwidth=3]${goto 220}[--datatype=HT --startday=5 --hideunits --centeredwidth=3]/[--datatype=LT --startday=5 --hideunits --centeredwidth=3]${goto 270}[--datatype=HT --startday=6 --hideunits --centeredwidth=3]/[--datatype=LT --startday=6 --hideunits --centeredwidth=3]${goto 320}[--datatype=HT --startday=7 --hideunits --centeredwidth=3]/[--datatype=LT --startday=7 --hideunits --centeredwidth=3]
Well, I thought I had everything working correctly. I changed the wallpaper and rebooted, but I now have black backgrounds on my conkys.
conky calendar:
conkyforecast:Code:# UBUNTU-CONKY. # Update interval in seconds update_interval 1.0 # Create own window instead of using desktop (required in nautilus) own_window yes own_window_colour 000000 # Black own_window_type normal #try also 'normal' or 'desktop' 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 text_buffer_size 6144 # large buffer needed max_specials 640 max_user_text 4000 # Minimum size of text area minimum_size 1280 maximum_width 1280 draw_shades no draw_outline no # amplifies text if yes draw_borders no draw_graph_borders no use_xft yes xftalpha 0.9 xftfont Candera:size=8 uppercase no override_utf8_locale yes use_spacer no stippled_borders 3 border_margin 0 border_width 0 # Gap between borders of screen and text gap_x 1 gap_y 1 # Default colors and also border colors, grey90 == #e5e5e5 default_color grey color1 orange # colours below used by colorize script color7 lightblue color8 yellow color9 red # Text alignment, other possible values are commented #alignment top_left #alignment top_right #alignment bottom_left #alignment bottom_right alignment top_middle TEXT ${voffset 8}${goto 190}${font LCDMono:bold:size=24}${color6}${time %b}${font}${color} ${voffset -19}${font DejaVu Sans Mono:Bold:size=10}${execpi 60 /home/peter1/Conky/scripts/conky_calhoriz.sh} ${voffset -15}${font LCDMono:bold:size=24}${color3}${time %Y}${font}
conkymain:Code:# UBUNTU-CONKY. # Update interval in seconds update_interval 1.0 # Create own window instead of using desktop (required in nautilus) own_window yes own_window_colour 000000 # Black own_window_type normal #try also 'normal' or 'desktop' 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 text_buffer_size 6144 # large buffer needed max_specials 800 max_user_text 4000 # Minimum size of text area #minimum_size 300 5 #maximum_width 300 lua_load ~/scripts/draw_bg.lua lua_draw_hook_pre draw_shades no draw_outline no # amplifies text if yes draw_borders no draw_graph_borders no use_xft yes xftalpha 0.9 xftfont Candera:size=8 uppercase no override_utf8_locale yes use_spacer no stippled_borders 3 border_margin 0 border_width 5 border_inner_margin 0 border_outer_margin 0 # Gap between borders of screen and text gap_x 5 gap_y 5 # Default colors and also border colors, grey90 == #e5e5e5 default_color grey color1 orange # colours below used by colorize script color7 lightblue color8 yellow color9 red # Text alignment, other possible values are commented #alignment top_left #alignment top_right alignment bottom_left #alignment bottom_right # stuff after 'TEXT' will be formatted on screen TEXT ${voffset -50}${offset 10}${execpi 1800 conkyForecast --location=USNC0204 --template=/home/peter1/Conky/scripts/conkyForecast.template}
I just don't know how to fix this.Code:# UBUNTU-CONKY. # Update interval in seconds update_interval 1.0 # Create own window instead of using desktop (required in nautilus) own_window yes own_window_colour 000000 # Black own_window_type normal #try also 'normal' or 'desktop' 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 text_buffer_size 6000 # large buffer needed max_specials 512 max_user_text 4000 # Minimum size of text area #minimum_size 300 5 #maximum_width 300 lua_load ~/scripts/draw_bg.lua lua_draw_hook_pre draw_shades no draw_outline no # amplifies text if yes draw_borders no draw_graph_borders no use_xft yes xftalpha 0.9 xftfont Candera:size=8 uppercase no override_utf8_locale yes use_spacer no stippled_borders 3 border_margin 0 border_width 0 border_inner_margin 5 border_outer_margin 0 # Gap between borders of screen and text gap_x 10 gap_y 10 # Default colors and also border colors, grey90 == #e5e5e5 default_color grey color1 orange # colours below used by colorize script color7 lightblue color8 yellow color9 red # Text alignment, other possible values are commented #alignment top_left #alignment top_right #alignment bottom_left alignment bottom_right # stuff after 'TEXT' will be formatted on screen TEXT ${color }SYSTEM: ${offset 5}${color }Distro${alignr}${color}${pre_exec cat /etc/issue.net} ${offset 5}${color }Kernel${alignr}${color}$sysname $kernel ${offset 5}${color }UpTime${alignr}${color}${uptime} ${color }PROCESSOR: ${color }${execi 1000 cat /proc/cpuinfo | grep "model name" | cut -c14-36} ${color lightgrey}${tab 20}Freqency: ${alignr}${color }${freq_g cpu0}Ghz ${color lightgrey}${tab 20}Temperature: ${alignr}${color #ddaa00}${acpitemp}C ${color } ${color lightgrey}${tab 20}Load: ${color #ddaa00}${cpu}%${alignr }${color }${cpubar 6,175} ${color lightgrey}${tab 20}CPU History ${color }${tab 47}${cpugraph cpu0 10,175 000000 ffffff} ${color lightgrey}${tab 20}Processes Running: ${color }${running_processes} ${color lightgrey}${tab 20}Processes Sleeping: ${color }${processes} ${color }${tab 20}Top CPU Processes: $alignr CPU% ${color #ddaa00}${tab 40}${top name 1}$alignr${top cpu 1} ${color }${tab 40}${top name 2}$alignr${top cpu 2} ${color }${tab 40}${top name 3}$alignr${top cpu 3} ${color }MEMORY: ${color }${tab 20}Real: ${memmax} total / ${mem} in use ${color lightgrey}${tab 20}Used: ${color #ddaa00}${memperc}%${alignr}${color }${membar 6,175} ${color }${tab 20}Swap: ${swapmax} total / ${swap} in use ${color lightgrey}${tab 20}Used: ${color #ddaa00}${swapperc}%${alignr}${color }${swapbar 6,175} ${color }${tab 20}Top Memory Processes: $alignr MEM% ${color #ddaa00}${tab 40}${top_mem name 1}$alignr${top_mem mem 1} ${color }${tab 40}${top_mem name 2}$alignr${top_mem mem 2} ${color }${tab 40}${top_mem name 3}$alignr${top_mem mem 3} ${color }VIDEO: ${color } ${tab 20}${execi 30 nvclock -i | grep 'Card:' | cut -c9-27} ${tab 20}GPU Temp: ${alignr}${execpi 8 nvidia-settings -q GPUCoreTemp -t | xargs /home/peter1/Conky/scripts/colorizegpu.sh}°C ${tab 20}${color lightgrey}NVidia Driver Version:$alignr ${color} ${exec nvidia-settings -q NvidiaDriverVersion | grep Attribute | cut -d ' ' -f 6} ${tab 20}${color lightgrey}Current GPU Clock:$alignr ${color} ${exec nvidia-settings -q GPUPerfModes | grep perf=0 | cut -d ' ' -f 7 | cut -c 9-11} MHz ${color }DISK: ${color }/dev/hda3 Linux (ext3) ${color lightgrey}${tab 20}Total: ${color }${fs_size} ${color lightgrey}${tab 20}Used: ${color }${fs_used} ${color lightgrey}${tab 20}Available: ${color }${fs_free} ${color lightgrey}${tab 20}Free: ${color #ddaa00}${fs_free_perc}%${tab 45}${color }${alignr}${fs_bar 6,175} ${color lightgrey}${tab 20}I/O History: ${tab 47}${diskiograph 10,175 000000 ffffff} ${tab 25}${offset 5}${voffset 10}${color}${font LCDMono:size=50}${time %I:%M:%P}${font}
Yup, because you asked for them, all of your conkys have:
Try this, very easy, comment out two lines:Code:# Create own window instead of using desktop (required in nautilus) own_window yes own_window_colour 000000 # Black own_window_type normal #try also 'normal' or 'desktop' own_window_transparent yes own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
Lets see what happens.Code:# Create own window instead of using desktop (required in nautilus) own_window yes #own_window_colour 000000 # Black #own_window_type normal #try also 'normal' or 'desktop' own_window_transparent yes own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
Bruce
EDIT: Which is the opposite of what kids/parents say/mean.
OH!! You HAD to remind me of my C-64 days didn't you!
That's when a computer teacher told me computers are DUMB DUMB DUMB!!!
"That is to say they are as dumb as the person who writes the code."
What a thing to say to someone that had a bug and couldn't find it.
Scheeeech!
CHIMO!
Bruce
Last edited by Bruce M.; January 23rd, 2010 at 01:30 AM.
Bookmarks