You are not logged in.
1. the click image doesn't work ...
2. outta coffee! P-A-N-I-C!
Fixed I think
Give a man a truth and he will think for a day.
Teach a man to reason and he will think for a lifetime!
Offline
Sector11 wrote:1. the click image doesn't work ...
2. outta coffee! P-A-N-I-C!Fixed I think
What? the link or the coffee
Ahhh the link ... looks good. {sip}
Last edited by Sector11 (2011-11-13 20:22:35)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
..Thank you MrPeachy yea it works on xubuntu 11.10 a few small bugs when I edit the conkyrc and save it throws this error and will not restart
Conky: llua_do_call: function conky_weather execution failed: /home/dlm955/conky/luas/thermometer3.lua:223: attempt to index global 'day1' (a nil value)but I overcome this will killall conky and restart it ok....
It took a couple fires here also. It seems the script is running ahead of the webpage parsing. After 'day1' is loaded it renders the first time. One time blank, then empty thermometer and right text then all is well again.
That right conky is a great work in progress.
Congratulations, you've figured out the sound of one hand clapping...
Offline
Thank you MrPeachy yea it works on xubuntu 11.10 a few small bugs when I edit the conkyrc and save it throws this error and will not restart
Conky: llua_do_call: function conky_weather execution failed: /home/dlm955/conky/luas/thermometer3.lua:223: attempt to index global 'day1' (a nil value)but I overcome this will killall conky and restart it ok....
well here's a screen with everything working so far
you are welcome
yes, because of the timed section at the top of the script which is triggered by the number of conky updates
and when you edit the conkyrc and re-save the update number doesnt reset to 0, it keeps going
so kill restart is best
Offline
you are welcome
yes, because of the timed section at the top of the script which is triggered by the number of conky updates
and when you edit the conkyrc and re-save the update number doesnt reset to 0, it keeps going
so kill restart is best
That's right: KFC that sucker!!!
That's Kentucky Fried Conky for all you folks out there:
Bash alias:
alias kfc='killall conky'
EDIT: No it was never meant to mean "that"!!!!
Last edited by Sector11 (2011-11-13 22:27:38)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
latest conky using my favorite game. I'll post up the scripts in a bit. Thanks for everyone's help
BTW. Still not finished just wanted to post up before I get yelled at by the girlfriend
Also does anyone have a script for a conky with just a battery bar meter that covers the whole screen width wise. One preferablly with rounded edges. thanks.
Offline
latest conky using my favorite game. I'll post up the scripts in a bit. Thanks for everyone's help
BTW. Still not finished just wanted to post up before I get yelled at by the girlfriend
Also does anyone have a script for a conky with just a battery bar meter that covers the whole screen width wise. One preferablly with rounded edges. thanks.
rounded ends (=====) or the bars rounded
check back a few post I'am learning to use a lua by wlourf that makes great bars and such tell me how wide and tall you want it in pixels and I'll give it a go....it can even make it go top to bottom of screen if you like..
Give a man a truth and he will think for a day.
Teach a man to reason and he will think for a lifetime!
Offline
demarsjcd wrote:latest conky using my favorite game. I'll post up the scripts in a bit. Thanks for everyone's help
BTW. Still not finished just wanted to post up before I get yelled at by the girlfriend
Also does anyone have a script for a conky with just a battery bar meter that covers the whole screen width wise. One preferablly with rounded edges. thanks.
rounded ends (=====) or the bars rounded
check back a few post I'am learning to use a lua by wlourf that makes great bars and such tell me how wide and tall you want it in pixels and I'll give it a go....it can even make it go top to bottom of screen if you like..
Thanks buddy. About 1000 x 100 pixels. Any way they to section it or put verticle lines in it like below. Thats just a sketch.
Offline
i think i am getting towards being done with this project for the time being
here is what it looks like
for those brave souls who want to try it
http://ompldr.org/vYjlteA
if anyone has ideas for weather, or wants to use a certain part of the script then let me know
Offline
i think i am getting towards being done with this project for the time being
if anyone has ideas for weather, or wants to use a certain part of the script then let me know
Time coded in lua still is a mystery to me.
I think I saw the howto earlier today and will not get to play until tomorrow afternoon as you now have almost 1200 lines.
Also, alignment bottom_right seems to be not working. If you have any insight on how to solve this. I found bg scaling, and transparency on my own.
Congratulations, you've figured out the sound of one hand clapping...
Offline
@ mrpeachy
Pure fu**ing genius - brilliance my man...
AWESOME
Could not have said it better myself. I have to ask, what is the first step in learning lau to a point where you can create the amazing lau scripts you create. It is absolutely amazing.
Offline
i think i am getting towards being done with this project for the time being
here is what it looks like
{snip}
if anyone has ideas for weather, or wants to use a certain part of the script then let me know
Opposing statements: Does not compute! recalculando - recalculando! (as they say here = recalculating)
I think it is awesome, and I can have it anytime anywhere!
EXCELLENT - AWESOME - FANTASTIC - only scratches the surface!
Well done mrpeachy! Well done indeed!
EDIT
I moved the clock to the middle left, thanks for leaving the space.
lua_load ~/Conky/LUA/thermometer_v4.lua
TEXT
${lua conky_draw_bg 10 0 0 650 510 0x000000 0.5}
${lua conky_weather}${voffset 240}${goto 10}${font digitalk:size=18}${time %T}${font}
Last edited by Sector11 (2011-11-14 15:33:42)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Moderator: Kill this please
Last edited by Sector11 (2011-11-14 15:31:21)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
thanks all!
@ichase
how to learn lua...
i started by reading londonali1010's early scripts, the rings script and clock etc (back in the days when lua was just catching on in conky)
then try modifying a script and see what happens, start small
also read the cairo drawing tutorial http://cairographics.org/documentation/
here is a blank lua script that i use, so i dont have to go through the setup part each time
also has some useful bits and pieces that i use the most
require 'cairo'
function conky_draw_fig()
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
--#########################################################################################################
--#########################################################################################################
--[[useful operations
1. cutting string up into individual characters (requires split function)
sub=string.gsub(text, ".", "%1|")
split=string.split(sub, "|")
slen=string.len(text)
2. how to find points around a circle
arc=(math.pi/180)*degree
x=0+radius*(math.sin(arc))
y=0-radius*(math.cos(arc))
3. set up and show text
font="Mono"
fsize=12
cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, fsize)
cairo_set_source_rgba (cr,1,1,1,1)
cairo_move_to (cr,x,y)
cairo_show_text (cr,"text")
4-text extents
text="text
extents=cairo_text_extents_t:create()
cairo_text_extents(cr,text,extents)
width=extents.width
height=extents.height
5-linear gradient--example top to bottom
rh=rectangle height
rw=rectangle width
local pat = cairo_pattern_create_linear (0,y,0,y+rh);
cairo_pattern_add_color_stop_rgba (pat, 1, 0, 0, 0, 1);
cairo_pattern_add_color_stop_rgba (pat, 0, 1, 1, 1, 1);
cairo_rectangle (cr,x,y,rw, rh);
cairo_set_source (cr, pat);
cairo_fill (cr);
cairo_pattern_destroy (pat);
6 execute commands and save to strings
local f = io.popen("command")
string = f:read("*a")
f:close()
7 color function
function rgb_to_r_g_b(col_a)
return ((color/0x10000) % 0x100)/255,((color]/0x100) % 0x100)/255,(color % 0x100)/255
end
]]
--#########################################################################################################
--#########################################################################################################
end-- if updates>5
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
end-- end main function
Offline
sorry did not find a way to radius the ends of the bar, but each bar is radius top/bottom
Ok here you go....I tested this on my lappy with ubu 11.04 worked great here's a pic
click pic to inlarge , click pic again to fill browser
the last ten bars are differant to show last 10 percent to charge
empty bars are red with white outline
full bars are solid green
last ten bars empty red/white - full green with red outline
the whole conky is 1010 pixels wide not sure of height as conky controls that
make sure line num 47 in batbarconkyrc points to the battbargraph.lua folder {where you put it}
here is link from my dropbox http://dl.dropbox.com/u/40226108/batbar.zip
just post any question here I'll try to give quick reply....
Last edited by dlm955 (2011-11-14 19:29:22)
Give a man a truth and he will think for a day.
Teach a man to reason and he will think for a lifetime!
Offline
oops... just noticed that my kmh and mph are in the wrong place on the wind speed gauge (the inside is kmh then mph with knots on the outside)
corrected code is here
http://ompldr.org/vYmEycg
or just go to line 438 and change that to mph, line 446 change to kmh
Offline
demarsjcd wrote:sorry did not find a way to radius the ends of the bar, but each bar is radius top/bottom
Ok here you go....I tested this on my lappy with ubu 11.04 worked great here's a pic
click pic to inlarge , click pic again to fill browser
the last ten bars are differant to show last 10 percent to charge
empty bars are red with white outline
full bars are solid green
last ten bars empty red/white - full green with red outline
the whole conky is 1010 pixels wide not sure of height as conky controls thatmake sure line num 47 in batbarconkyrc points to the battbargraph.lua folder {where you put it}
here is link from my dropbox http://dl.dropbox.com/u/40226108/batbar.zip
just post any question here I'll try to give quick reply....
Thanks buddy. It worked out good. Any way I can get the script for that conky on the top right of you last screen shot. It looked like a radar. I was looking for something that lays horizontal with the cone shape and with a transparent background. You are da man!
Offline
oops... just noticed that my kmh and mph are in the wrong place on the wind speed gauge (the inside is kmh then mph with knots on the outside)
corrected code is here
http://ompldr.org/vYmEycgor just go to line 438 and change that to mph, line 446 change to kmh
Direct change to code is easier
Thanks
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
battery bar is a perfect project to start on writing a lua script
require 'cairo'
function conky_battbar()
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
--#####################################
--set line thickness
cairo_set_line_width (cr, 30);
--set line to have rounded end
cairo_set_line_cap (cr, CAIRO_LINE_CAP_ROUND)
--set start position for line
x_position=30
y_position=100
--set total length of line
length=200
--draw background line
--set color and alpha for background
cairo_set_source_rgba (cr,0,0,0,0.5)
--[[
note about setting colors
in lua you set colors and alpha as numbers between 0 and 1 (red,green,blue,alpha)
when you get colors you often get rgb numbers out of 255
you can use these numbers directly as you can input equations just as easily as numbers
cairo_set_source_rgba (cr,250/255,100/255,0/255,1) gives you orange, for alpha 1=full opaque 0=fulltransparent
]]
--move tp where we want to start the line
cairo_move_to (cr,x_position,y_position)--reference positions set above
--draw a line the length we set
cairo_rel_line_to (cr,length,0)--reference length set above
cairo_stroke (cr)-- draws the line
--draw indicator line, draw after background so it draws ontop
--get value using conky parse
battperc=tonumber(conky_parse("${battery_percent}"))--tonumber makes sure battvalue is a number
--get a value to plot based on total length and battery %
battvalue=(length/100)*battperc
--set up our indicator
--width and line end type will carry over from when we set them at the top
--set color and alpah
cairo_set_source_rgba (cr,1,1,1,1)
--move to start
cairo_move_to (cr,x_position,y_position)--reference positions set above
--draw a line indicating current battery %
cairo_rel_line_to (cr,battvalue,0)--reference battvalue calculated above
cairo_stroke (cr)-- draws the line
--###########################################
end-- if updates>5
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end-- end main function
conkyrc
lua_load ~/lua/battbar.lua
TEXT
${lua conky_battbar}
it may not be as fancy as some bars you can get through other scripts
but the fanciness will come the better you get at writing scripts
Offline
Offline
Thanks buddy. It worked out good. Any way I can get the script for that conky on the top right of you last screen shot. It looked like a radar. I was looking for something that lays horizontal with the cone shape and with a transparent background. You are da man!
thank you
you have everything your looking for in that batbargraph.lua,read the first 100 lines and you will find info on what to edit to get the effect you want also check the web page on line 5 for advanced settings...
Last edited by dlm955 (2011-11-15 00:46:02)
Give a man a truth and he will think for a day.
Teach a man to reason and he will think for a lifetime!
Offline
battery bar is a perfect project to start on writing a lua script
{snip}
it may not be as fancy as some bars you can get through other scripts
but the fanciness will come the better you get at writing scripts
No battery!
Will it do camera battery?
You should start a Learn LUA with mrpeachy thread.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
mrpeachy's 100% LUA Weather is Featured and in the 2011 (3) Gallery at Conky PitStop.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
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