1
1
mirror of https://git.shadowkat.net/izaya/OC-PsychOS2.git synced 2024-09-21 03:09:12 -04:00
OC-PsychOS2/module/createterms.lua
2019-01-09 15:56:19 +11:00

18 lines
371 B
Lua

local ts = {}
for a,_ in component.list("screen") do
ts[#ts+1] = a
end
for a,_ in component.list("gpu") do
local r,w = vtemu(a,table.remove(ts,1))
fd[#fd+1] = {["read"]=r,["write"]=w,["close"]=function() w("\27[2J\27[H") end,["t"]="t"}
end
if #fd < 1 then
local fdi,nfd = io.newfd()
function nfd.read()
end
function nfd.write()
end
function nfd.close()
end
end