SEARCH

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

You are not logged in.

#876 2014-04-14 19:19:33

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

Re: Wun Weather Script for Conky (Lua)

Offline

Help fund CrunchBang, donate to the project!

#877 2014-04-14 19:24:20

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

Re: Wun Weather Script for Conky (Lua)

Thank you Sector11 and thank you jst_joe big_smile  big_smile
you can go play with it now devil

IMPORTANT - i forgot to mention that you need to edit wun.lua a little to get the gui working

on lines 76 to 83 remove all the "local" except for line 81
so it looks like this

now={}
text_forecast={{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}}
day={{},{},{},{},{},{},{},{},{},{}}
hour={{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}}
alerts={{message_body={}},{message_body={}},{message_body={}},{message_body={}},{message_body={}},{message_body={}},{message_body={}},{message_body={}},{message_body={}},{message_body={}}}
local astro={}
time={}
update={}

EDIT - and one more things
it only does text output no icons yet, but that shouldn't be too hard

when you enter text you put plain text in single quotes ' '
and use .. to put text and data options together
so this for example:

'Today's Conditions: '..day[1].conditions

Last edited by mrpeachy (2014-04-14 19:31:20)

Offline

#878 2014-04-14 19:39:59

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

Re: Wun Weather Script for Conky (Lua)

Offline

#879 2014-04-14 19:47:29

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

Re: Wun Weather Script for Conky (Lua)

... oops! I made a boo-boo  lol  lol  lol

bad post --- mods please ... do your thing and axe this!

Last edited by Sector11 (2014-04-14 19:48:37)

Offline

#880 2014-04-14 19:53:56

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

Re: Wun Weather Script for Conky (Lua)

Offline

#881 2014-04-14 20:00:11

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

Re: Wun Weather Script for Conky (Lua)

Offline

#882 2014-04-14 20:57:08

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

Re: Wun Weather Script for Conky (Lua)

Offline

#883 2014-04-14 21:12:27

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

Re: Wun Weather Script for Conky (Lua)

Offline

#884 2014-04-14 22:46:19

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

Re: Wun Weather Script for Conky (Lua)

Last edited by Sector11 (2014-04-14 22:47:07)

Offline

#885 2014-04-15 00:01:56

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

Re: Wun Weather Script for Conky (Lua)

Offline

#886 2014-04-15 01:38:04

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

Re: Wun Weather Script for Conky (Lua)

Last edited by mrpeachy (2014-04-15 03:02:21)

Offline

#887 2014-04-15 03:03:58

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

Re: Wun Weather Script for Conky (Lua)

Last edited by mrpeachy (2014-04-15 03:14:33)

Offline

#888 2014-04-15 10:43:49

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

Re: Wun Weather Script for Conky (Lua)

Offline

#889 2014-04-15 13:39:37

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

Re: Wun Weather Script for Conky (Lua)

Offline

#890 2014-04-15 14:51:28

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

Re: Wun Weather Script for Conky (Lua)

language="DE",--must be in quotes

Offline

#891 2014-04-15 15:13:03

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

Re: Wun Weather Script for Conky (Lua)

default_path="/media/5/wun/templates/"

Last edited by Sector11 (2014-04-15 15:16:40)

Offline

#892 2014-04-15 15:39:40

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

Re: Wun Weather Script for Conky (Lua)

language="DE",--must be in quotes

Offline

#893 2014-04-15 15:44:03

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

Re: Wun Weather Script for Conky (Lua)

Conky: llua_do_call: function conky_weather execution failed: [string "return 'Conditions: '..now.conditions"]:1: attempt to index global 'now' (a nil value)
Conky: llua_do_call: function conky_weather execution failed: [string "return 'Conditions: '..now.conditions"]:1: attempt to index global 'now' (a nil value)

Offline

#894 2014-04-15 18:32:07

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

Re: Wun Weather Script for Conky (Lua)

Offline

#895 2014-04-15 18:34:53

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

Re: Wun Weather Script for Conky (Lua)

now={}
text_forecast={{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}}
day={{},{},{},{},{},{},{},{},{},{}}
hour={{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}}
alerts={{message_body={}},{message_body={}},{message_body={}},{message_body={}},{message_body={}},{message_body={}},{message_body={}},{message_body={}},{message_body={}},{message_body={}}}
local astro={}
time={}
update={}

Offline

#896 2014-04-15 18:58:23

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

Re: Wun Weather Script for Conky (Lua)

^ that info did get lost a little way back smile
making those changes to wun.lua wont affect the ability to run templates
just a quirk of a particular piece of lua code needed in the gui script that cant see things that have been localized

Offline

#897 2014-04-15 19:14:16

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

Re: Wun Weather Script for Conky (Lua)

 15 Apr 14 | 15:59:29 /media/5/wun_gui
    $ conky -c /media/5/wun_gui/wunrci.conky &
[1] 28899
 
 15 Apr 14 | 15:59:31 /media/5/wun_gui
    $ Conky: desktop window (265) is root window
Conky: window type - normal
Conky: drawing to created window (0x3400001)
Conky: drawing to double buffer
### SCRIPT IN DEVELOPER MODE ###
processed text data for 20 time periods, padded 0
processed data for 10 days, padded 0
processed data for 36 hours, padded 0
weather data processed
### SCRIPT IN DEVELOPER MODE ###
done!
own_window_title=interactiveconkyrc
1455	5	8692723	54525953	/tmp/xdo
x:1539 y:13 screen:0 window:8692723
Conky: Lua script '/media/5/wun_gui/gui.lua' reloaded
Conky: Lua script '/media/5/wun_gui/gui.lua' reloaded
Conky: Lua script '/media/5/wun_gui/wun.lua' reloaded
### SCRIPT IN DEVELOPER MODE ###
processed text data for 20 time periods, padded 0
processed data for 10 days, padded 0
processed data for 36 hours, padded 0
weather data processed
### SCRIPT IN DEVELOPER MODE ###
done!
Conky: '/media/5/wun_gui/wunrci.conky' modified, reloading...
Conky: desktop window (265) is root window
Conky: window type - normal
Conky: drawing to created window (0x3400001)
Conky: drawing to double buffer
### SCRIPT IN DEVELOPER MODE ###

Offline

#898 2014-04-15 19:18:38

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

Re: Wun Weather Script for Conky (Lua)

do you have zenity installed?

when you click the bottons, do they change color?

i had zenity already installed on mint 16

EDIT when you click somewhere in the conky window are you getting the click coordinates returned in the terminal?
like this:

own_window_title=interactiveconkyrc
975	5	664	44040193	/tmp/xdo
x:1052 y:9 screen:0 window:44040193
x:1226 y:65 screen:0 window:44040193

also do other interactive scripts work?

EDIT 2
well from your earlier post i see that you were getting the dialog boxes
and the clicks were working for you

the edit to wun.lua should not have affected the ability of the script to run

Last edited by mrpeachy (2014-04-15 19:35:04)

Offline

#899 2014-04-15 20:01:00

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

Re: Wun Weather Script for Conky (Lua)

--item number
	local qt="Image item number"
	local zen=exe('a=$(yad --title="'..mt..'" --entry --text "'..qt..'" --entry-text "1"); echo $a')
	local inum=string.gsub(zen,"[\n\r]","")
	local inum=tonumber(inum)
--timage file

Offline

Be excellent to each other!

#900 2014-04-15 20:07:42

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

Re: Wun Weather Script for Conky (Lua)

I'm just glad it's working big_smile
Nice that YAD takes the same input as zenity, (edit -just read back in your post that it's a zenity fork, so it would)
What in particular makes you prefer it?

Last edited by mrpeachy (2014-04-15 20:19:03)

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

Debian Logo