SEARCH

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

You are not logged in.

#551 2014-01-30 21:16:14

jst_joe
#! Junkie
From: Here, There and After
Registered: 2012-07-03
Posts: 297

Re: Wun Weather Script for Conky (Lua)

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. big_smile


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

Be excellent to each other!

#552 2014-01-30 22:57:09

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Wun Weather Script for Conky (Lua)

jst_joe wrote:
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. big_smile

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.

lol  lol  lol  lol
{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

#553 2014-01-30 23:11:50

jst_joe
#! Junkie
From: Here, There and After
Registered: 2012-07-03
Posts: 297

Re: Wun Weather Script for Conky (Lua)

Sector11 wrote:

Just one big happy conky family!

OK!
I'll second that one also. big_smile


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

#554 2014-01-30 23:58:30

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Wun Weather Script for Conky (Lua)

wink


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#555 2014-01-31 00:36:03

jst_joe
#! Junkie
From: Here, There and After
Registered: 2012-07-03
Posts: 297

Re: Wun Weather Script for Conky (Lua)

Sector11 wrote:

wink

What can I say?
I'm easy!
Not cheap, but easy. smile


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

#556 2014-01-31 18:24:41

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Wun Weather Script for Conky (Lua)

jst_joe wrote:
Sector11 wrote:

wink

What can I say?
I'm easy!
Not cheap, but easy. smile

HA!

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! lol


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#557 2014-01-31 18:44:06

Habitual
#! Member
From: Youngstown, OH
Registered: 2010-09-10
Posts: 62
Website

Re: Wun Weather Script for Conky (Lua)

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 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

#558 2014-01-31 19:54:00

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Wun Weather Script for Conky (Lua)

mrpeachy wrote:

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 starts

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)

do the same for any of the available days
use your 2 variables
day7time_hours
day7time_mins
in an out function smile
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: 2014_01_31_16_23_47_460x610_Sector11.jpg

-- ### 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: 2014_01_31_16_23_18_460x610_Sector11.jpg

-- ### 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.  big_smile
I tried it with 6, 4 it "seemed" to work   smile

I'd post line numbers but mine has changed from the original.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#559 2014-01-31 19:55:58

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Wun Weather Script for Conky (Lua)

Habitual wrote:
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 2014

So 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!  lol  lol  lol


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#560 2014-01-31 19:58:21

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

Re: Wun Weather Script for Conky (Lua)

Sector11 wrote:
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.  big_smile
I tried it with 6, 4 it "seemed" to work   smile

I'd post line numbers but mine has changed from the original.

i just picked day 7 to test it with  big_smile

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

#561 2014-01-31 20:11:15

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Wun Weather Script for Conky (Lua)

mrpeachy wrote:

i just picked day 7 to test it with  big_smile

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

Booo! BOOO!

I have the latest wun.lua - I just didn't realize it was there  smile

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

#562 2014-01-31 20:33:32

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

Re: Wun Weather Script for Conky (Lua)

Sector11 wrote:
mrpeachy wrote:

i just picked day 7 to test it with  big_smile

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

Booo! BOOO!

I have the latest wun.lua - I just didn't realize it was there  smile

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 big_smile

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 big_smile

Last edited by mrpeachy (2014-01-31 20:50:20)

Offline

#563 2014-01-31 20:53:15

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Wun Weather Script for Conky (Lua)

mrpeachy wrote:

great minds think alike, i was just about to do that my big_smile

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.  lol lol lol

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

#564 2014-01-31 21:15:08

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

Re: Wun Weather Script for Conky (Lua)

Sector11 wrote:
mrpeachy wrote:

great minds think alike, i was just about to do that my big_smile

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.  lol lol lol

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)  big_smile

Offline

#565 2014-01-31 21:58:16

jst_joe
#! Junkie
From: Here, There and After
Registered: 2012-07-03
Posts: 297

Re: Wun Weather Script for Conky (Lua)

mrpeachy wrote:

i just picked day 7 to test it with big_smile

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. smile


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

#566 2014-02-01 01:37:43

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

Re: Wun Weather Script for Conky (Lua)

some eye candy coming to wun soon

Screenshot_from_2014_01_31_19_22_09.jpg

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

#567 2014-02-01 01:44:38

jst_joe
#! Junkie
From: Here, There and After
Registered: 2012-07-03
Posts: 297

Re: Wun Weather Script for Conky (Lua)

mrpeachy wrote:

some eye candy coming to wun soon

You really have fun with this. smile
That's very cool


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

#568 2014-02-01 01:52:50

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

Re: Wun Weather Script for Conky (Lua)

jst_joe wrote:
mrpeachy wrote:

some eye candy coming to wun soon

You really have fun with this. smile
That's very cool

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  big_smile

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  smile

Last edited by mrpeachy (2014-02-01 01:53:11)

Offline

#569 2014-02-01 03:05:19

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Wun Weather Script for Conky (Lua)

mrpeachy wrote:
jst_joe wrote:
mrpeachy wrote:

some eye candy coming to wun soon

You really have fun with this. smile
That's very cool

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  big_smile

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  smile

You could have asked me.  big_smile

Doesn't the style of the conky look familiar?
lol  lol  lol  lol  lol  lol  lol  lol  lol
2014_01_31_23_53_15_1063x1032_Sector11.jpg

Boy do I ever feel good now. cool cool cool cool


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#570 2014-02-01 03:09:45

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

Re: Wun Weather Script for Conky (Lua)

Sector11 wrote:

You could have asked me.  big_smile

Doesn't the style of the conky look familiar?
lol  lol  lol  lol  lol  lol  lol  lol  lol
http://s20.postimg.org/oagh2q4cp/2014_01_31_23_53_15_1063x1032_Sector11.jpg

Boy do I ever feel good now. cool cool cool cool

You would have been my next option had I failed to find the scrip via google!  big_smile

Offline

#571 2014-02-01 03:20:15

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Wun Weather Script for Conky (Lua)

mrpeachy wrote:

You would have been my next option had I failed to find the scrip via google!  big_smile

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.  big_smile

Going yo archive my LUA directory for you. ... tomorrow.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#572 2014-02-01 03:27:55

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

Re: Wun Weather Script for Conky (Lua)

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

http://crunchbang.org/forums/viewtopic. … 41#p354941

Offline

#573 2014-02-01 04:41:53

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

Re: Wun Weather Script for Conky (Lua)

also looking at what we can get out of the alerts api setting
quite a lot it seems!

Screenshot_from_2014_01_31_22_29_11.jpg

Offline

#574 2014-02-01 11:07:02

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

Re: Wun Weather Script for Conky (Lua)

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

Be excellent to each other!

#575 2014-02-01 13:44:15

Habitual
#! Member
From: Youngstown, OH
Registered: 2010-09-10
Posts: 62
Website

Re: Wun Weather Script for Conky (Lua)

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

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.
Server: acrobat

Debian Logo