1
0
mirror of https://github.com/kepler155c/opus synced 2025-11-14 22:37:11 +00:00

run autorun programs in shell mode

This commit is contained in:
kepler155c@gmail.com
2019-03-27 15:21:31 -04:00
parent 82f6d3451d
commit 8fede6f507
8 changed files with 127 additions and 96 deletions

View File

@@ -1,5 +1,3 @@
_G.requireInjector(_ENV)
--[[
Adds a task and the control-d hotkey to view the kernel log.
--]]
@@ -13,12 +11,14 @@ local term = _G.term
local function systemLog()
local routine = kernel.getCurrent()
local w, h = kernel.window.getSize()
kernel.window.reposition(1, 2, w, h - 1)
if multishell and multishell.openTab then
local w, h = kernel.window.getSize()
kernel.window.reposition(1, 2, w, h - 1)
routine.terminal = kernel.window
routine.window = kernel.window
term.redirect(kernel.window)
routine.terminal = kernel.window
routine.window = kernel.window
term.redirect(kernel.window)
end
kernel.hook('mouse_scroll', function(_, eventData)
local dir, y = eventData[1], eventData[3]
@@ -50,8 +50,15 @@ local function systemLog()
keyboard.removeHotkey('control-d')
end
multishell.openTab({
title = 'System Log',
fn = systemLog,
hidden = true,
})
if multishell and multishell.openTab then
multishell.openTab({
title = 'System Log',
fn = systemLog,
hidden = true,
})
else
kernel.run({
title = 'Syslog',
fn = systemLog,
})
end