How to run lua commands from awesome/rc.lua
in an interactive iterpreter?
I'm trying to create some functions in ~/.config/awesome/rc.lua
for new key bindings. Sometimes I get an error and I want to test these functions by printing the tables and variables in a command line. I downloaded lua5.2
and I started playing with the interactive interpreter. I wrote a small script that I run at the beginning of the interactive mode.
I'm having a problem when I require("gears")
and require("awful")
and pretty much every other library found in /usr/share/awesome/lib/
. Here are some examples:
- When attempting to
require("gears")
, I get the error:/usr/share/awesome/lib/gears/wallpaper.lua:17: attempt to index global 'screen' (a nil value)
- When removing the line with
require("gears")
, the linerequire("awful")
, gives me:/usr/share/awesome/lib/awful/tag.lua:603: attempt to index field 'client' (a nil value)
It seems that for every module in the awesome library, There is some component not known for the lua interpreter. How do I tell the lua interpreter to be aware of these components?
I'm not very experienced with lua coding. Am I digging in the wrong place? Is there a different and perhaps better way to test functions from awesome/rc.lua
?