SEARCH

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

You are not logged in.

#951 2014-05-04 03:10:43

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

Re: Wun Weather Script for Conky (Lua)

Sector11 wrote:

The line entered:

'Time: '..time.hour_24_pad..':'..time.min-pad..':'..time.sec

Shouldn't it be (time.min_pad)?


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!

#952 2014-05-04 03:46:22

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:

To quote Clint Eastwood from Heartbreak Ridge:
"This doesn't mean we're going to be swapping spit in the shower!"

lol lol lol lol

Painting grenade to look like a bar of Lifebuoy Soap.


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

Offline

#953 2014-05-04 03:47:59

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:

The line entered:

'Time: '..time.hour_24_pad..':'..time.min-pad..':'..time.sec

Shouldn't it be (time.min_pad)?

Ahhhhhhhhhhhhhhhhhhhhhh suddup!

Here, have some soap.  {toss}   ]:D  ]:D  ]:D  ]:D  ]:D
Me - make a typo ... never!

Good catch!  :8

EDIT:  Tested it mrpeachy ...
Tomorrow I start a 'serious' template.

Last edited by Sector11 (2014-05-04 03:49:18)


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

Offline

#954 2014-05-04 03:53:03

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

Re: Wun Weather Script for Conky (Lua)

@ Joe ....

Get rid of the soap ...

6...5...3...4...

lol  lol  lol


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

Offline

#955 2014-05-04 14:17:16

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

Re: Wun Weather Script for Conky (Lua)

Sector11 wrote:
jst_joe wrote:
Sector11 wrote:

The line entered:

'Time: '..time.hour_24_pad..':'..time.min-pad..':'..time.sec

Shouldn't it be (time.min_pad)?

Ahhhhhhhhhhhhhhhhhhhhhh suddup!

Here, have some soap.  {toss}   ]:D  ]:D  ]:D  ]:D  ]:D
Me - make a typo ... never!

Good catch!  :8

EDIT:  Tested it mrpeachy ...
Tomorrow I start a 'serious' template.

It's very east to miss simple things like that.  wink


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

#956 2014-05-04 15:45:32

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

Re: Wun Weather Script for Conky (Lua)

@Sector11 - ah, typos! 
glad you got it working  smile
I'm looking forward to see what you create!

Thanks for the catch jst_joe  smile

Offline

#957 2014-05-04 16:15:28

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

Re: Wun Weather Script for Conky (Lua)

^ With all that you have done I'm just glad to be able to help. 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

#958 2014-05-04 18:48:20

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

Re: Wun Weather Script for Conky (Lua)

I started and made an error ot would not allow me to edit.

2014_05_04_14_54_15_1920x1080_Sector11.png « 1 -- 2 » 2014_05_04_14_55_22_1920x1080_Sector11.jpg

2014_05_04_14_55_44_1920x1080_Sector11.jpg « 3 -- 4 » 2014_05_04_15_01_55_1920x1080_Sector11.jpg

In #4 I added a ${goto} ... it would not allow me to edit after that.

Suggestion:  even if the code is wrong, the script should allow editing at all times.

If you notice I select a 'function' copy it to a text editor and build it up, then when I get what I want I copy it to the GUI editor and activate it.

Another OOPS!  Imperial is a Default even when I pick Metric ... good for people in the US but having to pick 'Metric' for everything I input boring and annoying.

Maybe an option here:

--SET DEFAULTS###########################################################
--text defaults
default_font="monofur"--default must be in quotes
default_font_size=14
default_color="0xFFDEAD"--default must be in quotes --	NavajoWhite
default_face="bold"--default must be in quotes
default_horizontal_justify="l"--left, default must be in quotes
default_vertical_justify="n"--normal, default must be in quotes
default_shadow=1--shadows off, 1 for on
default_shadow_offset=2--in pixels
default_shadow_color="0x000000"--default must be in quotes
default_shadow_alpha=1--full opaque
--image defaults
default_width=50
default_height=50
default_mode=0--0 for imlib2, 1 for cairo(only with png)
--moon default
default_moon_size=60
default_moon_on_image=1
default_moon_alpha=0.8
default_moon_color="0xffffff" -- when onimage==0
default_moon_bgc="0x000000" --when onimage=0
default_moon_bga=1 --when ominage=0
--folder default
--default_path="/home/mcdowall/Desktop/testfolder2/"
default_path="/media/5/wun/gui-test/"
--#######################################################################

OR!!!  Once 'Metric' is selected its the default for that session, until changed at which time Imperial becomes a default until Metric is reselected ... and on and on ...


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

Offline

#959 2014-05-05 00:19:31

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

Re: Wun Weather Script for Conky (Lua)

^the metric imperial issue should be easily solved

not sure how easy it will be to solve the issue of mistakes in the entry boxes not leading to errors
possible, but im not sure exactly how to go about it just yet.... going to take some tinkering  smile

ill work on an update soon!

Offline

#960 2014-05-05 00:58:08

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

Re: Wun Weather Script for Conky (Lua)

^ You Sir...
are a machine! 8)
And I mean that in a good way. 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

#961 2014-05-05 01:20:30

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:

^ You Sir...
are a machine! 8)
And I mean that in a good way. smile

Yup, he always gets my standing ovation.   wink

BTW, starting again ... get a line - save - new line save ....
2014_05_04_22_19_26_1920x1080_Sector11.jpg
Wife wants computer ... later.


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

Offline

#962 2014-05-05 16:39:22

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

Re: Wun Weather Script for Conky (Lua)

@sector11 - when you said above that

I started and made an error it would not allow me to edit.

can you elaborate?

when i intentionally enter typos into the data options box, then click ok through the settings, I get an error in the terminal, but this does not prevent me from clicking the buttons
so when i click the T i can go back to the line I just entered and fix the error

What was happening that you were being prevented from editing?

Offline

#963 2014-05-05 18:32:23

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

Re: Wun Weather Script for Conky (Lua)

here is a replacement gui.lua
https://dl.dropboxusercontent.com/u/190 … lua.tar.gz

when you select metric then metric is default until you select imperial, which becomes default
also when you select a particular data option type, such as current weather, that type becomes default

so if you are working on a current weather section, you only need to select it the first time, then just click ok every other time, until you change the data type, then the default changes

solving the problem of incorrect data options giving errors is going to be difficult and i dont yet know if it will be possible

Offline

#964 2014-05-05 18:40:28

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

Re: Wun Weather Script for Conky (Lua)

mrpeachy wrote:

when i intentionally enter typos into the data options box, then click ok through the settings, I get an error in the terminal, but this does not prevent me from clicking the buttons
so when i click the T i can go back to the line I just entered and fix the error

I tested and got the same results as you. hmm


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

#965 2014-05-05 19:50:31

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

Re: Wun Weather Script for Conky (Lua)

See - I'm jinxed!  I'm the "Wanna Noob ßeta Tester, ask S11!"  lol  lol  lol

Here is my error in progress ... the first time I did this the conky disappeared ... this time it's on the screen .... but I cannot edit:

--[[text 6]]out({x=60,y=120,txt='↑ '..day[1].high_metric..'°${goto 200}↓ '..day[1].low_metric..'°',f='monofur',fs=14,c=0xFFDEAD,face='bold',hj='l',vj='n',shadow=1,sxo=2,syo=2,sc=0x000000,sa=1})

via the [T] button.

Start:
1 »» 2014_05_05_15_57_44_1920x1080_Sector11.jpg

  • ↑First I load the conky and template from yesterday. ↑

    1. I start building [Text 6] by putting the options I want in a blank text page

    2. first today's High

    3. then today's Low

2 »» 2014_05_05_15_59_42_1920x1080_Sector11.png

  • ↑ High - Low beside the Sun ↑

    1. build the line the way I want it in the text editor

    2. paste it into the GUI app

3 »» 2014_05_05_16_02_20_1920x1080_Sector11.png

  • ↑ add a ${goto 200} ↑

    1. ERROR! Will Smith ERROR!

4 »» 2014_05_05_16_03_15_1920x1080_Sector11.png

  • ↑ there's the new line ERROR showing ↑

5 »» 2014_05_05_16_05_11_1920x1080_Sector11.png

  • ↑ Terminal error when I try to edit [Text 6]↑

6 »» 2014_05_05_16_37_47_1920x1080_Sector11.jpg

  • ↑ Editing 'code.txt' to take ${goto 200} out doesn't help ↑

The code.txt if anyone want to try it.

--[[text 1]]out({x=0,y=50,txt=time.hour_24_pad..':'..time.min_pad..':'..time.sec..' '..time.weekday_short..' '..time.day_pad..' '..time.monthname_short..' '..time.year,f='monofur',fs=14,c=0xFFDEAD,face='bold',hj='l',vj='n',shadow=1,sxo=2,syo=2,sc=0x000000,sa=1})
--[[text 2]]out({x=60,y=65,txt='Current: '..now.temp_metric..'° ± '..now.feelslike_metric..'°',f='monofur',fs=14,c=0xFFDEAD,face='bold',hj='l',vj='n',shadow=1,sxo=2,syo=2,sc=0x000000,sa=1})
--[[text 3]]out({x=60,y=80,txt='Bar: '..now.pressure_metric..' '..now.pressure_metric_unit..' Trend: '..now.pressure_trend,f='monofur',fs=14,c=0xFFDEAD,face='bold',hj='l',vj='n',shadow=1,sxo=2,syo=2,sc=0x000000,sa=1})
--[[text 4]]out({x=60,y=95,txt='↑ '..day[1].high_metric..'° ↓ '..day[1].low_metric..'°',f='monofur',fs=14,c=0xFFDEAD,face='bold',hj='l',vj='n',shadow=1,sxo=2,syo=2,sc=0x000000,sa=1})
--[[text 6]]out({x=60,y=120,txt='↑ '..day[1].high_metric..'°${goto 200}↓ '..day[1].low_metric..'°',f='monofur',fs=14,c=0xFFDEAD,face='bold',hj='l',vj='n',shadow=1,sxo=2,syo=2,sc=0x000000,sa=1})
--[[image 1]]image({x=0,y=65,w=50,h=50,file=now.weather_icon,cairo=0})

Going to kill the conky and see if restarting it will help: Nope ...

Looks like df.txt is the culprit:

1##time.hour_24_pad..':'..time.min_pad..':'..time.sec..' '..time.weekday_short..' '..time.day_pad..' '..time.monthname_short..' '..time.year&&2##'Current: '..now.temp_metric..'° ± '..now.feelslike_metric..'°'&&3##'Bar: '..now.pressure_metric..' '..now.pressure_metric_unit..' Trend: '..now.pressure_trend&&4##'↑ '..day[1].high_metric..'° ↓ '..day[1].low_metric..'°'&&6##'↑ '..day[1].high_metric..'°${goto 200}↓ '..day[1].low_metric..'°'&&

Will edit - kill conky and restart: YES!  That did it ...
2014_05_05_16_48_32_1920x1080_Sector11.jpg

Hope this gives some direction on how to proceed.


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

Offline

#966 2014-05-05 20:44:17

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

Re: Wun Weather Script for Conky (Lua)

Interesting, it may be perculiar to adding the ${goto}... Maybe because $ is a control character in lua.  I'll see if i can replicate the error... The sh bad substitution tells me it's a problem with the yad line...

EDIT - just replicated, have the ${goto} line on screen but when i try and edit I get

sh: 1: Bad substitution

hmmm...

EDIT 2
it is the $ that is causing the problem
ill have to add a line that escapes that character before sending it to yad

Last edited by mrpeachy (2014-05-05 20:49:50)

Offline

#967 2014-05-05 21:15:54

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

Re: Wun Weather Script for Conky (Lua)

these are the magic characters in lua

( ) . % + - * ? [ ^ $

ive been trying out combinations and you can use them as part of plain text except for a few combinations
Sector11 found one of those combinations  big_smile

not sure how easy this problem will be to solve  hmm

but i did find out something really odd

put this

'( ) . % + - * ? [ ^'

into the data option / text box and for me it prints out the contents of my home directory!!

this is actually quite interesting, but I have no idea why it does it

Offline

#968 2014-05-05 21:21:14

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

Re: Wun Weather Script for Conky (Lua)

this update should take care of any mistakenly entered conky objects

https://dl.dropboxusercontent.com/u/190 … lua.tar.gz

finds any ${ and deletes the $ before the line is sent to yad

edit - only conky commands, such as ${goto 50} seem to prevent editing and give the sh bad substitution error

good find Sector11  big_smile

Last edited by mrpeachy (2014-05-05 21:24:38)

Offline

#969 2014-05-05 21:46:11

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:

good find Sector11  big_smile

Remember the TV commercials:  Give it to Mikie, he hates everything!

Well this is me:  Give it to Sector11, he can break anything. lol lol lol lol lol

Din-din  back later.


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

Offline

#970 2014-05-05 23:29:54

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

Re: Wun Weather Script for Conky (Lua)

there was an oops in that last update
this has the oops fixed
https://dl.dropboxusercontent.com/u/190 … lua.tar.gz

Offline

#971 2014-05-06 01:08:33

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:

there was an oops in that last update
this has the oops fixed
https://dl.dropboxusercontent.com/u/190 … lua.tar.gz

Tis a good thing I didn't get that oppsie one .. BTW, will this read the stuff already made?

I have enough problems with my own Oopsies   lol  lol


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

Offline

#972 2014-05-06 01:57:37

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

Re: Wun Weather Script for Conky (Lua)

Sector11 wrote:

I have enough problems with my own Oopsies lol lol

I often resemble that remark. roll


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

#973 2014-05-06 02:18:41

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:

there was an oops in that last update
this has the oops fixed
https://dl.dropboxusercontent.com/u/190 … lua.tar.gz

Tis a good thing I didn't get that oppsie one .. BTW, will this read the stuff already made?

I have enough problems with my own Oopsies   lol  lol

Yes, just a few tweaks here and there but the basic mechanism is the same as before

Will load what you have saved

Offline

#974 2014-05-06 02:40:16

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:

I have enough problems with my own Oopsies lol lol

I often resemble that remark. roll

Yea, but they are in my bloodline I think.  big_smile


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

Offline

Be excellent to each other!

#975 2014-05-06 02:41:41

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:

Yes, just a few tweaks here and there but the basic mechanism is the same as before

Will load what you have saved

Good to know, will get at it right after I get home tomorrow morning.
Stole the PC from my wife to get to this  big_smile


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

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