v1.8.0 - Fixed a bug with shell not executing files in the working directory, added json library, changed all configs to json, added config auto-generation so they don't reset after an update.

This commit is contained in:
TheWahlolly
2025-05-31 09:55:23 +03:00
parent 34f716beaa
commit 41d55113e5
13 changed files with 92 additions and 115 deletions
+4 -4
View File
@@ -5,6 +5,7 @@ _G.cormgr.corList = {}
local component = import("component")
local filesystem = import("filesystem")
local json = import("json")
local gpu = component.proxy(component.list("gpu")())
function _G.cormgr.loadCoroutine(path, ...)
@@ -55,14 +56,13 @@ local function runCoroutines()
end
end
local handle = filesystem.open("/halyde/config/startupapps.cfg", "r")
local data = ""
local tmpdata
local handle, data, tmpdata = filesystem.open("/halyde/config/startupapps.json", "r"), "", nil
repeat
tmpdata = handle:read(math.huge or math.maxinteger)
data = data .. (tmpdata or "")
until not tmpdata
for line in data:gmatch("([^\n]*)\n?") do
handle:close()
for _, line in ipairs(json.decode(data)) do
if line ~= "" then
--[[ if _G.print then
print(line)