2 lines
1.9 KiB
Plaintext
2 lines
1.9 KiB
Plaintext
local a=0x00FFFF;local b=0xFFFFFF;local c=0xDBDBDB;local d=0x6D6D6D;local e=0x00FF00;local function f(g)syscall.devctl(1,"sfgc",g)end;local h=syscall.getUsername()or"Unknown"local i=syscall.getHostname()or"Unknown"local j=h.."@"..i;local function k(l)local m=math.floor(l/1000)local n=math.floor(m/60)local o=math.floor(n/60)local p=math.floor(o/24)m=m%60;n=n%60;o=o%24;local q={}if p>0 then q[#q+1]=p.."d"end;if o>0 then q[#q+1]=o.."h"end;if n>0 then q[#q+1]=n.."m"end;q[#q+1]=m.."s"return table.concat(q," ")end;local r=syscall.getHost()or"Unknown"local s=r:match("ComputerCraft ([%d%.]+)")or r;local t={{nil,j},{nil,string.rep("-",#j)},{"OS",syscall.version()or"Unknown"},{"Host",s},{"Arch",syscall.arch()or"Unknown"},{"Uptime",k(syscall.getUptime()or 0)},{"Tasks",tostring(#(syscall.getTasks()or{}))},{"Shell",syscall.getEnviron("SHELL")or"Unknown"},{"Terminal","tty1"},{"UID",tostring(syscall.getuid())},{"Packages","n/a (spm)"}}local u={".. *. .. "," *= +@* +* "," .@#. -@@@= :#@. "," =@@+ *@@@# +@@= "," %@@%: *@@@# -%@@% "," :@@@@+ *@@@# .*@@@@: "," :*@@@%- *@@@# -@@@@*: "," =%@@#. *@@@# .#@@%= "," :=. :*@@= *@@@# =@@+: .=: "," %@#=..*# +@@@# #*..=#@# "," .@@@@+=# .%@%: #=+@@@@. "," .....=# -@= *+...:. "," -*%*-@= - =@-*%*- "," -@*. -@%. :%@- :*@- "," .#@#@* "," -#- "," "}local v=math.max(#u,#t)for w=1,v do local x=u[w]or string.rep(" ",36)f(a)printInline(x)f(c)printInline("| ")local y=t[w]if y then if y[1]==nil and w==1 then f(e)printInline(y[2])elseif y[1]==nil and w==2 then f(d)printInline(y[2])elseif y[1]then f(c)printInline(y[1]..": ")f(b)printInline(y[2])end end;f(b)print("")end
|