One quick question - that's interactive?
Printable View
I was wondering if anyone else was having this problem. Whenever I start a conky (I have 8 of them running all the time), they start in one position, but after saving an rc or restarting conky with
the conky moves down 5 pixels and 5 pixels to the right. Today I got everything adjusted how I wanted on the WUN weather conky, saved the file so I could watch for errors in the terminal, and everything was off. I Don't know exactly when it started, but I tried reinstalling conky, uninstalling 1.8.1 and installing 1.9.0. Still the same thing. I should specify that all of my conky display is through lua scripts, nothing is actually displayed in the conky rc, but I did try running one with no lua and displaying hard coded text and it did the same thing. Once I save or restart the first time, it doesn't move anymore on subsequent saves/restarts. Anyone have any ideas? It's not a real big deal, but it gets kind of aggravating.Code:sudo killall -SIGUSR1 conky
That doesn't work for me ... all my conkys start on the desktop I run the command on.
I have the same question as mrpeachy, any "5" in your conky?
gap_x
gap_y
inner_border_margin
outer_border_margin
etc
Or do you sent borders anywhere else in Ubuntu ... I have a 3 pixel edge around my entire screen.
When I had stuff displayed by the rc I had the same problem, but now I have everything displayed by the lua scripts using
for whichever desktop I want it on. Most of my stuff is in 1 lua that displays on four different desktops. Then I have one to draw all of my frames, which draws on five desktops. Then misc. others for testing, playing etc.Code:desktop=tonumber(conky_parse("${desktop}"))
if desktop==3 then
do stuff
end
No, they all have x and y gaps of 0, except one with a y gap 0f 30, and no margins set (that I can find). As far as system settings, I cant find any margin settings (I'm on xubuntu with xfwm4 window manager. If anyone knows where these settings are, if they exist, please let me know).Quote:
do you have anything set to 5 in the conky rc?
gap? inner margin?
Below you will find my wunrc (the only thing I changed in it was the template call), my info rc, just for comparison, and the weather template (it's pretty ugly right now).:)
Any help is greatly appreciated.
wunrc
my_info_lua_rcCode:#######################################################################
# conky -c /path/to/wun/conky_configs/wunrc &
# pkill -xf "conky -c /path/to/wun/conky_configs/wunrc" &
#
## The latest script is a lua only weather script. aka: wun
## » Wun Weather Script for Conky (Lua)
## http://crunchbang.org/forums/viewtopic.php?id=31306
##
## mrpeachys LUA Tutorial
## http://crunchbang.org/forums/viewtopic.php?id=17246
##
## Conky settings
## http://conky.sourceforge.net/config_settings.html
##
## Conky Variables below TEXT
## http://conky.sourceforge.net/variables.html
##
#######################################################################
# Conky Settings, descriptions from the url above
#######################################################################
### The number of times Conky will update before quitting.
### Zero makes Conky run forever.
total_run_times 0
### Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont Mono:size=8
xftalpha 1
### Force UTF8? requires XFT
override_utf8_locale yes
### Size of the standard text buffer (default is 256 bytes).
### This buffer is used for intermediary text, such as individual lines, output from $exec vars, and various other variables.
### Increasing the size of this buffer can drastically reduce Conky's performance, but will allow for more text display per variable.
text_buffer_size 1536
# Maximum number of special things, e.g. fonts, offsets, aligns, etc. (default is 512)
max_specials 3000
# if yes, Conky will be forked to background when started.
background yes
# Update interval in seconds. See wun_config.lua
update_interval 1
### window settings
own_window yes
own_window_transparent yes
own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
### ARGB can be used for real transparency,
### note that a composite manager is required for real transparency.
own_window_argb_visual yes
own_window_argb_value 255
### Imlib2 image cache size, in bytes. Defaults to 4MiB.
### Increase this value if you use $image lots. Set to 0 to disable the image cache
#imlib_cache_size 0
### Use the Xdbe extension? (eliminates flicker)
double_buffer yes
### Shades, outlines and borders
draw_shades no
default_shade_color black
draw_outline no
default_outline_color white
draw_borders no
draw_graph_borders no
### Shortens units to a single character (kiB->k, GiB->G, etc.). Default is off.
#short_units yes
### Pad percentages to this many decimals (0 = no padding)
pad_percents 0
### Inner border margin in pixels (the margin between the border and text).
#border_inner_margin 0
### Width for $top name value (defaults to 15 characters).
top_name_width 10
### Subtract (file system) buffers from used memory?
no_buffers yes
### if YES, text is rendered in upper case
uppercase no
### The number of samples to average for CPU monitoring.
cpu_avg_samples 2
### The number of samples to average for net data
net_avg_samples 2
### Adds spaces around certain objects to stop them from moving other things around.
### Arguments are left, right, and none (default)
use_spacer right
### Manually set the window name. Defaults to "<hostname> - conky".
### Important for interactive conky
own_window_title interactiveconkyrc
### Aligned position on screen, may be:
### top_left, top_right, top_middle, bottom_left, bottom_right, bottom_middle, middle_left, middle_middle, middle_right, or none
### (also can be abreviated as tl, tr, tm, bl, br, bm, ml, mm, mr).
alignment top_left
### Minimum size of window: width height
minimum_size 1920 1100
### Maximum width of window
maximum_width 1920
### Gap between text and screen borders.
gap_x 0 ##Gap, in pixels, between right or left border of screen
gap_y 0 ##Gap, in pixels, between top or bottom border of screen
#######################################################################
# Lua Settings
# Load and run wun weather script -- hook_post
#######################################################################
lua_load ~/wun/wun.lua
lua_draw_hook_post weather
#######################################################################
#######################################################################
# Load template
#######################################################################
#lua_load ~/wun/templates/astroweather.lua #900 900
#lua_load ~/wun/templates/s11template.lua #350 900
#lua_load ~/wun/templates/wun_glassy_side_bar.lua #200 900
lua_load ~/wun/templates/classic10day.lua #600 900
#lua_load ~/wun/templates/testing/wun_testing.lua##unfinished
TEXT
classic10day.lua (heavily modified)Code:##############################################
# Settings
##############################################
max_specials 10000
max_user_text 1500000
background no
use_xft yes
#xftfont Sans:size=12
#xftalpha 1
font Ubuntu Mono:size=10
total_run_times 0
own_window yes
own_window_argb_visual yes
own_window_transparent yes
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 1920 1080
maximum_width 1920
draw_shades no
draw_outline no
draw_borders no
default_bar_size 185 9
draw_graph_borders yes
default_color white
default_shade_color black
default_outline_color white
alignment top_left
gap_x 0
gap_y 30
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
text_buffer_size 512
top_name_width 10
if_up_strictness address
update_interval 1
lua_load /home/dale/scripts/my_info.lua
lua_draw_hook_pre main
#lua_draw_hook_post clock_rings
#lua_load ~/scripts/bargraph.lua
#lua_draw_hook_pre main_bars
TEXT
#${if_running guayadeque}${execp ~/conkyGuayadeque.py --template=~/conkyGuayadeque.template}${else}${endif}${font}
#${font Ubuntu Mono:size=12}${color 75b3d1}${execp gcal -s 1 | sed -e 's/</${color ffd700} /' -e 's/>/${color f0f0f0} /' -e 's/^./${goto 165}/'}
Thanks for your help. If you need anything else, let me know.Code:_G.weather_script = function()--#### DO NOT EDIT THIS LINE ##############
--these tables hold the coordinates for each repeat do not edit #########
top_left_x_coordinate={}--###############################################
top_left_y_coordinate={}--###############################################
--#######################################################################
--SET DEFAULTS ##########################################################
--set defaults do not localise these defaults if you use a seperate display script
-- default_font="CorporateMonoExtraBold"--font must be in quotes
default_font="Anonymous Pro:bold"--font must be in quotes
default_font_size=11
default_color=0xffffff--white
default_alpha=1--fully opaque
default_image_width=50
default_image_height=50
-- ## New Options ###
default_face="normal"
-- "normal" for normal/normal
-- "bold" for normal/bold
-- "italic" for italic/normal
-- "bolditalic" for italic/bold
-- END OF DEFAULTS ######################################################
function os.capture(cmd, raw)
local f = assert(io.popen(cmd, 'r'))
local s = assert(f:read('*a'))
f:close()
if raw then return s end
s = string.gsub(s, '^%s+', '')
s = string.gsub(s, '%s+$', '')
s = string.gsub(s, '[\n\r]+', ' ')
return s
end
desktop=tonumber(conky_parse("${desktop}"))
if desktop==7 then
--START OF WEATHER CODE -- START OF WEATHER CODE -- START OF WEATHER CODE
out({c=0xffd700,a=1,f="Digital-7",fs=42,x=641+5,y=299+5,txt="wun Weather from wunderground.com"})
--out({c=0xffd700,a=1,f="Digital-7",fs=42,x=50,y=304,txt=updates})
out({c=0xffd700,a=1,f="Digital-7",fs=24,x=349+5,y=379+5,txt="current conditions"})
out({c=0xffd700,a=1,f="Digital-7",fs=24,x=1369+5,y=379+5,txt="today's forecast"})
xstart=380+5
ystart=430
out({c=0xffd700,a=1,x=958+5,y=ystart+105+8,f="Digital-7 Mono",fs=24,txt=update.day_pad.." "..update.monthname_short.." "..update.year,hj="c"})
out({c=0xffd700,a=1,x=958+5,y=ystart+130+8,f="Digital-7 Mono",fs=24,txt=update.hour_12..":"..update.min.." "..update.ampm,hj="c"})
image({x=300,y=ystart+10,h=100,w=100,file=now.weather_icon})
image({x=505+5,y=ystart+8+5,h=50,w=50,file=now.wind_icon})
-- Temp / FeelsLike & CONDITIONS TEXT
out({c=0xffd700,a=1,f="Digital-7",fs=50,x=366+5,y=ystart+185+5,txt=now.temp_imperial,hj="c"})
out({c=0xffd700,a=1,f="Digital-7",fs=50,x=530+5,y=ystart+185+5,txt=now.feelslike_imperial,hj="c"})
--out({c=0x00FFFF,a=1,f="WW Digital",fs=25,face="normal",x=140,y=60,txt="-22".."°"})
out({c=0x75b3d1,a=1,x=351+5,y=ystart+142+5,txt="Temp"})
out({c=0x75b3d1,a=1,x=505+5,y=ystart+142+5,txt="Feels Like"})
image({ x=1350+5, y=ystart-15+5, h=150,w=150,file=day[1].weather_icon})
out({c=0x00BFFF,a=1,f="Zekton",fs=24,x=296+151+5,y=ystart+114+5,txt=now.conditions,hj="c"})--"This is a test again",hj="c"})--
out({c=0x00BFFF,a=1,f="Zekton",fs=24, x=1457+5, y=ystart+114+5, txt=day[1].conditions_user,hj="c"})
-- data titles
-- data output
datay=110+5 -- y=datay or
datayy=15 -- y=ystart+(datayy*1) use 1 or more
ystart=ystart+90
out({c=0x75b3d1,a=1,x=xstart+981, y=ystart+50, txt="High"})
out({c=0xffd700,a=1,x=xstart+958+36,f="Digital-7",fs=50, y=ystart+95,f="Digital-7",fs=50, txt=day[1].high_imperial,hj="c"})
out({c=0x75b3d1,a=1,x=xstart+1147, y=ystart+50, txt="Low"})--,hj="r"
out({c=0x00BFFF,a=1,x=xstart+1157,f="Digital-7",fs=50, y=ystart+95, txt=day[1].low_imperial,hj="c"})
out({c=0x75b3d1,a=1,x=xstart-85, y=ystart+105+(datayy*5), txt="Wind Chill:"})
out({c=0xe5e5e5,a=1,x=xstart-5, y=ystart+105+(datayy*5), txt=now.windchill_imperial..now.windchill_imperial_unit})
out({c=0x75b3d1,a=1,x=xstart-85, y=ystart+105+(datayy*3), txt="Heat Index:"})
out({c=0xe5e5e5,a=1,x=xstart-5, y=ystart+105+(datayy*3), txt=now.heatindex_imperial..now.heatindex_imperial_unit})
out({c=0x75b3d1,a=1,x=xstart-85, y=ystart+105+(datayy*6), txt="UV Index:"})
out({c=0xe5e5e5,a=1,x=xstart-5, y=ystart+105+(datayy*6), txt=now.uvi.." "..now.uvi_text})
--out({c=0xDCDCDC,a=1,x=xstart+50, y=ystart+15+(datayy*3), txt="Wind:",hj="r"})
out({c=0x75b3d1,a=1,x=xstart+148,f="Zekton",fs=16, y=ystart-59+(datayy*3), txt=now.wind_imperial..now.wind_imperial_unit,hj="c"})
--out({c=0x00BFFF,a=1,x=xstart+110, y=ystart+15+(datayy*3), txt=now.wind_dir})
--out({c=0xDCDCDC,a=1,x=xstart+170, y=ystart+15+(datayy*3), txt="@",hj="r"})
--out({c=0x00BFFF,a=1,x=xstart+175, y=ystart+15+(datayy*3), txt=now.wind_degrees})
out({c=0x75b3d1,a=1,x=xstart-85+180, y=ystart+105+(datayy*6), txt="Humidity:"})
out({c=0xe5e5e5,a=1,x=xstart+218, y=ystart+105+(datayy*6), txt=now.humidity.."%",hj="r"})
out({c=0x75b3d1,a=1,x=xstart-85, y=ystart+105+(datayy*4), txt="Dewpoint:"})
out({c=0xe5e5e5,a=1,x=xstart-5, y=ystart+105+(datayy*4), txt=now.dewpoint_imperial..now.dewpoint_imperial_unit})
out({c=0x75b3d1,a=1,x=xstart-85+180, y=ystart+105+(datayy*4), txt="Barometer:"})
out({c=0xe5e5e5,a=1,x=xstart+218, y=ystart+105+(datayy*4), txt=now.pressure_imperial..now.pressure_imperial_unit,hj="r"})
out({c=0x75b3d1,a=1,x=xstart-85+180, y=ystart+105+(datayy*5), txt="Visibility:"})
out({c=0xe5e5e5,a=1,x=xstart+218, y=ystart+105+(datayy*5), txt=now.visibility_imperial..now.visibility_imperial_unit,hj="r"})
out({c=0x75b3d1,a=1,x=xstart+970-42, y=ystart+105+(datayy*3), txt="Precipitation:"})
out({c=0xe5e5e5,a=1,x=xstart+1070-42, y=ystart+105+(datayy*3), txt=day[1].precipitation.." %"})
out({c=0x75b3d1,a=1,x=xstart+970-42, y=ystart+105+(datayy*4), txt="Humidity:"})
out({c=0xe5e5e5,a=1,x=xstart+1070-42, y=ystart+105+(datayy*4), txt=day[1].minhumidity.." %"})
out({c=0x75b3d1,a=1,x=xstart+970-42, y=ystart+105+(datayy*5), txt="Wind Speed:"})
out({c=0xe5e5e5,a=1,x=xstart+1070-42, y=ystart+105+(datayy*5), txt=day[1].maxwind_imperial.." "..day[1].maxwind_imperial_unit})
out({c=0x75b3d1,a=1,x=xstart+965-51+200, y=ystart+105+(datayy*1), txt="Sun:"})
out({c=0x75b3d1,a=1,x=xstart+1070-51+124, y=ystart+105+(datayy*2), txt="Rise:"})
out({c=0xe5e5e5,a=1,x=xstart+1070-51+160, y=ystart+105+(datayy*2), txt=day[1].sunrise_12.." "..day[1].sunrise_ampm})
out({c=0x75b3d1,a=1,x=xstart+1070-51+124, y=ystart+105+(datayy*3), txt="Set:"})
out({c=0xe5e5e5,a=1,x=xstart+1070-51+160, y=ystart+105+(datayy*3), txt=day[1].sunset_12.." "..day[1].sunset_ampm})
out({c=0x75b3d1,a=1,x=xstart+965-51+200, y=ystart+105+(datayy*4), txt="Moon:"})
out({c=0x75b3d1,a=1,x=xstart+1070-51+124, y=ystart+105+(datayy*5), txt="Rise:"})
out({c=0xe5e5e5,a=1,x=xstart+1070-51+160, y=ystart+105+(datayy*5), txt=day[1].moonrise_12.." "..day[1].moonrise_ampm})
out({c=0x75b3d1,a=1,x=xstart+1070-51+124, y=ystart+105+(datayy*6), txt="Set:"})
out({c=0xe5e5e5,a=1,x=xstart+1070-51+160, y=ystart+105+(datayy*6), txt=day[1].moonset_12.." "..day[1].moonset_ampm})
out({c=0x75b3d1,a=1,x=xstart+970-42, y=ystart+105+(datayy*6), txt="Moon Visible:"})
out({c=0xe5e5e5,a=1,x=xstart+1070-42, y=ystart+105+(datayy*6), txt=day[1].moon_visible.." %"})
--
--
--
--out({c=0xDCDCDC,a=1,x=xstart+50, y=ystart+15+(datayy*6), txt="Precip:",hj="r"})
--out({c=0x00BFFF,a=1,x=xstart+55, y=ystart+15+(datayy*6), txt=hour[1].precipitation.."%"})
--out({c=0xDCDCDC,a=1,x=xstart+150, y=ystart+15+(datayy*6), txt="Today:",hj="r"})
--out({c=0x00BFFF,a=1,x=xstart+155, y=ystart+15+(datayy*6), txt=day[1].rain_allday_imperial..day[1].rain_allday_imperial_unit})
--out({c=0xDCDCDC,a=1,x=xstart+100, y=ystart+15+(datayy*7), txt="Snow Today:",hj="r"})
--out({c=0x00BFFF,a=1,x=xstart+105, y=ystart+15+(datayy*7), txt=day[1].snow_day_imperial..day[1].snow_day_imperial_unit})
--out({c=0xDCDCDC,a=1,x=xstart+50, y=ystart+15+(datayy*8), txt="UV:",hj="r"})
--out({c=0x00BFFF,a=1,x=xstart+55, y=ystart+15+(datayy*8), txt=now.uvi})
--out({c=0x00BFFF,a=1,x=xstart+100, y=ystart+15+(datayy*8), txt=now.uvi_text})
--out({c=0xDCDCDC,a=1,x=xstart+50, y=ystart+15+(datayy*14), txt="Phase:",hj="r"})
--out({c=0x00BFFF,a=1,x=xstart+55, y=ystart+15+(datayy*14), txt=day[1].moon_phase})
out({c=0xffd700,a=1,x=980,y=679+5,f="Digital-7",fs=24,txt=day[1].moon_phase,hj="c"})
draw_moon({day=1,size=40,x=850+5,y=672+5,moon_icon=1,a=0.9})
-- lineday[1].moon_phase
--[image({x=205,y=5,w=1,h=260,file="/media/5/Conky/images/LightSlateGrey_1.png"})
ystart=30+5
ygap=80
-- 3 hour output
--out({c=0x00BFFF,a=1,x=220, y=ystart, txt="Next 3"})
--out({c=0x00BFFF,a=1,x=220, y=ystart+15, txt="Hours"})
-- 1st hour
y1=35
out({c=0x75b3d1,x=220+632+5, y=ystart+y1+310,fs=14, txt=hour[1].hour_12.." "..hour[1].ampm})
image({w=80,h=80,x=223+591+5, y=ystart+y1+5+306, file=hour[1].weather_icon}) -- image({w=30,h=30,x=223,y=55,file="/media/5/Conky/images/red+x.png"})
out({x=228+633+5, y=ystart+y1+45+324,fs=14, txt=hour[1].temp_imperial ..hour[1].temp_imperial_unit})
-- 2nd hour
y2=y1+ygap
out({c=0x75b3d1,x=220+719+5, y=ystart+y1+310,fs=14, txt=hour[2].hour_12.." "..hour[2].ampm})
image({w=80,h=80,x=223+678+5, y=ystart+y1+5+306, file=hour[2].weather_icon}) --image({w=30,h=30,x=223,y=130,file="/media/5/Conky/images/red+x.png"})
out({x=228+720+5, y=ystart+y1+45+324,fs=14, txt=hour[2].temp_imperial ..hour[2].temp_imperial_unit})
-- 3rd hour
y3=y2+ygap
out({c=0x75b3d1,x=220+806+5, y=ystart+y1+310,fs=14, txt=hour[3].hour_12.." "..hour[3].ampm})
image({w=80,h=80,x=223+765+5, y=ystart+y1+5+306, file=hour[3].weather_icon}) -- image({w=30,h=30,x=223,y=215,file="/media/5/Conky/images/red+x.png"})
out({x=228+807+5, y=ystart+y1+45+324,fs=14, txt=hour[3].temp_imperial ..hour[3].temp_imperial_unit})
-- line
--image({x=275,y=5,w=1,h=300,file="/media/5/Conky/images/deep_skyblue_1.png"})
--start or weather forecast table section
--set start forecast day
start_day=1
--set total forecast days you want to display
number_of_days=10
topy=30+5
topyy=135 -- topy+(topyy*1)
topx=285+5
topxx=430+5
-- set coordinates for top lef corners for each repeat
-- x = l|r y = u|d
top_left_x_coordinate[1],top_left_y_coordinate[1] =topxx-900,topy+10
top_left_x_coordinate[2],top_left_y_coordinate[2] =topxx-420,topy+10
top_left_x_coordinate[3],top_left_y_coordinate[3] =topxx-30,topy+10
top_left_x_coordinate[4],top_left_y_coordinate[4] =topxx+360,topy+10
top_left_x_coordinate[5],top_left_y_coordinate[5] =topxx+750,topy+10
-- line
--image({x=420,y=5,w=1,h=300,file="/media/5/Conky/images/deep_skyblue_1.png"})
top_left_x_coordinate[6],top_left_y_coordinate[6] =topxx+1140,topy+10
top_left_x_coordinate[7],top_left_y_coordinate[7] =topxx-420,topy+600+(65*4)
top_left_x_coordinate[8],top_left_y_coordinate[8] =topxx-30,topy+600+(65*4)
top_left_x_coordinate[9],top_left_y_coordinate[9] =topxx+360,topy+600+(65*4)
top_left_x_coordinate[10],top_left_y_coordinate[10] =topxx+750,topy+600+(65*4)
--########################################################################################
for i=start_day,number_of_days-(start_day-1) do --start of day repeat, do not edit #######
tlx=top_left_x_coordinate[i] --sets top left x position for each repeat ##################
tly=top_left_y_coordinate[i] --sets top left y position for each repeat ##################
--########################################################################################
--out({c=0xffd700,a=1, x=topx+130+1286-(390*4), y=topy+193,f="Digital-7",fs=22, txt=day[1].weekday})
out({c=0xffd700,a=1, x=topx+130+1327-(390*4), y=topy+196,f="Digital-7",fs=22, txt=day[2].weekday,hj="c"})
out({c=0xffd700,a=1, x=topx+130+1327-(390*3), y=topy+196,f="Digital-7",fs=22, txt=day[3].weekday,hj="c"})
out({c=0xffd700,a=1, x=topx+130+1327-(390*2), y=topy+196,f="Digital-7",fs=22, txt=day[4].weekday,hj="c"})
out({c=0xffd700,a=1, x=topx+130+1327-390, y=topy+196,f="Digital-7",fs=22, txt=day[5].weekday,hj="c"})
out({c=0xffd700,a=1, x=topx+130+1327, y=topy+196,f="Digital-7",fs=22, txt=day[6].weekday,hj="c"})
out({c=0xffd700,a=1, x=topx+130+1327-(390*4), y=topy+828,f="Digital-7",fs=22, txt=day[7].weekday,hj="c"})
out({c=0xffd700,a=1, x=topx+130+1327-(390*3), y=topy+828,f="Digital-7",fs=22, txt=day[8].weekday,hj="c"})
out({c=0xffd700,a=1, x=topx+130+1327-(390*2), y=topy+828,f="Digital-7",fs=22, txt=day[9].weekday,hj="c"})
out({c=0xffd700,a=1, x=topx+130+1327-390, y=topy+828,f="Digital-7",fs=22, txt=day[10].weekday,hj="c"})
out({c=0xffd700,a=1, x=topx+130+1327, y=topy+828,f="Digital-7",fs=22, txt="Pollen",hj="c"})
xadd=15
image({ x=tlx+160, y=tly+5, h=70,w=70,file=day[i].weather_icon})
draw_moon({day=i,size=25, x=tlx+300, y=tly+25, moon_icon=1,a=0.9})
out({c=0x75b3d1,a=1, x=tlx+15, y=tly+35,fs=14, txt="High:"})
out({c=0xFFd700,a=1, x=tlx+65, y=tly+35,fs=20, txt=day[i].high_imperial..day[i].high_imperial_unit})
out({c=0x75b3d1,a=1, x=tlx+15, y=tly+95-10, txt="Precipitation:"})
out({c=0xe5e5e5,a=1, x=tlx+105, y=tly+95-10, txt=day[i].precipitation.."%"})
out({c=0x75b3d1,a=1, x=tlx+15, y=tly+60,fs=14, txt="Low:"})
out({c=0x00bfff,a=1, x=tlx+65, y=tly+60,fs=20, txt=day[i].low_imperial..day[i].low_imperial_unit})
out({c=0x75b3d1,a=1, x=tlx+15, y=tly+110-10, txt="Humidity:"})
out({c=0xe5e5e5,a=1, x=tlx+105, y=tly+110-10, txt=day[i].minhumidity.."%"})
out({c=0xe5e5e5,a=1, x=tlx, y=tly+5,fs=15, txt=day[i].conditions_user})
out({c=0x75b3d1,a=1, x=tlx+15, y=tly+125-10, txt="Wind Speed:"})
out({c=0xe5e5e5,a=1, x=tlx+105, y=tly+125-10, txt=day[i].avewind_imperial.." "..day[i].avewind_imperial_unit})
out({c=0x75b3d1,a=1, x=tlx+15, y=tly+125+30-10, txt="Rainfall:"})
out({c=0xe5e5e5,a=1, x=tlx+105, y=tly+125+30-10, txt=day[i].rain_allday_imperial})
out({c=0x75b3d1,a=1, x=tlx+15, y=tly+125+15-10, txt="Max Wind:"})
out({c=0xe5e5e5,a=1, x=tlx+105, y=tly+125+15-10, txt=day[i].maxwind_imperial.." "..day[i].maxwind_imperial_unit})
out({c=0x75b3d1,a=1, x=tlx+230, y=tly+125-45, txt="Sun"})
out({c=0x75b3d1,a=1, x=tlx+295, y=tly+125-45, txt="Moon"})
out({c=0x75b3d1,a=1, x=tlx+175, y=tly+140-45, txt="Rise:"})
out({c=0x75b3d1,a=1, x=tlx+175, y=tly+155-45, txt="Set:"})
out({c=0xe5e5e5,a=1, x=tlx+215, y=tly+140-45, txt=day[i].sunrise_12.." "..day[1].sunrise_ampm})
out({c=0xe5e5e5,a=1, x=tlx+285, y=tly+140-45, txt=day[i].moonrise_12.." "..day[1].moonrise_ampm})
out({c=0xe5e5e5,a=1, x=tlx+215, y=tly+155-45, txt=day[i].sunset_12.." "..day[1].sunset_ampm})
out({c=0xe5e5e5,a=1, x=tlx+285, y=tly+155-45, txt=day[i].moonset_12.." "..day[1].moonset_ampm})
out({c=0x75b3d1,a=1, x=tlx+255, y=tly+175-42,fs=16, txt="Moon Phase",hj="c"})
out({c=0xe5e5e5,a=1, x=tlx+255, y=tly+175-25,fs=16, txt=day[i].moon_phase,hj="c"})
--
datay=195+30+492+5 -- y=195+datay or
dataadd=14 -- y=195+datay+(dataadd*1) use 1 or more
--VAR1 = os.capture("cat /home/dale/test/test1 | grep 'out of 12' | cut -c 19-22", "raw")
VAR2 = os.capture("cat /home/dale/test/test1 | grep -m 1 'out of 12' | cut -c 19-21")
pollen=tonumber(VAR2)
if pollen==1 or pollen==2 or pollen==3 or pollen==4 or pollen==5 or pollen==6 or pollen==7 or pollen==8 or pollen==9 or pollen==10 or pollen==11 or pollen==12 then
p_count=VAR2..".0" else p_count=VAR2 end --elseif pollen > 1 then p_count=VAR2.."0" end
VAR3 = os.capture("cat /home/dale/test/test3 | grep 'Pollen Type' | cut -c 39-")
--out({c=0x75b3d1,a=1, x=1160+410+35+5, y=datay+(dataadd*7)+200, txt="Low:"})
out({c=0xffd700,a=1,f="Anonymous Pro",fs=16,x=1150+410+20,y=datay+200,txt="Index"})
out({c=0x75b3d1,a=1,f="Anonymous Pro",face="bold",fs=12,x=1160+410+20,y=datay+(dataadd*1)+200,txt="Low:"})
out({c=0x75b3d1,a=1,f="Ubuntu Mono",fs=12,x=1240+410+35+5,y=datay+(dataadd*1)+200,txt="0.0 - 2.4"})
out({c=0x75b3d1,a=1,f="Anonymous Pro",face="bold",fs=12,x=1160+410+20,y=datay+(dataadd*2)+200,txt="Low/Medium:"})
out({c=0x75b3d1,a=1,f="Ubuntu Mono",fs=12,x=1240+410+35+5,y=datay+(dataadd*2)+200,txt="2.5 - 4.8"})
out({c=0x75b3d1,a=1,f="Anonymous Pro",face="bold",fs=12,x=1160+410+20,y=datay+(dataadd*3)+200,txt="Medium:"})
out({c=0x75b3d1,a=1,f="Ubuntu Mono",fs=12,x=1240+410+35+5,y=datay+(dataadd*3)+200,txt="4.9 - 7.2"})
out({c=0x75b3d1,a=1,f="Anonymous Pro",face="bold",fs=12,x=1160+410+20,y=datay+(dataadd*4)+200,txt="Medium/High:"})
out({c=0x75b3d1,a=1,f="Ubuntu Mono",fs=12,x=1240+410+35+5,y=datay+(dataadd*4)+200,txt="7.3 - 9.6"})
out({c=0x75b3d1,a=1,f="Anonymous Pro",face="bold",fs=12,x=1160+410+20,y=datay+(dataadd*5)+200,txt="High:"})
out({c=0x75b3d1,a=1,f="Ubuntu Mono",fs=12,x=1240+410+35+5,y=datay+(dataadd*5)+200,txt="9.7 - 12.0"})
out({c=0x75b3d1,a=1,f="Anonymous Pro",fs=16,x=1320+410+35+5,y=datay+200,txt="Pollen Count"})
out({c=0x75b3d1,a=1,f="Anonymous Pro",fs=16,x=1320+410+35+5,y=datay+(dataadd*3)+200,txt="Pollen Type(s)"})
out({c=0xffd700,a=1,f="Digital-7 Mono",face="normal",fs=22,x=1800+5,y=datay+(dataadd*1)+210,txt=p_count})
p_leng=string.len(VAR3)
VAR3_2=(string.sub(VAR3, 1, -2))
text_string=VAR3_2
split_table=string.split(text_string,"/")
tablen=table.getn(split_table)
text_string2=split_table[tablen]
split_table2=(string.sub(text_string2, 1, -2)) --should remove the last char
-- split_table2=string.split(text_string2,".")
--start,finish,last_pollen=string.find(text_string2,"([%a])")
--out({c=0xe5e5e5,a=1,f="Anonymous Pro:bold",fs=14,x=1330+410+35,y=datay+(dataadd*4)+233,txt=VAR3_2})
pollen_table=#split_table
--out({c=0xe5e5e5,a=1,f="Anonymous Pro:bold",fs=16,x=1330+410+35,y=datay+(dataadd*4)+227,txt=pollen_table})
pol_y=datay+(dataadd*4)+203
for i=1,tonumber(pollen_table) do
poly=pol_y+((i-1)*14)
out({c=0xe5e5e5,a=1,f="Anonymous Pro",fs=14,x=1775+5,y=poly,txt=split_table[i]})
end--for
--_ampm
--day[1].sunrise_24_pad
--
-- out({c=0xDCDCDC,a=1,x=tlx+50,y=tly+52,txt="UV "..uv_index_num[i]})
--out({c=0xDCDCDC,a=1,x=tlx,y=tly+95,txt="S "..sun_rise_lc[i]})
-- out({c=0x00BFFF,a=1,x=tlx+73,y=tly+95,txt=sun_set_lc[i]})
--out({c=0xDCDCDC,a=1,x=tlx,y=tly+110,txt="M "..moon_rise_lc[i]})
-- out({c=0x00BFFF,a=1,x=tlx+73,y=tly+110,txt=moon_set_lc[i]})
--########################################################################################
end--if desktop==7
end--of forecast repeat section ##########################################################
--########################################################################################
--]]
--END OF WEATHER CODE ----END OF WEATHER CODE ----END OF WEATHER CODE ---
--#######################################################################
end--of weather_display function do not edit this line ##################
--#######################################################################
one thing i would suggest is that lua can open and read files using native commands
in your script you are using the os.capture function to call the prgrams cat,grep and cut
clearly this works, and that is the most important thing, but it would be cheaper to do that kind of thing using lua commands
however, it does require you t lean some new commands,
i have a handy link to some easy to follow info
http://wiki.roblox.com/index.php/String_pattern
also there is lots of info about using string.match and string.gsub
some lines for reading a file:
Code:local file=/path/to/file
local f=io.open(file, "rb")
local filestring = f:read("*all")
I've been looking for some easy to understand tutorials (like yours) but most of what I've found is way over my head. They either show commands without explaining them, or they explain them in a language I don't understand. That link looks like I might be able to comprehend it, so I'll give it a study. It'll give me something new to play with.:D
Thank you for the tips.