You are not logged in.
Documentation is Important and you do a great job of it.
I'll second that!
mrpeachy's documentation makes editing code simple enough even a non-programmer can do it.
I'm a prime example.
A person who has a cat by the tail knows a whole lot more about cats than someone who has just read about them.
Mark Twain
Offline
Habitual wrote:Documentation is Important and you do a great job of it.
I'll second that!
mrpeachy's documentation makes editing code simple enough even a non-programmer can do it.
I'm a prime example.
EXCUSE ME! I'm the prime noob, non-techie, non-programmer, here with at least 1,000,001 questions under my belt!
You have no idea how hard it was to get mrpeachy out of that white tux that ties in the back after question #765,866.
{of course mrpeachy will probably say that's closer to the truth than he's like to admit too!}
Just one big happy conky family!
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Just one big happy conky family!
OK!
I'll second that one also.
A person who has a cat by the tail knows a whole lot more about cats than someone who has just read about them.
Mark Twain
Offline
^
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
^
What can I say?
I'm easy!
Not cheap, but easy.
A person who has a cat by the tail knows a whole lot more about cats than someone who has just read about them.
Mark Twain
Offline
Sector11 wrote:^
What can I say?
I'm easy!
Not cheap, but easy.
I'm easy and cheap!!!
I can be had for a dime - by the right person - and if they don't have the dime, I'll lend it to her.
However, my "List of Right People" consists of only one - and I'm married to her.
So cheap, easy and very selective - that's me!
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
i changed a couple of lines in wunrci to this:
The tmpwatch exclusion has worked, my wunrci has been running faithfully since
Thu Jan 30 13:19:37 2014
So glad. That drove me nuts (short drive)
Length of daylight is a great addition - Thanks!
Success is 1% Inspiration
and 98% Perspiration and
2% atttention to details.
Offline
i think this code works
this is a function to try out in a template, put it right at the top, before the template code startsfunction daytime(sr,ss) local srh=tonumber(sr:sub(1,2)) local srm=tonumber(sr:sub(4,5)) local ssh=tonumber(ss:sub(1,2)) local ssm=tonumber(ss:sub(4,5)) local smd=ssm-srm local shd=ssh-srh if smd<0 then shd=shd-1 smd=smd+60 end return shd,smd end--daytime
then within the template do something like this
day7time_hours,day7time_mins=daytime(day[7].sunrise_24_pad,day[7].sunset_24_pad)
do the same for any of the available days
use your 2 variables
day7time_hours
day7time_mins
in an out function
let me know if anything doesnt look right
OK, I left your complete post for easy reference.
Yes, it works. It took this LUA challenged person a while to figure it out:
Bottom box to the right of Sun Transit
When you said: put it right at the top, before the template code starts, I took it literal!
-- put it right at the top, before the template code starts ------------------
-- start daytime
function daytime(sr,ss)
local srh=tonumber(sr:sub(1,2))
local srm=tonumber(sr:sub(4,5))
local ssh=tonumber(ss:sub(1,2))
local ssm=tonumber(ss:sub(4,5))
local smd=ssm-srm
local shd=ssh-srh
if smd<0 then
shd=shd-1
smd=smd+60
end
return shd,smd
end -- daytime
-- put it right at the top, before the template code starts ------------------
-- ## DISPLAY FUNCTION ######## DISPLAY FUNCTION ######## DISPLAY FUNCTION ###
_G.weather_script = function(update,time,now,text_forecast,day,hour)
-- ### ↑ DO NOT EDIT THIS LINE ↑ ↑ DO NOT EDIT THIS LINE ↑ ##################
And the code lower in the template:
-- ### BOTTOM ASTRONOMY BOX - WITH A DAY PICKED - ie: Fri 24-01 ############
image({x=182+moon_x_adjust,y=440,w=100,h=100,file=mpi})
draw_moon({day=sd,size=65,x=232+moon_x_adjust,y=490,moon_icon=1,a=0.7,shadow=1})
out({x=30,y=440,txt="Begins & Ends: "..day[sd].begin_civil_twilight_24_pad.." | "..day[sd].end_civil_twilight_24_pad,shadow=1})
out({x=30,y=455,txt="Sun Rise | Set: "..day[sd].sunrise_24_pad.." | "..day[sd].sunset_24_pad,shadow=1})
out({x=30,y=470,txt="Sun Transit: "..day[sd].sun_transit_24_pad,shadow=1})
-- -------------------------
day7time_hours,day7time_mins=daytime(day[sd].sunrise_24_pad,day[sd].sunset_24_pad)
out({x=150,y=470,txt="Daylight: "..day7time_hours..":"..day7time_mins,shadow=1})
-- -------------------------
out({x=30,y=485,txt="Moon Rise: "..day[sd].moonrise_24_pad.." | "..day[sd].moonrise_additional_24_pad,shadow=1})
out({x=30,y=500,txt="Moon Transit: "..day[sd].moon_transit_24_pad,shadow=1})
out({x=30,y=515,txt="Moon Set: "..day[sd].moonset_24_pad.." | "..day[sd].moonset_additional_24_pad,shadow=1})
out({x=30,y=530,txt="Moon Phase: "..day[sd].moon_phase,shadow=1})
out({x=30,y=545,txt="Visible Moon: "..day[sd].moon_visible.."%",shadow=1})
and even lower in the template:
-- ### BOTTOM ASTRONOMY BOX - NO DAY PICKED ##################################
image({x=182+moon_x_adjust,y=440,w=100,h=100,file=mpi})
draw_moon({day=1,size=65,x=232+moon_x_adjust,y=490,moon_icon=1,a=0.7})
out({x=30,y=440,txt="Begins & Ends: "..day[1].begin_civil_twilight_24_pad.." | "..day[1].end_civil_twilight_24_pad,shadow=1})
out({x=30,y=455,txt="Sun Rise | Set: "..day[1].sunrise_24_pad.." | "..day[1].sunset_24_pad,shadow=1})
out({x=30,y=470,txt="Sun Transit: "..day[1].sun_transit_24_pad,shadow=1})
-- -------------------------
day7time_hours,day7time_mins=daytime(day[1].sunrise_24_pad,day[1].sunset_24_pad)
out({x=150,y=470,txt="Daylight: "..day7time_hours..":"..day7time_mins,shadow=1})
-- -------------------------
out({x=30,y=485,txt="Moon Rise: "..day[1].moonrise_24_pad.." | "..day[1].moonrise_additional_24_pad,shadow=1})
out({x=30,y=500,txt="Moon Transit: "..day[1].moon_transit_24_pad,shadow=1})
out({x=30,y=515,txt="Moon Set: "..day[1].moonset_24_pad.." | "..day[1].moonset_additional_24_pad,shadow=1})
out({x=30,y=530,txt="Moon Phase: "..day[1].moon_phase,shadow=1})
out({x=30,y=545,txt="Visible Moon: "..day[1].moon_visible.."%",shadow=1})
Yup, I like it . . .
Question: Why (day7time_hours) the "7" or is it just your lucky number.
I tried it with 6, 4 it "seemed" to work
I'd post line numbers but mine has changed from the original.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
mrpeachy wrote:i changed a couple of lines in wunrci to this:
The tmpwatch exclusion has worked, my wunrci has been running faithfully since
Thu Jan 30 13:19:37 2014So glad. That drove me nuts (short drive)
Length of daylight is a great addition - Thanks!
RE: Length of daylight - {sigh}, crossed the finish line last again!
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
function daytime(sr,ss) local srh=tonumber(sr:sub(1,2)) local srm=tonumber(sr:sub(4,5)) local ssh=tonumber(ss:sub(1,2)) local ssm=tonumber(ss:sub(4,5)) local smd=ssm-srm local shd=ssh-srh if smd<0 then shd=shd-1 smd=smd+60 end return shd,smd end--daytime
then within the template do something like this
day7time_hours,day7time_mins=daytime(day[7].sunrise_24_pad,day[7].sunset_24_pad)
Question: Why (day7time_hours) the "7" or is it just your lucky number.
I tried it with 6, 4 it "seemed" to workI'd post line numbers but mine has changed from the original.
i just picked day 7 to test it with
if you get the most recent version of wun.lua the daylength code is now part of the day data
day[1].daylength_hour
day[1].daylength_min
Offline
i just picked day 7 to test it with
![]()
if you get the most recent version of wun.lua the daylength code is now part of the day data
day[1].daylength_hour
day[1].daylength_min
I have the latest wun.lua - I just didn't realize it was there
I downloaded it from Conky PitStop. hahahahahaha
Is the readme updated? That should be included in wun.lua.tar.gz (just a thought/opinion)
Last edited by Sector11 (2014-01-31 20:12:41)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
mrpeachy wrote:i just picked day 7 to test it with
![]()
if you get the most recent version of wun.lua the daylength code is now part of the day data
day[1].daylength_hour
day[1].daylength_minBooo! BOOO!
I have the latest wun.lua - I just didn't realize it was there
I downloaded it from Conky PitStop. hahahahahaha
Is the readme updated? That should be included in wun.lua.tar.gz (just a thought/opinion)
great minds think alike, i was just about to do that my
EDIT - read_me included
also wun.lua is updated, i was looking through it and i had forgotten to close some files in a few locations
fixed, would be a good idea to get the new version
EDIT 2
day[1].daylength_hour
day[1].daylength_hour_pad
day[1].daylength_min
day[1].daylength_min_pad
A quick find and replace should do the trick for you Sector11
Last edited by mrpeachy (2014-01-31 20:50:20)
Offline
great minds think alike, i was just about to do that my
EDIT - read_me included
also wun.lua is updated, i was looking through it and i had forgotten to close some files in a few locations
fixed, would be a good idea to get the new version
Great minds?¡ - - - no I'm not going there.
OH! Good - an update, old bugs squashed ... did you catch the plug earlier?
I got the latest wun.lua from Conky PitStop?
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
mrpeachy wrote:great minds think alike, i was just about to do that my
EDIT - read_me included
also wun.lua is updated, i was looking through it and i had forgotten to close some files in a few locations
fixed, would be a good idea to get the new versionGreat minds?¡ - - - no I'm not going there.
![]()
![]()
![]()
OH! Good - an update, old bugs squashed ... did you catch the plug earlier?
I got the latest wun.lua from Conky PitStop?
that is the one!
not a bug as such, just an oversight (aka an oopsie)
Offline
i just picked day 7 to test it with
![]()
if you get the most recent version of wun.lua the daylength code is now part of the day data
day[1].daylength_hour
day[1].daylength_min
This a great function I used it in the
--CURRENT BUTTON OFF WITH SHOWDAY BUTTON(S) ON ##########################
out({a=1,fs=13,x=30,y=115,txt="Daylight: "..day[sd].daylength_hour.."hrs "..day[sd].daylength_min.."min",shadow=1})
section with [sd] it shows the daylight hours for each day.
A person who has a cat by the tail knows a whole lot more about cats than someone who has just read about them.
Mark Twain
Offline
some eye candy coming to wun soon
i will be making a file called additional_functions.lua
, it will be in the additional_files/scripts folder then you can load it in wunrc alongside the other scripts then use the functions it contains
ill put the gradrec function in there also
Offline
some eye candy coming to wun soon
You really have fun with this.
That's very
A person who has a cat by the tail knows a whole lot more about cats than someone who has just read about them.
Mark Twain
Offline
mrpeachy wrote:some eye candy coming to wun soon
You really have fun with this.
![]()
That's very
this is an almost complete re-write of a function i used in the weather script that pre-dated v9000,
you could say it is the grand-daddy of wun
http://crunchbang.org/forums/viewtopic. … 48#p161848
unfortunately that ompldr link is no longer active, but i found the code here
http://forum.salixos.org/viewtopic.php? … 842b8d52fb
its probably also on my computer but googling was faster
Last edited by mrpeachy (2014-02-01 01:53:11)
Offline
jst_joe wrote:mrpeachy wrote:some eye candy coming to wun soon
You really have fun with this.
![]()
That's verythis is an almost complete re-write of a function i used in the weather script that pre-dated v9000,
you could say it is the grand-daddy of wun![]()
http://crunchbang.org/forums/viewtopic. … 48#p161848
unfortunately that ompldr link is no longer active, but i found the code here
http://forum.salixos.org/viewtopic.php? … 842b8d52fbits probably also on my computer but googling was faster
You could have asked me.
Doesn't the style of the conky look familiar?
Boy do I ever feel good now.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
You could have asked me.
Doesn't the style of the conky look familiar?
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
http://s20.postimg.org/oagh2q4cp/2014_01_31_23_53_15_1063x1032_Sector11.jpgBoy do I ever feel good now.
![]()
![]()
![]()
You would have been my next option had I failed to find the scrip via google!
Offline
You would have been my next option had I failed to find the scrip via google!
I think I have "every" LUA script you've put online.
What I like about that link, my conky ... your LUA and found on the Outer Limits of the Internet.
Going yo archive my LUA directory for you. ... tomorrow.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
go here to get the additional_functions.lua script
with instructions on how to set it up and on how to use the thermometer function
Offline
Offline
i tried to display the actual moonphase with v9000. there is a little difference between v9000 and wun.lua
have a look: http://postimg.org/image/pglhfbs9j/
Offline
Got another "gotchya". The temperature output in the top box displays a black Question Mark after "awhile".
I'm running wunrci in terminal to see what's spits out.
Have a Great Day!
Success is 1% Inspiration
and 98% Perspiration and
2% atttention to details.
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