On Sat, Oct 24, 2009 at 11:57:39AM +0200, lukash wrote: > On Sat, 24 Oct 2009 11:41:54 +0200 (CEST) Daniel Kreischer > <d.t.kreisc...@web.de> wrote: > > As I am actually running awesome, I wonder what would be the expected > > procedure to extend awesome's functionality with a script? > > > > Would I have to write some kind of widget which was then called in the > > rc.lua? In other words, how would I preferably make awesome call my > > script so that the script inherits awesome's initialization? > > Depends on what you wanna do. If you want to run a script on awesome > startup, you can use awful.util.spawn("yourscript"). If you want to control > awesome from outside while its running, there is awesome-client binary > that allows you to pass Lua commands to awesome. >
That's actually quite ugly a modus operandi. It won't export the lua environment to the script (because it's started with os.execute() after all). You'd for example do the follwing to run the script "gna.lua": echo "dofile(\"gna.lua\")" | awesome-client -- GCS/IT/M d- s+:- a-- C++ UL+++ US UB++ P+++ L+++ E--- W+ N+ o-- K- w--- ?O M-- ?V PS++ PE- Y++ PGP+++ t+ 5 X+ R tv b+++ DI+++ D+++ G+ e h! r y+ Gregor Best
pgpFd76Zzvpj6.pgp
Description: PGP signature