forked from izaya/OC-PsychOS2
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.
This commit is contained in:
parent
124b39c96d
commit
5213835970
5
.editorconfig
Normal file
5
.editorconfig
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*.lua]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 1
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
|||||||
*.cpio
|
*.cpio
|
||||||
*.af
|
*.af
|
||||||
|
apidoc.md
|
||||||
/target
|
/target
|
||||||
/doc
|
/doc
|
||||||
|
@ -1,11 +1,17 @@
|
|||||||
local lc = computer.uptime()
|
|
||||||
_G.clip = ""
|
_G.clip = ""
|
||||||
|
|
||||||
|
function start()
|
||||||
|
return os.spawn(function()
|
||||||
|
local lc
|
||||||
while true do
|
while true do
|
||||||
local eT = {coroutine.yield()}
|
local eT = {coroutine.yield()}
|
||||||
if eT[1] == "clipboard" then
|
if eT[1] == "clipboard" then
|
||||||
if computer.uptime() > lc + 5 then
|
if computer.uptime() > lc + 5 then
|
||||||
_G.clip = ""
|
_G.clip = ""
|
||||||
end
|
end
|
||||||
|
lc = computer.uptime()
|
||||||
_G.clip = _G.clip .. eT[3]
|
_G.clip = _G.clip .. eT[3]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user