You are not logged in.
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
let me know if anything doesnt look right
Offline
Seems that I have missed a lot!
Nice work on CPS S11!! The wun section is very
Peachy a quick question..
Would it be a waste of time to make a day/night icon for each condition.. or just go ahead and use the settings that you have in the wun.lua?
Last edited by falldown (2014-01-30 01:03:39)
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
Seems that I have missed a lot!
Nice work on CPS S11!! The wun section is very
![]()
Peachy a quick question..
Would it be a waste of time to make a day/night icon for each condition.. or just go ahead and use the settings that you have in the wun.lua?
if you made them, the script would use them
which icon, night or day, is determined from the iconurl
nt_iconname for night time icons
the script looks for the nt_ part and shows whichever icon has been set there
if you wanted to make a different icon for night and day it would require setting up the table in wun.lua (line 176 to 334 ) a little differently, but that is not a big problem
can just include instructions in the readme or how to
having just looked in my icons folder at the wicons, it appears that i may have one missing, there is a nt_sleet but no sleet
ill have to put that one in there and update the archive! - done
Last edited by mrpeachy (2014-01-30 01:15:42)
Offline
Thats good cause I have been doing both.
You can walk through the setup when I get these done.
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
looks like there is a bug in the moon data, on Wed 5th, Thu 6th and Fri 07 i am getting NA for all moon data
but looking in the downloaded files i see times in there
ill check into it!
Offline
fixed, and updated in archive
an oopsie, put n should have been i
line 872 should read:
if mtab[i ] then
--had to put a space between the i and ] to get the thing to show, otherwise the forum thinks i want italics
NOT
if mtab[n] then
Offline
Seems that I have missed a lot!
Nice work on CPS S11!! The wun section is very
![]()
Peachy a quick question..
Would it be a waste of time to make a day/night icon for each condition.. or just go ahead and use the settings that you have in the wun.lua?
Well see that's what you get for galloping around with your buddy, Forrest GIMP.
Thank you, I was inspired.
Day ~ night? Ooooooooooooooo más
mucho más
extremo
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
fixed, and updated in archive
an oopsie, put n should have been iline 872 should read:
if mtab[i ] then
--had to put a space between the i and ] to get the thing to show, otherwise the forum thinks i want italics
![]()
NOTif mtab[n] then
And dum-dum's like me would naturally copy/paste that line into wun.lua and get worse results than:
[i ] was found without a matching [/i ]
... of course realizing that 'before' copy pasting the line, I simply changed the "n" for a non-italic "i"
New catch phrase for us "Bull in the China Shoppe" types:
RTEP <-- Read The Entire Post!
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
@Sector11
Looking at the iweather_joe.lua template I see why it looks like it was setup for light backgrounds.
line 342 in --SET DEFAULTS section reads
default_color=0x000000--white
which is black text it should read
default_color=0xFFFFFF--white
My-Oop's :8
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
My-Oop's :8
Careful, that sounds like you're getting "S11itis"!
I've been known to do the same thing, change the colour but not the comment.
But I thought you wanted the black text, I didn't look that deep into it.
With white text on a very light transparent lua background, it would be for "dark" backgrounds.
The way I tweaked it it goes anywhere.
/media/5/wun/conky_configs/wunrci_jjoe.conky
## draw-bg.lua Settings ######################################################
## Above and After TEXT
##
lua_load /media/5/Conky/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 0 0 0 0 0 0x000000 0.45
#lua_draw_hook_post draw_bg 10 0 0 0 0 0x000000 0.2
#TEXT
#${lua conky_draw_bg 10 0 0 0 0 0x000000 0.2}
####################################################### End LUA Settings ###
TEXT
${lua conky_draw_bg 10 2 05 370 410 0x000000 0.4}
H± and W± are Humidity and Wind averages.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
The way I tweaked it it goes anywhere.
That does look good.
I've been playing with a very slight shadow on all the text that even shows up on a white bg.
I think I'll play with your idea some 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
That does look good.
![]()
I've been playing with a very slight shadow on all the text that even shows up on a white bg.
I think I'll play with your idea some also.
I have to admit, it does look good. I use draw-bk.lua on all my conkys since my wallpapers run from pure white and pure black (for testing purposes) and a thousand or so "in between" type walls. I like dark, my wife animals, flowers and beaches.
What can I say ... light grey semi-transparent conky backgrounds are
Last edited by Sector11 (2014-01-30 17:12:51)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
hmmm... this is just a guess but maybe your tmp folder gets cleaned out every once in a while?
Man, you a good guesser!
*/15 * * * * /usr/sbin/tmpwatch --atime 1 /tmp --exclude=/tmp/SBo/ > /dev/null 2>&1
so I've added
--exclude=/tmp/xdo
to that.
as a note: I tested it by firing up wuncri and while it ran, I nuked /tmp/xdo and sure enough, it showed the same symptom.
Thanks, you rock!
Success is 1% Inspiration
and 98% Perspiration and
2% atttention to details.
Offline
@ mrpeachy & Habitual
And I had a post typed up getting ready to ask if you had a blank file at:
/tmp/xdo
I thought naaaaaaaaaaaaaaa that can't be it.
Go figure!
So tell me, where does this empty file "xdo" go exactly?
/tmp/xdo or ~/tmp/xdo
Interestingly enough I have no /tmp/xdo but I do have a ~/tmp/xdo.
And everything works.
Last edited by Sector11 (2014-01-30 18:45:47)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
mrpeachy wrote:hmmm... this is just a guess but maybe your tmp folder gets cleaned out every once in a while?
Man, you a good guesser!
*/15 * * * * /usr/sbin/tmpwatch --atime 1 /tmp --exclude=/tmp/SBo/ > /dev/null 2>&1
so I've added
--exclude=/tmp/xdo
to that.
as a note: I tested it by firing up wuncri and while it ran, I nuked /tmp/xdo and sure enough, it showed the same symptom.
Thanks, you rock!
yay!
where is that line that cleans out tmp?
it may be a good idea to change the default in wunrci to point to additional_files in the wun folder so it is persistant
but it might also be a good idea to put a note in wunrci below the button setup with instructions how to add that --exclude command
Offline
/tmp/xdo here.
YMMV on #!
It must, I don't even have a /tmp directory, let alone a /tmp/xdo.
But the code all points to: /tmp/xdo - I just checked.
{was that Rod Serling that just streaked us?}
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
yay!
where is that line that cleans out tmp?
it may be a good idea to change the default in wunrci to point to additional_files in the wun folder so it is persistantbut it might also be a good idea to put a note in wunrci below the button setup with instructions how to add that --exclude command
It's a system program called tmpwatch (a Linux utility).
It doesn't come 'standard' on most systems I've used (Slackware for 562 days now and OpenSUSE for ~500 days before that). It has to be installed.
Suggestion or improvement to write the xdo file in the ~/wun folder where ever it exists?
Interestingly enough I have no /tmp/xdo but I do have a ~/tmp/xdo.
And everything works.
Thanks!
Last edited by Habitual (2014-01-30 19:01:49)
Success is 1% Inspiration
and 98% Perspiration and
2% atttention to details.
Offline
Suggestion or improvement to write the xdo file in the ~/wun folder where ever it exists?
Sector11 wrote:Interestingly enough I have no /tmp/xdo but I do have a ~/tmp/xdo.
And everything works.Thanks!
Like that suggestion: /path/to/wun/xdo
OK, I stand corrected, I do have a /tmp and a /tmp/xdo - but I didn't create it.
tmpwatch doesn't exist for Debian, but tmpreaper does (it replaces it):
30 Jan 14 | 16:03:02 ~
$ sho tmpreaper
Package: tmpreaper
State: not installed
Version: 1.6.13+nmu1
Priority: optional
Section: admin
Maintainer: Paul Slootman <paul@debian.org>
Architecture: amd64
Uncompressed Size: 172 k
Depends: libc6 (>= 2.2.5), debconf (>= 0.5.0) | debconf-2.0
Conflicts: tmpwatch
Replaces: tmpwatch
Description: cleans up files in directories based on their ageThis package provides a program that can be used to clean out temporary-file directories. It recursively searches the directory, refusing to chdir() across symlinks, and removes files that haven't been accessed in a user-specified amount of time. You can specify a set of files to protect from deletion with a shell pattern. It will not remove files owned by the process EUID that have the `w' bit clear, unless you ask it to, much like `rm -f'. `tmpreaper' will not remove symlinks, sockets, fifos, or special files unless given a command line option enabling it to.
WARNING: Please do not run `tmpreaper' on `/'. There are no protections against this written into the program, as that would prevent it from functioning the way you'd expect it to in a `chroot(8)' environment.
The daily tmpreaper run can be configured through /etc/tmpreaper.conf .
30 Jan 14 | 16:03:16 ~
$
Last edited by Sector11 (2014-01-30 19:23:09)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
i changed a couple of lines in wunrci to this:
lua_draw_hook_pre get_mouse {"interactiveconkyrc","/tmp/xdo"}
## after function call, table containing window title and path to click log file
## In the example above "/tmp/xdo" creates a file called xdo in your /tmp directory
## NOTE if you are running a /tmp cleaning utility then by removing /tmp/xdo while the script is running will cause errors
## for a more persistent xdo log file you can change the path to point to your wun folder
Offline
Thank you very much Habitual!
ive put the daylength code into wun and trying it out here
here is wun.lua with the change
https://dl.dropboxusercontent.com/u/190 … lua.tar.gz
2 new data options for each day (1 to 10)
day[1].daylength_hour
day[1].daylength_min
with most time options i have been making them padded or not, so i will most likely do that in the future
"_pad" to the end to retain a leading zero
Offline
just noticed an OOPS! my first quarter moon is the wrong way around :8 :8 LOL
ill post a fix in a minute
FIXED - in main archive and in the wun.lua script here
https://dl.dropboxusercontent.com/u/190 … lua.tar.gz
yikes, and here i was thinking it was finished!
Last edited by mrpeachy (2014-01-30 20:29:11)
Offline
i changed a couple of lines in wunrci to this:
lua_draw_hook_pre get_mouse {"interactiveconkyrc","/tmp/xdo"} ## after function call, table containing window title and path to click log file ## In the example above "/tmp/xdo" creates a file called xdo in your /tmp directory ## NOTE if you are running a /tmp cleaning utility then by removing /tmp/xdo while the script is running will cause errors ## for a more persistent xdo log file you can change the path to point to your wun folder
I'll make a note on CPS as well.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Thank you very much Habitual!
ive put the daylength code into wun and trying it out here
http://s21.postimg.org/8oxkyde0z/Screenshot_from_2014_01_30_13_56_52.jpghere is wun.lua with the change
https://dl.dropboxusercontent.com/u/190 … lua.tar.gz2 new data options for each day (1 to 10)
day[1].daylength_hour
day[1].daylength_minwith most time options i have been making them padded or not, so i will most likely do that in the future
"_pad" to the end to retain a leading zero
Sunrise/set times are in 24 hour times with a leading 0 for most places as it's required for ships and planes - and this remouves any doubt as to what time.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
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