1
0
mirror of https://github.com/kepler155c/opus synced 2025-12-12 19:38:05 +00:00

transition to kernel

This commit is contained in:
kepler155c@gmail.com
2018-01-13 23:40:53 -05:00
parent bd37b57780
commit 9de9452dd3
15 changed files with 157 additions and 180 deletions

View File

@@ -25,7 +25,7 @@ local page = UI.Page {
{ heading = 'Time', key = 'timestamp' },
},
values = multishell.getTabs(),
sortColumn = 'title',
sortColumn = 'uid',
autospace = true,
},
accelerators = {

View File

@@ -14,7 +14,7 @@ local shell = _ENV.shell
local term = _G.term
local window = _G.window
local parentTerm = term.current()
local parentTerm = kernel.terminal.parent -- term.current()
local w,h = parentTerm.getSize()
local overviewId
local tabsDirty = false
@@ -128,6 +128,7 @@ function multishell.openTab(tab)
end
printError('Press enter to close')
tab.isDead = true
tab.hidden = false
while true do
local e, code = os.pullEventRaw('key')
if e == 'terminate' or e == 'key' and code == keys.enter then
@@ -137,7 +138,7 @@ function multishell.openTab(tab)
end
end)
kernel.run(routine)
kernel.launch(routine)
if tab.focused then
multishell.setFocus(tab.uid)

View File

@@ -26,7 +26,6 @@ if options.title then
multishell.setTitle(multishell.getCurrent(), options.title)
end
print('connecting...')
local socket, msg = Socket.connect(remoteId, 23)
if not socket then
@@ -44,6 +43,7 @@ socket:write({
height = h,
isColor = ct.isColor(),
program = args,
pos = { ct.getCursorPos() },
})
Event.addRoutine(function()
@@ -58,8 +58,8 @@ Event.addRoutine(function()
end
end)
ct.clear()
ct.setCursorPos(1, 1)
--ct.clear()
--ct.setCursorPos(1, 1)
local filter = Util.transpose {
'char', 'paste', 'key', 'key_up', 'terminate',
@@ -77,10 +77,10 @@ while true do
end
if not socket.connected then
print()
print('Connection lost')
print('Press enter to exit')
pcall(read)
-- print()
-- print('Connection lost')
-- print('Press enter to exit')
-- pcall(read)
break
end
end