From f3d10bc82a3c42507a90c296a02ae777a4f1e273 Mon Sep 17 00:00:00 2001 From: TheWahlolly Date: Wed, 2 Jul 2025 11:48:51 +0300 Subject: [PATCH] v1.13.0 - Added shutdown and reboot commands. --- argentum.cfg | 6 +++++- halyde/apps/helpdb/default.txt | 6 ++++-- halyde/apps/helpdb/reboot.txt | 5 +++++ halyde/apps/helpdb/shutdown.txt | 5 +++++ halyde/apps/reboot.lua | 1 + halyde/apps/shutdown.lua | 1 + halyde/config/shell.json | 2 +- halyde/core/boot.lua | 2 +- 8 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 halyde/apps/helpdb/reboot.txt create mode 100644 halyde/apps/helpdb/shutdown.txt create mode 100644 halyde/apps/reboot.lua create mode 100644 halyde/apps/shutdown.lua diff --git a/argentum.cfg b/argentum.cfg index 9c9be6a..6482e62 100644 --- a/argentum.cfg +++ b/argentum.cfg @@ -1,7 +1,7 @@ local agcfg = { ["halyde"] = { ["maindir"] = "", - ["version"] = "1.12.6", + ["version"] = "1.13.0", ["description"] = "A universal, customizable and feature-packed operating system for OpenComputers.", ["directories"] = { "halyde/apps", @@ -27,7 +27,9 @@ local agcfg = { "halyde/apps/helpdb/lscor.txt", "halyde/apps/helpdb/lua.txt", "halyde/apps/helpdb/mv.txt", + "halyde/apps/helpdb/reboot.txt", "halyde/apps/helpdb/rm.txt", + "halyde/apps/helpdb/shutdown.txt", "halyde/apps/cat.lua", "halyde/apps/cd.lua", "halyde/apps/clear.lua", @@ -40,7 +42,9 @@ local agcfg = { "halyde/apps/lua.lua", "halyde/apps/mkdir.lua", "halyde/apps/mv.lua", + "halyde/apps/reboot.lua", "halyde/apps/rm.lua", + "halyde/apps/shutdown.lua", "halyde/config/oslogo.ans", "halyde/config/generate/shell.json", "halyde/config/generate/startupapps.json", diff --git a/halyde/apps/helpdb/default.txt b/halyde/apps/helpdb/default.txt index 73a53c4..dd84751 100644 --- a/halyde/apps/helpdb/default.txt +++ b/halyde/apps/helpdb/default.txt @@ -1,9 +1,11 @@ All default Halyde shell commands: + argentum Uses the Argentum package manager. cat Concatenates and prints a file. cd Changes directory. clear Clears the screen. cp Copies a file. echo Prints a message. + edit Opens the text editor. fetch Displays system information. help Shows this. ls Lists files. @@ -11,9 +13,9 @@ All default Halyde shell commands: lua Starts the Lua shell. mkdir Makes a directory. mv Moves/renames a file. + reboot Reboots the computer. rm Deletes a file. - edit Opens the text editor. - argentum Uses the Argentum package manager. + shutdown Shuts down the computer. You can get additional information on any app or command by running: help [COMMAND] diff --git a/halyde/apps/helpdb/reboot.txt b/halyde/apps/helpdb/reboot.txt new file mode 100644 index 0000000..ebabd96 --- /dev/null +++ b/halyde/apps/helpdb/reboot.txt @@ -0,0 +1,5 @@ +Usage: reboot +Reboots the computer. + +Examples: + reboot Reboots the computer. diff --git a/halyde/apps/helpdb/shutdown.txt b/halyde/apps/helpdb/shutdown.txt new file mode 100644 index 0000000..626ae9b --- /dev/null +++ b/halyde/apps/helpdb/shutdown.txt @@ -0,0 +1,5 @@ +Usage: shutdown +Shuts down the computer. + +Examples: + shutdown Shuts down the computer. diff --git a/halyde/apps/reboot.lua b/halyde/apps/reboot.lua new file mode 100644 index 0000000..a11869a --- /dev/null +++ b/halyde/apps/reboot.lua @@ -0,0 +1 @@ +import("computer").shutdown(true) diff --git a/halyde/apps/shutdown.lua b/halyde/apps/shutdown.lua new file mode 100644 index 0000000..d2544dc --- /dev/null +++ b/halyde/apps/shutdown.lua @@ -0,0 +1 @@ +import("computer").shutdown() diff --git a/halyde/config/shell.json b/halyde/config/shell.json index 2f00fba..3c7e373 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","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/"} +{"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","poweroff":"shutdown","restart":"reboot"},"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 e9e752f..3011208 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.12.6" +_G._OSVERSION = "Halyde 1.13.0" _G._OSLOGO = "" local handle, tmpdata = filesystem.open("/halyde/config/oslogo.ans", "r"), nil repeat