1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-20 18:27:40 +00:00

better startup

This commit is contained in:
kepler155c@gmail.com
2017-09-26 01:40:02 -04:00
parent 1c3e4917da
commit 2d93974e6a
5 changed files with 48 additions and 29 deletions

View File

@@ -134,6 +134,7 @@ local page = UI.Page {
accelerators = {
r = 'refresh',
e = 'edit',
f = 'files',
s = 'shell',
l = 'lua',
[ 'control-l' ] = 'refresh',
@@ -337,6 +338,12 @@ function page:eventHandler(event)
focused = true,
})
elseif event.type == 'files' then
multishell.openTab({
path = 'sys/apps/Files.lua',
focused = true,
})
elseif event.type == 'focus_change' then
if event.focused.parent.UIElement == 'Icon' then
event.focused.parent:scrollIntoView()

View File

@@ -37,23 +37,23 @@ local tabsDirty = false
local config = {
standard = {
textColor = colors.lightGray,
tabBarTextColor = colors.lightGray,
focusTextColor = colors.white,
backgroundColor = colors.gray,
tabBarBackgroundColor = colors.gray,
focusBackgroundColor = colors.gray,
textColor = colors.gray,
backgroundColor = colors.lightGray,
tabBarTextColor = colors.black,
tabBarBackgroundColor = colors.lightGray,
},
color = {
focusTextColor = colors.white,
focusBackgroundColor = colors.black,
textColor = colors.lightGray,
backgroundColor = colors.black,
tabBarTextColor = colors.lightGray,
tabBarBackgroundColor = colors.black,
focusTextColor = colors.white,
backgroundColor = colors.gray,
tabBarBackgroundColor = colors.gray,
focusBackgroundColor = colors.gray,
},
-- path = '.:/apps:' .. shell.path():sub(3),
path = 'usr/apps:sys/apps:' .. shell.path(),
path = shell.path(),
}
Config.load('multishell', config)
@@ -463,10 +463,6 @@ end)
local function startup()
local hasError
--if not Opus.loadExtensions() then
-- hasError = true
--end
local overviewId = multishell.openTab({
path = 'sys/apps/Overview.lua',
focused = true,

View File

@@ -1,13 +1,14 @@
local parentShell = shell
local shell = { }
local multishell = multishell or { }
local sandboxEnv = setmetatable({ }, { __index = _G })
for k,v in pairs(getfenv(1)) do
sandboxEnv[k] = v
end
sandboxEnv.shell = shell
sandboxEnv.multishell = multishell or { }
sandboxEnv.multishell = multishell
requireInjector(getfenv(1))