Re: Post your .conkyrc files w/ screenshots
Quote:
Originally Posted by
AndyOpie150
arclance: Is there a way to just have the weather radar, apart from the rest of of your conkyWeather. Same size as in your conkyWeather?
Yes it can be moved fairly easily by editing some lines in the function that draws them.
Code:
function drawRad_Sat_Small(cr, blx, bly, localx, localy)
local button_name = "small_Close/Wide"
if (localx >= buttons[button_name]["bl_x"]) and (localx <= (buttons[button_name]["bl_x"] + buttons[button_name]["width"])) and (localy <= buttons[button_name]["bl_y"]) and (localy >= (buttons[button_name]["bl_y"] - buttons[button_name]["height"])) then
if buttons[button_name]["state"] == 0 then
buttons[button_name]["state"] = 1
elseif buttons[button_name]["state"] == 1 then
buttons[button_name]["state"] = 0
end --# if buttons[button_name]["state"] == 0 then
elseif buttons[button_name]["state"] == nil then
buttons[button_name]["state"] = 0
end --# if (localx >= buttons[button_name]["bl_x"]) and (localx <= (buttons[button_name]["bl_x"] + buttons[button_name]["width"])) and (localy <= buttons[button_name]["bl_y"]) and (localy >= (buttons[button_name]["bl_y"] - buttons[button_name]["height"])) then
--####
local radarImage_Path = nil
local satteliteImage_Path = nil
if buttons[button_name]["state"] == 0 then
radarImage_Path = logDirectory.."/Images/radarImage_temp.gif."..string.format("%03i",updateCheck)
satteliteImage_Path = logDirectory.."/Images/satelliteImage_temp.gif."..string.format("%03i",updateCheck)
else
radarImage_Path = logDirectory.."/Images/radarImage_Wide_temp.gif."..string.format("%03i",updateCheck)
satteliteImage_Path = logDirectory.."/Images/satelliteImage_Wide_temp.gif."..string.format("%03i",updateCheck)
end --# if buttons[button_name]["state"] == 0 then
image({x=(923),y=(1),w=136,h=136,file=radarImage_Path})
image({x=(923),y=(137),w=136,h=136,file=satteliteImage_Path})
--cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL)
--cairo_set_font_size (cr, fSize)
cr = draw_shaded_text(cr, (updateCheck + 1), 925, 12, {color1_R,color1_G,color1_B,color1_A}, {color3_R,color3_G,color3_B,color3_A})
cr = draw_shaded_text(cr, (updateCheck + 1), 925, 149, {color1_R,color1_G,color1_B,color1_A}, {color3_R,color3_G,color3_B,color3_A})
return cr,blx,bly
end --# function drawRad_Sat_Small(cr, blx, bly)
This is one of the functions that I need to unhardcode before I can make the script resizable.
These lines control the position of the images.
Code:
image({x=(923),y=(1),w=136,h=136,file=radarImage_Path})
image({x=(923),y=(137),w=136,h=136,file=satteliteImage_Path})
Change the x=() and y=() values to change their positions.
You can change the position of the index numbers by changing these lines.
Code:
cr = draw_shaded_text(cr, (updateCheck + 1), 925, 12, {color1_R,color1_G,color1_B,color1_A}, {color3_R,color3_G,color3_B,color3_A})
cr = draw_shaded_text(cr, (updateCheck + 1), 925, 149, {color1_R,color1_G,color1_B,color1_A}, {color3_R,color3_G,color3_B,color3_A})
The two settings after (updateCheck + 1) control their position.
You will probably need to change the size of the conky window in the .conkyrc when you do this.
When you do that you will need to change how far from the top of the conky window the script starts.
You can do that by editing the "local bly = 24" value in this section of the script.
Code:
--######### Line 1 (Scrolling Alert) ##############################
local blx = 0
local bly = 24
Re: Post your .conkyrc files w/ screenshots
Thanks mrpeachy, I downloaded the files you have at #! and am gonna try out the example and see if I can't get it to do what I want. Hopefully this doesn't require too much more tweaking of voffsets and goto(s). I hate how editing one leads to fixing another and then finding a balance between them all.
Well I thought I read that there was a test file, but the file is blank except for a ${goto}${cpu} line, I ran that and it just showed numbers near the top of my screen. :( It's beyond my scope of reasoning I suppose. I'll look for someone who has already implemented this stuff and hopefully I can at least figure out what to copy and paste.
Re: Post your .conkyrc files w/ screenshots
Thanks arclance. This will give me something to gnaw on for a little while.
Re: Post your .conkyrc files w/ screenshots
Quote:
Originally Posted by
XiaolinDraconis
Thanks mrpeachy, I downloaded the files you have at #! and am gonna try out the example and see if I can't get it to do what I want. Hopefully this doesn't require too much more tweaking of voffsets and goto(s). I hate how editing one leads to fixing another and then finding a balance between them all.
Well I thought I read that there was a test file, but the file is blank except for a ${goto}${cpu} line, I ran that and it just showed numbers near the top of my screen. :( It's beyond my scope of reasoning I suppose. I'll look for someone who has already implemented this stuff and hopefully I can at least figure out what to copy and paste.
v9000 is all setup in lua script.... in the conkyrc the lua scripts are run
currently there is this
Code:
lua_load ~/v9000/v9000.lua
lua_draw_hook_pre weather
lua_load ~/v9000/weather_testing.lua
TEXT
${goto 230}${cpu}
weather_testing.lua is a script that outputs all the data that v9000 can output
so if you saw numbers and icons etc then that is a good sign that things are working :)
replace the line
Code:
weather_testing.lua
with
or
and you will see the data organized into a display
you can remove the goto and cpu from the conkyrc, but keep a blank line under TEXT
Re: Post your .conkyrc files w/ screenshots
Quote:
Originally Posted by
mrpeachy
v9000 is all setup in lua script.... in the conkyrc the lua scripts are run
currently there is this
Code:
lua_load ~/v9000/v9000.lua
lua_draw_hook_pre weather
lua_load ~/v9000/weather_testing.lua
TEXT
${goto 230}${cpu}
weather_testing.lua is a script that outputs all the data that v9000 can output
so if you saw numbers and icons etc then that is a good sign that things are working :)
replace the line
Code:
weather_testing.lua
with
or
and you will see the data organized into a display
you can remove the goto and cpu from the conkyrc, but keep a blank line under TEXT
Thats what i thought would happen, instead I got an error. Terminal output showed "Conky: llua_do_call: function conky_weather execution failed: attempt to call a nil value" repeatedly.
Oops, I forgot to update the name of the called script.
Well still getting the error.
Code:
##############################################
# Settings
##############################################
max_specials 10000
max_user_text 1500000
background no
use_xft yes
#xftfont Sans:size=12
#xftalpha 1
font Mono:size=8
total_run_times 0
own_window yes
own_window_title conky_weather
own_window_type override
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
double_buffer yes
minimum_size 600 600
maximum_width 600
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes
default_color white
default_shade_color black
default_outline_color white
alignment top_right
gap_x 30
gap_y 30
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
color1 86acad #darker blue
color2 b1c9c9 #lighter blue
text_buffer_size 100000
top_name_width 10
update_interval 1
lua_load ~/v9000/v9000.lua
lua_draw_hook_pre weather
lua_load ~/v9000/weather_script.lua
TEXT
I tried it without editing anything other than changing to s11template.lua and weather_script.lua and both produce the same error.
Re: Post your .conkyrc files w/ screenshots
Quote:
Originally Posted by
XiaolinDraconis
Thats what i thought would happen, instead I got an error. Terminal output showed "Conky: llua_do_call: function conky_weather execution failed: attempt to call a nil value" repeatedly.
if you could do the following
start the conky then killall conky once the error starts
then scroll up in the terminal to where conky was first started and post what you see down to where the nil error starts
Re: Post your .conkyrc files w/ screenshots
I was just being an idiot as usual. Had moved the v9000 out of home directory. So here's the results, I kinda understand what the problem is, but not entirely.
xiaolin@Dojo:~$ conky -c ~/v9000/conky_weather
Conky: llua_load: /home/xiaolin/v9000/v9000.lua:8: attempt to concatenate local 'username' (a nil value)
Conky: desktop window (460006b) is subwindow of root window (b0)
Conky: window type - normal
Conky: drawing to created window (0x3400002)
Conky: drawing to double buffer
Re: Post your .conkyrc files w/ screenshots
Quote:
Originally Posted by
XiaolinDraconis
I was just being an idiot as usual. Had moved the v9000 out of home directory. So here's the results, I kinda understand what the problem is, but not entirely.
xiaolin@Dojo:~$ conky -c ~/v9000/conky_weather
Conky: llua_load: /home/xiaolin/v9000/v9000.lua:8: attempt to concatenate local 'username' (a nil value)
Conky: desktop window (460006b) is subwindow of root window (b0)
Conky: window type - normal
Conky: drawing to created window (0x3400002)
Conky: drawing to double buffer
make sure the v9000 folder is back in your home directory - /home/username/v9000
seems like the command
Code:
os.getenv("USERNAME")
isnt returning your username
in v9000.lu edit line 7
Code:
local username = username
changing the second instance of username to you actual username in quotes
for you it would read
Code:
local username = "xiaolin"
Re: Post your .conkyrc files w/ screenshots
curious, would changing this
local username = username
package.path = '/home/'..username..'/.v9000_config.lua'
to
local username = username
package.path = '/home/'username'/.v9000_config.lua'
possibly fix that?
Re: Post your .conkyrc files w/ screenshots
Quote:
Originally Posted by
XiaolinDraconis
curious, would changing this
local username = username
package.path = '/home/'..username..'/.v9000_config.lua'
to
local username = username
package.path = '/home/'username'/.v9000_config.lua'
possibly fix that?
no. the two dots is how you put things together in strings in lua for example
Code:
string1="hello"
string2="world"
string3=string1..string2
print (string3) --> helloworld
line 7 is in there specifically in case the os.getenv command doesnt work properly