init
This commit is contained in:
commit
d2743fe41d
22 changed files with 2290 additions and 0 deletions
25
scripts/test-x.lua
Executable file
25
scripts/test-x.lua
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/env luajit
|
||||
package.cpath = package.cpath .. ";lib/?.so"
|
||||
local X = require("x")
|
||||
|
||||
local root = assert(X.open())
|
||||
local win = X.createWindow()
|
||||
|
||||
X.setErrorHandler(print)
|
||||
|
||||
atom, integer = X.getAtoms("ATOM", "INTEGER")
|
||||
assert(atom == 4 and integer == 19)
|
||||
assert(X.getAtomNames(atom) == "ATOM")
|
||||
|
||||
X.setProperty(win, X.getAtoms("test"), atom, 32, X.PropModeReplace, 69)
|
||||
assert(X.getProperty(win, X.getAtoms("test"), 0, atom) == 69)
|
||||
|
||||
X.setProperty(win, X.getAtoms("test"), X.getAtoms("STRING"), 8, X.PropModeReplace, "hello")
|
||||
assert(X.getProperty(win, X.getAtoms("test"), 0, X.getAtoms("STRING")) == "hello")
|
||||
|
||||
X.delProperty(win, X.getAtoms("test"))
|
||||
assert(not X.delProperty(win, X.getAtoms("test"), 0, X.getAtoms("STRING")))
|
||||
|
||||
assert(X.getMonitors() and X.getWindowAttributes(win))
|
||||
|
||||
X.close()
|
||||
18
scripts/xephyr.sh
Executable file
18
scripts/xephyr.sh
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/env sh
|
||||
|
||||
# test/xephyr.sh ./thornWM -c config.lua
|
||||
# test/xephyr.sh test/x.lua
|
||||
|
||||
Xephyr -br -ac -noreset -screen 1920x1080 :1 &
|
||||
sleep 0.1
|
||||
export DISPLAY=:1
|
||||
|
||||
export LUA_PATH="/usr/share/lua/5.1/?.lua;/usr/share/lua/5.1/?/init.lua;/usr/lib/lua/5.1/?.lua;/usr/lib/lua/5.1/?/init.lua;./?.lua;./?/init.lua;/root/.luarocks/share/lua/5.1/?.lua;/root/.luarocks/share/lua/5.1/?/init.lua"
|
||||
export LUA_CPATH="/usr/lib/lua/5.1/?.so;/usr/lib/lua/5.1/loadall.so;./?.so;/root/.luarocks/lib/lua/5.1/?.so"
|
||||
"$@" ; kill %1 &>/dev/null
|
||||
|
||||
# mkfifo /tmp/thornWM.fifo
|
||||
# (while true; do cat /tmp/thornWM.fifo; done) | th ./thornWM -c config.lua ; kill %1
|
||||
|
||||
wait
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue