You are not logged in.
Almost done..
Hmm.. intellicast is reporting wrong time... need to look into that.
Last edited by falldown (2013-09-05 03:32:19)
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
^^ As always fantastic work falldown
Conky | SMXI HowTo | Super Grub | VastOnes GMB HowTo | VSIDO
Offline
@iwfitz Thank you sir.
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
I remember having this issue and fixing it but for the life of me I cant remember what I did.......
Ive got conky calling an image and a cpu bar being called with mrpeachys allcombined.lua but the lua bar always wants to be behind the image. Hopefully someone can help me with this
http://en.zimagez.com/miniature/screenshot-09042013-061819pm.png
You could try to add image drawing function to allcombined.lua and call it like gradbar.
Debian Sid (Minted) x86_64/3.12-10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Intel X3100
Lenovo T61, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
Linux user No.: 483055 | Conky Pitstop
Offline
Worked like a charm Inidoro Pereyra. Thanks a bunch, Im bookmarking that conky of yours.
You're very welcome. It's a pleasure to be able to help somebody, for a change...
Offline
^^ As always fantastic work falldown
BIG +1 here. That thing is freaking gorgeous.
Offline
lionhead wrote:how do you realize the buttons that show the title? the glossy buttons? could you please share the could you are using!
I am using Peachy bargraph.lua and drawing a 3 step gradient to accomplish the glass effect.
Here is bargraph.lua..--easy compound shape drawing with gradients by mrpeachy 8/13/12 require 'cairo' function conky_main_bars() 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 --######################################################################################################### --[[subtab={} instructions ############################################################################# each step of the drawn shape must be in a sub table first entry must be d="start", set x and y of start point of shape other entried can be these types d="line" , draws a line to set coordinates,x and y d="rline" , draws a relative line starting at the last set point of the shape, x and y values are relative to this point d="arc_c" , draws an clockwise arc for the set amount of degrees starting at the last set point of the shape d="arc_a" , draws an anticlockwise arc for the set amount of degrees starting at the last set point of the shape for arc_c and arc_a you need to set a circle quandrant where the arc will start q=1 is the top right quarter of the circle q=2 is the bottom right quarter q=3 is bottom left quarter q=4 is the top left quarter r is the radius of the circle degs is the number of degrees to be drawn EG: subtab={--start of sub path table {d="start",x=100,y=100}, {d="rline",x=150,y=0}, {d="arc_c",q=1,r=50,degs=90}, {d="rline",x=0,y=25}, {d="rline",x=-50,y=0}, {d="rline",x=0,y=-10}, {d="arc_a",q=1,r=15,degs=90}, {d="line",x=100,y=150}, }--end of sub path table --NOTE setting up subtab by ityself does not draw anything, subtab is then sent to the function grec in the table below --grec settings ###################################################################################### g=1 --1=vertical, 2 = horizontal, 5=angled, 0=no gradient fill in color 1, 3=outline only in color1, 4=fill col1, outline col2 (default = 1) x=100 --default =0 y=100 --default =0 w=50 --default =50 h=100 --default =50 grad={} --set colors, alphas and gradient positions in seperate tables within a containing table. subtables must be seperated by commas --subtables contain -- {c=color,a=alpha,p=position} for position, in a vertical gradient 0 is the top, 1 is the bottom, 0.5 is half way etc -- no defaults gan=45 --angle of gradient for g=5 lw=1 --line width for g=3 or g=4 sub=1 --draw sub path shape, 1=draw, 0=don't draw (default is 0) db=1 --draw boundary, 1 for draw, 0 no draw (default is 0) - this can help in getting your shape positioned within the gradient rectangle correctly subtab=subtab --you could enter the contents of subtab directly in here but for ease of use i have set up subtab above EG: grec({g=2,x=100,y=100,w=200,h=80,grad={{c=0xffff00,a=1,p=0},{c=0xff0000,a=1,p=0.5}},sub=1,db=0,subtab=subtab}) --#########################################################################################################--]] end-- if updates>5 cairo_destroy(cr) cairo_surface_destroy(cs) cr=nil return "" end--end main function function grec(gtab)--################################################################################# local function color(col,alp) return ((col / 0x10000) % 0x100) / 255, ((col / 0x100) % 0x100) / 255, (col % 0x100) / 255, alp end local function pt(px,py,prad,pdeg) local ppo=(math.pi/180)*pdeg local px1=px+prad*(math.sin(ppo)) local py1=py-prad*(math.cos(ppo)) return px1,py1 end local function sub_draw(sdtab) cdsx={} cdsy={} dr={} limit=#sdtab for i=1,limit do local d=sdtab[i].d if d=="start" then table.insert(dr,"cairo_move_to(cr,"..tostring(sdtab[i].x)..","..tostring(sdtab[i].y)..");") table.insert(cdsx,sdtab[i].x) table.insert(cdsy,sdtab[i].y) end if d=="line" then table.insert(dr,"cairo_line_to(cr,"..tostring(sdtab[i].x)..","..tostring(sdtab[i].y)..");") table.insert(cdsx,sdtab[i].x) table.insert(cdsy,sdtab[i].y) end if d=="rline" then table.insert(dr,"cairo_rel_line_to(cr,"..tostring(sdtab[i].x)..","..tostring(sdtab[i].y)..");") table.insert(cdsx,cdsx[i-1]+sdtab[i].x) table.insert(cdsy,cdsy[i-1]+sdtab[i].y) end if d=="aline" then --pt(px,py,prad,pdeg) local alx,aly=pt(cdsx[i-1],cdsy[i-1],sdtab[i].l,sdtab[i].a) table.insert(dr,"cairo_line_to(cr,"..tostring(alx)..","..tostring(aly)..");") table.insert(cdsx,alx) table.insert(cdsy,aly) end if d=="arc" then local ang1=(math.pi/180)*((sdtab[i].a1)-90) local ang2=(math.pi/180)*((sdtab[i].a2)-90) local rad=sdtab[i].r local x=sdtab[i].x local y=sdtab[i].y table.insert(dr,"cairo_arc(cr,"..tostring(x)..","..tostring(y)..","..tostring(rad)..","..tostring(ang1)..","..tostring(ang2)..");") local ang2=(math.pi/180)*(sdtab[i].a2) local ax=0+rad*(math.sin(ang2)) local ay=0-rad*(math.cos(ang2)) table.insert(cdsx,x+ax) table.insert(cdsy,y+ay) end if d=="arc_c" then local q=sdtab[i].q local rad=sdtab[i].r if q==4 then ang1=(math.pi/180)*(270-90) x=cdsx[i-1]+rad y=cdsy[i-1] elseif q==1 then ang1=(math.pi/180)*(360-90) x=cdsx[i-1] y=cdsy[i-1]+rad elseif q==2 then ang1=(math.pi/180)*(90-90) x=cdsx[i-1]-rad y=cdsy[i-1] elseif q==3 then ang1=(math.pi/180)*(180-90) x=cdsx[i-1] y=cdsy[i-1]-rad end local ang2=ang1+((math.pi/180)*(sdtab[i].degs)) table.insert(dr,"cairo_arc(cr,"..tostring(x)..","..tostring(y)..","..tostring(rad)..","..tostring(ang1)..","..tostring(ang2)..");") local ang2=ang2+((math.pi/180)*90) local ax=0+rad*(math.sin(ang2)) local ay=0-rad*(math.cos(ang2)) table.insert(cdsx,x+ax) table.insert(cdsy,y+ay) end if d=="arc_a" then local q=sdtab[i].q local rad=sdtab[i].r if q==4 then ang1=(math.pi/180)*(360-90) x=cdsx[i-1] y=cdsy[i-1]+rad elseif q==1 then ang1=(math.pi/180)*(90-90) x=cdsx[i-1]-rad y=cdsy[i-1] elseif q==2 then ang1=(math.pi/180)*(180-90) x=cdsx[i-1] y=cdsy[i-1]-rad elseif q==3 then ang1=(math.pi/180)*(270-90) x=cdsx[i-1]+rad y=cdsy[i-1] end local ang2=ang1-(math.pi/180)*(sdtab[i].degs) table.insert(dr,"cairo_arc_negative(cr,"..tostring(x)..","..tostring(y)..","..tostring(rad)..","..tostring(ang1)..","..tostring(ang2)..");") local ang2=ang2+((math.pi/180)*90) local ax=0+rad*(math.sin(ang2)) local ay=0-rad*(math.cos(ang2)) table.insert(cdsx,x+ax) table.insert(cdsy,y+ay) end end return table.concat(dr) end--of local function sub_draw local g=gtab.g or 1 local x=gtab.x or 0 local y=gtab.y or 0 local w=gtab.w or 50 local h=gtab.h or 50 local r=gtab.r or 50 local rgx=gtab.rgx or x local rgy=gtab.rgy or y local grad=gtab.grad or {{c=0xffffff}} local gan=gtab.gan or 45 local lw=gtab.lw or 1 local sub=gtab.sub or 0 local db=gtab.db or 0 local subtab=gtab.subtab if db==1 and g~=6 then cairo_set_source_rgba (cr,1,1,1,1) cairo_set_line_width (cr,1) cairo_rectangle (cr,x,y,w,h) cairo_stroke (cr) elseif db==1 and g==6 then cairo_set_source_rgba (cr,1,1,1,1) cairo_set_line_width (cr,1) cairo_arc (cr,x,y,r,0,2*math.pi) cairo_stroke (cr) end --########################################## if g==1 or g==2 or g==5 or g==6 then --rectangular gradients if g==1 then pat = cairo_pattern_create_linear (0,y,0,y+h); elseif g==2 then pat = cairo_pattern_create_linear (x,0,x+w,0); elseif g==5 then --calculate hypotenuse across middle of rectange local hyp=math.sqrt((w^2)+(h^2)) local rad=hyp/2 --center point of rectangle local crx=x+(w/2) local cry=y+(h/2) --calculate point 1 local point=(math.pi/180)*gan local x1=crx+rad*(math.sin(point)) local y1=cry-rad*(math.cos(point)) --calculate point 2 local point=(math.pi/180)*(gan+180) local x2=crx+rad*(math.sin(point)) local y2=cry-rad*(math.cos(point)) --gradient pat = cairo_pattern_create_linear (x1,y1,x2,y2); elseif g==6 then pat = cairo_pattern_create_radial (rgx, rgy, 0, x, y, r); end local gnum=#grad for i=1,gnum do cairo_pattern_add_color_stop_rgba (pat,grad[i].p,color(grad[i].c,grad[i].a)); end--for loop if sub==1 then cairo_save (cr) cairo_clip(cr) cairo_new_sub_path(cr) local drawstring=sub_draw(subtab) loadstring(drawstring)() cairo_restore (cr) end cairo_set_source (cr, pat); cairo_fill(cr); cairo_pattern_destroy (pat); --########################################### elseif g==0 and sub==1 then --non gradient local drawstring=sub_draw(subtab) loadstring(drawstring)() cairo_set_source_rgba (cr,color(grad[1].c,grad[1].a)); cairo_fill(cr) elseif g==3 and sub==1 then local drawstring=sub_draw(subtab) loadstring(drawstring)() cairo_set_line_width(cr,lw) cairo_set_source_rgba (cr,color(grad[1].c,grad[1].a)); cairo_close_path (cr) cairo_stroke(cr); elseif g==4 and sub==1 then local drawstring=sub_draw(subtab) loadstring(drawstring)() cairo_set_source_rgba (cr,color(grad[1].c,grad[1].a)); cairo_fill_preserve(cr); cairo_set_line_width(cr,lw) cairo_set_source_rgba (cr,color(grad[2].c,grad[2].a)); cairo_close_path (cr) cairo_stroke(cr); elseif g==0 and sub~=1 then cairo_rectangle (cr,x,y,w,h) cairo_set_source_rgba (cr,color(grad[1].c,grad[1].a)); cairo_fill(cr); elseif g==3 and sub~=1 then cairo_rectangle (cr,x,y,w,h) cairo_set_line_width(cr,lw) cairo_set_source_rgba (cr,color(grad[1].c,grad[1].a)); cairo_close_path (cr) cairo_stroke(cr); elseif g==4 and sub~=1 then cairo_rectangle (cr,x,y,w,h) cairo_set_source_rgba (cr,color(grad[1].c,grad[1].a)); cairo_fill_preserve(cr); cairo_set_line_width(cr,lw) cairo_set_source_rgba (cr,color(grad[2].c,grad[2].a)); cairo_close_path (cr) cairo_stroke(cr); --radial gradients elseif g==6 then pat = cairo_pattern_create_radial (cx, cy, crad-(clw/2)-2,-- cx, cy, crad+(clw/2)+4); cairo_pattern_add_color_stop_rgba (pat, 0, 0, 0, 0, 1); cairo_pattern_add_color_stop_rgba (pat, 0.5, 0, 0, 0, 0); cairo_pattern_add_color_stop_rgba (pat, 1, 0, 0, 0, 1); cairo_set_source (cr, pat); cairo_arc (cr, cx, cy, crad+(clw/2), 0, 2*math.pi); cairo_fill (cr); cairo_pattern_destroy (pat); end--of g type end--of function grec
And here is my glass effect settings..
--###################################################################### subtab={ {d="start",x=0,y=sysb+5}, {d="rline",x=200,y=0}, {d="arc_c",q=1,r=15,degs=90}, {d="arc_c",q=2,r=15,degs=90}, {d="rline",x=-200,y=0}, } grec({g=1,x=0,y=sysb+5,w=180,h=30,grad={{c=0xFFFFFF,a=0.7,p=0},{c=0xFFFFFF,a=0.0,p=0.5},{c=0x000000,a=0.7,p=1}},sub=1,db=0,subtab=subtab}) --######################################################################
I will post my complete conky when finished lionhead.
i would like to use a similar bargraph together with my onliner. but unfortunately the bargraph is above the text
this is my oneliner:
at the moment i'm using both scripts this way:
#-----LUA
lua_load ~/bazinga/bazinga.lua
lua_draw_hook_pre weather
lua_load ~/v9000/oneliner.lua
lua_load ~/v9000/bargraph.lua
lua_draw_hook_post main_bars
i only use lua! i do not use additional code within the conky-config-file.
Offline
lionhead you could combine all of your output.. Including barograph into one config.lua file.
That's how I do all of my conkys now. I too run everything in Lua.. Seems to be less resource hungry.
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
BIG +1 here. That thing is freaking gorgeous.
Thank you!! Peachy writes the scripts and I try to make them perdy.
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
Almost done..
http://s7.postimg.org/4gv8044tz/2013_09_04_1378351578_1440x900_scrot.jpg
Hmm.. intellicast is reporting wrong time... need to look into that.
I must have been asleep at the wheel ... that's really cool!
So IP's +1 and my +1 = +10
01010011011011110111001001110010011110010010110000100000010010010010000001100011011011110111010101101100011001000010000001101110011011110111010000100000011010000110010101101100011100000010000001101101011110010111001101100101011011000110011000100001
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
I am asleep at the wheel when I make these conkys!
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
You could try to add image drawing function to allcombined.lua and call it like gradbar.
Now thats a good idea..... something to work on!
Conky | SMXI HowTo | Super Grub | VastOnes GMB HowTo | VSIDO
Offline
Hi, i'm new here (althrough i've been reading in this topic for a while)
I'm making my first conky skin but running into trouble O:)
I'm on:
Linux mint 15 (cinnamon) 64bit
conky latest version
I want:
To get the sound volume form the system
Problem:
i now use:
amixer get Master | awk -F'[]%[]' '/%/ {if ($7 == "off") { print "mute" } else { print $2"%" }}'
the code works perfect (found it on the internet, likely it was here) but the sound percentage is not what i expected. When i see the volume in cinnamon it indicates another number, i've looked it up and this is the cause (as far as i know): http://us.generation-nt.com/answer/bug- … 03092.html (tl:dr the use a mapping that's not that common)
So... as you have probably guessed right now i want the sound volume % (mapping) that is used in cinnamon and not the "odd" one from amixer (because i'm not used to it and sometimes very different from the mapping i'm used to -> confusing situations)
Anyone got an idea?
ps: getting the sound volume from a media player is not an option because i don't want it running in the background for just getting the volume
Last edited by iami (2013-09-06 14:43:43)
Offline
I went to the link you provided and in response "#2 Takashi Iwai" it pretty well explains things.
Just a thought but
Basically it's like partition sizes, some apps use 1000 bytes for a GB some 1024 ... therefor some leeway is needed.
Look at gparted ... it reports GB when you look at it, but to create a partition it wants the values in MB ( @ 1024 )
Thunar tells me:
/home/sector11/TeoBigusGeekus_Conky_Weather_Scripts_10-8-13.tar.gz is 7.4MB
Thunar's custom action "HowBig" says it's: 7.1MB
du -chs %N | zenity --text-info
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
I know, but it is kinda annoying because amixer shows 30% and cinnamon 17%, 52% vs 29% ect.. the difference is big. It's not the end of the world but i can't believe there is no place where i can grab cinnamon's sound volume. (or calculate it like cinnamon does)
Offline
@iami
what is the app giving you the volume in cinnamon? Check it's man page and see if it has command line options. If so, you can use those in your conky instead of amixer.
"It does not require many words to speak the truth." - Chief Joseph, Nez Perce tribe
Offline
Offline
I know, but it is kinda annoying because amixer shows 30% and cinnamon 17%, 52% vs 29% ect.. the difference is big. It's not the end of the world but i can't believe there is no place where i can grab cinnamon's sound volume. (or calculate it like cinnamon does)
check this
pacmd list-sinks | awk '/volume: 0:/ {print $3}'
Debian Sid (Minted) x86_64/3.12-10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Intel X3100
Lenovo T61, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
Linux user No.: 483055 | Conky Pitstop
Offline
@jing
Nice looking set up.
Is that awesome wm? If so, how about sharing the configs here --> http://crunchbang.org/forums/viewtopic. … 11796&p=11
"It does not require many words to speak the truth." - Chief Joseph, Nez Perce tribe
Offline
@jing
Nice looking set up.
Is that awesome wm? If so, how about sharing the configs here --> http://crunchbang.org/forums/viewtopic. … 11796&p=11
it is awesomewm and done.
Offline
@iami
what is the app giving you the volume in cinnamon? Check it's man page and see if it has command line options. If so, you can use those in your conky instead of amixer.
Well i've no idea, it's just the volume indicated in the taskbar (by an applet of cinnamon itself)
(i'm relatively new to linux)
check this
pacmd list-sinks | awk '/volume: 0:/ {print $3}'
THANKS! That's exactly what i was looking for, works perfect!
Offline
A little more progress.
Left side conky closed..
System button opened..
CPU button opened..
MEM button opened..
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
A little more progress.
WOW!!!! Now that's nice.... Is that ADcomp's "ADeskBar" I see in there?
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
It sure is.. I believe it will be a permanent addition.
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
It sure is.. I believe it will be a permanent addition.
It certainly accents that interactive conky you have going!
Behold the Interactive Conky Master; Falldown!
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat