Files
lit.ruv.wtf/website/scripts/commands/banner.js
Max Litruv Boonzaayer 288b48ddab Add terminal commands for enhanced functionality
- Implemented 'about' command to provide information about the terminal.
- Created 'banner' command to display a welcome message based on terminal width.
- Added 'bluesky' command to fetch and display recent posts from Bluesky.
- Introduced 'clear' command to clear the terminal screen.
- Developed 'color' command to change the terminal's color scheme.
- Added 'contact' command to display contact information.
- Implemented 'date' command to show the current date and time.
- Created 'echo' command to echo back user messages.
- Added 'github' command to simulate opening the GitHub repository.
- Implemented 'help' command to list available commands.
- Developed 'history' command to show command history.
- Added 'privacy' command to display the privacy policy.
- Implemented 'whoami' command to show user information.
2026-03-07 06:22:10 +11:00

25 lines
1.0 KiB
JavaScript

/**
* Banner command - Display welcome banner
*/
export default {
description: 'Display welcome banner',
execute: (term, writeClickable, VERSION, args, commandHistory, welcomeBannerFull, welcomeBannerCompact, welcomeBannerMinimal) => {
const cols = term.cols;
if (cols >= 78) {
term.writeln(welcomeBannerFull.split('\r\n').slice(0, -3).join('\r\n'));
writeClickable(' Type [command=help] for available commands.');
term.writeln(' Use ↑/↓ arrows to navigate command history.');
term.writeln('');
} else if (cols >= 40) {
term.writeln(welcomeBannerCompact.split('\r\n').slice(0, -2).join('\r\n'));
writeClickable(' Welcome! Type [command=help] for commands.');
term.writeln('');
} else {
term.writeln(welcomeBannerMinimal.split('\r\n').slice(0, -2).join('\r\n'));
writeClickable(' Type [command=help]');
term.writeln('');
}
return null;
}
};