SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#2076 2012-07-09 03:40:45

sqlpython
#! Die Hard
From: New England
Registered: 2011-11-28
Posts: 931

Re: Conky v1.9 Thread

If you are interested in one of the conkys just let me know.

@Sector11
One?  I want them All!
Also, Your Location would that be NH? ... Ct here..


OHCG #!, Jessie,, Siduction-13.1Slackware 14Bridge,, Sabayon 13.4,

Offline

Be excellent to each other!

#2077 2012-07-09 08:38:06

Dodge ram
#! CrunchBanger
Registered: 2011-04-26
Posts: 140

Re: Conky v1.9 Thread

@S11, I just got done searching all kinds of conky sites and looked at uncountable config files. Every conky I find that has rings in it uses the conkyrc to show the info. Maybe it cannot be done, I don't know. I don't see why not. I will wait until mrpeachy see the post or I'll P.M. him later. Thanks for looking into that for me. Reference post # 2063

Offline

#2078 2012-07-09 12:52:06

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: Conky v1.9 Thread

Dodge ram wrote:

I am confused about something. Surprise surprise. I need to put the outputs of Home, Ram ect in my rings. And I am not sure how the best way to do it. I could do it in conky with {goto  } and {voffset  } but that wouldn't be right. I know there is a way to do it in lua and that would be the right way to do it, but I can't figure it out. I have read thru the lua tutorial but It left me scratching my head.
Conky line
...
If someone can help me get started on that it wuld be great. Thanks

You can either use ${goto} and ${voffset} in the .conkyrc to position the text or you can draw it with lua using conky_parse() to get the information into the lua script.

Offline

#2079 2012-07-09 13:09:45

Dodge ram
#! CrunchBanger
Registered: 2011-04-26
Posts: 140

Re: Conky v1.9 Thread

I am debating what direction I want to take this. I might go the easy route and {goto } and {voffset } but make it 2 separate conkys and lua. I think if I do that it will make it easier to do what I have planned.

Offline

#2080 2012-07-09 13:30:28

dk75
#! Junkie
Registered: 2012-06-14
Posts: 250

Re: Conky v1.9 Thread

Dodge ram wrote:

I am confused about something. Surprise surprise. I need to put the outputs of Home, Ram ect in my rings. And I am not sure how the best way to do it. I could do it in conky with {goto  } and {voffset  } but that wouldn't be right. I know there is a way to do it in lua and that would be the right way to do it, but I can't figure it out. I have read thru the lua tutorial but It left me scratching my head.


You have example in your LUA how to load values from Conky to LUA so just add some more:

num=conky_parse("${fs_used_perc /home}")
used=conky_parse("${fs_used /home}")
size=conky_parse("${fs_size /home}")

Then you just need to print that text in desired position, and that's LUA Cairo function which do that:

 function conky_print_text(cr, x, y, _text, color, alpha, font, font_size, style, weight, alignHorizontal, alignVertical) -- style = [normal(default)|italic|oblique]; weight = [normal(default)|bold]; alignHorizontal = [left(default)|center|right]; alignVertical = [top|center|bottom(default)]
     local function conky_rgb2rgba(colour,alpha) -- colour = hex color code, alpha = float [0.0 - 1.0] transparency factor
         return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha -- returns color used by "cairo_set_rgba()" function
     end

     if style == "italic" then style = CAIRO_FONT_SLANT_ITALIC
     elseif style == "oblique" then style = CAIRO_FONT_SLANT_OBLIQUE
     else style = CAIRO_FONT_SLANT_NORMAL end
     
     if weight == "bold" then weight = CAIRO_FONT_WEIGHT_BOLD
     else weight = CAIRO_FONT_WEIGHT_NORMAL end
     
     local extents = cairo_text_extents_t:create() -- initialize text_extents structure (generic, a must be for following functions)
     cairo_save(cr)
     
     cairo_select_font_face(cr, font, style, weight)
     cairo_set_font_size(cr, font_size)
    cairo_set_source_rgba(cr, conky_rgb2rgba(color, alpha))
    
     cairo_text_extents(cr, _text, extents)
     
      if alignHorizontal == "center" then alignHorizontal = tonumber(extents.width/2 * -1)
      elseif alignHorizontal == "right" then alignHorizontal = tonumber(extents.width * -1)
      else alignHorizontal = 0 end
      
     if alignVertical == "top" then alignVertical = tonumber(extents.height)
     elseif alignVertical == "center" then alignVertical = tonumber(extents.height/2)
     else alignVertical = 0 end
     
     cairo_move_to(cr, x + alignHorizontal, y + alignVertical)
     cairo_show_text(cr, _text)
     cairo_stroke(cr)
     cairo_restore(cr)
 end

then use it in LUA code as:

conky_print_text(cr, 20, 20, "Home", 0x000000, 1, "DejaVu Sans Mono", 16, "normal", "bold", "left", "bottom" )
conky_print_text(cr, 20+95, 20, used, 0x000000, 1, "DejaVu Sans Mono", 16, "normal", "bold", "left", "bottom" )
conky_print_text(cr, 20+133, 20, "/" .. size, 0x000000, 1, "DejaVu Sans Mono", 16, "normal", "bold", "left", "bottom" )
conky_print_text(cr, 20+200, 20, num .. " %", 0x000000, 1, "DejaVu Sans Mono", 16, "normal", "bold", "left", "bottom" )

Of course you need to figure out proper font size and positioning for your layout but that is your problem now ;P

And that's how this conky_print_text function works:

aalwZLsc.png

aahTMMXg.png

aacU0pZu.png

aad7E8Gn.png

aafAybej.png

aahc8Sde.png


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

#2081 2012-07-09 14:35:34

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: Conky v1.9 Thread

^ I think that function is way more complicated than is needed for his purposes.
It does have good examples of how to do text alignment in lua though.

I would also use "extents.x_advance" instead of "extents.width" since "extents.width" ignores whitespace characters so you will have problems with any line with a space in it.

Here is the explanation from the cairo manual.

Note that whitespace characters do not directly contribute to the size of the rectangle (extents.width and extents.height). They do contribute indirectly by changing the position of non-whitespace characters. In particular, trailing whitespace characters are likely to not affect the size of the rectangle, though they will affect the x_advance and y_advance values.

Offline

#2082 2012-07-09 16:24:37

dk75
#! Junkie
Registered: 2012-06-14
Posts: 250

Re: Conky v1.9 Thread

arclance wrote:

^ I think that function is way more complicated than is needed for his purposes.

It is not. Only thing that you would not include if you do everything by hand are IF statements that determine text properties. It's not much a complication for a code so... removing it and hard-code properties into code wouldn't change a bit of this function complication.


arclance wrote:

I would also use "extents.x_advance" instead of "extents.width" since "extents.width" ignores whitespace characters so you will have problems with any line with a space in it.

Ah... didn't done much texting in LUA so for me it wasn't problem to solve but as this function is generic for any use then ok, changed to x_advance and y_bearing for text measurement.

 function conky_print_text(cr, x, y, _text, color, alpha, font, font_size, style, weight, alignHorizontal, alignVertical) -- style = [normal(default)|italic|oblique]; weight = [normal(default)|bold]; alignHorizontal = [left(default)|center|right]; alignVertical = [top|center|bottom(default)]
     local function conky_rgb2rgba(colour,alpha) -- colour = hex color code, alpha = float [0.0 - 1.0] transparency factor
         return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha -- returns color used by "cairo_set_rgba()" function
     end

     if style == "italic" then style = CAIRO_FONT_SLANT_ITALIC
     elseif style == "oblique" then style = CAIRO_FONT_SLANT_OBLIQUE
     else style = CAIRO_FONT_SLANT_NORMAL end
     
     if weight == "bold" then weight = CAIRO_FONT_WEIGHT_BOLD
     else weight = CAIRO_FONT_WEIGHT_NORMAL end
     
     local extents = cairo_text_extents_t:create() -- initialize text_extents structure (generic, a must be for following functions)
     cairo_save(cr)
     
     cairo_select_font_face(cr, font, style, weight)
     cairo_set_font_size(cr, font_size)
    cairo_set_source_rgba(cr, conky_rgb2rgba(color, alpha))
    
     cairo_text_extents(cr, _text, extents)
     
      if alignHorizontal == "center" then alignHorizontal = tonumber(extents.x_advance/2)
      elseif alignHorizontal == "right" then alignHorizontal = tonumber(extents.x_advance)
      else alignHorizontal = 0 end)
      else alignHorizontal = 0 end
      
     if alignVertical == "top" then alignVertical = tonumber(extents.y_bearing)
     elseif alignVertical == "center" then alignVertical = tonumber(extents.y_bearing/2)
     else alignVertical = 0 end
     
     cairo_move_to(cr, x-alignHorizontal, y-alignVertical)
     cairo_show_text(cr, _text)
     cairo_stroke(cr)
     cairo_restore(cr)
 end

Last edited by dk75 (2012-07-09 16:25:34)


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

#2083 2012-07-09 17:37:43

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

Dodge ram's request intrigued me ... since I pointed to mrprachy's howto I thought I'd play with it
--->>> and with success I might add.

I knew that text exists in the v9000 weather script but like Dodge ram - sometime there is a need to have text in an existing script and (in my case) a kick in the butt to try something.  So I took the 'ultimate background script': draw-bk.lua and copied it to draw-bk_text.lua and created a blank conky:

#
lua_load ~/Conky/LUA/draw-bg_text.lua
lua_draw_hook_pre draw_bg 30 0 0 0 0 0x000000 0.3
#
#######################################################  End LUA Settings  ###
# The all important - How often conky refreshes.
# If you have a "Crey" try: 0.2 - smokin' - but watch the CPU useage go UP!
update_interval 1

minimum_size 500 500 ## width, height
maximum_width 500  ## width, usually a good idea to be '=' or '>' minimum width

# one blank line below text
TEXT

And what do you know "I" did it!
aajM8zzE.jpg

draw-bk_text.lua

--[[Background originally by londonali1010 (2009)
    ability to set any size for background mrpeachy 2011
    ability to set variables for bg in conkyrc dk75

  the change is that if you set width and/or height to 0
  then it assumes the width and/or height of the conky window

so:

Above and After TEXT  (requires a composite manager or it blinks!)

 lua_load ~/wea_conky/draw_bg.lua
 TEXT
 ${lua conky_draw_bg 10 0 0 0 0 0x000000 0.4}

OR Both above TEXT (no composite manager required - no blinking!)

 lua_load ~/wea_conky/draw_bg.lua
 lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.5
 TEXT

Note
${lua conky_draw_bg 20 0 0 0 0 0x000000 0.4}
  See below:        1  2 3 4 5 6        7

${lua conky_draw_bg corner_radius x_position y_position width height color alpha}

covers the whole window and will change if you change the minimum_size setting

1 = 20             corner_radius
2 = 0             x_position
3 = 0             y_position
3 = 0             width
5 = 0             height
6 = 0x000000      color
7 = 0.4           alpha

]]

require 'cairo'
local    cs, cr = nil
function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
function conky_draw_bg(r,x,y,w,h,color,alpha)
if conky_window == nil then return end
if cs == nil then cairo_surface_destroy(cs) end
if cr == nil then cairo_destroy(cr) 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)
w=w
h=h
if w=="0" then w=tonumber(conky_window.width) end
if h=="0" then h=tonumber(conky_window.height) end
cairo_set_source_rgba (cr,rgb_to_r_g_b(color,alpha))
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
-----------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_fill (cr)
------------------------------------------------------------
-- === outside the main function ===========================
-- === From mrpeachys HowTo ================================
font="Zekton"
font_size=33
text="Hi Conky lovers"
xpos,ypos=20,50 -- same as gap_x & gap_x settings see 'cairo_move_to' below
red,green,blue,alpha=1,1,1,1 -- between 1 and 0
font_slant=CAIRO_FONT_SLANT_NORMAL  -- NORMAL ITALIC
font_face=CAIRO_FONT_WEIGHT_NORMAL  -- NORMAL BOLD

cairo_select_font_face (cr, "CorporateMonoExtraBold", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size (cr, 20)
cairo_set_source_rgba (cr,255/255,255/255,0/2551,1)
cairo_move_to (cr,20,90)
cairo_show_text (cr,"Thank you mrpeachy")
cairo_stroke (cr)

cairo_select_font_face (cr, "Electronics", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 80)
cairo_set_source_rgba (cr,255/255,113/255,0/2551,1.0)
cairo_move_to (cr,20,200)
cairo_show_text (cr,"d e g")
cairo_stroke (cr)

cairo_select_font_face (cr, "Emoticons", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 35)
cairo_set_source_rgba (cr,96/255,242/255,218/2551,1.0)
cairo_move_to (cr,10,280)
cairo_show_text (cr,"abcdefghijklmnop")
cairo_stroke (cr)

cairo_select_font_face (cr, "Kingthings Christmas 2", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 50)
cairo_set_source_rgba (cr,255/255,0/255,0/2551,1.0)
cairo_move_to (cr,10,340)
cairo_show_text (cr,"Merry Christmas")
cairo_stroke (cr)

cairo_select_font_face (cr, "Kingthings Christmas 2", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 50)
cairo_set_source_rgba (cr,0/255,255/255,0/2551,1.0)
cairo_move_to (cr,12,344)
cairo_show_text (cr,"Merry Christmas")
cairo_stroke (cr)

cairo_select_font_face (cr, "Buttons and switches JL", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size (cr, 20)
cairo_set_source_rgba (cr,255/255,113/255,0/2551,1.0)
cairo_move_to (cr,70,240)
cairo_show_text (cr,"abcdef")
cairo_stroke (cr)

cairo_select_font_face (cr, "FFF Tusj", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size (cr, 90)
cairo_set_source_rgba (cr,255/255,0/255,113/2551,1)
cairo_move_to (cr,90,470)
cairo_show_text (cr,"Yipeee!")
cairo_stroke (cr)

-- === Code to work the text ===============================
cairo_select_font_face (cr, font, font_slant, font_face);
cairo_set_font_size (cr, font_size)
cairo_set_source_rgba (cr,red,green,blue,alpha)
cairo_move_to (cr,xpos,ypos)
cairo_show_text (cr,text)
cairo_stroke (cr)
-- =========================================================

cairo_surface_destroy(cs)
cairo_destroy(cr)
return ""
end

·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#2084 2012-07-09 17:54:56

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

dk75 wrote:

Only thing that you would not include if you do everything by hand are IF statements that determine text properties.

Wanted to try your little text lua here in the 'draw-bk.lua' but I couldn't get it to work.  It is because there are two:

function conky_something

statements?

I think the IF statements gave that script strength and flexibility. and ease of use when placing the text.

I can see where the ability "to add" this to another lus script (like but not limited to) draw-bk.lua would be a huge plus.

Just a thought.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#2085 2012-07-09 18:28:04

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: Conky v1.9 Thread

dk75 wrote:
arclance wrote:

^ I think that function is way more complicated than is needed for his purposes.

It is not. Only thing that you would not include if you do everything by hand are IF statements that determine text properties. It's not much a complication for a code so... removing it and hard-code properties into code wouldn't change a bit of this function complication.

You also set the font settings every time you call the function instead of only when you change the font settings which makes the script more cpu intensive.

dk75 wrote:
arclance wrote:

I would also use "extents.x_advance" instead of "extents.width" since "extents.width" ignores whitespace characters so you will have problems with any line with a space in it.

Ah... didn't done much texting in LUA so for me it wasn't problem to solve but as this function is generic for any use then ok, changed to x_advance and y_bearing for text measurement.

Where did you get y_bearing from? 
The cairo manual has y_advance as the equivalent to x_advance.

Sector11 wrote:

Wanted to try your little text lua here in the 'draw-bk.lua' but I couldn't get it to work.  It is because there are two:

function conky_something

statements?

I think that is the problem as well.
I don't think you can have a function inside another function but I would need to check the lua manual to be sure.

Edit:
It was hard to find but I looks like you can have a function declared inside of another function in lua.

Last edited by arclance (2012-07-09 18:42:57)

Offline

#2086 2012-07-09 18:32:21

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

sqlpython wrote:

If you are interested in one of the conkys just let me know.

@Sector11
One?  I want them All!
Also, Your Location would that be NH? ... Ct here..

ALL!  Are you serious? Or is this a joke?

NH? New Hampshire or Northern Hemisphere? Ct? = Connecticut?
-  Either way; Nope - Buenos Aires, Argentina.
Winter here at the moment.

I'll pack them up if you are serious no problem, need time though as:
Setup:

  1. AMD Athlon II X3 - 3 cores and Average shown in Chronograph

  2. nVidia graphics driver

  3. eth0 (wired - cable)

  4. 1280x1024 screen

9 conkys:

  1. ~/Conky/S11_Chronograph.conky

  2. ~/Conky/S11_Dates.conky

  3. ~/Conky/S11_email.conky

  4. ~/Conky/S11_Rem_Cal.conky

    1. ~/Conky/DAYS/all.txt - text file used by S11_Rem_Cal.conky

    2. ~/.reminders - text file used by remind

  5. ~/Conky/S11_v9_H.conky

  6. ~/Conky/S11_v9_R.conky

  7. ~/Conky/S11_CB.conky

  8. ~/Conky/S11_SM.conky

  9. ~/Conky/S11_VNS.conky

10th not shown:

  • ~/Conky/VO_Radiotray.conky

aafaIwWF.jpg

LUA scripts:

  1. ~/Conky/LUA/draw-bk.lua - used in all!

  2. ~/v9000/v9000.lua - used three times

    1. ~/Conky/templates/S11_V9_R-template.lua

    2. ~/Conky/templates/h-10d-template.lua

    3. ~/Conky/templates/sun-moon-template.lua

  3. ~/Conky/LUA/Chronograph.lua

Support programs required:

  1. lm-sensors

  2. hddtemp

  3. remind

  4. conkyEmail

  5. conkyMisc

    1. conkyDateDiff

    2. conkyDaysDiff

  6. radiotray (not shown - botton left when running - set to run on desktop 1 only)

  7. vnstat

Fonts required:

  1. Anonymous Pro

  2. CorporateMonoExtraBold

  3. Andale Mono

  4. Zekton

  5. digitalk

  6. mono

Extras:

  • ~/Conky/images/cyan_1.png

I think that's everything!

Last edited by Sector11 (2012-07-09 19:18:29)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#2087 2012-07-10 03:47:05

dk75
#! Junkie
Registered: 2012-06-14
Posts: 250

Re: Conky v1.9 Thread

arclance wrote:

You also set the font settings every time you call the function instead of only when you change the font settings which makes the script more cpu intensive.

yeah

Many things could be moved out from inside this function to outside, with less memory and cpu consumption as a result, but then, almost nothing will be left, and instead using all in one, ease to use function you'll end up with text display inline as needed.

Then you have a choice - easy to use, compact  function that have everything you need inside or... make everything yourself as needed without this function at all.
Your choice, and your ability to work with LUA.

arclance wrote:
dk75 wrote:
arclance wrote:

I would also use "extents.x_advance" instead of "extents.width" since "extents.width" ignores whitespace characters so you will have problems with any line with a space in it.

Ah... didn't done much texting in LUA so for me it wasn't problem to solve but as this function is generic for any use then ok, changed to x_advance and y_bearing for text measurement.

Where did you get y_bearing from? 
The cairo manual has y_advance as the equivalent to x_advance.

Yes, it have, and I've made print it's value to terminal during work, and it seems that it have always "0" value.
x_bearing have value of space between first character and text anchor, and y_bearing have negative value of drawn glyph height (not font height).
Maybe it's Conky bug - dunno.

Sector11 wrote:

Wanted to try your little text lua here in the 'draw-bk.lua' but I couldn't get it to work.  It is because there are two:

function conky_something

statements?

No.
It was because it was copied to forum with error - dunno why one line was duplicated.

So, there is my function in your function that's working (vertical align is back to extents.height as extents.y_bearing will have different values depending whatever there are small character as "acegmnopqrsuvwxyz" or tall character as "bdfijklt"):

--[[Background originally by londonali1010 (2009)
    ability to set any size for background mrpeachy 2011
    ability to set variables for bg in conkyrc dk75

  the change is that if you set width and/or height to 0
  then it assumes the width and/or height of the conky window

so:

Above and After TEXT  (requires a composite manager or it blinks!)

 lua_load ~/wea_conky/draw_bg.lua
 TEXT
 ${lua conky_draw_bg 10 0 0 0 0 0x000000 0.4}

OR Both above TEXT (no composite manager required - no blinking!)

 lua_load ~/wea_conky/draw_bg.lua
 lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.5
 TEXT

Note
${lua conky_draw_bg 20 0 0 0 0 0x000000 0.4}
  See below:        1  2 3 4 5 6        7

${lua conky_draw_bg corner_radius x_position y_position width height color alpha}

covers the whole window and will change if you change the minimum_size setting

1 = 20             corner_radius
2 = 0             x_position
3 = 0             y_position
3 = 0             width
5 = 0             height
6 = 0x000000      color
7 = 0.4           alpha

]]

require 'cairo'
local    cs, cr = nil

function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

 function conky_print_text(cr, x, y, _text, color, alpha, font, font_size, style, weight, alignHorizontal, alignVertical) -- style = [normal(default)|italic|oblique]; weight = [normal(default)|bold]; alignHorizontal = [left(default)|center|right]; alignVertical = [top|center|bottom(default)]
     local function conky_rgb2rgba(colour,alpha) -- colour = hex color code, alpha = float [0.0 - 1.0] transparency factor
         return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha -- returns color used by "cairo_set_rgba()" function
     end
     
    if style == "italic" then style = CAIRO_FONT_SLANT_ITALIC
     elseif style == "oblique" then style = CAIRO_FONT_SLANT_OBLIQUE
     else style = CAIRO_FONT_SLANT_NORMAL end
     
     if weight == "bold" then weight = CAIRO_FONT_WEIGHT_BOLD
     else weight = CAIRO_FONT_WEIGHT_NORMAL end
     
     local extents = cairo_text_extents_t:create() -- initialize text_extents structure (generic, a must be for following functions)
     cairo_save(cr)
     
     cairo_select_font_face(cr, font, style, weight)
     cairo_set_font_size(cr, font_size)
     cairo_set_source_rgba(cr, conky_rgb2rgba(color, alpha))
    
     cairo_text_extents(cr, _text, extents)
     
     if alignHorizontal == "center" then alignHorizontal = tonumber(extents.x_advance/2)
     elseif alignHorizontal == "right" then alignHorizontal = tonumber(extents.x_advance)
     else alignHorizontal = 0 end
      
     if alignVertical == "top" then alignVertical = tonumber(extents.height)
     elseif alignVertical == "center" then alignVertical = tonumber(extents.height/2)
     else alignVertical = 0 end
     
     cairo_move_to(cr, x-alignHorizontal, y+alignVertical)
     cairo_show_text(cr, _text)
     cairo_stroke(cr)
     cairo_restore(cr)
 end

function conky_draw_bg(r,x,y,w,h,color,alpha)
if conky_window == nil then return end
if cs == nil then cairo_surface_destroy(cs) end
if cr == nil then cairo_destroy(cr) 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)
w=w
h=h
if w=="0" then w=tonumber(conky_window.width) end
if h=="0" then h=tonumber(conky_window.height) end
cairo_set_source_rgba (cr,rgb_to_r_g_b(color,alpha))
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
-----------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_fill (cr)
------------------------------------------------------------
-- === outside the main function ===========================
-- === From mrpeachys HowTo ================================
font="Zekton"
font_size=33
text="Hi Conky lovers"
xpos,ypos=20,50 -- same as gap_x & gap_x settings see 'cairo_move_to' below
red,green,blue,alpha=1,1,1,1 -- between 1 and 0
font_slant=CAIRO_FONT_SLANT_NORMAL  -- NORMAL ITALIC
font_face=CAIRO_FONT_WEIGHT_NORMAL  -- NORMAL BOLD

cairo_select_font_face (cr, "CorporateMonoExtraBold", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size (cr, 20)
cairo_set_source_rgba (cr,255/255,255/255,0/2551,1)
cairo_move_to (cr,20,90)
cairo_show_text (cr,"Thank you mrpeachy")
cairo_stroke (cr)

cairo_select_font_face (cr, "Electronics", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 80)
cairo_set_source_rgba (cr,255/255,113/255,0/2551,1.0)
cairo_move_to (cr,20,200)
cairo_show_text (cr,"d e g")
cairo_stroke (cr)

cairo_select_font_face (cr, "Emoticons", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 35)
cairo_set_source_rgba (cr,96/255,242/255,218/2551,1.0)
cairo_move_to (cr,10,280)
cairo_show_text (cr,"abcdefghijklmnop")
cairo_stroke (cr)

cairo_select_font_face (cr, "Kingthings Christmas 2", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 50)
cairo_set_source_rgba (cr,255/255,0/255,0/2551,1.0)
cairo_move_to (cr,10,340)
cairo_show_text (cr,"Merry Christmas")
cairo_stroke (cr)

cairo_select_font_face (cr, "Kingthings Christmas 2", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, 50)
cairo_set_source_rgba (cr,0/255,255/255,0/2551,1.0)
cairo_move_to (cr,12,344)
cairo_show_text (cr,"Merry Christmas")
cairo_stroke (cr)

cairo_select_font_face (cr, "Buttons and switches JL", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size (cr, 20)
cairo_set_source_rgba (cr,255/255,113/255,0/2551,1.0)
cairo_move_to (cr,70,240)
cairo_show_text (cr,"abcdef")
cairo_stroke (cr)

cairo_select_font_face (cr, "FFF Tusj", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size (cr, 90)
cairo_set_source_rgba (cr,255/255,0/255,113/2551,1)
cairo_move_to (cr,90,470)
cairo_show_text (cr,"Yipeee!")
cairo_stroke (cr)

-- === Code to work the text ===============================
cairo_select_font_face (cr, font, font_slant, font_face);
cairo_set_font_size (cr, font_size)
cairo_set_source_rgba (cr,red,green,blue,alpha)
cairo_move_to (cr,xpos,ypos)
cairo_show_text (cr,text)
cairo_stroke (cr)
-- =========================================================

-- === Conky print text function usage ======================
conky_print_text(cr, 100.5, 120.7, "Yurippe!", 0x0000af, 0.7, "DejaVu Sans Mono", 24, "italic", "bold", "left", "bottom")
conky_print_text(cr, 100, 120, "Yurippe!", 0x00afff, 1, "DejaVu Sans Mono", 24, "oblique", "normal", "left", "bottom")
conky_print_text(cr, 100.5, 120.7, "Yurippe!", 0xaf0000, 0.7, "DejaVu Sans Mono", 24, "italic", "bold", "left", "top")
conky_print_text(cr, 100, 120, "Yurippe!", 0xffef00, 1, "DejaVu Sans Mono", 24, "oblique", "normal", "left", "top")
-- ==========================================================

cairo_surface_destroy(cs)
cairo_destroy(cr)
return ""
end


PS: there is rectangle drawing Tips'n'Tricks also that I've found on the net.
Instead of using cairo_move_to, cairo_line_to, cairo_arc and then cairo_close_path, one need to use cairo_arc with cairo_close_path only - sneaky.
For more details see One4All one4all_cairo.flibs at my Conky Pitstop corner ;PPPp

Last edited by dk75 (2012-07-10 03:54:54)


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

#2088 2012-07-10 03:53:55

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: Conky v1.9 Thread

I updated my smplayer2 conky script to fix a couple of bugs.
2f0659192877873.gif
Changes:
  1. Output errors to stderr instead of stdout so they are not displayed in the conky window.
  2. Handle smplayer2 startup, track changes, and file changes properly.
  3. Handle position percent out of range error due to current position being larger than total length for
      some files.

#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
"""
Name: smplayer2_conky.py
Author: arclance
Date_Created:2012-05-03
Date_Updated:2012-07-09

Changelog
v1.2
  Fix self._positionPercent sometimes being greater than 100% (causes conky error)

v1.1
  Catch Errors And Print To stderr not conky (stdout)
  Handle Startup and Track or File Changes Without Crashing
"""

import dbus
import sys

class smplayer2_Info:
    
    def __init__(self):
        #### line spacing and color settings ####
        self._offset = "${voffset -3}"
        self._color0 = "${color}"
        self._color1 = "${color0}"
    #enddef
        
    def getOutput(self):
        bus = dbus.SessionBus()
        try:
            #### setup dbus hooks ####
            remote_player = bus.get_object('org.mpris.MediaPlayer2.SMPlayer2', '/org/mpris/MediaPlayer2')
            iface_player = dbus.Interface(remote_player, 'org.freedesktop.DBus.Properties')
            #### get metadata from smplayer2 ####
            self._metadata = iface_player.Get("org.mpris.MediaPlayer2.Player","Metadata")
            #### format metadata for output ####
            self._length = int(self._metadata["mpris:length"]) # length in seconds
            self._position = iface_player.Get("org.mpris.MediaPlayer2.Player","Position")
            self._positionPercent =(float(self._position)/float(self._length))*100
            self._positionHMS = str(self._position/3600).rjust(2,"0") + ":" + str((self._position%3600)/60).rjust(2,"0") + ":" + str((self._position%3600)%60).rjust(2,"0")
            self._lengthHMS = str(self._length/3600).rjust(2,"0") + ":" + str((self._length%3600)/60).rjust(2,"0") + ":" + str((self._length%3600)%60).rjust(2,"0")
            #### get player status data ####
            self._volume = iface_player.Get("org.mpris.MediaPlayer2.Player","Volume")
            self._status = iface_player.Get("org.mpris.MediaPlayer2.Player","PlaybackStatus")
            self._title = self._metadata["xesam:title"]
            ####
        except Exception, e:
            #### handle smplayer2 startup, track changes, and file changes ####
            sys.stderr.write("\nerror1: " + str(e))
            self._length = 1 
            self._position = 0
            self._positionPercent =(float(self._position)/float(self._length))*100
            self._positionHMS = str(self._position/3600).rjust(2,"0") + ":" + str((self._position%3600)/60).rjust(2,"0") + ":" + str((self._position%3600)%60).rjust(2,"0")
            self._lengthHMS = str(self._length/3600).rjust(2,"0") + ":" + str((self._length%3600)/60).rjust(2,"0") + ":" + str((self._length%3600)%60).rjust(2,"0")
            ####
            self._volume = iface_player.Get("org.mpris.MediaPlayer2.Player","Volume")
            self._status = iface_player.Get("org.mpris.MediaPlayer2.Player","PlaybackStatus")
            self._title = "N/A"
        #endtry
        #### handle out of range position percents ####
        if self._positionPercent < 0:
            self._positionPercent = 0
        elif self._positionPercent > 100:
            self._positionPercent = 100
        #endif
    #enddef
    
    def formatOutput(self):
        #### create final string to output to conky ####
        self._conkyOutput = self._color0 + self._positionHMS + self._color1 + " ${execbar echo " + str(self._positionPercent) + "} " + self._color0 + self._lengthHMS
        self._conkyOutput += "\n" + self._offset + self._color0 + self._status + self._color1 + " Volume:" + self._color0 + str(int(self._volume*100)) + "% " + self._color1 + self._title
        return self._conkyOutput
    #enddef
#endclass

#### run script ####
test = smplayer2_Info()
test.getOutput()
#### print ouput to conky ####
try:
    print test.formatOutput().encode("utf-8")
except Exception, e:
    #print str(e)
    sys.stderr.write("\nerror2: " + str(e))
#endtry

Last edited by arclance (2012-07-10 04:24:30)

Offline

#2089 2012-07-10 04:03:52

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: Conky v1.9 Thread

dk75 wrote:
arclance wrote:

Where did you get y_bearing from?

Yes, it have, and I've made print it's value to terminal during work, and it seems that it have always "0" value.
x_bearing have value of space between first character and text anchor, and y_bearing have negative value of drawn glyph height (not font height).
Maybe it's Conky bug - dunno.

Where did you find out about y_bearing? I could not find it in the cairo manual.
It might be a conky bug, I suspect there are several bugs in the lua integration that have not been found yet.

dk75 wrote:

PS: there is rectangle drawing Tips'n'Tricks also that I've found on the net.
Instead of using cairo_move_to, cairo_line_to, cairo_arc and then cairo_close_path, one need to use cairo_arc with cairo_close_path only - sneaky.
For more details see One4All one4all_cairo.flibs ;PPPp

There is an even easier way to draw rectangles, cairo_rectangle().

Offline

#2090 2012-07-10 04:30:37

sqlpython
#! Die Hard
From: New England
Registered: 2011-11-28
Posts: 931

Re: Conky v1.9 Thread

-  Either way; Nope - Buenos Aires, Argentina.
@Sector11
Winter here at the moment.

Ok, Bad guess on my part..and Yeah Connecticut USA...
So, my first reaction to White Mtns is always New Hampshire..

..No, I wasn't joking and Thank You!
As scripter and programmer, I don't want to reinvent the wheel.  The screen shots of your conkys in post #2078 are just what I was looking for as a base for my own experimentation. You did the all the base type examples that I was currently looking to play with....
I have looked and looked and have found quite a few various examples that I have liked but your examples will make for me the base kit I was looking for...as I am conky fan but unpractised in it's scriptings.
  Perfect!! Thanks again....


OHCG #!, Jessie,, Siduction-13.1Slackware 14Bridge,, Sabayon 13.4,

Offline

#2091 2012-07-10 04:32:08

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Conky v1.9 Thread

Image3.png
i remember getting into the details of text_extents a little while ago
i would suspect lua could give you all of these metrics (although not worded as they are in the diagram)

Offline

#2092 2012-07-10 11:07:27

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

dk75 wrote:
Sector11 wrote:

Wanted to try your little text lua here in the 'draw-bk.lua' but I couldn't get it to work.  It is because there are two:

function conky_something

statements?

No.
It was because it was copied to forum with error - dunno why one line was duplicated.

PS: there is rectangle drawing Tips'n'Tricks also that I've found on the net.
Instead of using cairo_move_to, cairo_line_to, cairo_arc and then cairo_close_path, one need to use cairo_arc with cairo_close_path only - sneaky.
For more details see One4All one4all_cairo.flibs at my Conky Pitstop corner ;PPPp

OK, sometime an oops! just happens.

This looks good:
aahLo9RF.jpg

Being a forgetfull type I put the 'cheat sheet' down with the text:

-- === Conky print text function usage ======================
-- (cr, x, y, _text, color, alpha, font, font_size, style, weight, alignHorizontal, alignVertical)
    -- style = [normal(default)|italic|oblique]
    -- weight = [normal(default)|bold]
    -- alignHorizontal = [left(default)|center|right]
    -- alignVertical = [top|center|bottom(default)]

conky_print_text(cr, 330.5, 120.7, "Yurippe!", 0x0000af, 0.7, "DejaVu Sans Mono", 24, "italic", "bold", "left", "bottom")
conky_print_text(cr, 330, 120, "Yurippe!", 0x00afff, 1, "DejaVu Sans Mono", 24, "oblique", "normal", "left", "bottom")
conky_print_text(cr, 280.5, 130.7, "Thank you, dk75", 0xaf0000, 0.7, "DejaVu Sans Mono", 24, "normal", "bold", "left", "top")
conky_print_text(cr, 280, 130, "Thank you, dk75", 0xffef00, 1, "DejaVu Sans Mono", 24, "normal", "normal", "left", "top")

conky_print_text(cr, 140, 350, "Merry Christmas", 0xaf0000, 0.7, "Kingthings Christmas 2", 35, "normal", "normal", "left", "top")
conky_print_text(cr, 142, 352, "Merry Christmas", 0xffef00, 1, "Kingthings Christmas 2", 35, "normal", "normal", "left", "top")
-- ==========================================================

Really nice stuff.  Thank you ....

OH yea, I'll check out One4All  big_smile

Last edited by Sector11 (2012-07-10 11:07:56)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#2093 2012-07-10 11:09:29

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

mrpeachy wrote:

Image3.png
i remember getting into the details of text_extents a little while ago
i would suspect lua could give you all of these metrics (although not worded as they are in the diagram)

I was wondering when you'd show up mrpeachy.
I see good things coming that will help all us not so LUA literate.  big_smile


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#2094 2012-07-10 11:14:11

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

sqlpython wrote:

..No, I wasn't joking and Thank You!
As scripter and programmer, I don't want to reinvent the wheel.  The screen shots of your conkys in post #2078 are just what I was looking for as a base for my own experimentation. You did the all the base type examples that I was currently looking to play with....
I have looked and looked and have found quite a few various examples that I have liked but your examples will make for me the base kit I was looking for...as I am conky fan but unpractised in it's scriptings.
  Perfect!! Thanks again....

Will have them later today. I'll put the link them in post #2078 and let you know when done.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#2095 2012-07-10 11:52:03

dk75
#! Junkie
Registered: 2012-06-14
Posts: 250

Re: Conky v1.9 Thread

arclance wrote:

Where did you find out about y_bearing? I could not find it in the cairo manual.

Cairographics manual: cairo-text-extents-t structure - every function that needs structure have link to it in manual



arclance wrote:
dk75 wrote:

PS: there is rectangle drawing Tips'n'Tricks also that I've found on the net.
Instead of using cairo_move_to, cairo_line_to, cairo_arc and then cairo_close_path, one need to use cairo_arc with cairo_close_path only - sneaky.
For more details see One4All one4all_cairo.flibs ;PPPp

There is an even easier way to draw rectangles, cairo_rectangle().

Yes... but with rounded corners as needed for background script?


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

#2096 2012-07-10 12:48:29

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: Conky v1.9 Thread

dk75 wrote:

\

arclance wrote:
dk75 wrote:

PS: there is rectangle drawing Tips'n'Tricks also that I've found on the net.
Instead of using cairo_move_to, cairo_line_to, cairo_arc and then cairo_close_path, one need to use cairo_arc with cairo_close_path only - sneaky.
For more details see One4All one4all_cairo.flibs ;PPPp

There is an even easier way to draw rectangles, cairo_rectangle().

Yes... but with rounded corners as needed for background script?

No, but you said rectangle not squircle and did not mention a background script.

Last edited by arclance (2012-07-10 13:05:38)

Offline

#2097 2012-07-10 13:03:49

dk75
#! Junkie
Registered: 2012-06-14
Posts: 250

Re: Conky v1.9 Thread

arclance wrote:
dk75 wrote:

Yes... but with rounded corners as needed for background script?

No, but you said rectangle not squircle and made not mention of a background script.

Sorry, I did mind shortcut when posting after Sector11 draw-bk post...


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

#2098 2012-07-10 13:07:04

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 987

Re: Conky v1.9 Thread

^ That's fine, I really just wanted to legitimately use the word squircle.

Offline

#2099 2012-07-10 20:33:09

sqlpython
#! Die Hard
From: New England
Registered: 2011-11-28
Posts: 931

Re: Conky v1.9 Thread

Will have them later today. I'll put the link them in post #2078 and let you know when done.

  cool


OHCG #!, Jessie,, Siduction-13.1Slackware 14Bridge,, Sabayon 13.4,

Offline

Help fund CrunchBang, donate to the project!

#2100 2012-07-11 04:59:59

lwfitz
#! Die Hard
From: Monrovia, CA
Registered: 2012-01-19
Posts: 886
Website

Re: Conky v1.9 Thread

Ive been messing with se7en11's info conky that he posted a little bit ago and am wondering why all the info thats called with

lspci

doesnt show up.

lspci gives me this output

luke@crunchbang:~$ lspci
00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 18)
00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 18)
00:16.0 Communication controller: Intel Corporation 5 Series/3400 Series Chipset HECI Controller (rev 06)
00:1a.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 06)
00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 06)
00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 06)
00:1c.5 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 6 (rev 06)
00:1d.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 06)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a6)
00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller (rev 06)
00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 6 port SATA AHCI Controller (rev 06)
00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 06)
00:1f.6 Signal processing controller: Intel Corporation 5 Series/3400 Series Chipset Thermal Subsystem (rev 06)
03:00.0 Network controller: Intel Corporation Centrino Advanced-N 6200 (rev 09)
04:00.0 Ethernet controller: Atheros Communications Inc. AR8152 v1.1 Fast Ethernet (rev c1)
ff:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 05)
ff:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 05)
ff:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 05)
ff:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 05)
ff:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 05)
ff:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 05)

Maybe I dont have something installed that I need?


Edit:

When I start just that conky this is the error Im getting

luke@crunchbang:~$ ~/.conky/.conky_start
WARNING: gnome-keyring:: couldn't connect to: /home/luke/.cache/keyring-yMrqOb/pkcs11: No such file or directory
Conky: /home/luke/.conky/.conkyrc_weather: 25: config file error
luke@crunchbang:~$ Conky: forked to background, pid is 31471

Conky: desktop window (b0) is root window
Conky: window type - normal
Conky: drawing to created window (0x1200001)
Conky: drawing to double buffer
sh: 1: gawk: not found
sh: 1: gawk: not found
sh: 1: gawk: not found
sh: 1: gawk: not found
sh: 1: gawk: not found
sh: 1: gawk: not found

Edit #2:


Installed Gawk and now it works......... imagine that roll

Only thing that doesnt show is my wireless card

Last edited by lwfitz (2012-07-11 05:27:44)

Offline

Board footer

Powered by FluxBB

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

Debian Logo