The NEX OS desktop is managed by two cooperating contexts —Documentation Index
Fetch the complete documentation index at: https://mintlify.com/shadownrx/windows/llms.txt
Use this file to discover all available pages before exploring further.
DesktopContext for icons and virtual workspaces, and SettingsContext for wallpaper and system-wide visual state. Together they expose a fully configurable workspace that supports custom wallpapers, freely positioned and sortable desktop icons, Windows 11-style snap zones, multiple virtual desktops, a widgets panel, and a system tray with live hardware toggles.
Wallpaper
The desktop wallpaper is stored as a URL string inside the current user’s profile inSettingsContext. Any publicly reachable image URL is accepted.
https://images.unsplash.com/photo-1620641788421-7a1c342ea42e?q=80&w=1974). When a neon theme is active, the Background3D component renders above the wallpaper layer, so the wallpaper acts as a subtle base beneath the 3D scene.
Wallpaper changes are persisted per-user in
localStorage. Each user profile independently stores its own wallpaper, theme, accent color, and night light preference.Desktop Icons
Desktop icons are managed byuseDesktop() from DesktopContext. Each icon records an absolute x/y pixel position and can target a registered application via appId.
Icon Management Methods
| Method | Parameters | Description |
|---|---|---|
addDesktopIcon | icon: Partial<DesktopIcon> | Adds a new icon at the specified x/y coordinates. |
updateDesktopIcon | id: string, updates: Partial<DesktopIcon> | Updates any icon property — position, title, or appId. |
removeDesktopIcon | id: string | Permanently removes an icon from the desktop. |
sortDesktopIcons | by: 'name' | 'type' | 'position' | Re-orders all icons alphabetically, by type, or by grid position. |
Icon Type
Drag-and-Drop Repositioning
Icons support free-form drag-and-drop directly on the desktop canvas. TheDesktop.tsx component listens to mousedown, mousemove, and mouseup events to track drag state and calls updateDesktopIcon(id, { x: newX, y: newY }) on every move frame — giving smooth, pixel-accurate repositioning with a minimum clamp of 10px from the desktop edge.
Virtual Desktops
NEX OS ships with three virtual desktops out of the box (Escritorio 1, Escritorio 2, Escritorio 3). Each desktop maintains an independent set of open windows — windows are filtered by desktopId when rendering.
Virtual Desktop Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Win + Tab | Open Task View — see all desktops and windows at a glance |
Win + Ctrl + → | Switch to the next virtual desktop (wraps around) |
Win + Ctrl + ← | Switch to the previous virtual desktop (wraps around) |
Escape | Close Task View |
Win + Ctrl + → on the last desktop loops back to the first. The switch is handled directly in Desktop.tsx via window.addEventListener('keydown', ...), calling switchDesktop() after computing the next index modulo virtualDesktops.length.
Task View (
Win + Tab) is rendered by src/components/system/TaskView.tsx. It provides a visual overview of all virtual desktops and all currently open windows, allowing windows to be dragged between desktops.Snap Layouts
NEX OS implements Windows 11-style window snapping with six snap zones. Snapping is performed by callingsnapWindow(id, direction) from useWindowManager(), which instantly positions and sizes the window to fill its designated screen zone.
Snap Positions
| Direction | Screen Zone |
|---|---|
left | Left half of the screen |
right | Right half of the screen |
top-left | Top-left quadrant |
top-right | Top-right quadrant |
bottom-left | Bottom-left quadrant |
bottom-right | Bottom-right quadrant |
savedSize field on AppWindow stores the { width, height, x, y } snapshot taken before snapping or maximizing. When the window is unsnapped or restored, savedSize is used for a pixel-perfect restore — preventing the common UX problem of windows expanding to an unexpected size after unsnapping.
Widgets Panel
The widgets panel slides in from the left side of the desktop and is toggled via the widgets button in the taskbar or by right-clicking the desktop and selecting Toggle widgets panel. It is managed byuseUI() from UIContext.
src/components/system/WidgetsPanel.tsx:
WeatherWidget
Current conditions, temperature, and forecast. Located at
src/components/system/widgets/WeatherWidget.tsx.NewsWidget
Latest headlines feed. Located at
src/components/system/widgets/NewsWidget.tsx.StocksWidget
Live stock tickers and price changes. Located at
src/components/system/widgets/StocksWidget.tsx.System Tray
The system tray lives in the bottom-right corner of the taskbar and provides quick toggles for the most common system states. All values come fromuseSettings().
| Toggle | Property | Default |
|---|---|---|
| Wi-Fi | isWifiEnabled | true |
| Bluetooth | isBluetoothEnabled | true |
| Night Light | isNightLightEnabled | false |
| Volume slider | volume (0–100) | 50 |
| Brightness slider | brightness (0–100) | 100 |
Night Light Mode
WhenisNightLightEnabled is true, a warm amber overlay is applied to the desktop surface, reducing the amount of blue-spectrum light emitted by the screen. This is particularly useful during evening sessions and maps directly to the --win-brightness CSS variable that controls the filter: brightness(...) applied to the OS root element.