1
1
mirror of https://git.shadowkat.net/izaya/OC-PsychOS2.git synced 2024-11-29 14:11:33 -05:00

Compare commits

..

No commits in common. "36a3912c84f6f66474732248c04e0c926581d05c" and "fbef63f9b0d4b4cfc9a2907adab8b5baf31af0f1" have entirely different histories.

3 changed files with 6 additions and 38 deletions

View File

@ -1,3 +1,2 @@
minitel.lua minitel.lua
tape-iofs.lua tape-iofs.lua
fsmanager.service

View File

@ -65,38 +65,20 @@ function ct.append(np)
p=p+1 p=p+1
ct.insert() ct.insert()
end end
function ct.delete(np,n) function ct.substitute(np)
ct.sp(np) ct.sp(np)
_G.clip = "" table.remove(ft,p)
for i = 1, (n or 1) do
_G.clip = _G.clip .. table.remove(ft,p) .. "\n"
end
end
function ct.substitute(np,n)
ct.delete(np,n)
ct.insert(np) ct.insert(np)
end end
function ct.delete(np)
ct.sp(np)
table.remove(ft,p)
end
function ct.filename(np) function ct.filename(np)
if np then fp = np end if np then fp = np end
print(fp) print(fp)
end end
local function rawpaste()
for line in string.gmatch(_G.clip,"[^\n]") do
print(string.format("%4d\t %s",p,line))
table.insert(ft,p,line)
end
end
function ct.pasteprevious(np)
ct.sp(np)
rawpaste()
end
function ct.paste(np)
ct.sp(np)
p = p + 1
rawpaste()
end
ct.o = ct.readfile ct.o = ct.readfile
ct.w = ct.writefile ct.w = ct.writefile
ct.l = ct.list ct.l = ct.list
@ -106,8 +88,6 @@ ct.a = ct.append
ct.s = ct.substitute ct.s = ct.substitute
ct.d = ct.delete ct.d = ct.delete
ct.f = ct.filename ct.f = ct.filename
ct.p = ct.pasteprevious
ct.P = ct.paste
ct.readfile(fp) ct.readfile(fp)

View File

@ -1,11 +0,0 @@
local lc = computer.uptime()
_G.clip = ""
while true do
local eT = {coroutine.yield()}
if eT[1] == "clipboard" then
if computer.uptime() > lc + 5 then
_G.clip = ""
end
_G.clip = _G.clip .. eT[3]
end
end