Skip to content

Commit

Permalink
Update System.js
Browse files Browse the repository at this point in the history
  • Loading branch information
withinJoel authored Oct 16, 2024
1 parent 89abc00 commit c012e66
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion Modules/System.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,24 @@ function getSys() {
echo('Screen Resolution: ' + screenresolution);
}

//Whatis
// Function to handle user input
function whatIsCommand(input) {
// Check if the input starts with 'whatis'
if (input.startsWith('whatis ')) {
// Extract the command from the input
const command = input.split(' ')[1];

// Look up the command in the dictionary
const meaning = commandDictionary[command];

// Return the meaning or a message if the command is not found
return meaning ? meaning : `Command '${command}' not found.`;
} else {
return "Please use the format 'whatis <command>'.";
}
}

//CPU Info
async function getCPUInfo() {
const cpuInfo = await window.electronAPI.getCPUInfo();
Expand Down Expand Up @@ -427,4 +445,4 @@ function getMousePosition() {
//error
function errorhandling() {
echo(`Not a valid command.`);
}
}

0 comments on commit c012e66

Please sign in to comment.