add boot themes

This commit is contained in:
Marc Robin Richter
2026-03-17 13:55:45 +01:00
parent fcfcf28eab
commit 8acde1f9ad
7 changed files with 145 additions and 57 deletions
+25
View File
@@ -1,4 +1,5 @@
import type { LineColor } from '../components/BootSequence';
import { BOOT_SCREENS } from '../components/MatrixRain';
export interface OutputLine {
text: string;
@@ -211,6 +212,30 @@ export const handlers: Record<string, CommandHandler> = {
return [red(`rm: cannot remove '${args[args.length - 1]}': Permission denied`)];
},
theme: (args) => {
if (args.length === 0) {
const current = localStorage.getItem('stift15-bootscreen') || 'logo';
return [
amber('Boot screen themes:'),
...BOOT_SCREENS.map((s) =>
green(` ${s === current ? '▸ ' : ' '}${s}`)
),
dim(''),
dim(`Usage: theme <name>`),
dim('Run "reboot" to see the new boot screen.'),
];
}
const name = args[0].toLowerCase();
if (!BOOT_SCREENS.includes(name)) {
return [red(`theme: '${name}' not found. Available: ${BOOT_SCREENS.join(', ')}`)];
}
localStorage.setItem('stift15-bootscreen', name);
return [
green(`Boot screen set to '${name}'.`),
dim('Run "reboot" to see it.'),
];
},
sudo: (args) => {
if (args.length === 0) return [red('sudo: missing command')];
return [