The CookieOS Power Management menu gives you a clean, keyboard-driven interface for safely shutting down or rebooting the computer. It is reached by selecting Power from the start menu, which runsDocumentation 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.
os/.powerManagement. Like the start menu it draws a centred, boxed option list with a live clock in the top bar, and it supports the same Up/Down/Enter navigation. Choosing Shutdown or Reboot triggers a graceful goodbye animation before the computer actually powers off or restarts.
Menu Options
| Option | Behaviour |
|---|---|
| Shutdown | Calls cosUtils.goodByeSetup(term) to position the cursor centrally, then executes shutdown — which internally calls os.shutdown() |
| Reboot | Calls cosUtils.goodByeSetup(term) to position the cursor centrally, then executes reboot — which internally calls os.reboot() |
| Back | Returns to the start menu by running shell.run(".menu") |
Keyboard Navigation
Navigation is identical to the start menu.cosUtils.menuKeyUpDownManagement handles Up/Down arrow keys and wraps the selection at both ends. Press Enter to confirm the highlighted option.
Move the selection
Press the Up or Down arrow key to move the highlight between Shutdown, Reboot, and Back.
The Goodbye Animation
Bothos.reboot and os.shutdown are replaced at startup by startup/replacements.lua. The replacements wrap the original CC:Tweaked functions with a short goodbye sequence: the screen is cleared, the cursor is moved to the vertical centre by cosUtils.goodByeSetup(term), the word “Goodbye” is printed in yellow, and the computer waits one second before calling the original function.
os.shutdown follows the same pattern, calling originalShutdown() in place of originalreboot(). The original functions are captured into originalreboot and originalShutdown before the replacements are installed, so the underlying CC:Tweaked behaviour is preserved.
cosUtils.goodByeSetup(device) calculates the horizontal and vertical centre of the terminal before clearing the screen and positioning the cursor, ensuring the “Goodbye” message always appears in the middle of the display regardless of terminal size: