1
1
mirror of https://git.shadowkat.net/izaya/OC-PsychOS2.git synced 2024-11-24 20:27:39 -05:00
OC-PsychOS2/service/clipboard.lua
Amanda Cameron 5213835970 clipboard: Make the clipboard service work under the new service sys
This also adds a [.editorconfig](https://editorconfig.org/) and adds
apidoc.md to the gitignore.
2020-05-21 15:02:46 -04:00

18 lines
309 B
Lua

_G.clip = ""
function start()
return os.spawn(function()
local lc
while true do
local eT = {coroutine.yield()}
if eT[1] == "clipboard" then
if computer.uptime() > lc + 5 then
_G.clip = ""
end
lc = computer.uptime()
_G.clip = _G.clip .. eT[3]
end
end
end)
end