mirror of
https://github.com/kepler155c/opus
synced 2025-10-21 10:47:40 +00:00
cloud edit + logger removal
This commit is contained in:
@@ -43,7 +43,7 @@ local buttons = { }
|
||||
local sx, sy = term.current().getSize()
|
||||
local maxRecent = math.ceil(sx * sy / 62)
|
||||
|
||||
local function elipse(s, len)
|
||||
local function ellipsis(s, len)
|
||||
if #s > len then
|
||||
s = s:sub(1, len - 2) .. '..'
|
||||
end
|
||||
@@ -253,7 +253,7 @@ function page.container:setCategory(categoryName, animate)
|
||||
icon = DEFAULT_ICON
|
||||
end
|
||||
|
||||
local title = elipse(program.title, 8)
|
||||
local title = ellipsis(program.title, 8)
|
||||
|
||||
local width = math.max(icon.width + 2, #title + 2)
|
||||
table.insert(self.children, UI.Icon({
|
||||
|
26
sys/apps/cedit.lua
Normal file
26
sys/apps/cedit.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
local multishell = _ENV.multishell
|
||||
local os = _G.os
|
||||
local read = _G.read
|
||||
local shell = _ENV.shell
|
||||
|
||||
local args = { ... }
|
||||
if not args[1] then
|
||||
error('Syntax: cedit <filename>')
|
||||
end
|
||||
|
||||
if not _G.cloud_catcher then
|
||||
print('Paste key: ')
|
||||
local key = read()
|
||||
if #key == 0 then
|
||||
return
|
||||
end
|
||||
-- open an unfocused tab
|
||||
local id = shell.openTab('cloud ' .. key)
|
||||
print('Connecting...')
|
||||
while not _G.cloud_catcher do
|
||||
os.sleep(.2)
|
||||
end
|
||||
multishell.setTitle(id, 'Cloud')
|
||||
end
|
||||
|
||||
shell.run('cloud edit ' .. table.unpack({ ... }))
|
12
sys/apps/cshell.lua
Normal file
12
sys/apps/cshell.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
local read = _G.read
|
||||
local shell = _ENV.shell
|
||||
|
||||
if not _G.cloud_catcher then
|
||||
print('Paste key: ')
|
||||
local key = read()
|
||||
if #key == 0 then
|
||||
return
|
||||
end
|
||||
print('Connecting...')
|
||||
shell.run('cloud ' .. key)
|
||||
end
|
Reference in New Issue
Block a user