Page 1575 of 2343 FirstFirst ... 5751075147515251565157315741575157615771585162516752075 ... LastLast
Results 15,741 to 15,750 of 23425

Thread: Post your .conkyrc files w/ screenshots

  1. #15741
    Join Date
    Apr 2007
    Beans
    195

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Sector11 View Post
    I don't see anything that I recognize that would push memory up like that.

    However: I see somethings that are not needed: like lines that call up a font and immediately turn it off - for example:

    Code:
    ${font StyleBats:size=16}${font}CPU1: ${cpu cpu1}% ${alignr}${cpubar cpu1 8,60}
    Does that create RAM usage? Don't know but they should not be there.

    Those and a couple of other "cleanups" ${alignr} to ${alignr 2} (trust me) and commands with no brackets: Swap: $swapperc% given brackets. Swap: ${swapperc}%

    Technically they may not be required but I have found that after certain commands they mess things up. So I have gotten into the habit of using them always.

    Here is your code cleaned up a tad:
    Code:
    # Use Xft?
    use_xft yes
    xftfont OFL Sorts Mill Goudy:size=8
    xftalpha 0.8
    text_buffer_size 2048
    
    # 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 yes
    own_window_transparent yes
    own_window_type override
    own_window_class conky
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    background no
    
    # Use double buffering (reduces flicker, may not work for everyone)
    double_buffer yes
    
    # Minimum size of text area
    minimum_size 180 0
    #maximum_width 200
    
    # Draw shades?
    draw_shades no
    
    # Draw outlines?
    draw_outline no
    
    # Draw borders around text
    draw_borders no
    
    # Stippled borders?
    stippled_borders 0
    
    # border margins
    border_inner_margin 5
    
    # border width
    border_width 1
    
    # Default colors and also border colors
    default_color white
    default_shade_color white
    default_outline_color white
    own_window_colour white
    color1 white
    
    # 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
    # same thing as passing -x at command line
    gap_x 8
    gap_y 8
    
    # 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
    
    TEXT
    
    
    ${font Goudy Bookletter 1911:style=Bold}SYSTEM${font} ${hr 2}
    ${voffset 2}${font StyleBats:size=16}${font}Kernel: ${alignr}${kernel}
    ${font StyleBats:size=16}${font}CPU1: ${cpu cpu1}% ${alignr}${cpubar cpu1 8,60}
    ${font StyleBats:size=16}${font}CPU2: ${cpu cpu2}% ${alignr}${cpubar cpu2 8,60}
    ${font StyleBats:size=16}${font}RAM: $memperc% ${alignr}${membar 8,60}
    ${font StyleBats:size=16}${font}Swap: $swapperc% ${alignr}${swapbar 8,60}
    #${font Webdings:size=16}${font}Battery: ${battery_percent BAT0}% ${alignr}${battery_bar 8,60 BAT0}
    #${font StyleBats:size=16}${font}Temperature: ${alignr}${acpitemp}C
    ${font StyleBats:size=16}${font}Uptime: ${alignr}${uptime}
    #${font StyleBats:size=16}${font}System Update: ${color2} $color${execi 18000 update-manager "~U" | wc -l | tail}
    
    #TIME
    ${voffset -10}${alignc 36}${color2}${font Droid Sans:style=Bold:size=15}${time %r}${font}${color}
    ${voffset 6}${alignc}${time %B %d %Y}${voffset -6}
    
    #HDD Info
    ${font Goudy Bookletter 1911:style=Bold}HD${font} ${hr 2}
    ${voffset 4}${font Pie charts for maps:size=14}${font} ${voffset -5}Root:
    ${voffset 4}${fs_used /}/${fs_size /} ${alignr}${fs_bar 8,60 /}
    ${font Pie charts for maps:size=14}${font} ${voffset -5}Home:
    ${voffset 4}${fs_used /home}/${fs_size /home} ${alignr}${fs_bar 8,60 /home}
    
    #Processes Information
    ${font Goudy Bookletter 1911:style=Bold}TOP 5${font} ${hr 2}
    Process $alignr PID CPU
    ${top name 1} $alignr ${top pid 1} ${top cpu 1}
    ${top name 2} $alignr ${top pid 2} ${top cpu 2}
    ${top name 3} $alignr ${top pid 3} ${top cpu 3}
    ${top name 4} $alignr ${top pid 4} ${top cpu 4}
    ${top name 5} $alignr ${top pid 5} ${top cpu 5}
    #${top name 6} $alignr ${top pid 6} ${top cpu 6}
    #${top name 7} $alignr ${top pid 7} ${top cpu 7}
    #${top name 8} $alignr ${top pid 8} ${top cpu 8}
    #${top name 9} $alignr ${top pid 9} ${top cpu 9}
    #${top name 10} $alignr ${top pid 10} ${top cpu 10}
    
    #Internet connection Information
    ${font Goudy Bookletter 1911:style=Bold}NETWORK${font} ${hr 2}
    ${voffset 4}${font PizzaDude Bullets:size=14}${font}Up speed: ${upspeed eth0} ${alignr}${upspeedgraph wlan0 8,60 000000 000000}
    ${voffset 4}${font PizzaDude Bullets:size=14}${font}Down speed: ${downspeed eth0} ${alignr}${downspeedgraph wlan0 8,60 000000 000000}
    ${voffset 4}${font PizzaDude Bullets:size=14}${font}Upload: ${alignr}${totalup eth0}
    ${voffset 4}${font PizzaDude Bullets:size=14}${font}Download: ${alignr}${totaldown eth0}
    #${voffset 4}${font PizzaDude Bullets:size=14}${font}Signal: ${wireless_link_qual eth0}% ${alignr}${wireless_link_bar 8,60 eth0}
    ${voffset 4}${font PizzaDude Bullets:size=14}${font}Local IP: ${alignr}${addr eth0}
    None of the functionality has been changed or compromised.
    Hope this works for you.
    Yeah, listen to the guy. You might as well. I was about five seconds away from saying something similar about cleaning up the code a bit. I didn't know for certain if dead font calls added to the RAM, or that the brackets around mem/swapperc were necessary. I was trying it for myself on my own conky. I didn't notice any differences in the RAM usage over the few minutes I tried it, but I did notice how sloppy the code looked.

    For your own future Conky sanity, it's better to have cleaner code. The fact that the guy cleaned up your code for ya was a bit farther than I was willing to go though, so he gets the credit there

  2. #15742
    Join Date
    Nov 2006
    Location
    Vienna, Austria
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Sector11 View Post
    None of the functionality has been changed or compromised.
    Hope this works for you.
    Thanks very much for this. I am using your cleaned up code.

    I will have to find out what's causing this. My computer has only been running for 4 hours, and already RAM is at 24%.

    I connect to this machine using vino from time to time.

    I also have AFP set up so I can connect to my shares from my iMac.

    Otherwise nothing else is running. Strange...
    Recommended Resources: Ubuntu Linux Resources

  3. #15743
    Join Date
    Feb 2008
    Beans
    145
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by 42dorian View Post
    I'm going to go ahead and label this "Not of any use in Canada." YahooTV listings are great, but they don't follow the same rules as your TVRage site does. And there doesn't appear to be any sort of universal way to do this.

    Not YOUR fault, but I'm just putting the note there about this for Canadians. TVRage doesn't do anything for Canadians. We have more channels than just CBC and CTV.
    The weird thing about this is when you look at their network listings for Canada. They show something like 40 different channels, but the feed only displays 2
    Go figure.

    One other idea I was thinking of was something similar to the TVRage favorite show. Not sure how that would work for other countries, though. US and UK work great, its the rest of the world that needs work

  4. #15744
    Join Date
    Apr 2007
    Beans
    195

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by Neon612 View Post
    The weird thing about this is when you look at their network listings for Canada. They show something like 40 different channels, but the feed only displays 2
    Go figure.

    One other idea I was thinking of was something similar to the TVRage favorite show. Not sure how that would work for other countries, though. US and UK work great, its the rest of the world that needs work
    Well, technically, they're right. Those are the only 2 channels that are really... well... "New" on our schedule. Everything else is a Canadian rebroadcast, often in real time, of the American system. And mixed in we often have a duplicate channel in Canadian form, with Canadian commercials. Good example: ABC on channel 18 where I am, but "A" Channel Canada on channel 20 rebroadcasting things like "V" in real time. Global (Canadian) on 03, often with shows that are on CBS (05) and FOX (28) and quite frankly if Yahoo didn't just list them all I wouldn't fault these other sites for thinking we had nothing on except repeats

    But I do have a YahooTV page set up. Just not gonna try putting the data into Conky. I'm pretty happy with what I've got now.

  5. #15745
    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 foutes View Post
    Ok,last time tonight I promise.

    Added bargraph to conkyrhythmbox.

    .bargraph_small2.lua
    Code:
    --[[ BARGRAPH WIDGET
    	v2.0 by wlourf (12.07.2010)
    	this widget draws a bargraph with differe,ts effects 
    	http://u-scripts.blogspot.com/2010/07/bargraph-widget.html
    	
    	
    Parameters are :
    3 parameters are mandatory
    name	- the name of the conky variable to display, for example for {$cpu cpu0}, just write name="cpu"
    arg		- the argument of the above variable, for example for {$cpu cpu0}, just write arg="cpu0"
    		  arg can be a numericla value if name=""
    max		- the maximum value the above variable can reach, for example for {$cpu cpu0}, just write  max=100
    	
    Optional parameters:
    x,y		- coordinates of the starting point of the bar, default = middle of the conky window
    cap		- end of cap line, ossibles values are r,b,s (for round, butt, square), default="b"
    		  http://www.cairographics.org/samples/set_line_cap/
    angle	- angle of rotation of the bar in degress, default = 0 (i.e. a vertical bar)
    		  set to 90 for an horizontal bar
    skew_x	- skew bar around x axis, défaut = 0
    skew_y	- skew bar around y axis, défaut = 0
    blocks  - number of blocks to display for a bar (values >0) , default= 10
    height	- height of a block, default=10 pixels
    width	- width of a block, default=20 pixels
    space	- space between 2 blocks, default=2 pixels
    angle_bar	- this angle is used to draw a bar on a circular way (ok, this is no more a bar !) default=0
    radius		- for cicular bars, internal radius, default=0
    			  with radius, parameter width has no more effect.
    
    Colours below are defined into braces {colour in hexadecimal, alpha}
    fg_colour	- colour of a block ON, default= {0x00FF00,1}
    bg_colour	- colour of a block OFF, défaut = {0x00FF00,0.5}
    alarm		- threshold, values after this threshold will use alarm_colour colour , default=max
    alarm_colour - colour of a block greater than alarm, default=fg_colour
    smooth		- (true or false), create a gradient from fg_colour to bg_colour, default=false 
    mid_colour	- colours to add to gradient, with this syntax {position into the gradient (0 to1), colour hexa, alpha}
    			  for example, this table {{0.25,0xff0000,1},{0.5,0x00ff00,1},{0.75,0x0000ff,1}} will add
    			  3 colurs to gradient created by fg_colour and alarm_colour, default=no mid_colour
    led_effect	- add LED effects to each block, default=no led_effect
    			  if smooth=true, led_effect is not used
    			  possibles values : "r","a","e" for radial, parallelel, perdendicular to the bar (just try!)
    			  led_effect has to be used with theses colours :
    fg_led		- middle colour of a block ON, default = fg_colour
    bg_led		- middle colour of a block OFF, default = bg_colour
    alarm_led	- middle colour of a block > ALARM,  default = alarm_colour
    
    reflection parameters, not avaimable for circular bars
    reflection_alpha    - add a reflection effect (values from 0 to 1) default = 0 = no reflection
                          other values = starting opacity
    reflection_scale    - scale of the reflection (default = 1 = height of text)
    reflection_length   - length of reflection, define where the opacity will be set to zero
    					  calues from 0 to 1, default =1
    reflection			- position of reflection, relative to a vertical bar, default="b"
    					  possibles values are : "b","t","l","r" for bottom, top, left, right
    
    
    v1.0 (10 Feb. 2010) original release
    v1.1 (13 Feb. 2010) numeric values can be passed instead conky stats with parameters name="", arg = numeric_value	
    v1.2 (28 Feb. 2010) just renamed the widget to bargraph
    v1.3 (03 March 2010) added parameters radius & angle_bar to draw the bar in a circular way
    v2.0 (12 Jul. 2010) rewrite script + add reflection effects and parameters are now set into tables
    ]]
    
    require 'cairo'
    
    ----------------START OF PARAMETERS ----------
    
    
    function conky_main_bars()
    	bars_settings={	
    		{
    			name="",
    			arg=io.popen("conkyRhythmbox --datatype=PP"):read(),
    			max=100,
    			alarm=50,
    			bg_colour={0xFFFFFF,0.25},
    			fg_colour={0x00FF00,0.6},
    			alarm_colour={0xFF0000,0.6},
    			x=9,y=295,
    			blocks=80,
    			space=1,
    			height=2,width=8,
    			angle=90,
    			smooth=true,
    			mid_colour={{0.5,0xFFFF00,0.6}}	
    			},
    	 }		
    -------------END OF PARAMETERS--------------
    
    
        
    	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)    
    	--prevent segmentation error when reading cpu state
        if tonumber(conky_parse('${updates}'))>3 then
            for i in pairs(bars_settings) do
            	
            	draw_multi_bar_graph(bars_settings[i])
            	
            end
        end
    	cairo_destroy(cr)
    	cairo_surface_destroy(cs)
    
    end
    
    
    
    function draw_multi_bar_graph(t)
    	cairo_save(cr)
    	--check values
    	if t.name==nil and t.arg==nil then 
    		print ("No input values ... use parameters 'name' with 'arg' or only parameter 'arg' ") 
    		return
    	end
    	if t.max==nil then
    		print ("No maximum value defined, use 'max'")
    		return
    	end
    	if t.name==nil then t.name="" end
    	if t.arg==nil then t.arg="" end
    
    	--set default values	
    	if t.x == nil		then t.x = conky_window.width/2 end
    	if t.y == nil		then t.y = conky_window.height/2 end
    	if t.blocks == nil	then t.blocks=10 end
    	if t.height == nil	then t.height=10 end
    	if t.angle == nil 	then t.angle=0 end
    	t.angle = t.angle*math.pi/180
    	--line cap style
    	if t.cap==nil		then t.cap = "b" end
    	local cap="b"
    	for i,v in ipairs({"s","r","b"}) do 
    		if v==t.cap then cap=v end
    	end
    	delta=0
    	if t.cap=="r" or t.cap=="s" then delta = t.height end
    	if cap=="s" then 	cap = CAIRO_LINE_CAP_SQUARE
    	elseif cap=="r" then
    		cap = CAIRO_LINE_CAP_ROUND
    	elseif cap=="b" then
    		cap = CAIRO_LINE_CAP_BUTT
    	end
    	--end line cap style
    	--if t.led_effect == nil	then t.led_effect="r" end
    	if t.width == nil	then t.width=20 end
    	if t.space == nil	then t.space=2 end
    	if t.radius == nil	then t.radius=0 end
    	if t.angle_bar == nil	then t.angle_bar=0 end
    	t.angle_bar = t.angle_bar*math.pi/360 --halt angle
    	
    	--colours
    	if t.bg_colour == nil 	then t.bg_colour = {0x00FF00,0.5} end
    	if #t.bg_colour~=2 		then t.bg_colour = {0x00FF00,0.5} end
    	if t.fg_colour == nil 	then t.fg_colour = {0x00FF00,1} end
    	if #t.fg_colour~=2 		then t.fg_colour = {0x00FF00,1} end
    	if t.alarm_colour == nil 	then t.alarm_colour = t.fg_colour end
    	if #t.alarm_colour~=2 		then t.alarm_colour = t.fg_colour end
    
    	if t.mid_colour ~= nil then	
    		for i=1, #t.mid_colour do    
    		    if #t.mid_colour[i]~=3 then 
    		    	print ("error in mid_color table")
    		    	t.mid_colour[i]={1,0xFFFFFF,1} 
    		    end
    		end
        end
        
    	if t.bg_led ~= nil and #t.bg_led~=2	then t.bg_led = t.bg_colour end
    	if t.fg_led ~= nil and #t.fg_led~=2	then t.fg_led = t.fg_colour end
    	if t.alarm_led~= nil and #t.alarm_led~=2 then t.alarm_led = t.fg_led end
    	
    	if t.led_effect~=nil then
    		if t.bg_led == nil then t.bg_led = t.bg_colour end
    		if t.fg_led == nil 	then t.fg_led = t.fg_colour end
    		if t.alarm_led == nil  then t.alarm_led = t.fg_led end
    	end
    	
    
    	if t.alarm==nil then t.alarm = t.max end --0.8*t.max end
    	if t.smooth == nil then t.smooth = false end
    
    	if t.skew_x == nil then 
    		t.skew_x=0 
    	else
    		t.skew_x = math.pi*t.skew_x/180	
    	end
    	if t.skew_y == nil then 
    		t.skew_y=0
    	else
    		t.skew_y = math.pi*t.skew_y/180	
    	end
    	
    	if t.reflection_alpha==nil then t.reflection_alpha=0 end
    	if t.reflection_length==nil then t.reflection_length=1 end
    	if t.reflection_scale==nil then t.reflection_scale=1 end
    	
    	--end of default values
    	
    
     	local 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
    	
    	
    	--functions used to create patterns
    
    	local function create_smooth_linear_gradient(x0,y0,x1,y1)
    		local pat = cairo_pattern_create_linear (x0,y0,x1,y1)
    		cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(t.fg_colour))
    		cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(t.alarm_colour))
    		if t.mid_colour ~=nil then
    			for i=1, #t.mid_colour do
    				cairo_pattern_add_color_stop_rgba (pat, t.mid_colour[i][1], rgb_to_r_g_b({t.mid_colour[i][2],t.mid_colour[i][3]}))
    			end
    		end
    		return pat
    	end
    
    	local function create_smooth_radial_gradient(x0,y0,r0,x1,y1,r1)
    		local pat =  cairo_pattern_create_radial (x0,y0,r0,x1,y1,r1)
    		cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(t.fg_colour))
    		cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(t.alarm_colour))
    		if t.mid_colour ~=nil then
    			for i=1, #t.mid_colour do
    				cairo_pattern_add_color_stop_rgba (pat, t.mid_colour[i][1], rgb_to_r_g_b({t.mid_colour[i][2],t.mid_colour[i][3]}))
    			end
    		end
    		return pat
    	end
    	
    	local function create_led_linear_gradient(x0,y0,x1,y1,col_alp,col_led)
    		local pat = cairo_pattern_create_linear (x0,y0,x1,y1) ---delta, 0,delta+ t.width,0)
    		cairo_pattern_add_color_stop_rgba (pat, 0.0, rgb_to_r_g_b(col_alp))
    		cairo_pattern_add_color_stop_rgba (pat, 0.5, rgb_to_r_g_b(col_led))
    		cairo_pattern_add_color_stop_rgba (pat, 1.0, rgb_to_r_g_b(col_alp))
    		return pat
    	end
    
    	local function create_led_radial_gradient(x0,y0,r0,x1,y1,r1,col_alp,col_led,mode)
    		local pat = cairo_pattern_create_radial (x0,y0,r0,x1,y1,r1)
    		if mode==3 then
    			cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(col_alp))				
    			cairo_pattern_add_color_stop_rgba (pat, 0.5, rgb_to_r_g_b(col_led))
    			cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(col_alp))				
    		else
    			cairo_pattern_add_color_stop_rgba (pat, 0, rgb_to_r_g_b(col_led))
    			cairo_pattern_add_color_stop_rgba (pat, 1, rgb_to_r_g_b(col_alp))				
    		end
    		return pat
    	end
    
    
    
    
    
    
    	local function draw_single_bar()
    		--this fucntion is used for bars with a single block (blocks=1) but 
    		--the drawing is cut in 3 blocks : value/alarm/background
    		--not zvzimzblr for circular bar
    		local function create_pattern(col_alp,col_led,bg)
    			local pat
    			
    			if not t.smooth then
    				if t.led_effect=="e" then
    					pat = create_led_linear_gradient (-delta, 0,delta+ t.width,0,col_alp,col_led)
    				elseif t.led_effect=="a" then
    					pat = create_led_linear_gradient (t.width/2, 0,t.width/2,-t.height,col_alp,col_led)
    				elseif  t.led_effect=="r" then
    					pat = create_led_radial_gradient (t.width/2, -t.height/2, 0, t.width/2,-t.height/2,t.height/1.5,col_alp,col_led,2)
    				else
    					pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(col_alp))
    				end
    			else
    				if bg then
    					pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(t.bg_colour))
    				else
    					pat = create_smooth_linear_gradient(t.width/2, 0, t.width/2,-t.height)
    				end
    			end
    			return pat
    		end
    		
    		local y1=-t.height*pct/100
    		local y2=nil
    		if pct>(100*t.alarm/t.max) then 
    			y1 = -t.height*t.alarm/100
    			y2 = -t.height*pct/100
    			if t.smooth then y1=y2 end
    		end
    		
    		if t.angle_bar==0 then
    		
    			--block for fg value
    			pat = create_pattern(t.fg_colour,t.fg_led,false)
    			cairo_set_source(cr,pat)
    			cairo_rectangle(cr,0,0,t.width,y1)
    			cairo_fill(cr)
    		
    			-- block for alarm value			
    			if not t.smooth and y2 ~=nil then 
    				pat = create_pattern(t.alarm_colour,t.alarm_led,false)
    				cairo_set_source(cr,pat)
    				cairo_rectangle(cr,0,y1,t.width,y2-y1)
    				cairo_fill(cr)
    				y3=y2
    			else
    				y2,y3=y1,y1
    			end
    			-- block for bg value
    			cairo_rectangle(cr,0,y2,t.width,-t.height-y3)
    			pat = create_pattern(t.bg_colour,t.bg_led,true)
    			cairo_set_source(cr,pat)
    			cairo_pattern_destroy(pat)
    			cairo_fill(cr)
    		end		
    	end  --end single bar
    	
    
    
    
    
    
    	local function draw_multi_bar()
    		--function used for bars with 2 or more blocks
    		for pt = 1,t.blocks do 
    			--set block y
    			local y1 = -(pt-1)*(t.height+t.space)
    			local light_on=false
    			
    			--set colors
    			local col_alp = t.bg_colour
    			local col_led = t.bg_led
    			if pct>=(100/t.blocks) or pct>0 then --ligth on or not the block
    				if pct>=(pcb*(pt-1))  then 
    					light_on = true
    					col_alp = t.fg_colour
    					col_led = t.fg_led
    					if pct>=(100*t.alarm/t.max) and (pcb*pt)>(100*t.alarm/t.max) then 
    						col_alp = t.alarm_colour 
    						col_led = t.alarm_led 
    					end
    				end
    			end
    
    			--set colors
    			--have to try to create gradients outside the loop ?
    			local pat 
    			
    			if not t.smooth then
    				if t.angle_bar==0 then
    					if t.led_effect=="e" then
    						pat = create_led_linear_gradient (-delta, 0,delta+ t.width,0,col_alp,col_led)
    					elseif t.led_effect=="a" then
    						pat = create_led_linear_gradient (t.width/2, -t.height/2+y1,t.width/2,0+t.height/2+y1,col_alp,col_led)					
    					elseif  t.led_effect=="r" then
    						pat = create_led_radial_gradient (t.width/2, y1, 0, t.width/2,y1,t.width/1.5,col_alp,col_led,2)	
    					else
    						pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(col_alp))
    					end
    				else
    					 if t.led_effect=="a"  then
    						 pat = create_led_radial_gradient (0, 0, t.radius+(t.height+t.space)*(pt-1),
    														 0, 0, t.radius+(t.height+t.space)*(pt),						 
    											 col_alp,col_led,3)	
    					else
    						pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(col_alp))					
    					end
    					
    				end
    			else
    				
    				if light_on then
    					if t.angle_bar==0 then
    						pat = create_smooth_linear_gradient(t.width/2, t.height/2, t.width/2,-(t.blocks-0.5)*(t.height+t.space))
    					else
    						pat = create_smooth_radial_gradient(0, 0, (t.height+t.space),  0,0,(t.blocks+1)*(t.height+t.space),2)
    					end
    				else		
    					pat = cairo_pattern_create_rgba  (rgb_to_r_g_b(t.bg_colour))
    				end
    			end
    			cairo_set_source (cr, pat)
    			cairo_pattern_destroy(pat)
    
    			--draw a block
    			if t.angle_bar==0 then
    				cairo_move_to(cr,0,y1)
    				cairo_line_to(cr,t.width,y1)
    			else		
    				cairo_arc( cr,0,0,
    					t.radius+(t.height+t.space)*(pt)-t.height/2,
    					 -t.angle_bar -math.pi/2 ,
    					 t.angle_bar -math.pi/2)
    			end
    			cairo_stroke(cr)
    		end	
    	end
    	
    	
    	
    	
    	local function setup_bar_graph()
    		--function used to retrieve the value to display and to set the cairo structure
    		if t.blocks ~=1 then t.y=t.y-t.height/2 end
    		
    		local value = 0
    		if t.name ~="" then
    			value = tonumber(conky_parse(string.format('${%s %s}', t.name, t.arg)))
    		else
    			value = tonumber(t.arg)
    		end
    
    		if value==nil then value =0 end
    		
    		pct = 100*value/t.max
    		pcb = 100/t.blocks
    		
    		cairo_set_line_width (cr, t.height)
    		cairo_set_line_cap  (cr, cap)
    		cairo_translate(cr,t.x,t.y)
    		cairo_rotate(cr,t.angle)
    
    		local matrix0 = cairo_matrix_t:create()
    		cairo_matrix_init (matrix0, 1,t.skew_y,t.skew_x,1,0,0)
    		cairo_transform(cr,matrix0)
    
    	
    		
    		--call the drawing function for blocks
    		if t.blocks==1 and t.angle_bar==0 then
    			draw_single_bar()
    			if t.reflection=="t" or t.reflection=="b" then cairo_translate(cr,0,-t.height) end
    		else
    			draw_multi_bar()
    		end
    
    		--dot for reminder
    		--[[
    		if t.blocks ~=1 then
    			cairo_set_source_rgba(cr,1,0,0,1)
    			cairo_arc(cr,0,t.height/2,3,0,2*math.pi)
    			cairo_fill(cr)
    		else
    			cairo_set_source_rgba(cr,1,0,0,1)
    			cairo_arc(cr,0,0,3,0,2*math.pi)
    			cairo_fill(cr)
    		end
    ]]
    		--call the drawing function for reflection and prepare the mask used		
    		if t.reflection_alpha>0 and t.angle_bar==0 then
    			local pat2
    			local matrix1 = cairo_matrix_t:create()
    			if t.angle_bar==0 then
    				pts={-delta/2,(t.height+t.space)/2,t.width+delta,-(t.height+t.space)*(t.blocks)}
    				if t.reflection=="t" then
    					cairo_matrix_init (matrix1,1,0,0,-t.reflection_scale,0,-(t.height+t.space)*(t.blocks-0.5)*2*(t.reflection_scale+1)/2)
    					pat2 = cairo_pattern_create_linear (t.width/2,-(t.height+t.space)*(t.blocks),t.width/2,(t.height+t.space)/2)
    				elseif t.reflection=="r" then
    					cairo_matrix_init (matrix1,-t.reflection_scale,0,0,1,delta+2*t.width,0)
    					pat2 = cairo_pattern_create_linear (delta/2+t.width,0,-delta/2,0)
    				elseif t.reflection=="l" then
    					cairo_matrix_init (matrix1,-t.reflection_scale,0,0,1,-delta,0)
    					pat2 = cairo_pattern_create_linear (-delta/2,0,delta/2+t.width,-0)
    				else --bottom
    					cairo_matrix_init (matrix1,1,0,0,-1*t.reflection_scale,0,(t.height+t.space)*(t.reflection_scale+1)/2)
    					pat2 = cairo_pattern_create_linear (t.width/2,(t.height+t.space)/2,t.width/2,-(t.height+t.space)*(t.blocks))
    				end
    			end
    			cairo_transform(cr,matrix1)
    
    			if t.blocks==1 and t.angle_bar==0 then
    				draw_single_bar()
    				cairo_translate(cr,0,-t.height/2) 
    			else
    				draw_multi_bar()
    			end
    			
    			
    			cairo_set_line_width(cr,0.01)
    			cairo_pattern_add_color_stop_rgba (pat2, 0,0,0,0,1-t.reflection_alpha)
    			cairo_pattern_add_color_stop_rgba (pat2, t.reflection_length,0,0,0,1)
    			if t.angle_bar==0 then
    				cairo_rectangle(cr,pts[1],pts[2],pts[3],pts[4])
    			end
    			cairo_clip_preserve(cr)
    			cairo_set_operator(cr,CAIRO_OPERATOR_CLEAR)
    			cairo_stroke(cr)
    			cairo_mask(cr,pat2)
    			cairo_pattern_destroy(pat2)
    			cairo_set_operator(cr,CAIRO_OPERATOR_OVER)
    			
    		end --reflection
    		
    		
    	end --setup_bar_graph()
    
    	
    	--start here !
    	setup_bar_graph()
    	cairo_restore(cr)
    end
    conkyrhythmbox template
    Code:
    ${color #656565}
    ${color3}Status:${color1}[--datatype=ST]
    ${color3}Artist:${color1}[--datatype=AR]
    ${color3}Album:${color1}[--datatype=AL]
    ${color3}Title:${color1}[--datatype=TI]
    ${color3}Volume:${color1}[--datatype=VO]
    Added this to template and now have album art.New screen shot to show output.
    Code:
    ${image [--datatype=CA] -n -p 60,380 -s 125x125}

    OK found a problem with this I need some help with.

    When I close rhythmbox the conkyrhythmbox portion disappears as it should except for the bar graph as shown in screen shot.

    Can I add ${if_running rhythmbox} ${endif} to the bargraph section below to kill that .lua or is there another way?

    Code:
    lua_load /home/linus/scripts/.draw_bg1.lua
    lua_load /home/linus/scripts/.bargraph_small2.lua
    lua_draw_hook_pre draw_bg
    lua_draw_hook_post main_bars
    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)

  6. #15746
    Join Date
    Oct 2009
    Location
    Under a rock
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by foutes View Post
    OK found a problem with this I need some help with.

    When I close rhythmbox the conkyrhythmbox portion disappears as it should except for the bar graph as shown in screen shot.

    Can I add ${if_running rhythmbox} ${endif} to the bargraph section below to kill that .lua or is there another way?

    Code:
    lua_load /home/linus/scripts/.draw_bg1.lua
    lua_load /home/linus/scripts/.bargraph_small2.lua
    lua_draw_hook_pre draw_bg
    lua_draw_hook_post main_bars

    i didnt know about the draw_hook_pre and post to get 2 scripts running at the same time... handy

    your going to have to edit the ba graph lua script... something like this (just need to change the main_bars function)

    Code:
    function conky_main_bars()
        bars_settings={    
            {
                name="",
                arg=io.popen("conkyRhythmbox --datatype=PP"):read(),
                max=100,
                alarm=50,
                bg_colour={0xFFFFFF,0.25},
                fg_colour={0x00FF00,0.6},
                alarm_colour={0xFF0000,0.6},
                x=9,y=295,
                blocks=80,
                space=1,
                height=2,width=8,
                angle=90,
                smooth=true,
                mid_colour={{0.5,0xFFFF00,0.6}}    
                },
         }        
    -------------END OF PARAMETERS--------------
    
    running=conky_parse('${if_running rhythmbox}1${else}0${endif}')
    if running==1 then
        
        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)    
        --prevent segmentation error when reading cpu state
        if tonumber(conky_parse('${updates}'))>3 then
            for i in pairs(bars_settings) do
                
                draw_multi_bar_graph(bars_settings[i])
                
            end
        end
        cairo_destroy(cr)
        cairo_surface_destroy(cs)
    end
    end
    you could also edit the background lua in a similar way so that it shortens when rhythmbox isnt running
    Last edited by mrpeachy; January 6th, 2011 at 04:51 AM.

  7. #15747
    Join Date
    Dec 2007
    Beans
    28

    Re: Post your .conkyrc files w/ screenshots

    Two problems that I am still having issues with and hoping someone could help me with:

    1) All of my cores show the same usage on the bars, even when the % percentages are different. I must have something wrong, but cannot figure it out.

    2) Is there any way to get the GPU temps on my second graphics card. I am running a 460 for my main display and a 275 for my two side monitors.

    Any and all help is appreciated.

    Michael

    Code:
    ####################################################
    ## Michael | rev. 12-27-2010 10:11 
    ## A collection of many files collected off internet
    ####################################################
    ####
    ## Use XFT? Required to Force UTF8 (see below).
    #
    use_xft yes
    xftfont LiberationSans:size=8.85
    xftalpha 0.7
    text_buffer_size 2048
    ####
    ## Force UTF8? Requires XFT (see above).
    ## Displays degree symbol, instead of °, etc.
    #
    override_utf8_locale yes
    ####
    ## Update interval in seconds.
    #
    update_interval 1.5
    ####
    ## 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 yes
    own_window_type override
    own_window_transparent yes
    ####
    ## Use double buffering? Reduces flicker.
    #
    double_buffer yes
    ####
    ## Draw shades?
    #
    draw_shades no
    ####
    ## Draw outlines?
    #
    draw_outline yes
    ####
    ## Draw borders around text?
    #
    draw_borders no
    ####
    ## Draw borders around graphs?
    #
    draw_graph_borders no
    ####
    ## Print text to stdout?
    ## Print text in console?
    #
    out_to_ncurses no
    out_to_console no
    ####
    ## Text alignment.
    #
    alignment top_right
    ####
    ## Minimum size of text area.
    #
    minimum_size 235 0
    ####
    ## Gap between text and screen borders.
    #
    gap_x 7
    gap_y 32
    ####
    ## Shorten MiB/GiB to M/G in stats.
    #
    short_units yes
    ####
    ## Pad % symbol spacing after numbers.
    #
    pad_percents 0
    
    ####
    ## Pad spacing between text and borders.
    #
    border_inner_margin 4
    ####
    ## Limit the length of names in "Top Processes".
    #
    top_name_width 10
    ####
    ## Subtract file system -/+buffers/cache from used memory?
    ## Set to yes, to produce meaningful physical memory stats.
    #
    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
    ####
    ## Add spaces to keep things from moving around?
    ## Only affects certain objects.
    #
    use_spacer right
    ####
    ## My colors (suit yourself).
    #
    color0 White
    color1 Ivory
    color2 Ivory2
    color3 Ivory3
    color4 Tan1
    color5 Tan2
    color6 Gray
    color7 AntiqueWhite4
    color8 DarkSlateGray
    color9 Black
    ####
    ## Lua script (for shaded background).
    #
    lua_load ~/.conky/draw_bg.lua
    lua_draw_hook_pre draw_bg
    ####
    ## Installed fonts (required).
    #
    # ConkyWeather (Stanko Metodiev)
    # ConkyWindNESW (Stanko Metodiev)
    # Liberation Mono (Ascender Corp)
    # Liberation Sans (Ascender Corp)
    # Moon Phases (Curtis Clark)
    # OpenLogos (Icoma)
    # PizzaDude Bullets (Jakob Fischer)
    # Radio Space (Iconian Fonts)
    # StyleBats (Vinterstille)
    # Ubuntu (Canonical Ltd)
    # Ubuntu Title Bold (Paulo Silva)
    # Weather (Jonathan Macagba)
    # WenQuanYi Micro Hei (Google Corp)
    TEXT
    ##################
    ##     LOGO     ##
    ##################
    ${voffset -2}${font OpenLogos:size=103}${color2}v${voffset -66}${goto 178}${font UbuntuTitleBold:size=20}${color4}10.10
    ##################
    ##    SYSTEM    ##
    ##################
    ${voffset 10}${font WenQuanYiMicroHei:bold:size=44}${color1}  $nodename${font}
    ${voffset 10}${font WenQuanYiMicroHei:bold:size=8.75}${color4}SYSTEM${offset 8}${color8}${hr 2}
    ${voffset 4}${font OpenLogos:size=10}${color2}u${voffset -4}${font}${color6}${offset 5}${sysname}${offset 5}${kernel}${alignr}${machine}
    ${voffset 2}${font StyleBats:size=10}${color2}A${voffset -1}${font}${color6}${offset 5}Intel Quad Core i7 985EE CPU${alignr}${freq_g cpu0}${offset }GHz
    ${voffset 2}${font StyleBats:size=10}${color2}q${voffset -1}${font}${color6}${offset 5}Uptime${alignr}${uptime}
    ${voffset 2}${font StyleBats:size=10}${color2}o${voffset -1}${font}${color6}${offset 5}File${offset 3}System${alignr}${fs_type}
    ##################
    ##  PROCESSORS  ##
    ##################
    ${voffset 6}${font WenQuanYiMicroHei:bold:size=8.75}${color4}PROCESSORS${offset 8}${color8}${voffset -2}${hr 2}${font}
    ${voffset 4}${font StyleBats:size=10}${color2}k${voffset -2}${font}${color6}${offset 2}CPU1${offset 5}${cpu cpu1}%${color7}${alignr 2}${cpubar 4,153 cpu1}
    ${voffset 2}${font StyleBats:size=10}${color2}k${voffset -2}${font}${color6}${offset 2}CPU2${offset 5}${cpu cpu2}%${color7}${alignr 2}${cpubar 4,153 cpu2}
    ${voffset 2}${font StyleBats:size=10}${color2}k${voffset -2}${font}${color6}${offset 2}CPU3${offset 5}${cpu cpu3}%${color7}${alignr 2}${cpubar 4,153 cpu3}
    ${voffset 2}${font StyleBats:size=10}${color2}k${voffset -2}${font}${color6}${offset 2}CPU4${offset 5}${cpu cpu4}%${color7}${alignr 2}${cpubar 4,153 cpu4}
    ${voffset 2}${font StyleBats:size=10}${color2}k${voffset -2}${font}${color6}${offset 2}CPU5${offset 5}${cpu cpu5}%${color7}${alignr 2}${cpubar 4,153 cpu5}
    ${voffset 2}${font StyleBats:size=10}${color2}k${voffset -2}${font}${color6}${offset 2}CPU6${offset 5}${cpu cpu6}%${color7}${alignr 2}${cpubar 4,153 cpu6}
    ${voffset 2}${font StyleBats:size=10}${color2}k${voffset -2}${font}${color6}${offset 2}CPU7${offset 5}${cpu cpu7}%${color7}${alignr 2}${cpubar 4,153 cpu7}
    ${voffset 2}${font StyleBats:size=10}${color2}k${voffset -2}${font}${color6}${offset 2}CPU8${offset 5}${cpu cpu8}%${color7}${alignr 2}${cpubar 4,153 cpu8}
    ##################
    ##  CPU TEMP    ##
    ##################
    ${voffset 5}${font Arial:bold:size=10}${color4}TEMPERATURE${color8}${hr 2}
    ${voffset 2}${font PizzaDude Bullets:size=10}${color2}${font}${color6} CPU Core0 Temp: ${alignr 50}(crit = +80.0°C) ${color0}${alignr 2}${execi 8 sensors | grep -A 1 'Core 0' | cut -c14-21| sed '/^$/d'}
    ${voffset 2}${font PizzaDude Bullets:size=10}${color2}${font}${color6} CPU Core1 Temp: ${alignr 50}(crit = +80.0°C) ${color0}${alignr 2}${execi 8 sensors | grep -A 1 'Core 1' | cut -c14-21| sed '/^$/d'}
    ${voffset 2}${font PizzaDude Bullets:size=10}${color2}${font}${color6} CPU Core2 Temp: ${alignr 50}(crit = +80.0°C) ${color0}${alignr 2}${execi 8 sensors | grep -A 1 'Core 2' | cut -c14-21| sed '/^$/d'}
    ${voffset 2}${font PizzaDude Bullets:size=10}${color2}${font}${color6} CPU Core3 Temp: ${alignr 50}(crit = +80.0°C) ${color0}${alignr 2}${execi 8 sensors | grep -A 1 'Core 3' | cut -c14-21| sed '/^$/d'}
    ${voffset 2}${font PizzaDude Bullets:size=10}${color2}${font}${color6} SYSTEM Temp:    ${alignr 50}(crit = +80.0°C) ${color0}${alignr 2}${execi 8 sensors | grep 'SYS Temp' | cut -c18-25| sed '/^$/d'}
    ${voffset 2}${font PizzaDude Bullets:size=10}${color2}${font}${color6} CPU Casing Temp:${alignr 50}(crit = +80.0°C) ${color0}${alignr 2}${execi 8 sensors | grep 'CPU Casing' | cut -c18-25| sed '/^$/d'}
    ${voffset 2}${font PizzaDude Bullets:size=10}${color2}${font}${color6} Case Temp:      ${alignr 50}(crit = +80.0°C) ${color0}${alignr 2}${execi 8 sensors | grep 'Other Temp' | cut -c18-25| sed '/^$/d'}
    ${voffset 2}${font PizzaDude Bullets:size=10}${color2}${font}${color6} GTX460 Temp:    ${alignr 48}(crit = +80.0°C) ${color0}${alignr 2}+${nvidia temp}.0°C
    #${voffset 2}${font PizzaDude Bullets:size=10}${color2}${font}${color6} GTX460 Temp:    ${alignr 50}(crit = +80.0°C) ${color0}${alignr 2}${execi 8 nvidia-settings -q [gpu:0]/GPUCoreTemp | grep "Attribute"| cut -c46-47}.0°C 
    #${voffset 2}${font PizzaDude Bullets:size=10}${color2}${font}${color6} GTX275 Temp:    ${alignr 50}(crit = +80.0°C) ${color0}${alignr 2}${execi 8 nvidia-settings -q [gpu:1]/GPUCoreTemp | grep "Attribute"| cut -c46-47}.0°C 
    ##################
    ##  Graphics    ##
    ##################
    ${voffset 5}${font Arial:bold:size=10}${color4}GRAPHICS CARDS${color8}${hr 2}
    ${font}${execpi 3600 ~/scripts/conkygraphics.sh}
    ##################
    ##    MEMORY    ##
    ##################
    ${voffset 6}${font WenQuanYiMicroHei:bold:size=8.75}${color4}MEMORY${offset 8}${color8}${hr 2}
    ${voffset 2}${font StyleBats:size=10}${color2}l${voffset -2}${font}${color6}${offset 3}RAM${goto 97}${mem}${goto 133}/${offset 5}${memmax}${alignr}${memperc}%
    ${color7}${alignr 2}${membar 4,230}
    ##################
    ##     HDD      ##
    ##################
    ${voffset 2}${font WenQuanYiMicroHei:bold:size=8.75}${color4}HDD${offset 8}${color8}${hr 2}
    #${voffset 2}${font StyleBats:size=10}${color2}x${voffset -2}${font}${color6}${offset 4}ROOT${goto 95}${fs_used /}${goto 133}/${offset 5}${fs_size /}${alignr}${fs_free_perc /}%
    #${color7}${alignr 2}${fs_bar 4,230 /}
    ${voffset 1}${font StyleBats:size=10}${color2}x${voffset -2}${font}${color6}${offset 4}HOME${goto 95}${fs_used /home}${goto 133}/${offset 5}${fs_size /home}${alignr}${fs_free_perc /home}%
    ${color7}${alignr 2}${fs_bar 4,230 /home}
    ${voffset 1}${font StyleBats:size=10}${color2}x${voffset -2}${font}${color6}${offset 4}DATA${goto 95}${fs_used /media/Data}${goto 133}/${offset 5}${fs_size /media/Data}${alignr}${fs_free_perc /media/Data}%
    ${color7}${alignr 2}${fs_bar 4,230 /media/Data}
    ${voffset 1}${font StyleBats:size=10}${color2}x${voffset -2}${font}${color6}${offset 4}MYBOOK${goto 95}${fs_used /media/MyBook}${goto 133}/${offset 5}${fs_size /media/MyBook}${alignr}${fs_free_perc /media/MyBook}%
    ${color7}${alignr 2}${fs_bar 4,230 /media/MyBook}
    #${voffset 1}${font StyleBats:size=10}${color2}4${voffset -2}${font}${color6}${offset 4}SWAP${goto 95}${swap}${goto 133}/${offset 5}${swapmax}${alignr}${swapperc}%
    #${color7}${alignr 2}${swapbar 4,230}
    ##################
    # TOP PROCESSES ##
    ##################
    ${voffset 3}${font WenQuanYiMicroHei:bold:size=8.75}${color4}TOP PROCESSES${offset 8}${color8}${hr 2}
    ${voffset 2}${font StyleBats:size=10}${color1}h${voffset -3}${font}${color6}${offset 5}${top_mem name 1}${goto 115}${top_mem mem_res 1}${alignr}${top_mem mem 1}%
    ${voffset 2}${font StyleBats:size=10}${color1}h${voffset -3}${font}${color6}${offset 5}${top_mem name 2}${goto 115}${top_mem mem_res 2}${alignr}${top_mem mem 2}%
    ${voffset 2}${font StyleBats:size=10}${color1}h${voffset -3}${font}${color6}${offset 5}${top_mem name 3}${goto 115}${top_mem mem_res 3}${alignr}${top_mem mem 3}%
    ${voffset 2}${font StyleBats:size=10}${color1}h${voffset -3}${font}${color6}${offset 5}${top_mem name 4}${goto 115}${top_mem mem_res 4}${alignr}${top_mem mem 4}%
    ${voffset 2}${font StyleBats:size=10}${color1}h${voffset -3}${font}${color6}${offset 5}${top_mem name 5}${goto 115}${top_mem mem_res 4}${alignr}${top_mem mem 5}%
    ${voffset 2}${font StyleBats:size=10}${color1}h${voffset -3}${font}${color6}${offset 5}${top_mem name 6}${goto 115}${top_mem mem_res 4}${alignr}${top_mem mem 6}%
    ${voffset 2}${font StyleBats:size=10}${color1}h${voffset -3}${font}${color6}${offset 5}${top_mem name 7}${goto 115}${top_mem mem_res 4}${alignr}${top_mem mem 7}%
    ${voffset 2}${font StyleBats:size=10}${color1}h${voffset -3}${font}${color6}${offset 5}${top_mem name 8}${goto 115}${top_mem mem_res 4}${alignr}${top_mem mem 8}%
    ${voffset 2}${font StyleBats:size=10}${color1}h${voffset -3}${font}${color6}${offset 5}${top_mem name 9}${goto 115}${top_mem mem_res 4}${alignr}${top_mem mem 9}%
    ${voffset 2}${font StyleBats:size=10}${color1}h${voffset -3}${font}${color6}${offset 5}${top_mem name 10}${goto 115}${top_mem mem_res 4}${alignr}${top_mem mem 10}%
    ##################
    ##   NETWORK    ##
    ##################
    ${voffset 6}${font WenQuanYiMicroHei:bold:size=8.75}${color4}NETWORK${offset 8}${color8}${hr 2}
    #${voffset 2}${font PizzaDudeBullets:size=10}${color2}a${font}${color6}${offset 5}Private${offset 3}IP${alignr}${addr eth0}
    #${font PizzaDudeBullets:size=10}${color2}a${font}${color6}${offset 5}Public${offset 7}IP${alignr}${execi 600 wget -q -O - checkip.dyndns.org | sed -e 's/[^[:digit:]\|.]//g'}
    ${voffset 4}${font PizzaDudeBullets:size=10}${color2}T${font}${color6}${offset 5}Down${alignr}${downspeed eth0}
    ${font PizzaDudeBullets:size=10}${color2}N${font}${color6}${offset 5}Up${alignr}${upspeed eth0}
    ${voffset 4}${font PizzaDudeBullets:size=10}${color2}T${font}${color6}${offset 5}Downloaded${alignr}${totaldown eth0}
    ${font PizzaDudeBullets:size=10}${color2}N${font}${color6}${offset 5}Uploaded${alignr}${totalup eth0}
    ##################
    ##    MAIL      ##
    ##################
    ${voffset 5}${font WenQuanYiMicroHei:bold:size=8.75}${color4}EMAIL${offset 8}${color8}${voffset -2}${hr 2}
    ${color6}Inbox  ${color0} ${alignr} 
    ${execpi 5 python ~/scripts/gmail_parser.py}
    #${color F8DF58}${font FreeSans:size=14}Google Reader${font}
    #${color2}${execi 300 conkyGoogleReader -S -u secret@gmail.com -p Secret| fold -s -w44}
    ##################
    ##   CALENDAR   ##
    ##################
    #${voffset 6}${font WenQuanYiMicroHei:bold:size=8.75}${color4}DATE${offset 8}${color8}${voffset -2}${hr 2}${font}
    #${voffset 18}${font LiberationMono:size=8}${color3}${alignc 60}${time %A}${font}
    #${voffset -3}${font LiberationMono:size=22}${color4}${alignc 60}${time %d}${font}
    #${voffset -1}${font LiberationMono:size=8}${color3}${alignc 60}${time %B}${font}
    #${voffset -3}${font LiberationMono:size=8}${color3}${alignc 60}${time %Y}${font}
    #${voffset -79}${font CutOutsFor3DFX:size=64}${color8}${alignc 97}2${font}
    #${voffset -69}${font LiberationMono:size=8}${color3}${execpi 1800 VinDSL_Cal_4= cal | sed '1d' | sed s/^/"\$\{offset 97"\}/ | sed '/^ *$/d' | sed 's/\<'"$(date +%-d)"'\>/${color4}&${color3}/'}${font}
    ##################
    ##   CALENDAR   ##
    ##################
    ${voffset 15}${font WenQuanYiMicroHei:bold:size=8.75}${color4}DATE${offset 8}${color8}${voffset -2}${hr 2}
    ${voffset 8}${font LiberationMono:size=12}${color4}${offset 5}${time %A}  ${time %d}${time %B}${time %Y}${font}
    ${voffset 8}${font LiberationMono:size=12}${color3}${execpi 1800 VinDSL_Cal3= cal | sed '1d' | sed s/^/"\$\{offset 15"\}/ | sed '/^ *$/d' | sed 's/\<'"$(date +%-d)"'\>/${color4}&${color3}/'}
    ##################
    ##     TIME     ##
    ##################
    ${voffset 1}${font WenQuanYiMicroHei:bold:size=8.75}${color4}TIME${offset 8}${color8}${voffset -2}${hr 2}
    ${if_match ${time %l}<=9}${voffset -4}${font RadioSpace:size=32}${color3}${offset 25}${time %l:%M%p}${else}${if_match ${time %l}>=10}${voffset -4}${font RadioSpace:size=32}${color3}${offset 25}${time %l:%M%p}${endif}${endif}

  8. #15748
    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 mrpeachy View Post
    i didnt know about the draw_hook_pre and post to get 2 scripts running at the same time... handy

    your going to have to edit the ba graph lua script... something like this (just need to change the main_bars function)

    Code:
    function conky_main_bars()
        bars_settings={    
            {
                name="",
                arg=io.popen("conkyRhythmbox --datatype=PP"):read(),
                max=100,
                alarm=50,
                bg_colour={0xFFFFFF,0.25},
                fg_colour={0x00FF00,0.6},
                alarm_colour={0xFF0000,0.6},
                x=9,y=295,
                blocks=80,
                space=1,
                height=2,width=8,
                angle=90,
                smooth=true,
                mid_colour={{0.5,0xFFFF00,0.6}}    
                },
         }        
    -------------END OF PARAMETERS--------------
    
    running=conky_parse('${if_running rhythmbox}1${else}0${endif}')
    if running==1 then
        
        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)    
        --prevent segmentation error when reading cpu state
        if tonumber(conky_parse('${updates}'))>3 then
            for i in pairs(bars_settings) do
                
                draw_multi_bar_graph(bars_settings[i])
                
            end
        end
        cairo_destroy(cr)
        cairo_surface_destroy(cs)
    end
    end
    you could also edit the background lua in a similar way so that it shortens when rhythmbox isnt running
    After trying the above the .lua throws errors and the bar does not appear.
    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. #15749
    Join Date
    Oct 2009
    Location
    Under a rock
    Beans
    Hidden!

    Re: Post your .conkyrc files w/ screenshots

    Quote Originally Posted by foutes View Post
    After trying the above the .lua throws errors and the bar does not appear.
    ah...well I didn't actually test it.... post the errors if you would

    if its along the lines of tried to evaluate a string then try a tonumber operation on the conky parse

    Code:
    running=tonumber(conky_parse('${if_running rhythmbox}1${else}0${endif}'))
    and just to check... you need the rest of the script too... just switch out the old
    function conky_main_bars() with the updated function
    Last edited by mrpeachy; January 6th, 2011 at 06:57 AM.

  10. #15750
    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 mrpeachy View Post
    ah...well I didn't actually test it.... post the errors if you would

    if its along the lines of tried to evaluate a string then try a tonumber operation on the conky parse

    Code:
    running=tonumber(conky_parse('${if_running rhythmbox}1${else}0${endif}'))
    and just to check... you need the rest of the script too... just switch out the old
    function conky_main_bars() with the updated function

    Here is the error.The last line repeats.
    Code:
    linus@linus-laptop:~$ conky -c ~/.conkyrc1 &
    [1] 7326
    linus@linus-laptop:~$ Conky: llua_load: /home/linus/scripts/.bargraph_small2.lua:510: 'end' expected (to close 'function' at line 69) near '<eof>'
    Conky: desktop window (26000a9) is subwindow of root window (fe)
    Conky: window type - override
    Conky: drawing to created window (0x4c00001)
    Conky: drawing to double buffer
    Conky: llua_do_call: function conky_main_bars execution failed: attempt to call a nil value

    gives the same error
    Code:
    running=tonumber(conky_parse('${if_running rhythmbox}1${else}0${endif}'))
    Last edited by foutes; January 6th, 2011 at 07:46 AM.
    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)

Page 1575 of 2343 FirstFirst ... 5751075147515251565157315741575157615771585162516752075 ... 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
  •