added a more flexible screen setup system and stuff
This commit is contained in:
parent
0682c50879
commit
b9916c2b13
@ -1,12 +1,31 @@
|
||||
_G.DEFAC = 1
|
||||
do
|
||||
if component.list("gpu")() and component.list("screen")() and component.list("keyboard")() and tty and kbd then
|
||||
tty(component.list("gpu")(),component.list("screen")())
|
||||
log(pcall(function()
|
||||
local ka = component.list("keyboard")()
|
||||
kbd(ka)
|
||||
end))
|
||||
luash()
|
||||
local ts = {}
|
||||
if fs.exists("/boot/sys/session.dat") then
|
||||
local f = io.open("/boot/sys/session.dat","rb")
|
||||
if f then
|
||||
S = f:read("*a")
|
||||
f:close()
|
||||
log(S)
|
||||
for line in S:gmatch("[^\n]+") do
|
||||
log(line)
|
||||
local ga, sa, ka = line:match("(.+)\t(.+)\t(.+)")
|
||||
ts[#ts+1] = {os.gensalt(16),ga,sa,ka}
|
||||
log()
|
||||
end
|
||||
end
|
||||
else
|
||||
ts[1] = {os.gensalt(16),component.list("gpu")(),component.list("screen")(),component.list("keyboard")()} -- session name, GPU address, screen address, keyboard address
|
||||
end
|
||||
for k,v in ipairs(ts) do
|
||||
log(v[1],v[2],v[3],v[4])
|
||||
tty(v[2],v[3],v[1])
|
||||
kbd(v[4],v[1])
|
||||
luash(v[1])
|
||||
end
|
||||
elseif nshd then
|
||||
nshd(23)
|
||||
end
|
||||
end
|
||||
computer.beep()
|
||||
|
Loading…
Reference in New Issue
Block a user