Open Juul opened 6 years ago
To install ljsyscall
:
sudo luarocks install ljsyscall
To use ljsyscall
:
syscall = require('syscall')
ioctl = syscall.ioctl
ret = ioctl(syscall.stdout, 'TIOCGWINSZ')
From here
It's possible to compile awesome 4.2 against luajit in debian jessie using only the system packages:
apt install luajit libluajit-5.1-2 libluajit-5.1-dev lua-lgi lua-lgi-dev
export CMAKE_ARGS="-DLUA_LIBRARY=/usr/lib/x86_64-linux-gnu/libluajit-5.1.so -DLUA_INCLUDE_DIR=/usr/include/luajit-2.0"
We need to do
ioctl
calls from within awesome. The quickest and ugliest way to do this would be to simply make the calls directly from the awesome C code. The slightly nicer way would be to expose a function to callioctl
from awesome. An even nicer way might be to use ljsyscall to exposeioctl
to lua. Now ljsyscall requires either LuaJIT or luaffi. Since LuaJIT is really fast why not use LuaJIT? Well, awesome does compile against LuaJIT but it is a bit more work. Here's how:Install luajit from source:
Install luarocks from source:
Install lgi using luarocks:
Symlink the
luajit
binary tolua
:Before running
make
to compile awesome, run the following: