diff --git a/argentum.cfg b/argentum.cfg index 378b44f..696c241 100644 --- a/argentum.cfg +++ b/argentum.cfg @@ -1,7 +1,7 @@ local agcfg = { ["halyde"] = { ["maindir"] = "", - ["version"] = "1.8.5", + ["version"] = "1.8.6", ["description"] = "A universal, customizable and feature-packed operating system for OpenComputers.", ["directories"] = { "halyde/apps", @@ -23,6 +23,7 @@ local agcfg = { "halyde/apps/helpdb/fetch.txt", "halyde/apps/helpdb/help.txt", "halyde/apps/helpdb/ls.txt", + "halyde/apps/helpdb/lscor.txt", "halyde/apps/helpdb/lua.txt", "halyde/apps/helpdb/mv.txt", "halyde/apps/helpdb/rm.txt", @@ -34,6 +35,7 @@ local agcfg = { "halyde/apps/fetch.lua", "halyde/apps/help.lua", "halyde/apps/ls.lua", + "halyde/apps/lscor.lua", "halyde/apps/lua.lua", "halyde/apps/mkdir.lua", "halyde/apps/mv.lua", diff --git a/argentum/store/halyde/package.cfg b/argentum/store/halyde/package.cfg index d1b02a6..cc595c7 100644 --- a/argentum/store/halyde/package.cfg +++ b/argentum/store/halyde/package.cfg @@ -4,7 +4,7 @@ Ahalyde/core/ Ahalyde/config/generate/ Ahalyde/apps/helpdb/ Ahalyde/apps/ -V1.8.5 +V1.8.6 Ainit.lua Ahalyde/apps/helpdb/cat.txt Ahalyde/apps/helpdb/cd.txt @@ -15,6 +15,7 @@ Ahalyde/apps/helpdb/echo.txt Ahalyde/apps/helpdb/fetch.txt Ahalyde/apps/helpdb/help.txt Ahalyde/apps/helpdb/ls.txt +Ahalyde/apps/helpdb/lscor.txt Ahalyde/apps/helpdb/lua.txt Ahalyde/apps/helpdb/mv.txt Ahalyde/apps/helpdb/rm.txt @@ -26,6 +27,7 @@ Ahalyde/apps/echo.lua Ahalyde/apps/fetch.lua Ahalyde/apps/help.lua Ahalyde/apps/ls.lua +Ahalyde/apps/lscor.lua Ahalyde/apps/lua.lua Ahalyde/apps/mkdir.lua Ahalyde/apps/mv.lua diff --git a/halyde/apps/helpdb/lscor.txt b/halyde/apps/helpdb/lscor.txt new file mode 100644 index 0000000..95f4891 --- /dev/null +++ b/halyde/apps/helpdb/lscor.txt @@ -0,0 +1,5 @@ +Usage: lscor +Lists every active coroutine by ID and name. + +Examples: + lscor Lists every active coroutine by ID and name. diff --git a/halyde/apps/lscor.lua b/halyde/apps/lscor.lua new file mode 100644 index 0000000..ffe3495 --- /dev/null +++ b/halyde/apps/lscor.lua @@ -0,0 +1,9 @@ +print("\27[93m"..tostring(#cormgr.corList).."\27[0m coroutines active") +for i=1, #cormgr.corList do + if i==#cormgr.corList then + print("\27[93m└ "..i.."\27[0m - "..cormgr.labelList[i].." \27[0m") + else + print("\27[93m├ "..i.."\27[0m - "..cormgr.labelList[i].." \27[0m") + end + +end diff --git a/halyde/config/shell.json b/halyde/config/shell.json index de725fe..2f00fba 100644 --- a/halyde/config/shell.json +++ b/halyde/config/shell.json @@ -1 +1 @@ -{"prompt":"\u001b[92m%s > \u001b[0m","aliases":{"move":"mv","copy":"cp","ag":"argentum","rename":"mv","..":"cd ..","man":"help","del":"rm","delete":"rm","ren":"mv","remove":"rm","list":"ls","wget":"download","dir":"ls"},"splashMessages":["Made by John Haly- I mean Cerulean Blue.","Welcome! Type \"help\" to get started.","Also try KOCOS!","Welcome back, Commander. We have no idea what we're doing.","99.9% bug-free. The remaining 0.1% are features.","0 days since last error.","Everything is fine. The fire is decorative.","Please don't feed the background processes.","Also has fetch!","Anything red is no man's land. Trust me.","Machine...","Abort, Retry, Fail?","What's the deal with /argentum/store?","So cutting-edge you can't hold it in your hand.","Americans are the reason you see colors on-screen. I'm talking about ANSI escape codes, not politics.","Shoutout to Ponali!"],"path":["/halyde/apps/"],"startupMessage":"\n │\n │ %s\n │ %s\n │\n ","defaultWorkingDirectory":"/home/"} +{"prompt":"\u001b[92m%s > \u001b[0m","aliases":{"move":"mv","copy":"cp","ag":"argentum","rename":"mv","..":"cd ..","man":"help","del":"rm","delete":"rm","ren":"mv","remove":"rm","list":"ls","wget":"download","dir":"ls","ps":"lscor"},"splashMessages":["Made by John Haly- I mean Cerulean Blue.","Welcome! Type \"help\" to get started.","Also try KOCOS!","Welcome back, Commander. We have no idea what we're doing.","99.9% bug-free. The remaining 0.1% are features.","0 days since last error.","Everything is fine. The fire is decorative.","Please don't feed the background processes.","Also has fetch!","Anything red is no man's land. Trust me.","Machine...","Abort, Retry, Fail?","What's the deal with /argentum/store?","So cutting-edge you can't hold it in your hand.","Americans are the reason you see colors on-screen. I'm talking about ANSI escape codes, not politics.","Shoutout to Ponali!"],"path":["/halyde/apps/"],"startupMessage":"\n │\n │ %s\n │ %s\n │\n ","defaultWorkingDirectory":"/home/"} diff --git a/halyde/core/boot.lua b/halyde/core/boot.lua index c0a983b..fafdedc 100644 --- a/halyde/core/boot.lua +++ b/halyde/core/boot.lua @@ -1,7 +1,7 @@ local loadfile = ... local filesystem = loadfile("/halyde/lib/filesystem.lua")(loadfile) -_G._OSVERSION = "Halyde 1.8.5" +_G._OSVERSION = "Halyde 1.8.6" _G._OSLOGO = "" local handle, tmpdata = filesystem.open("/halyde/config/oslogo.ans", "r"), nil repeat diff --git a/halyde/core/cormgr.lua b/halyde/core/cormgr.lua index 0b64b33..661ef44 100644 --- a/halyde/core/cormgr.lua +++ b/halyde/core/cormgr.lua @@ -1,5 +1,6 @@ _G.cormgr = {} _G.cormgr.corList = {} +_G.cormgr.labelList = {} --local ocelot = component.proxy(component.list("ocelot")()) @@ -8,7 +9,7 @@ local filesystem = import("filesystem") local json = import("json") local gpu = component.proxy(component.list("gpu")()) -function _G.cormgr.loadCoroutine(path, ...) +function _G.cormgr.loadCoroutine(path,...) local args = {...} local cor = coroutine.create(function() local result, errorMessage = xpcall(function(...) @@ -26,6 +27,7 @@ function _G.cormgr.loadCoroutine(path, ...) end --import(path, table.unpack(args)) end) + table.insert(_G.cormgr.labelList, string.match(tostring(path), "([^/]+)%.lua$")) table.insert(_G.cormgr.corList, cor) end