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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user