mikshaw
Group: Members
Posts: 4856
Joined: July 2004 |
|
Posted: April 08 2008,17:08 |
|
A long time ago I was asking about the possibility of customizing the look and behavior of murgaLua without having to modify individual scripts. I can't seem to find that particular thread, so I'm making new one (sue me).
There is of course the .Xdefaults file, in which you can set default FLTK scheme, background colors, and forground color, but thats as far as it goes:
! this is really ugly =o) fltk*scheme:plastic fltk*background:gray50 Text.background:gray70 fltk*foreground:yellow fltk*selectBackground:green
This also doesn't help much because you still have to modify the scripts in order to use these resources.
Now that I've started reading Programming in Lua I found an answer almost immediately. By using the LUA_INIT environment variable (exported from .bash_profile, for example), you can specify a file that Lua will run before doing anything else.
So, if you have the file /home/dsl/.murgarc, you can do this: export LUA_INIT="@$HOME/.murgarc" before running murgaLua (note the '@'). Whatever Lua commands are in that file will be run.
A simple example:Code Sample | _PROMPT=os.getenv("USER").."> " Fl:set_boxtype(fltk.FL_UP_BOX,fltk.FL_THIN_UP_BOX) Fl:set_boxtype(fltk.FL_DOWN_BOX,fltk.FL_THIN_DOWN_BOX) |
-------------- http://www.tldp.org/LDP/intro-linux/html/index.html
|