1 line
2.3 KiB
Lua
1 line
2.3 KiB
Lua
local a=import("component")local b=import("computer")local function c(a)termlib.cursorPosX=35;termlib.write(a.."\n",false)end;termlib.write(_OSLOGO,false)termlib.cursorPosY=termlib.cursorPosY-17;c("\27[92mOS\27[0m: ".._OSVERSION)c("\27[92mArchitecture\27[0m: ".._VERSION)local d=0;for a,a in a.list()do d=d+1 end;c("\27[92mComponents\27[0m: "..tostring(d))c("\27[92mCoroutines\27[0m: "..tostring(#cormgr.corList))c("\27[92mBattery\27[0m: "..tostring(math.floor(b.energy()/b.maxEnergy()*1000+0.5)/10).."%")local d=b.totalMemory()local e=b.totalMemory()-b.freeMemory()local f;if convert(d,"B","GiB")>=1 then f=tostring(math.floor(convert(d,"B","GiB")*100+0.5)/100).." GiB"elseif convert(d,"B","MiB")>=1 then f=tostring(math.floor(convert(d,"B","MiB")*100+0.5)/100).." MiB"elseif convert(d,"B","KiB")>=1 then f=tostring(math.floor(convert(d,"B","KiB")*100+0.5)/100).." KiB"else f=tostring(d).." B"end;local d;if convert(e,"B","GiB")>=1 then d=tostring(math.floor(convert(e,"B","GiB")*100+0.5)/100).." GiB"elseif convert(e,"B","MiB")>=1 then d=tostring(math.floor(convert(e,"B","MiB")*100+0.5)/100).." MiB"elseif convert(e,"B","KiB")>=1 then d=tostring(math.floor(convert(e,"B","KiB")*100+0.5)/100).." KiB"else d=tostring(e).." B"end;c("\27[92mMemory\27[0m: "..d.." / "..f)local d=a.invoke(b.getBootAddress(),"spaceTotal")local b=a.invoke(b.getBootAddress(),"spaceUsed")local e;if convert(d,"B","GiB")>=1 then e=tostring(math.floor(convert(d,"B","GiB")*100+0.5)/100).." GiB"elseif convert(d,"B","MiB")>=1 then e=tostring(math.floor(convert(d,"B","MiB")*100+0.5)/100).." MiB"elseif convert(d,"B","KiB")>=1 then e=tostring(math.floor(convert(d,"B","KiB")*100+0.5)/100).." KiB"else e=tostring(d).." B"end;local d;if convert(b,"B","GiB")>=1 then d=tostring(math.floor(convert(b,"B","GiB")*100+0.5)/100).." GiB"elseif convert(b,"B","MiB")>=1 then d=tostring(math.floor(convert(b,"B","MiB")*100+0.5)/100).." MiB"elseif convert(b,"B","KiB")>=1 then d=tostring(math.floor(convert(b,"B","KiB")*100+0.5)/100).." KiB"else d=tostring(b).." B"end;c("\27[92mDisk\27[0m: "..d.." / "..e)local a,b=a.invoke(a.list("gpu")(),"getResolution")c("\27[92mResolution\27[0m: "..tostring(a).."x"..tostring(b).."\n")c("\27[40m \27[41m \27[42m \27[43m \27[44m \27[45m \27[46m \27[47m ")c("\27[100m \27[101m \27[102m \27[103m \27[104m \27[105m \27[106m \27[107m ")termlib.cursorPosY=termlib.cursorPosY+5 |