SEARCH

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

You are not logged in.

#5301 2013-05-09 13:20:21

Sector11
Leonardo da Conci
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,181
Website

Re: Conky v1.9 Thread

farmersdaughter wrote:

Thank you Sector 11, it looks amazing! And it works wonderfully!

Will share a screenshot when I get a chance to. I'm so happy LOL

You're welcome.  I hope it updates a little more often for you than it does for me here.
For example it's been an hour and 25 minutes with no update.
Last night over 3 hours.

Last edited by Sector11 (2013-05-09 13:25:05)


Q&As for Conky v1.9 & v1.10 | Conky Archives | All Conky Threads
.deb file editor | Debian Jessie: BunsenLabs subAlpha & Wally-jr
BL Forum Moderator | LinuxBBQ

Offline

Be excellent to each other!

#5302 2013-05-09 14:27:47

easysid
#! CrunchBanger
From: India
Registered: 2013-01-25
Posts: 149

Re: Conky v1.9 Thread

Sector11 wrote:
easysid wrote:

hi,
I saw this clock Click Clock for ipad.

As I see it, it displays numbers with increasing alpha and font. But how do I get the trail effect? -- [got it]
Another question - would it be copyright infringement if I were to use this design in conky?

Thanks

EDIT: Got it. I'll post the code.

Oooooooooooooo that I LIKE!!!!!!!!!!!!!!!!
Maybe an edited version to add month, day as well ... hmmmmmmmmmm

waiting patiently ....
... is it done yet?
... ... ... is it done yet?
... ... ... ... ... ... is it done yet?
From the front seat: ahhhhhhhh shuddup! lol

yes it is done smile
Original image : Click Clock for ipad

My approximation
Eb2nPgG.png

btw ... this isn't a copyright violation. Is it?

clock.lua

--[[ Clock for conky
written by easysid
Thu 09 May 2013 19:20:16 IST
]]--

require 'cairo'

function conky_main()

clock_table ={
    {
        -- Draw the seconds
        arg = "time %S",
        xc = 200,  
        yc = 150,
        r  = 100, -- radius
        font_face = "monospace",
        top_font_size = 20, -- actual font size for display 
        min_font_size = 6,  -- min font for trail
        max_font_size = 14, -- max font fot trail
        max_alpha = .6,     -- max alpha for trail
        trail = 40,         -- size of trail max = 60
        main_color = {0xFFFFFF, 1}, --color of numbers
        trail_color = {0xFFFFFF, 1} --color of trail.
    },
    
    {
        -- Draw the Minutes
        arg = "time %M",
        xc = 200,
        yc = 150,
        r  = 65,        -- radius
        font_face = "monospace",   
        top_font_size = 23, -- font size for display
        min_font_size = 4,  -- min font for trail
        max_font_size = 14, -- max font fot trail
        max_alpha = .6,     -- max alpha for trail
        trail = 40,         -- size of trail
        main_color = {0xFFFFFF, 1}, --color of numbers
        trail_color = {0xFFFFFF, 1} --color of trail
    },

    {
        -- Draw the Hours
        arg = "time %H",
        xc = 200,
        yc = 150,
        r  = 60,
        font_face = "calibri",
        top_font_size = 50, -- font size for display
        min_font_size = 3,  -- min font for trail
        max_font_size = 12, -- max font fot trail
        max_alpha = .6,     -- max alpha for trail
        trail = 40,         -- size of trail
        main_color = {0xFFFFFF, 1}, --color of numbers
        trail_color = {0xFFFFFF, 1} --color of trail
    },
}
    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>3 then
        for i in ipairs(clock_table) do
            draw_clock(cr, clock_table[i])
        end
    end
    cairo_destroy(cr)
    cairo_surface_destroy(cs)
    cr=nil
end-- end main function


function draw_clock(cr, t)
         
        cairo_select_font_face (cr, t.font_face, CAIRO_FONT_SLANT_NORMAL,  CAIRO_FONT_WEIGHT_NORMAL)

        local value = tonumber(conky_parse(string.format("${%s}",t.arg)))
        local first = value - t.trail
        
        if t.arg == 'time %H' then -- special case for the hour digit
             cairo_set_source_rgba (cr, rgba_to_r_g_b_a(t.main_color))
             cairo_set_font_size (cr, t.top_font_size)
             cairo_move_to(cr, t.xc - t.top_font_size/3, t.yc+t.top_font_size/4) -- minor adjustment. Tweak here for your setting
             cairo_show_text(cr, value) 
        else
            for i = first, value do
        
                local theta = i*2*math.pi/60 -math.pi/2 -- calculate the angle
                local alpha = t.max_alpha*(i-first)/(value-first) -- map alpha value to [0, max_alpha]
                local font_size = (t.max_font_size-t.min_font_size)*(i-first)/(value-first) + t.min_font_size -- map font size similar to alpha
                t.trail_color[2] = alpha
                cairo_set_source_rgba (cr, rgba_to_r_g_b_a(t.trail_color))
                cairo_set_font_size (cr, font_size)
                if i == value then -- if we have the main value
                    cairo_set_source_rgba (cr, rgba_to_r_g_b_a(t.main_color)) -- switch color
                    cairo_set_font_size (cr, t.top_font_size) -- switch font
                end -- end if
                local k = i
                if k < 0 then k = 60 + i end  -- adjust seconds
                cairo_move_to(cr, t.xc + t.r*math.cos(theta), t.yc + t.r*math.sin(theta))
                cairo_show_text(cr, k) 

            end -- end for
        end --end if
end -- end draw_clock
   

function rgba_to_r_g_b_a(tcolor)
	local color,alpha=tcolor[1],tcolor[2]
	return ((color / 0x10000) % 0x100) / 255., 
		((color / 0x100) % 0x100) / 255., (color % 0x100) / 255., alpha
end --end rgba

----
EDIT  11-April-2014 If you are coming here from the Conky Archives Thread, grab the code from https://github.com/easysid/conky_configs smile
----

Last edited by easysid (2014-04-11 11:22:04)

Offline

#5303 2013-05-09 14:35:37

farmersdaughter
#! Member
Registered: 2009-08-27
Posts: 99
Website

Re: Conky v1.9 Thread

It about every hour for me. Doesn't really bother me. I basically live outdoors anyway. I just need it for those days when I need to plan ahead.


The Canuck with Questions. And Acer Aspires... if you have #! on an Acer and have a question... ask!

Offline

#5304 2013-05-09 15:34:25

Sector11
Leonardo da Conci
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,181
Website

Re: Conky v1.9 Thread

easysid wrote:
Sector11 wrote:

... ... ... ... ... ... is it done yet?
From the front seat: ahhhhhhhh shuddup! lol

yes it is done smile
Original image : Click Clock for ipad

My approximation
http://i.imgur.com/Eb2nPgG.png

btw ... this isn't a copyright violation. Is it?

I don't think so ... if you didn't see the code just an image and wrote the LUA yourself.
I Googled: Click Clock for iPad:

http://appadvice.com/search?q=click+clock where it shows two "click clocks" your is patterned after "coffeecodings" idea, but it's not clickable with iPad control.  Just a clock style!

Now after that - I'm not a lawyer.  big_smile


Q&As for Conky v1.9 & v1.10 | Conky Archives | All Conky Threads
.deb file editor | Debian Jessie: BunsenLabs subAlpha & Wally-jr
BL Forum Moderator | LinuxBBQ

Offline

#5305 2013-05-09 15:38:23

Sector11
Leonardo da Conci
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,181
Website

Re: Conky v1.9 Thread

farmersdaughter wrote:

It about every hour for me. Doesn't really bother me. I basically live outdoors anyway. I just need it for those days when I need to plan ahead.

Good that's normal, most weather sites update once an hour.  Maybe it's because of where I am.
Doesn't matter I have other weather scripts.


Q&As for Conky v1.9 & v1.10 | Conky Archives | All Conky Threads
.deb file editor | Debian Jessie: BunsenLabs subAlpha & Wally-jr
BL Forum Moderator | LinuxBBQ

Offline

#5306 2013-05-09 16:20:04

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Conky v1.9 Thread

i found an old script (made by mrpeachy) and modified it. this bars could be very useful. i thought that i share the code.

and they look very good (bottom left): http://ompldr.org/vaWN0ag

you call the function like this:

gbar({lw=5,lc=0xffff000,la=1,var="cpu",dev="cpu1",posx=30,posy=460,w=200,h=25,sbc=0x4D4D4D,mbc=0x999999,ebc=0xE6E6E6,sic=0x00ff00,mic=0xffff00,eic=0xffff00})

this is the function:

function gbar(gb)

local var=gb.var
local dev=gb.dev or ''
local x,y=gb.posx,gb.posy
local l,w=gb.w,gb.h

local sbc,mbc,ebc=gb.sbc,gb.mbc,gb.ebc -- bg color
local sic,mic,eic=gb.sic,gb.mic,gb.eic -- indicator color

local sba=gb.sba or 1
local mba=gb.mba or 1
local eba=gb.eba or 1

local sia=gb.sia or 1
local mia=gb.mia or 1
local eia=gb.eia or 1

local lw=gb.lw or 1
local lc=gb.lc or 0x000000
local la=gb.la or 1

num=conky_parse("${"..var..' '..dev.."}")
num=tonumber(num)

num=num/100

pat = cairo_pattern_create_linear (x, y, x+l, y);
cairo_pattern_add_color_stop_rgba (pat, 1, col(sbc,sba));
cairo_pattern_add_color_stop_rgba (pat, 0.5, col(mbc,mba));
cairo_pattern_add_color_stop_rgba (pat, 0, col(ebc,eba));
cairo_rectangle (cr, x, y, l, w);
cairo_set_source (cr, pat);
cairo_fill (cr)

pat = cairo_pattern_create_linear (x, y, x+l, y);
cairo_pattern_add_color_stop_rgba (pat, 0, col(sic,sia));
cairo_pattern_add_color_stop_rgba (pat, 0.5, col(mic,mia));
cairo_pattern_add_color_stop_rgba (pat, 1, col(eic,eia));
cairo_rectangle (cr, x, y, l, w);
cairo_new_sub_path (cr); cairo_rectangle (cr, l+x, y, -l*(1-num), w);
cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD);
cairo_set_source (cr, pat); cairo_fill_preserve (cr);
cairo_set_source_rgba (cr, 0,0,0,0); cairo_fill (cr);
cairo_pattern_destroy (pat);

-- boundary line
cairo_translate (cr, (x+(lw/2)), (y+(lw/2))) 
cairo_set_line_width (cr, lw);
cairo_set_source_rgba (cr, col(lc,la));
cairo_rectangle (cr, -lw/2, -lw/2, l,w)
cairo_stroke (cr)

end--function

the values for alpha have the value 1 as standard. that means that u do not have to declare it.

edit: now you can draw a boundary line around the bar. if u do not want such a line than change the setting la=1 to la=0

gbar({lw=5,lc=0xffff000,la=0,var="cpu",dev="cpu1",posx=30,posy=460,w=200,h=25,sbc=0x4D4D4D,mbc=0x999999,ebc=0xE6E6E6,sic=0x00ff00,mic=0xffff00,eic=0xffff00})

the standard-color for this boundary line is black. if u do  want to have this color then u do not have to define it.

Last edited by lionhead (2013-05-09 17:16:33)

Offline

#5307 2013-05-09 17:50:05

farmersdaughter
#! Member
Registered: 2009-08-27
Posts: 99
Website

Re: Conky v1.9 Thread


The Canuck with Questions. And Acer Aspires... if you have #! on an Acer and have a question... ask!

Offline

#5308 2013-05-09 18:17:50

Sector11
Leonardo da Conci
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,181
Website

Re: Conky v1.9 Thread

easysid came up with the clock --- I tweaked it a bit by changing the font to Monofur, bold, changed the colour of the trailing digits, made it a bit smaller and added draw-bg.lua as a circle.

Here it is with various backgrounds, I love it:
adwzJqEk.jpg

and the same clock I tweaked - dropped the background and repositioned it on a wallpaper as the first element of a group of conkys I have been thinking about for this wallpaper:
adw0Iojk.jpg

Hey - more to come - I'm thinking of putting the seconds outside the black circle, and the minutes on the black circle ... under construction.  Imagine one conky: 1900x1000

Thanks easysid for the kick start!  It's PERFECT!

Last edited by Sector11 (2013-05-09 18:23:02)


Q&As for Conky v1.9 & v1.10 | Conky Archives | All Conky Threads
.deb file editor | Debian Jessie: BunsenLabs subAlpha & Wally-jr
BL Forum Moderator | LinuxBBQ

Offline

#5309 2013-05-09 18:20:56

Sector11
Leonardo da Conci
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,181
Website

Re: Conky v1.9 Thread

Looks good!  big_smile

Host: Canadian Bear.  Priceless!


Q&As for Conky v1.9 & v1.10 | Conky Archives | All Conky Threads
.deb file editor | Debian Jessie: BunsenLabs subAlpha & Wally-jr
BL Forum Moderator | LinuxBBQ

Offline

#5310 2013-05-09 18:58:05

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

Re: Conky v1.9 Thread

lionhead wrote:

@mrpeachy

i've just found your amazing script: http://ompldr.org/vaWNzdA

is it possible to display the visibility of the iss (hubble is never visible here)? you wrote that it's possible while i use the programm 'predict'. do u have an idea how to do this?

btw: a new version of my custom v9000: http://ompldr.org/vaWN0ag

that was a prototype... like those fancy prototype cars you see at car shows that never actually get put into production smile
it *is* possible to do what you want but not easy

Offline

#5311 2013-05-09 19:00:34

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

Re: Conky v1.9 Thread

easysid wrote:
Sector11 wrote:
easysid wrote:

hi,
I saw this clock Click Clock for ipad.

As I see it, it displays numbers with increasing alpha and font. But how do I get the trail effect? -- [got it]
Another question - would it be copyright infringement if I were to use this design in conky?

Thanks

EDIT: Got it. I'll post the code.

Oooooooooooooo that I LIKE!!!!!!!!!!!!!!!!

waiting patiently ....

yes it is done smile

agreed with Sector11, your book of conky looks good too... not every day that you see an original approach to conky/lua displays big_smile

Offline

#5312 2013-05-09 19:01:38

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

Re: Conky v1.9 Thread

Sector11 wrote:

I have been thinking about for this wallpaper:
http://t.imgbox.com/adw0Iojk.jpg

That background is just screaming for some fancy conky/lua big_smile

Offline

#5313 2013-05-09 19:26:10

farmersdaughter
#! Member
Registered: 2009-08-27
Posts: 99
Website

Re: Conky v1.9 Thread

Sector11 wrote:

Looks good!  big_smile

Host: Canadian Bear.  Priceless!

You have no idea... my first name means “bear girl” in Latin. So yes, I get a kick out of my host name LOL. My netbook (also now running #!) is TinyPengiun. Still hunting for the ideal Conky and Tux-related wallpaper there.


The Canuck with Questions. And Acer Aspires... if you have #! on an Acer and have a question... ask!

Offline

#5314 2013-05-09 21:11:50

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Conky v1.9 Thread

mrpeachy wrote:
lionhead wrote:

@mrpeachy

i've just found your amazing script: http://ompldr.org/vaWNzdA

is it possible to display the visibility of the iss (hubble is never visible here)? you wrote that it's possible while i use the programm 'predict'. do u have an idea how to do this?

btw: a new version of my custom v9000: http://ompldr.org/vaWN0ag

that was a prototype... like those fancy prototype cars you see at car shows that never actually get put into production smile
it *is* possible to do what you want but not easy

a prototype? the sun-moon-chart looks really good. and it works stable! but i wait for an update. this 'prototype' is one of my 'all-time-favorits'. it's a must-have for people that are interessted in astronomy (like me). i really wait for a new astronomy-eyecandy!

i would help to make a beta test smile

my current desktop: http://ompldr.org/vaWN5MQ

Offline

#5315 2013-05-09 21:30:16

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

Re: Conky v1.9 Thread

lionhead wrote:

a prototype? the sun-moon-chart looks really good. and it works stable! but i wait for an update. this 'prototype' is one of my 'all-time-favorits'. it's a must-have for people that are interessted in astronomy (like me). i really wait for a new astronomy-eyecandy!

the sun and moon part work pretty well, although i have never worked out all the bugs (particularly how to account for things like daylight savings time)

the display of other stuff like the ISS and hubble was the experimental part

Offline

#5316 2013-05-09 21:33:05

Sector11
Leonardo da Conci
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,181
Website

Re: Conky v1.9 Thread

farmersdaughter wrote:

You have no idea... my first name means “bear girl” in Latin. So yes, I get a kick out of my host name LOL. My netbook (also now running #!) is TinyPengiun. Still hunting for the ideal Conky and Tux-related wallpaper there.

Tux Penguins can be found at the Tux Factory.  And at http://wallbase.cc/ search for Tux.  Lots there.  big_smile

This one is cute:  http://wallbase.cc/wallpaper/172437

The ideal conky doesn't exist ... conky is addictive and as such we are always tweaking them.  lol


Q&As for Conky v1.9 & v1.10 | Conky Archives | All Conky Threads
.deb file editor | Debian Jessie: BunsenLabs subAlpha & Wally-jr
BL Forum Moderator | LinuxBBQ

Offline

#5317 2013-05-09 21:44:38

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Conky v1.9 Thread

mrpeachy wrote:

the sun and moon part work pretty well, although i have never worked out all the bugs (particularly how to account for things like daylight savings time)

the display of other stuff like the ISS and hubble was the experimental part

then it's time to fix this bugs. what do u think?  wink

Offline

#5318 2013-05-10 02:33:53

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

Re: Conky v1.9 Thread

^ I have a very busy weekend coming up and another busy week next week, but after that I should have lots of free time.  Who knows what will happen smile

Offline

#5319 2013-05-10 03:57:17

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,726

Re: Conky v1.9 Thread

peachy wrote:

^ I have a very busy weekend coming up and another busy week next week, but after that I should have lots of free time.  Who knows what will happen

Probably some of the best news I have heard all year!!

S11 that wallpaper looks like it was created with conky/lua in mind!!

Last edited by falldown (2013-05-10 03:59:28)

Offline

#5320 2013-05-10 05:06:21

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

Re: Conky v1.9 Thread

^LOL how goes falldown?

Offline

#5321 2013-05-10 05:48:31

easysid
#! CrunchBanger
From: India
Registered: 2013-01-25
Posts: 149

Re: Conky v1.9 Thread

Sector11 wrote:

easysid came up with the clock --- I tweaked it a bit by changing the font to Monofur, bold, changed the colour of the trailing digits, made it a bit smaller and added draw-bg.lua as a circle.

Here it is with various backgrounds, I love it:
http://t.imgbox.com/adwzJqEk.jpg

Thanks easysid for the kick start!  It's PERFECT!

Those look good smile .. thanks .

mrpeachy wrote:

agreed with Sector11, your book of conky looks good too... not every day that you see an original approach to conky/lua displays big_smile

Thanks to you. Your lua How To was a big help.  smile

Sector11 wrote:

and the same clock I tweaked - dropped the background and repositioned it on a wallpaper as the first element of a group of conkys I have been thinking about for this wallpaper:
http://t.imgbox.com/adw0Iojk.jpg

mrpeachy wrote:
Sector11 wrote:

I have been thinking about for this wallpaper:
http://t.imgbox.com/adw0Iojk.jpg

That background is just screaming for some fancy conky/lua big_smile

Absolutely. Just looking at it gives ideas.
I would either go with something retro -  Fill every circle with a dial gauge and make it look like First gen Computer panel
or something completely futuristic, straight out of sci fi.

Offline

#5322 2013-05-10 07:53:48

Dobbie03
Resident Metaller
From: New Zealand
Registered: 2009-08-15
Posts: 1,575

Re: Conky v1.9 Thread

Needing some more help, my weather icons are sitting underneath the lua background.  How do I make them be on top?

Here is my code:

Conky

# Use Xft?
use_xft yes
xftfont Open Sans Light:size=8
xftalpha 0.8
text_buffer_size 2048
uppercase yes

# 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 normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
#own_window_argb_visual yes
#own_window_argb_value 255

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

minimum_size 250

# Draw shades?
draw_shades no
default_shade_color 292421
# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders 0

# border margins
border_inner_margin 5
border_outer_margin 0
draw_graph_borders no
# border width
border_width 0

# 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 10
gap_y 40

#	Distric-Thin			fonts
#	Blue Highway
#	Raleway
#	Zekton
#	Calibri
#	Engebrechtre
#	Opeln2001
#	Open Sans Light
#	Open Sans Light

# -- Lua Load -- #
lua_load ~/.draw_bg.lua
lua_draw_hook_pre draw_bg

lua_load ~/.bargraph_small.lua
lua_draw_hook_post main_bars

imlib_cache_size 0

color1 0099CC
color2 9933CC
color3 669900
color4 FF8800
color5 CC0000
color6 AAAAAA
color7 484848

TEXT
${execi 300 curl -s "http://weather.yahooapis.com/forecastrss?w=2348079&u=c" -o ~/.cache/weather.xml}${font Open Sans Light:size=15}${execi 300 grep "yweather:location" ~/.cache/weather.xml | grep -o "city=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}, ${execi 300 grep "yweather:location" ~/.cache/weather.xml | grep -o "country=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}${font}
${font Open Sans Light:size=45}${alignr}${execi 300 grep "yweather:condition" ~/.cache/weather.xml | grep -o "temp=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}°${font}
${execi 300 cp -f ~/.weathericons/$(grep "yweather:condition" ~/.cache/weather.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*").png ~/.cache/weather.png}${image ~/.cache/weather.png -p 0,45 -s 60x60}
${execi 300 grep "yweather:condition" ~/.cache/weather.xml | grep -o "text=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}
${color6}${execi 300 grep "yweather:wind" ~/.cache/weather.xml | grep -o "speed=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}${execi 300 grep "yweather:units" ~/.cache/weather.xml | grep -o "speed=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}${color}
${execi 300 cp -f ~/.weathericons/$(grep "yweather:forecast" ~/.cache/weather.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | head -n1).png ~/.cache/weather-today.png}${image ~/.cache/weather-today.png -p 0,175 -s 30x30}${execi 300 cp -f ~/.weathericons/$(grep "yweather:forecast" ~/.cache/weather.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | tail -n1).png ~/.cache/weather-tomorrow.png}${image ~/.cache/weather-tomorrow.png -p 130,175 -s 30x30}
${goto 60}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | head -n1}${goto 190}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "day=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | tail -n1}
${goto 60}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | head -n1}° ${color6}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | head -n1}°${color}${goto 190}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "high=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | tail -n1}° ${color6}${execi 300 grep "yweather:forecast" ~/.cache/weather.xml | grep -o "low=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*" | tail -n1}°${color}${voffset 15}
${color7}${hr}${color}
${if_existing /proc/net/route wlan0}
${color1}Up:${color} ${color3}${upspeed wlan0}${color}${alignr}${color1}Down:${color} ${color3}${downspeed wlan0}${color}
${upspeedgraph wlan0 50,120 FF8800 FF8800}${alignr}${downspeedgraph wlan0 50,120 FF8800 FF8800}
${color1}Sent:${color} ${color2}${totalup wlan0}${color}${alignr}${color1}Received:${color} ${color2}${totaldown wlan0}${color}
${else}${if_existing /proc/net/route eth0}
${color1}Up:${color} ${color3}${upspeed eth0}${color}${alignr}${color1}Down:${color} ${color3}${downspeed eth0}${color}
${upspeedgraph eth0 50,120 FF8800 FF8800}${alignr}${downspeedgraph eth0 50,120 FF8800 FF8800}
${color1}Sent:${color} ${color2}${totalup eth0}${color}${alignr}${color1}Received:${color} ${color2}${totaldown eth0}${color}
${else}${if_existing /proc/net/route eth1}
${color1}Up:${color} ${color3}${upspeed eth1}${color}${alignr}${color1}Down:${color} ${color3}${downspeed eth1}${color}
${upspeedgraph eth1 50,120 FF8800 FF8800}${alignr}${downspeedgraph eth1 50,120 FF8800 FF8800}
${color1}Sent:${color} ${color2}${totalup eth1}${color}${alignr}${color1}Received:${color} ${color2}${totaldown eth1}${color}
${else}${if_existing /proc/net/route ppp0}
${color1}Up:${color} ${color3}${upspeed ppp0}${color}${alignr}${color1}Down:${color} ${color3}${downspeed ppp0}${color}
${upspeedgraph ppp0 50,120 FF8800 FF8800}${alignr}${downspeedgraph ppp0 50,120 FF8800 FF8800}
${color1}Sent:${color} ${color2}${totalup ppp0}${color}${alignr}${color1}Received:${color} ${color2}${totaldown ppp0}${color}
${else}
Network disconnected
${color6}Connect to a network to see statistics${color}
${voffset 50}
${endif}${endif}${endif}${voffset -15}

${font Open Sans Light:size=15}System Info 
${color}${font Open Sans Light:pixelsize=10}USER: ${color1}${alignr}${nodename}
${color}${font Open Sans Light:pixelsize=10}DISTRO:  ${color1}${alignr}${pre_exec lsb_release -sd || cat /etc/*release}
${color}${font Open Sans Light:pixelsize=10}KERNEL: ${color1}${alignr}${kernel}
${color}${font Open Sans Light:pixelsize=10}ARCH: ${color1}${alignr}$machine
${color}${font Open Sans Light:pixelsize=10}CPU: ${color1}${alignr}${freq_g cpu0} GHz
${color}${font Open Sans Light:pixelsize=10}UPTIME: ${color1}${alignr}${uptime}
${color}${font Open Sans Light:pixelsize=10}PROCESSES: ${color1}${alignr}$processes ($running_processes running)
${color7}${hr}${color}
${font Open Sans Light:size=15}Processors/Memory
${color}${font Open Sans Light:pixelsize=10}CPU 1: ${color1}${alignc}${freq_g 0} ${color1}Ghz ${color2}${alignr}${cpu cpu0}${color1}%
${color}${font Open Sans Light:pixelsize=10}CPU 2: ${color1}${alignc}${freq_g 1} ${color1}Ghz ${color2}${alignr}${cpu cpu1}${color1}%
${color}${font Open Sans Light:pixelsize=10}CPU 3: ${color1}${alignc}${freq_g 2} ${color1}Ghz ${color2}${alignr}${cpu cpu2}${color1}%
${color}${font Open Sans Light:pixelsize=10}CPU 4: ${color1}${alignc}${freq_g 3} ${color1}Ghz ${color2}${alignr}${cpu cpu3}${color1}%
${alignr}${loadgraph 50,250 FF8800 FF8800 -l}
${color}${font Open Sans Light:pixelsize=10}RAM: ${color3}${alignc 10}${mem}
${color}${font Open Sans Light:pixelsize=10}TOTAL: ${color3}${alignc 10}${memmax}
#${alignr}${memgraph 50,250 FF8800 FF8800 -l}
${color7}${hr}${color}
${font Open Sans Light:size=15}Top Processes
${color}${font Open Sans Light:pixelsize=10}${color #ffffff}${top_mem name 1}${color1}${alignc -10}${top_mem mem_res 1}${color2}${alignr}${top_mem mem 1}${color1} %
${color}${font Open Sans Light:pixelsize=10}${color #ffffff}${top_mem name 2}${color1}${alignc -10}${top_mem mem_res 2}${color2}${alignr}${top_mem mem 2}${color1} %
${color}${font Open Sans Light:pixelsize=10}${color #ffffff}${top_mem name 3}${color1}${alignc -10}${top_mem mem_res 3}${color2}${alignr}${top_mem mem 3}${color1} %
${color}${font Open Sans Light:pixelsize=10}${color #ffffff}${top_mem name 4}${color1}${alignc -10}${top_mem mem_res 4}${color2}${alignr}${top_mem mem 4}${color1} %
${color}${font Open Sans Light:pixelsize=10}${color #ffffff}${top_mem name 5}${color1}${alignc -10}${top_mem mem_res 5}${color2}${alignr}${top_mem mem 5}${color1} %

Lua BG

--[[	Background by londonali1010 (2009)
	VinDSL Background Hack (2010-2011)

This script draws a background to the Conky window. It covers the whole of the Conky window, but you can specify rounded corners, if you wish.

To call this script in Conky, use (assuming you have saved this script to ~/scripts/):
	lua_load ~/scripts/draw_bg.lua
	lua_draw_hook_pre draw_bg

Changelog:
	+ v3.1	VinDSL Hack (12.01.2011) Added more shading example(s).
	+ v3.0	VinDSL Hack (01.28.2011) Killed memory leak.
	+ v2.4	VinDSL Hack (01.25.2011) Declared all variables in local.
	+ v2.3	VinDSL Hack (12.31.2010) Added shading example(s).
	+ v2.2	VinDSL Hack (12.30.2010) Cleaned up the code a bit.
	+ v2.1	VinDSL Hack (12.24.2010) Added cairo destroy function(s).
	+ v2.0	VinDSL Hack (12.21.2010) Added height adjustment variable.
	+ v1.0	Original release (07.10.2009)

]]

--------------START OF PARAMETERS ------------
-- Change these settings to affect your background:

-- "corner_r" is the radius, in pixels, of the rounded corners. If you don't want rounded corners, use 0.

	local corner_r = 25

-- Set the colour and transparency (alpha) of your background (0.00 - 0.99).

--	(Light Shading Example)
--	local bg_colour = 0x4d4d4d
--	local bg_alpha = 0.45

--	(Medium Shading Example)
--	local bg_colour = 0x222222
--	local bg_alpha = 0.08

--	(Dark Shading Example)
	local bg_colour = 0x000000
	local bg_alpha = 0.75

--	(Brown Shading Example)
--	local bg_colour = 0x330000
--	local bg_alpha = 0.15

--	(Ivory Black Shading Example)
--	local bg_colour = 0x292421
--	local bg_alpha = 0.25

--	(Metallic Gold Shading Example)
--	local bg_colour = 0xd4af37
--	local bg_alpha = 0.01

--	(Navy Blue Shading Example)
--	local bg_colour = 0x33339F
--	local bg_alpha = 0.11

--	(Olive Green Shading Example)
--	local bg_colour = 0x333319
--	local bg_alpha = 0.08

--	(Silver Shading Example)
--	local bg_colour = 0xc0c0c0
--	local bg_alpha = 0.15

-- Tweaks the height of your background, in pixels. If you don't need to adjust the height, use 0.

--	(Default Setting)
--	local vindsl_hack_height = 900

	local vindsl_hack_height = 0

---------------END OF PARAMETERS -------------

require 'cairo'
local	cs, cr = nil

local 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()
	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 w = conky_window.width
	local h = conky_window.height
	local v = vindsl_hack_height
	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)
	
	cairo_move_to(cr,corner_r,0)
	cairo_line_to(cr,w-corner_r,0)
	cairo_curve_to(cr,w,0,w,0,w,corner_r)
	cairo_line_to(cr,w,h+v-corner_r)
	cairo_curve_to(cr,w,h+v,w,h+v,w-corner_r,h+v)
	cairo_line_to(cr,corner_r,h+v)
	cairo_curve_to(cr,0,h+v,0,h+v,0,h+v-corner_r)
	cairo_line_to(cr,0,corner_r)
	cairo_curve_to(cr,0,0,0,0,corner_r,0)
	cairo_close_path(cr)

	cairo_set_source_rgba(cr,rgb_to_r_g_b(bg_colour,bg_alpha))
	cairo_fill(cr)

	cairo_surface_destroy(cs)
	cairo_destroy(cr)
	end

Offline

#5323 2013-05-10 10:52:29

lionhead
#! Junkie
From: Dagobah / Germany
Registered: 2011-01-22
Posts: 459

Re: Conky v1.9 Thread

mrpeachy wrote:

^ I have a very busy weekend coming up and another busy week next week, but after that I should have lots of free time.  Who knows what will happen smile

this sounds very promising. let's wait smile

Offline

#5324 2013-05-10 12:22:44

Sector11
Leonardo da Conci
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,181
Website

Re: Conky v1.9 Thread

Dobbie03 wrote:

Needing some more help, my weather icons are sitting underneath the lua background.  How do I make them be on top?

Call the background after TEXT

# -- Lua Load -- #
lua_load ~/.draw_bg.lua
#lua_draw_hook_pre draw_bg

lua_load ~/.bargraph_small.lua
lua_draw_hook_post main_bars

imlib_cache_size 0

color1 0099CC
color2 9933CC
color3 669900
color4 FF8800
color5 CC0000
color6 AAAAAA
color7 484848

TEXT
${lua conky_draw_bg}${execi 300 curl -s "http://weathe... ... ...

Q&As for Conky v1.9 & v1.10 | Conky Archives | All Conky Threads
.deb file editor | Debian Jessie: BunsenLabs subAlpha & Wally-jr
BL Forum Moderator | LinuxBBQ

Offline

Help fund CrunchBang, donate to the project!

#5325 2013-05-10 12:40:36

Sector11
Leonardo da Conci
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,181
Website

Re: Conky v1.9 Thread

mrpeachy wrote:

agreed with Sector11, your book of conky looks good too... not every day that you see an original approach to conky/lua displays big_smile

Precisely why I encouraged him to continue.  Been a long time, he had to take a beak, but came back to it.

mrpeachy wrote:

That background is just screaming for some fancy conky/lua big_smile

You're right, gonna have mrpeachy all over it when I'm done.  big_smile

falldown wrote:
peachy wrote:

^ I have a very busy weekend coming up and another busy week next week, but after that I should have lots of free time.  Who knows what will happen

Probably some of the best news I have heard all year!!

S11 that wallpaper looks like it was created with conky/lua in mind!!

Yup, agreed, super nice to have mrpeachy back.

See above, if I had mastered "interactive" as well as you did I can think some you did that might fit in there as well.

easysid wrote:

Absolutely. Just looking at it gives ideas.
I would either go with something retro -  Fill every circle with a dial gauge and make it look like First gen Computer panel or something completely futuristic, straight out of sci fi.

The idea is definitely to have some rings, circles, bars and fegular conky commands.

Last edited by Sector11 (2013-05-10 13:08:27)


Q&As for Conky v1.9 & v1.10 | Conky Archives | All Conky Threads
.deb file editor | Debian Jessie: BunsenLabs subAlpha & Wally-jr
BL Forum Moderator | LinuxBBQ

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.

Debian Logo