SEARCH

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

You are not logged in.

#51 2012-03-03 16:42:30

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

Re: HOW TO : using lua scripts in conky

function conky_something1()
--stuff
end--of function something1

function conky_something2()
--stuff
end--of function something2

function conky_something3()
--stuff
end--of function something3

Last edited by mrpeachy (2012-03-03 16:56:25)

Offline

Be excellent to each other!

#52 2012-03-03 19:03:03

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

Re: HOW TO : using lua scripts in conky

~/Conky/LUA/bargraph.lua
function conky_main_bars

~/Conky/LUA/rings2.lua
function conky_main_rings

~/Conky/LUA/text.lua
function conky_draw_text

~/Conky/LUA/clock.lua
function clock_widget

~/Conky/LUA/box.lua
function conky_main_box

Offline

#53 2012-03-03 21:46:17

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

Re: HOW TO : using lua scripts in conky

function conky_mainfunction()
--stuff
end--of main function

Last edited by mrpeachy (2012-03-03 21:47:33)

Offline

#54 2012-03-04 02:50:37

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

Re: HOW TO : using lua scripts in conky

Last edited by Sector11 (2012-03-04 02:51:30)

Offline

#55 2012-03-23 18:18:30

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

Re: HOW TO : using lua scripts in conky

function string:split(delimiter)
local result = { }
local from = 1
local delim_from, delim_to = string.find( self, delimiter, from )
while delim_from do
table.insert( result, string.sub( self, from , delim_from-1 ) )
from = delim_to + 1
delim_from, delim_to = string.find( self, delimiter, from )
end
table.insert( result, string.sub( self, from ) )
return result
end--of function

Last edited by mrpeachy (2012-09-01 17:15:57)

Offline

#56 2012-05-11 16:03:46

Peachy
New Member
Registered: 2012-05-11
Posts: 1

Re: HOW TO : using lua scripts in conky

Thank you for this. I have just finished part 1.
Taking it slow. I want to make sure I understand everything.

Offline

#57 2012-05-11 16:06:52

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,727

Re: HOW TO : using lua scripts in conky

Offline

#58 2012-05-11 16:59:05

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

Re: HOW TO : using lua scripts in conky

^yes, that could be a little confusing!


hope everything is making sense peachy

Offline

#59 2012-05-27 22:07:40

1inux
New Member
Registered: 2012-05-27
Posts: 1

Re: HOW TO : using lua scripts in conky

I dont quite understand 'part 7', where exactly in the conky lua file do i put the segments of code in order to get the notification effect?

Offline

#60 2012-08-28 12:30:31

jed
#! CrunchBanger
From: Detachment 7
Registered: 2012-08-28
Posts: 200
Website

Re: HOW TO : using lua scripts in conky

@mrpeachy, thanks for the great tips n tricks about conky! I gave you a nod over at ubuntuforums for the help you gave me recently.  Thanks to you and Sector11 over there, I got a pretty good one going that I finally like a lot.  Even have figured out how to start it up after a 3 second delay when the laptop reboots or logs in.
Just wanted to Officially say thanks here on crunchbanglinux, as I did a lot of reading here for a lot of different things.  As a Linux user, you gotta love all the free support some of these better sites offer via their users.  It's why I'm using Linux smile  Well, not totally why, but hopefully if your reading this then you know what I mean!  Linux rules...
Jed

Offline

#61 2012-08-28 16:37:38

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

Re: HOW TO : using lua scripts in conky

Hi jed
Saw your post over at the ubuntu thread, nicely done!
I'm always happy to see a new v9000 convert big_smile

Offline

#62 2012-09-01 04:28:24

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

Re: HOW TO : using lua scripts in conky

local file = io.popen("command")
output = file:read("*a")
file:close()

Last edited by mrpeachy (2012-09-01 18:08:46)

Offline

#63 2012-09-01 19:44:30

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

Re: HOW TO : using lua scripts in conky

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              19G  4.9G   13G  28% /
udev                  3.9G  4.0K  3.9G   1% /dev
tmpfs                 1.6G  1.1M  1.6G   1% /run
none                  5.0M     0  5.0M   0% /run/lock
none                  4.0G  288K  4.0G   1% /run/shm
/dev/sda5             459G  223G  213G  52% /home
/dev/sr0              6.9G  6.9G     0 100% /media/Belk_4e_IRDVD

Offline

#64 2012-09-02 02:19:24

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

Re: HOW TO : using lua scripts in conky

local file = io.popen("curl 'web address'")
output = file:read("*a")
file:close()

Last edited by mrpeachy (2012-09-03 03:02:11)

Offline

#65 2012-09-02 21:36:07

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,727

Re: HOW TO : using lua scripts in conky

Offline

#66 2012-09-02 22:29:01

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

Re: HOW TO : using lua scripts in conky

*wonders if anyone has read it all* lol
by the way, if anyone has been following along and has a request about how to do something with lua in conky, let me know.

Offline

#67 2012-09-02 23:14:09

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

Re: HOW TO : using lua scripts in conky

Offline

#68 2012-09-02 23:17:24

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

Re: HOW TO : using lua scripts in conky

local file = io.popen("curl 'web address'")
output = file:read("*a")
file:close()

Last edited by Sector11 (2012-09-02 23:22:26)

Offline

#69 2012-09-03 02:59:08

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

Re: HOW TO : using lua scripts in conky

local file = io.popen("curl 'web address'")
output = file:read("*a")
file:close()

Last edited by mrpeachy (2012-09-03 03:02:44)

Offline

#70 2012-09-03 23:00:13

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

Re: HOW TO : using lua scripts in conky

local file = io.popen("curl 'web address'")
output = file:read("*a")
file:close()

Offline

#71 2012-11-06 21:14:56

borntwisted
New Member
From: Wales
Registered: 2012-11-06
Posts: 2
Website

Re: HOW TO : using lua scripts in conky

string1=5
string2=9
string3=string1*string3

Offline

#72 2012-11-06 21:18:59

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

Re: HOW TO : using lua scripts in conky

string1=5
string2=9
string3=string1*string3

Offline

#73 2012-11-23 02:06:19

dura
Bloated Gimp
From: interzone
Registered: 2012-09-15
Posts: 2,108

Re: HOW TO : using lua scripts in conky

wow

Offline

#74 2013-03-07 17:05:53

Gordon
#! CrunchBanger
From: Blackpool, Lancashire, UK
Registered: 2012-05-22
Posts: 238

Re: HOW TO : using lua scripts in conky

Hi mrpeachy,

I am trying to follow your howto and have come across a problem that I have no idea how to fix it or what it is. this is what I get when I run conky in terminal

gordon@crunchbang:~$ conky
WARNING: gnome-keyring:: couldn't connect to: /home/gordon/.cache/keyring-f9X7tR/pkcs11: No such file or directory
Conky: missing text block in configuration; exiting
***** Imlib2 Developer Warning ***** :
	This program is calling the Imlib call:

	imlib_context_free();

	With the parameter:

	context

	being NULL. Please fix your program.

and this is what I have in lua

-- this is a lua script for use in conky

require 'cairo'

function conky_main()  -- start of main function

if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
cr = cairo_create(cs)
local updates=tonumber(conky_parse('${updates}'))
if updates>5 then -- start of updates
-- ####################################
ptint ('hello world')
-- ####################################
end -- if updates
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr = nil
end  -- of main function

which is what I think you say is the minimum that you need. What have I got wrong please ?


Cheers smile smile
Gordon
Using Janice Testing at present also sid and systemd and  VSIDO
A7N8X delux motherboard, 1 GB ram, AMD ATHLON XP 2800+ ( 2255 Mhz ), Nvidia Geforce PNY 62000 graphics card

Offline

Be excellent to each other!

#75 2013-03-08 05:48:03

ansem_of_nexus
#! CrunchBanger
Registered: 2012-09-19
Posts: 234

Re: HOW TO : using lua scripts in conky

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