The CookieOS start menu is the central hub of the operating system. It appears automatically after the boot sequence completes and gives you keyboard-driven access to every major area of CookieOS: the command prompt, the programs menu, power management, the uninstaller, and the built-in help system. It stays on screen until you make a selection, and it keeps a live clock running in the top-right corner at all times so you always know the current time.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/PrinceOfCookies/CookieOS/llms.txt
Use this file to discover all available pages before exploring further.
Screen Layout
The display is split into two layers drawn bycosUtils.drawMenu(term) and cosUtils.centerPrintTable respectively.
Top Bar
cosUtils.drawMenu(term) renders a persistent two-character-wide bar spanning the top two rows of the terminal. It is backed by an off-screen window that is shown only once fully composed, preventing flicker:
- Left — the version string stored in the global
cosv(e.g.,CookieOS v2.2.5), written in yellow. - Right — the current time in
HH:MM AM/PMformat (or 24-hour if configured), written in white.
Menu Box
Below the top bar, the menu is rendered usingcosUtils.centerPrintTable inside an invisible off-screen window. cosUtils.drawBox draws a border around the items, and each item is horizontally centered on the terminal. The selected item is highlighted with square brackets, for example [ Command ], while all other items appear without decoration.
Menu Options
| Option | Action |
|---|---|
| Command | Opens the command prompt (os/.command) |
| Programs | Opens the programs menu (os/.programs) |
| Power | Opens power management (os/.powerManagement) |
| Uninstall | Runs the uninstall script (os/.uninstall) |
| Help | Runs .help |
Keyboard Navigation
Navigation is handled entirely by the keyboard.cosUtils.menuKeyUpDownManagement(key, numOp, max, min) translates key presses into a new selection index, wrapping seamlessly from the last option back to the first and vice versa.
Move the selection
Press the Up or Down arrow key to move the highlighted bracket to the previous or next option. The selection wraps around at both ends.
Live Clock Refresh
The start menu uses a timer to keep the top-bar clock current without polling continuously. A new timer fires roughly every second; the menu only redraws when the minute value has actually changed since the last redraw, so screen updates are kept to a minimum.0.1 seconds to produce a near-instant initial refresh, then every subsequent timer is set to 1 second. cosUtils.getTime("12", true) returns the current hour, minute, and AM/PM indicator; the minute value is stored in lastrefresh after each draw so the comparison is cheap.