On Sat, 24 Oct 2009 12:17:43 +0200 (CEST) Gregor Best <g...@intepi.net> wrote: > 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
Right. I forgot its Lua script we're talking about... If you'd want the script to be run at startup, you can put it in rc.lua. If you want it to be run on user action, like keybinding or click, just put it in the action handler. Then again, if your code isn't long, you can just put it in the rc.lua for simplicity :) lukash -- To unsubscribe, send mail to awesome-devel-unsubscr...@naquadah.org.