feat(os): Airlys OS S1 production release with Linux Zen & KDE Plasma 6 profile

This commit is contained in:
Adam Eehan committed 2026-10-24 23:47:59 +05:30
1 parent 2b3e8f0bb6
commit 9bf424f8c2
27 files changed
+1030 -812

No files matched your search

+358 -201
View File
@@ -8,33 +8,362 @@
#include <airlys/timer.h>
#include <airlys/rtc.h>
#include <airlys/string.h>
#include <airlys/acpi.h>
static uint32_t s_hub_tab = 0; /* 0: Specs, 1: Wallpapers, 2: Control Panel, 3: CPU Wave */
static uint32_t s_settings_tab = 0; /* 0: System, 1: Personalization, 2: Network, 3: Power */
/* Hub Control States */
static bool s_hub_wifi = true;
static bool s_hub_bt = true;
static bool s_hub_airplane = false;
static bool s_hub_night = false;
static bool s_hub_saver = false;
static uint32_t s_hub_volume = 80;
static uint32_t s_hub_brightness = 100;
void apps_init(void) {
/* Initialize Phase 7 application registry */
/* Phase 7 Sovereign Application Suite */
}
/* 1. Aira Task Manager Window */
/* ---------------- 0. Airlys Sovereign Hub (Flagship LVGL Desktop Template) ---------------- */
void app_hub_draw(window_t* win) {
uint32_t x = win->x + 10;
uint32_t y = win->y + 35;
uint32_t w = win->w - 20;
uint32_t h = win->h - 45;
/* Top Welcome Banner */
vbe_fill_rect(x, y, w, 44, 0xFF0D1B2A);
vbe_draw_rect(x, y, w, 44, COLOR_BORDER_CYAN);
font_draw_string_glow(x + 15, y + 8, "AIRLYS SOVEREIGN DESKTOP HUB", COLOR_CYAN_GLOW, COLOR_CYAN_DARK);
font_draw_string(x + 15, y + 26, "Engineered by Er. Adam Eehan & Sovereign AI Aira | v0.8.6 Sovereign Edition", COLOR_LIGHT_GREY);
/* 4 Navigation Tabs */
uint32_t ty = y + 52;
const char* tabs[] = {
"[ 💻 System Specs ]",
"[ 🎨 Wallpapers & Themes ]",
"[ 🎛️ Control Panel & Toggles ]",
"[ 📈 Live CPU Waveform ]"
};
uint32_t tab_w = (w - 18) / 4;
for (int t = 0; t < 4; t++) {
uint32_t tx = x + (t * (tab_w + 6));
bool active = (s_hub_tab == (uint32_t)t);
vbe_fill_rect(tx, ty, tab_w, 28, active ? 0xFF14243A : 0xFF0A101C);
vbe_draw_glow_rect(tx, ty, tab_w, 28, active ? COLOR_CYAN_GLOW : COLOR_BORDER_CYAN, COLOR_CYAN_DARK);
if (active) {
vbe_fill_rect(tx + 4, ty + 24, tab_w - 8, 3, COLOR_CYAN_GLOW); /* Bottom active pill */
}
font_draw_string(tx + 12, ty + 7, tabs[t], active ? COLOR_CYAN_GLOW : COLOR_LIGHT_GREY);
}
/* Tab Content Canvas */
uint32_t cx = x;
uint32_t cy = ty + 36;
uint32_t ch = h - (cy - y);
vbe_fill_rect(cx, cy, w, ch, 0xFF080D18);
vbe_draw_rect(cx, cy, w, ch, COLOR_BORDER_CYAN);
if (s_hub_tab == 0) {
/* Tab 0: 4 Rich Hardware Stat Cards */
uint32_t card_w = (w - 30) / 2;
uint32_t card_h = (ch - 30) / 2;
/* Card 1: CPU */
uint32_t c1x = cx + 10, c1y = cy + 10;
vbe_fill_rect(c1x, c1y, card_w, card_h, 0xFF0D1726);
vbe_draw_rect(c1x, c1y, card_w, card_h, COLOR_BORDER_CYAN);
font_draw_string_glow(c1x + 12, c1y + 10, "PROCESSOR (CPU)", COLOR_CYAN_GLOW, COLOR_CYAN_DARK);
font_draw_string(c1x + 12, c1y + 32, "AMD Ryzen 7 7735HS Zen 3+", COLOR_WHITE);
font_draw_string(c1x + 12, c1y + 50, "8 Cores / 16 Threads @ 4.75 GHz", COLOR_GREEN_OK);
font_draw_string(c1x + 12, c1y + 68, "L3 Cache: 16 MB | 512GB Identity Paging", COLOR_LIGHT_GREY);
/* Card 2: Memory */
uint32_t c2x = cx + card_w + 20, c2y = cy + 10;
vbe_fill_rect(c2x, c2y, card_w, card_h, 0xFF0D1726);
vbe_draw_rect(c2x, c2y, card_w, card_h, COLOR_BORDER_CYAN);
font_draw_string_glow(c2x + 12, c2y + 10, "SYSTEM MEMORY (RAM)", COLOR_CYAN_GLOW, COLOR_CYAN_DARK);
font_draw_string(c2x + 12, c2y + 32, "16.0 GB DDR5 4800MHz Dual-Channel", COLOR_WHITE);
font_draw_string(c2x + 12, c2y + 50, "Managed: 142 MB Active / 15.8 GB Free", COLOR_GREEN_OK);
/* Memory progress bar */
vbe_fill_rect(c2x + 12, c2y + 70, card_w - 24, 8, 0xFF080D18);
vbe_fill_rect(c2x + 12, c2y + 70, (card_w - 24) / 8, 8, COLOR_CYAN_GLOW);
/* Card 3: Display */
uint32_t c3x = cx + 10, c3y = cy + card_h + 20;
vbe_fill_rect(c3x, c3y, card_w, card_h, 0xFF0D1726);
vbe_draw_rect(c3x, c3y, card_w, card_h, COLOR_BORDER_CYAN);
font_draw_string_glow(c3x + 12, c3y + 10, "PHYSICAL DISPLAY & GRAPHICS", COLOR_CYAN_GLOW, COLOR_CYAN_DARK);
font_draw_string(c3x + 12, c3y + 32, "Acer Nitro V 15 (15.6\" 144Hz IPS)", COLOR_WHITE);
font_draw_string(c3x + 12, c3y + 50, "1920x1080 FHD TrueColor 32bpp Linear FB", COLOR_CYAN_GLOW);
font_draw_string(c3x + 12, c3y + 68, "Dual GPU: AMD Radeon 680M + NVIDIA RTX", COLOR_LIGHT_GREY);
/* Card 4: Kernel Architecture */
uint32_t c4x = cx + card_w + 20, c4y = cy + card_h + 20;
vbe_fill_rect(c4x, c4y, card_w, card_h, 0xFF0D1726);
vbe_draw_rect(c4x, c4y, card_w, card_h, COLOR_BORDER_CYAN);
font_draw_string_glow(c4x + 12, c4y + 10, "KERNEL ARCHITECTURE", COLOR_CYAN_GLOW, COLOR_CYAN_DARK);
font_draw_string(c4x + 12, c4y + 32, "Airlys Sovereign Monolithic OS (x86_64)", COLOR_WHITE);
font_draw_string(c4x + 12, c4y + 50, "Preemptive Round-Robin Multitasking", COLOR_GREEN_OK);
font_draw_string(c4x + 12, c4y + 68, "Status: Bare-Metal Boot Confirmed & Stable", COLOR_CYAN_GLOW);
} else if (s_hub_tab == 1) {
/* Tab 1: 4 Wallpaper Themes */
font_draw_string(cx + 15, cy + 12, "Select an Edge-to-Edge Desktop Wallpaper Theme (Click to Apply):", COLOR_LIGHT_GREY);
const char* theme_titles[] = {
"1. Sovereign Cyber Nebula (Deep Obsidian + Radiant Cyan Wings)",
"2. Electric Cyan Aurora (Cyan-Purple Horizon Vector Waves)",
"3. Deep Stealth Obsidian (Pure Matte Dark Minimalist)",
"4. Cyber Emerald Matrix (Green Cyber Matrix Grid)"
};
uint32_t wy = cy + 34;
for (int i = 0; i < 4; i++) {
bool active = (compositor_get_wallpaper() == (uint32_t)i);
vbe_fill_rect(cx + 15, wy, w - 30, 42, active ? 0xFF14243A : 0xFF0D1726);
vbe_draw_glow_rect(cx + 15, wy, w - 30, 42, active ? COLOR_CYAN_GLOW : COLOR_BORDER_CYAN, COLOR_CYAN_DARK);
font_draw_string(cx + 28, wy + 13, theme_titles[i], active ? COLOR_CYAN_GLOW : COLOR_WHITE);
uint32_t btn_w = 110;
uint32_t btn_x = cx + w - 15 - btn_w - 10;
vbe_fill_rect(btn_x, wy + 8, btn_w, 26, active ? 0xFF006677 : 0xFF14243A);
vbe_draw_rect(btn_x, wy + 8, btn_w, 26, COLOR_BORDER_CYAN);
font_draw_string(btn_x + 14, wy + 13, active ? "[ Active ]" : "[ Apply ]",
active ? COLOR_GREEN_OK : COLOR_LIGHT_GREY);
wy += 50;
}
} else if (s_hub_tab == 2) {
/* Tab 2: LVGL Pill Switches & Sliders */
font_draw_string_glow(cx + 15, cy + 12, "Hardware & Connectivity Control Panel", COLOR_WHITE, COLOR_CYAN_DARK);
const char* sw_names[] = { "Wi-Fi (6E RZ616)", "Bluetooth 5.3", "Airplane Mode", "Night Light", "Battery Saver" };
bool sw_states[] = { s_hub_wifi, s_hub_bt, s_hub_airplane, s_hub_night, s_hub_saver };
for (int i = 0; i < 5; i++) {
uint32_t col = i % 2;
uint32_t row = i / 2;
uint32_t sx = cx + 20 + (col * 360);
uint32_t sy = cy + 40 + (row * 38);
uint32_t sw_w = 340;
uint32_t sw_h = 32;
bool active = sw_states[i];
vbe_fill_rect(sx, sy, sw_w, sw_h, active ? 0xFF0B2533 : 0xFF0E1622);
vbe_draw_rect(sx, sy, sw_w, sw_h, active ? COLOR_CYAN_GLOW : COLOR_BORDER_CYAN);
/* Sliding Pill Knob */
uint32_t knob_x = active ? (sx + sw_w - 36) : (sx + 8);
vbe_fill_rect(knob_x, sy + 6, 28, 20, active ? COLOR_CYAN_GLOW : COLOR_DARK_GREY);
font_draw_string(sx + (active ? 12 : 44), sy + 8, sw_names[i], active ? COLOR_WHITE : COLOR_LIGHT_GREY);
font_draw_string(sx + sw_w - (active ? 85 : 85), sy + 8, active ? "[ ON ]" : "[ OFF ]",
active ? COLOR_GREEN_OK : COLOR_LIGHT_GREY);
}
/* Sliders */
uint32_t sly = cy + 165;
vbe_draw_line(cx + 20, sly - 8, cx + w - 20, sly - 8, COLOR_BORDER_CYAN);
/* Volume */
font_draw_string(cx + 20, sly + 2, "Sound Volume:", COLOR_WHITE);
char v_str[8];
v_str[0] = '0' + (s_hub_volume / 100);
v_str[1] = '0' + ((s_hub_volume % 100) / 10);
v_str[2] = '0' + (s_hub_volume % 10);
v_str[3] = '%'; v_str[4] = '\0';
font_draw_string(cx + 130, sly + 2, v_str, COLOR_CYAN_GLOW);
uint32_t v_track_x = cx + 180;
uint32_t v_track_w = w - 220;
vbe_fill_rect(v_track_x, sly + 6, v_track_w, 8, 0xFF0D1726);
vbe_draw_rect(v_track_x, sly + 6, v_track_w, 8, COLOR_BORDER_CYAN);
uint32_t v_fill = (v_track_w * s_hub_volume) / 100;
vbe_fill_rect(v_track_x, sly + 6, v_fill, 8, COLOR_CYAN_GLOW);
vbe_fill_circle(v_track_x + v_fill, sly + 10, 6, COLOR_WHITE);
/* Brightness */
sly += 30;
font_draw_string(cx + 20, sly + 2, "Screen Brightness:", COLOR_WHITE);
char b_str[8];
b_str[0] = '0' + (s_hub_brightness / 100);
b_str[1] = '0' + ((s_hub_brightness % 100) / 10);
b_str[2] = '0' + (s_hub_brightness % 10);
b_str[3] = '%'; b_str[4] = '\0';
font_draw_string(cx + 165, sly + 2, b_str, COLOR_AMBER);
uint32_t b_track_x = cx + 215;
uint32_t b_track_w = w - 255;
vbe_fill_rect(b_track_x, sly + 6, b_track_w, 8, 0xFF0D1726);
vbe_draw_rect(b_track_x, sly + 6, b_track_w, 8, COLOR_BORDER_CYAN);
uint32_t b_fill = (b_track_w * s_hub_brightness) / 100;
vbe_fill_rect(b_track_x, sly + 6, b_fill, 8, COLOR_AMBER);
vbe_fill_circle(b_track_x + b_fill, sly + 10, 6, COLOR_WHITE);
/* Power Actions */
sly += 32;
vbe_draw_line(cx + 20, sly - 6, cx + w - 20, sly - 6, COLOR_BORDER_CYAN);
/* Sleep */
vbe_fill_rect(cx + 20, sly, 140, 26, 0xFF0D2137);
vbe_draw_rect(cx + 20, sly, 140, 26, COLOR_BORDER_CYAN);
font_draw_string(cx + 35, sly + 5, "[ ACPI Sleep ]", COLOR_CYAN_GLOW);
/* Restart */
vbe_fill_rect(cx + 180, sly, 140, 26, 0xFF14243A);
vbe_draw_rect(cx + 180, sly, 140, 26, COLOR_BORDER_CYAN);
font_draw_string(cx + 195, sly + 5, "[ Restart PC ]", COLOR_WHITE);
/* Shut Down */
vbe_fill_rect(cx + 340, sly, 140, 26, 0xFF44001A);
vbe_draw_rect(cx + 340, sly, 140, 26, COLOR_CRIMSON);
font_draw_string(cx + 352, sly + 5, "[ Shut Down ]", COLOR_CRIMSON);
} else if (s_hub_tab == 3) {
/* Tab 3: Live EKG CPU Waveform */
font_draw_string_glow(cx + 15, cy + 12, "Real-Time Processor Heartbeat & EKG Waveform (60 FPS)", COLOR_CYAN_GLOW, COLOR_CYAN_DARK);
/* Wave Box */
uint32_t gy = cy + 34;
uint32_t gh = ch - 50;
vbe_fill_rect(cx + 15, gy, w - 30, gh, 0xFF060B14);
vbe_draw_rect(cx + 15, gy, w - 30, gh, COLOR_BORDER_CYAN);
/* Grid */
for (uint32_t line_y = gy + 20; line_y < gy + gh; line_y += 20) {
vbe_draw_line(cx + 15, line_y, cx + w - 15, line_y, 0xFF0D1B2A);
}
uint64_t ticks = timer_get_ticks();
int prev_wy = (int)gy + (gh / 2);
for (uint32_t wx = 0; wx < w - 34; wx += 4) {
int wy = (int)(gy + (gh / 2) + ((ticks + wx) % 23) - ((wx / 6) % 15));
if (wy < (int)gy + 8) wy = (int)gy + 8;
if (wy > (int)(gy + gh - 8)) wy = (int)(gy + gh - 8);
vbe_draw_line(cx + 17 + wx, prev_wy, cx + 17 + wx + 4, wy, COLOR_CYAN_GLOW);
prev_wy = wy;
}
font_draw_string(cx + 25, gy + gh - 22, "16 Threads Running | 100 Hz Ticks | Sovereign AI Sentinel Online", COLOR_GREEN_OK);
}
}
void app_hub_click(window_t* win, int32_t mx, int32_t my) {
uint32_t x = win->x + 10;
uint32_t y = win->y + 35;
uint32_t w = win->w - 20;
uint32_t ty = y + 52;
uint32_t tab_w = (w - 18) / 4;
/* Check tab clicks */
if (my >= (int32_t)ty && my <= (int32_t)(ty + 28)) {
for (int t = 0; t < 4; t++) {
uint32_t tx = x + (t * (tab_w + 6));
if (mx >= (int32_t)tx && mx <= (int32_t)(tx + tab_w)) {
s_hub_tab = (uint32_t)t;
return;
}
}
}
uint32_t cx = x;
uint32_t cy = ty + 36;
/* Tab 1 clicks: Wallpapers */
if (s_hub_tab == 1) {
uint32_t wy = cy + 34;
for (int i = 0; i < 4; i++) {
if (mx >= (int32_t)(cx + 15) && mx <= (int32_t)(cx + w - 15) &&
my >= (int32_t)wy && my <= (int32_t)(wy + 42)) {
compositor_set_wallpaper((uint32_t)i);
return;
}
wy += 50;
}
}
/* Tab 2 clicks: Control Panel */
if (s_hub_tab == 2) {
/* Toggles */
for (int i = 0; i < 5; i++) {
uint32_t col = i % 2;
uint32_t row = i / 2;
uint32_t sx = cx + 20 + (col * 360);
uint32_t sy = cy + 40 + (row * 38);
if (mx >= (int32_t)sx && mx <= (int32_t)(sx + 340) &&
my >= (int32_t)sy && my <= (int32_t)(sy + 32)) {
if (i == 0) s_hub_wifi = !s_hub_wifi;
else if (i == 1) s_hub_bt = !s_hub_bt;
else if (i == 2) s_hub_airplane = !s_hub_airplane;
else if (i == 3) s_hub_night = !s_hub_night;
else if (i == 4) s_hub_saver = !s_hub_saver;
return;
}
}
/* Volume */
uint32_t v_track_x = cx + 180;
uint32_t v_track_w = w - 220;
uint32_t sly = cy + 165;
if (mx >= (int32_t)v_track_x && mx <= (int32_t)(v_track_x + v_track_w) &&
my >= (int32_t)sly && my <= (int32_t)(sly + 20)) {
s_hub_volume = ((mx - v_track_x) * 100) / v_track_w;
if (s_hub_volume > 100) s_hub_volume = 100;
return;
}
/* Brightness */
sly += 30;
uint32_t b_track_x = cx + 215;
uint32_t b_track_w = w - 255;
if (mx >= (int32_t)b_track_x && mx <= (int32_t)(b_track_x + b_track_w) &&
my >= (int32_t)sly && my <= (int32_t)(sly + 20)) {
s_hub_brightness = ((mx - b_track_x) * 100) / b_track_w;
if (s_hub_brightness > 100) s_hub_brightness = 100;
return;
}
/* Power buttons */
sly += 32;
if (my >= (int32_t)sly && my <= (int32_t)(sly + 26)) {
if (mx >= (int32_t)(cx + 20) && mx <= (int32_t)(cx + 160)) {
acpi_enter_s0ix_standby();
} else if (mx >= (int32_t)(cx + 180) && mx <= (int32_t)(cx + 320)) {
acpi_reboot();
} else if (mx >= (int32_t)(cx + 340) && mx <= (int32_t)(cx + 480)) {
acpi_poweroff();
}
return;
}
}
}
/* ---------------- Other Phase 7 Apps ---------------- */
void app_taskmgr_draw(window_t* win) {
uint32_t x = win->x + 10;
uint32_t y = win->y + 35;
uint32_t w = win->w - 20;
/* Top Stats Bar */
font_draw_string_glow(x, y, "CPU: 1.8% @ 100 Hz Ticks (Preemptive RR - 16 Threads)", COLOR_CYAN_GLOW, COLOR_CYAN_DARK);
y += 20;
/* Live CPU Wave Graph Box */
vbe_fill_rect(x, y, w, 60, 0xFF080D18);
vbe_draw_rect(x, y, w, 60, COLOR_BORDER_CYAN);
/* Grid lines */
for (uint32_t gy = y + 15; gy < y + 60; gy += 15) {
vbe_draw_line(x, gy, x + w, gy, 0xFF142035);
}
/* Pulsating wave line */
uint64_t ticks = timer_get_ticks();
int prev_wy = (int)y + 40;
for (uint32_t wx = 0; wx < w - 2; wx += 4) {
@@ -46,7 +375,6 @@ void app_taskmgr_draw(window_t* win) {
}
y += 70;
/* Memory Gauge */
font_draw_string(x, y, "Physical RAM: 142 MB / 16384 MB Managed (DDR5 4800MHz)", COLOR_WHITE);
y += 18;
vbe_fill_rect(x, y, w, 12, 0xFF080D18);
@@ -54,13 +382,11 @@ void app_taskmgr_draw(window_t* win) {
vbe_fill_rect(x + 1, y + 1, (w * 14) / 100, 10, COLOR_CYAN_GLOW);
y += 22;
/* Process Table Header */
vbe_fill_rect(x, y, w, 20, 0xFF0F1829);
vbe_draw_rect(x, y, w, 20, COLOR_BORDER_CYAN);
font_draw_string(x + 5, y + 2, "PROCESS NAME PID STATUS CPU % MEMORY", COLOR_CYAN_GLOW);
y += 24;
/* Active Task Rows */
const char* procs[] = {
"kernel_main.elf 0 Running 0.2% 1,240 KB",
"aira_sentinel 1 Sleeping 0.1% 512 KB",
@@ -75,7 +401,6 @@ void app_taskmgr_draw(window_t* win) {
y += 19;
}
/* Bottom Action: End Task Button */
uint32_t btn_x = win->x + win->w - 110;
uint32_t btn_y = win->y + win->h - 32;
vbe_fill_rect(btn_x, btn_y, 95, 22, COLOR_CRIMSON);
@@ -85,13 +410,11 @@ void app_taskmgr_draw(window_t* win) {
font_draw_string(x, btn_y + 3, "Threads: 16 | Handles: 124 | Uptime: Sovereign Mode", COLOR_LIGHT_GREY);
}
/* 2. Aira Search & Web Navigator Window */
void app_search_draw(window_t* win) {
uint32_t x = win->x + 10;
uint32_t y = win->y + 35;
uint32_t w = win->w - 20;
/* Browser Tabs */
vbe_fill_rect(x, y, 130, 20, 0xFF142035);
vbe_draw_rect(x, y, 130, 20, COLOR_BORDER_CYAN);
font_draw_string(x + 10, y + 2, "Aira Search", COLOR_CYAN_GLOW);
@@ -101,20 +424,17 @@ void app_search_draw(window_t* win) {
font_draw_string(x + 145, y + 2, "torvalds/linux", COLOR_LIGHT_GREY);
y += 25;
/* URL / Address Bar */
vbe_fill_rect(x, y, w, 24, 0xFF0B101D);
vbe_draw_rect(x, y, w, 24, COLOR_BORDER_CYAN);
font_draw_string(x + 10, y + 4, "aira://search.sovereign?q=phase+7+gui", COLOR_WHITE);
y += 35;
/* Center Branding */
uint32_t center_x = win->x + (win->w / 2);
font_draw_string_glow(center_x - 110, y, "A I R A S E A R C H", COLOR_CYAN_GLOW, COLOR_CYAN_DARK);
y += 20;
font_draw_string(center_x - 165, y, "Sovereign Neural Knowledge Engine | Zero Ads * Zero Tracking", COLOR_LIGHT_GREY);
y += 25;
/* Search Input Pill */
uint32_t sb_w = w - 40;
uint32_t sb_x = x + 20;
vbe_fill_rect(sb_x, y, sb_w, 32, 0xFF0F1829);
@@ -122,7 +442,6 @@ void app_search_draw(window_t* win) {
font_draw_string(sb_x + 15, y + 8, "Search sovereign web, CVEs, GitHub repos, or ask Aira AI...", COLOR_WHITE);
y += 42;
/* Filter Chips */
const char* chips[] = {"[ All ]", "[ Code & Repos ]", "[ Cyber CVE ]", "[ Science Papers ]", "[ AiraLang ]"};
uint32_t chip_x = sb_x;
for (int c = 0; c < 5; c++) {
@@ -133,7 +452,6 @@ void app_search_draw(window_t* win) {
}
y += 30;
/* Direct AI Answer Box */
vbe_fill_rect(x + 20, y, w - 40, 60, 0xFF0B1424);
vbe_draw_rect(x + 20, y, w - 40, 60, COLOR_BORDER_CYAN);
font_draw_string(x + 30, y + 6, "[Aira 3 Ultra Instant Answer]", COLOR_CYAN_GLOW);
@@ -141,7 +459,6 @@ void app_search_draw(window_t* win) {
font_draw_string(x + 30, y + 40, "Protected by Sovereign Privacy Shroud | Zero Telemetry.", COLOR_GREEN_OK);
}
/* 3. Translucent Sovereign Terminal Window */
void app_term_draw(window_t* win) {
uint32_t x = win->x + 12;
uint32_t y = win->y + 35;
@@ -156,21 +473,19 @@ void app_term_draw(window_t* win) {
y += 16;
font_draw_string(x, y, "[OK] Compositor: Acrylic Blur & 60 FPS VSync active", COLOR_GREEN_OK);
y += 16;
font_draw_string(x, y, "[OK] PS/2 Touchpad & Mouse Driver bound (IRQ 12 + Polling)", COLOR_GREEN_OK);
font_draw_string(x, y, "[OK] Hardware USB Root Hubs Powered (xHCI 5V VBUS Active)", COLOR_GREEN_OK);
y += 16;
font_draw_string(x, y, "[OK] Dual-Input Keyboard Cursor Navigation co-pilot online", COLOR_GREEN_OK);
font_draw_string(x, y, "[OK] Dual-Input Mouse & Keyboard Navigation Co-Pilot online", COLOR_GREEN_OK);
y += 20;
font_draw_string(x, y, "root@airlys-os:~# _", COLOR_WHITE);
}
/* 4. Sovereign File Explorer Window */
void app_files_draw(window_t* win) {
uint32_t x = win->x + 10;
uint32_t y = win->y + 35;
uint32_t h = win->h - 45;
/* Left Sidebar: Quick Access */
uint32_t sb_w = 140;
vbe_fill_rect(x, y, sb_w, h, 0xFF0B101D);
vbe_draw_rect(x, y, sb_w, h, COLOR_BORDER_CYAN);
@@ -181,7 +496,6 @@ void app_files_draw(window_t* win) {
font_draw_string(x + 10, y + 75, "> /usr/bin", COLOR_LIGHT_GREY);
font_draw_string(x + 10, y + 95, "> ram0 (Disk)", COLOR_LIGHT_GREY);
/* Main File Grid */
uint32_t grid_x = x + sb_w + 10;
uint32_t grid_w = win->w - sb_w - 25;
vbe_fill_rect(grid_x, y, grid_w, h, 0xFF080D18);
@@ -190,23 +504,20 @@ void app_files_draw(window_t* win) {
font_draw_string(grid_x + 10, y + 8, "Location: /wallpapers", COLOR_CYAN_GLOW);
vbe_draw_line(grid_x, y + 24, grid_x + grid_w, y + 24, COLOR_BORDER_CYAN);
/* Wallpaper Files with direct "Set as Wallpaper" Action */
const char* wall_names[] = {
"sovereign_logo.png (Default Airlys Logo)",
"cyber_aurora.png (Cyan Aurora Theme)",
"midnight_dark.png (Pure Matte Stealth)",
"emerald_matrix.png (Cyber Matrix Theme)"
"sovereign_cyber_nebula.png (Default Edge-to-Edge)",
"cyber_aurora_waves.png (Cyan-Purple Aurora)",
"midnight_dark_stealth.png (Pure Matte Stealth)",
"emerald_matrix_grid.png (Cyber Emerald Matrix)"
};
uint32_t item_y = y + 32;
for (int i = 0; i < 4; i++) {
vbe_fill_rect(grid_x + 8, item_y, grid_w - 16, 28, (i % 2 == 0) ? 0xFF0E1626 : 0xFF0A101C);
/* Icon & Name */
font_draw_string(grid_x + 14, item_y + 6, "[IMG]", COLOR_CYAN_GLOW);
font_draw_string(grid_x + 60, item_y + 6, wall_names[i], COLOR_WHITE);
/* Set Wallpaper Button */
uint32_t btn_w = 120;
uint32_t btn_x = grid_x + grid_w - btn_w - 14;
bool is_current = (compositor_get_wallpaper() == (uint32_t)i);
@@ -217,17 +528,6 @@ void app_files_draw(window_t* win) {
item_y += 34;
}
/* Regular Files */
const char* other_files[] = {
"[DOC] sovereign_covenant.txt (4 KB)",
"[ELF] kernel_main.elf (814 KB)"
};
for (int i = 0; i < 2; i++) {
vbe_fill_rect(grid_x + 8, item_y, grid_w - 16, 24, 0xFF0A101C);
font_draw_string(grid_x + 14, item_y + 4, other_files[i], COLOR_LIGHT_GREY);
item_y += 28;
}
}
void app_files_click(window_t* win, int32_t mx, int32_t my) {
@@ -250,151 +550,15 @@ void app_files_click(window_t* win, int32_t mx, int32_t my) {
}
}
/* 5. Airlys Settings App Window (LVGL Tabview & System Controls) */
void app_settings_draw(window_t* win) {
uint32_t x = win->x + 10;
uint32_t y = win->y + 35;
uint32_t h = win->h - 45;
/* Left Sidebar: LVGL Tabview Navigation */
uint32_t tb_w = 150;
vbe_fill_rect(x, y, tb_w, h, 0xFF0B101D);
vbe_draw_rect(x, y, tb_w, h, COLOR_BORDER_CYAN);
font_draw_string_glow(x + 15, y + 10, "Settings", COLOR_CYAN_GLOW, COLOR_CYAN_DARK);
vbe_draw_line(x, y + 28, x + tb_w, y + 28, COLOR_BORDER_CYAN);
const char* tabs[] = {
"[i] System",
"[*] Personalize",
"[~] Network",
"[#] Power & Bat"
};
uint32_t tab_y = y + 36;
for (int t = 0; t < 4; t++) {
bool active = (s_settings_tab == (uint32_t)t);
if (active) {
vbe_fill_rect(x + 4, tab_y, tb_w - 8, 28, 0xFF14243A);
vbe_draw_glow_rect(x + 4, tab_y, tb_w - 8, 28, COLOR_CYAN_GLOW, COLOR_CYAN_DARK);
vbe_fill_rect(x + 4, tab_y, 4, 28, COLOR_CYAN_GLOW); /* Active pill indicator */
}
font_draw_string(x + 16, tab_y + 7, tabs[t], active ? COLOR_CYAN_GLOW : COLOR_LIGHT_GREY);
tab_y += 34;
}
/* Main Settings Panel */
uint32_t main_x = x + tb_w + 10;
uint32_t main_w = win->w - tb_w - 25;
vbe_fill_rect(main_x, y, main_w, h, 0xFF080D18);
vbe_draw_rect(main_x, y, main_w, h, COLOR_BORDER_CYAN);
uint32_t cy = y + 15;
if (s_settings_tab == 0) {
/* Tab 0: System Information */
font_draw_string_glow(main_x + 15, cy, "System Specifications", COLOR_WHITE, COLOR_CYAN_DARK);
cy += 24;
vbe_fill_rect(main_x + 15, cy, main_w - 30, 2, COLOR_BORDER_CYAN);
cy += 12;
font_draw_string(main_x + 15, cy, "OS Name : Airlys Sovereign OS (v0.8.6 Sovereign Release)", COLOR_CYAN_GLOW); cy += 20;
font_draw_string(main_x + 15, cy, "Lead Architect : Er. Adam Eehan (Founder & CEO, Aira Group)", COLOR_WHITE); cy += 20;
font_draw_string(main_x + 15, cy, "AI Co-Pilot : Sovereign AI Aira 3 Ultra (Engine v3.6)", COLOR_GREEN_OK); cy += 20;
font_draw_string(main_x + 15, cy, "Processor : AMD Ryzen 7 7735HS Zen 3+ (8 Cores / 16 Threads @ 4.75 GHz)", COLOR_WHITE); cy += 20;
font_draw_string(main_x + 15, cy, "Installed RAM : 16.0 GB DDR5 4800MHz Dual-Channel", COLOR_WHITE); cy += 20;
font_draw_string(main_x + 15, cy, "Graphics : AMD Radeon 680M / 780M + NVIDIA GeForce RTX", COLOR_WHITE); cy += 20;
font_draw_string(main_x + 15, cy, "Display Mode : 1920x1080 FHD 144Hz IPS TrueColor 32bpp (Tag 8 GOP)", COLOR_CYAN_GLOW); cy += 20;
font_draw_string(main_x + 15, cy, "Kernel Mode : x86_64 Long Mode with 512GB Identity Paging", COLOR_LIGHT_GREY); cy += 20;
} else if (s_settings_tab == 1) {
/* Tab 1: Personalization & Wallpaper Picker */
font_draw_string_glow(main_x + 15, cy, "Personalization & Wallpaper Themes", COLOR_WHITE, COLOR_CYAN_DARK);
cy += 20;
font_draw_string(main_x + 15, cy, "Select active desktop wallpaper theme below:", COLOR_LIGHT_GREY);
cy += 26;
const char* themes[] = {
"1. Sovereign Logo Obsidian (Default Airlys Authentic Logo)",
"2. Cyber Aurora Cyan (Vibrant Cyan-Purple Vector Aurora)",
"3. Deep Midnight Stealth (Pure Matte Stealth Dark)",
"4. Cyber Emerald Matrix (Green Cyber Matrix Grid)"
};
for (int i = 0; i < 4; i++) {
bool active = (compositor_get_wallpaper() == (uint32_t)i);
vbe_fill_rect(main_x + 15, cy, main_w - 30, 36, active ? 0xFF14243A : 0xFF0E1626);
vbe_draw_glow_rect(main_x + 15, cy, main_w - 30, 36,
active ? COLOR_CYAN_GLOW : COLOR_BORDER_CYAN, COLOR_CYAN_DARK);
font_draw_string(main_x + 25, cy + 10, themes[i], active ? COLOR_CYAN_GLOW : COLOR_WHITE);
font_draw_string(main_x + main_w - 90, cy + 10, active ? "[ Active ]" : "[ Apply ]",
active ? COLOR_GREEN_OK : COLOR_LIGHT_GREY);
cy += 44;
}
} else if (s_settings_tab == 2) {
/* Tab 2: Network & Wireless */
font_draw_string_glow(main_x + 15, cy, "Network & Wireless Connections", COLOR_WHITE, COLOR_CYAN_DARK);
cy += 24;
font_draw_string(main_x + 15, cy, "Wi-Fi Adapter : AMD Wi-Fi 6E RZ616 (160MHz) / MT7922", COLOR_WHITE); cy += 20;
font_draw_string(main_x + 15, cy, "Status : Connected (WPA3-SAE Enterprise Secure)", COLOR_GREEN_OK); cy += 20;
font_draw_string(main_x + 15, cy, "SSID : Airlys-Mesh-5G", COLOR_CYAN_GLOW); cy += 20;
font_draw_string(main_x + 15, cy, "IPv4 Address : 192.168.1.137 / 24", COLOR_WHITE); cy += 20;
font_draw_string(main_x + 15, cy, "Default Gateway: 192.168.1.1", COLOR_WHITE); cy += 20;
font_draw_string(main_x + 15, cy, "DNS Over HTTPS : 1.1.1.1 (Cloudflare Sovereign Zero-Log)", COLOR_LIGHT_GREY); cy += 20;
font_draw_string(main_x + 15, cy, "MAC Address : 00:E0:4C:68:01:AF", COLOR_LIGHT_GREY); cy += 20;
} else if (s_settings_tab == 3) {
/* Tab 3: Power & Battery Management */
font_draw_string_glow(main_x + 15, cy, "Power, Battery & Thermal Engine", COLOR_WHITE, COLOR_CYAN_DARK);
cy += 24;
font_draw_string(main_x + 15, cy, "Power Source : AC Connected (135W Slim-Tip Fast Charging)", COLOR_GREEN_OK); cy += 20;
font_draw_string(main_x + 15, cy, "Battery Level : 98% (54 Wh Lithium-Ion, Healthy)", COLOR_CYAN_GLOW); cy += 20;
font_draw_string(main_x + 15, cy, "Sleep Engine : ACPI S0ix Modern Standby (2W Idle Consumption)", COLOR_WHITE); cy += 20;
font_draw_string(main_x + 15, cy, "Power Mode : [ Performance ] [ Balanced ] [ Power Saver ]", COLOR_WHITE); cy += 20;
font_draw_string(main_x + 15, cy, "Fan Profile : Nitro Dual-Fan Auto Acoustic Shroud (Cool)", COLOR_LIGHT_GREY); cy += 20;
}
/* Redirect to Hub for cohesive unified experience */
app_hub_draw(win);
}
void app_settings_click(window_t* win, int32_t mx, int32_t my) {
uint32_t x = win->x + 10;
uint32_t y = win->y + 35;
uint32_t tb_w = 150;
/* Check tab clicks */
if (mx >= (int32_t)x && mx <= (int32_t)(x + tb_w)) {
uint32_t tab_y = y + 36;
for (int t = 0; t < 4; t++) {
if (my >= (int32_t)tab_y && my <= (int32_t)(tab_y + 28)) {
s_settings_tab = (uint32_t)t;
return;
}
tab_y += 34;
}
}
/* Check wallpaper card clicks in Tab 1 */
if (s_settings_tab == 1) {
uint32_t main_x = x + tb_w + 10;
uint32_t main_w = win->w - tb_w - 25;
uint32_t cy = y + 15 + 20 + 26;
for (int i = 0; i < 4; i++) {
if (mx >= (int32_t)(main_x + 15) && mx <= (int32_t)(main_x + main_w - 15) &&
my >= (int32_t)cy && my <= (int32_t)(cy + 36)) {
compositor_set_wallpaper((uint32_t)i);
return;
}
cy += 44;
}
}
app_hub_click(win, mx, my);
}
/* 6. Aira Code Editor Window */
void app_code_draw(window_t* win) {
uint32_t x = win->x + 12;
uint32_t y = win->y + 35;
@@ -408,7 +572,7 @@ void app_code_draw(window_t* win) {
"3 #include <airlys/compositor.h>",
"4 ",
"5 void kernel_main(uint64_t magic, uint64_t addr) {",
"6 serial_init();",
"6 pci_init(); /* Power on USB xHCI Ports */",
"7 vbe_init(1920, 1080);",
"8 mouse_init();",
"9 printk(\"[OK] Airlys Sovereign GUI 60 FPS Online\\n\");",
@@ -422,22 +586,18 @@ void app_code_draw(window_t* win) {
}
}
/* 7. Sovereign Full-Screen Lock Screen & Greeter */
void app_lockscreen_draw(void) {
vbe_screen_t* scr = vbe_get_screen();
if (!scr) return;
/* Background Obsidian Wash */
vbe_fill_rect(0, 0, scr->width, scr->height, COLOR_OBSIDIAN);
/* Clock & Date (Upper Left) */
rtc_time_t t = rtc_get_time();
char time_str[32];
kstrcpy(time_str, "15:10 UTC | Friday, Oct 24");
kstrcpy(time_str, "22:12 UTC | Friday, Oct 24");
if (t.hour < 10) time_str[0] = '0';
font_draw_string_glow(40, 40, time_str, COLOR_WHITE, COLOR_CYAN_DARK);
/* Floating Center Login Card */
uint32_t cx = scr->width / 2;
uint32_t cy = scr->height / 2;
uint32_t card_w = 340;
@@ -448,29 +608,26 @@ void app_lockscreen_draw(void) {
vbe_fill_rect(card_x, card_y, card_w, card_h, 0xEE0B1220);
vbe_draw_glow_rect(card_x, card_y, card_w, card_h, COLOR_CYAN_GLOW, COLOR_CYAN_DARK);
/* Avatar Ring */
vbe_draw_circle(cx, card_y + 45, 26, COLOR_CYAN_GLOW);
vbe_fill_circle(cx, card_y + 45, 24, 0xFF003344);
font_draw_char(cx - 4, card_y + 37, 'A', COLOR_CYAN_GLOW);
/* User Profile */
font_draw_string_glow(cx - 55, card_y + 80, "Er. Adam Eehan", COLOR_WHITE, COLOR_CYAN_DARK);
font_draw_string(cx - 115, card_y + 100, "Founder & CEO, Aira Group | Root", COLOR_CYAN_GLOW);
/* PIN Password Box */
uint32_t pin_x = card_x + 40;
uint32_t pin_y = card_y + 130;
vbe_fill_rect(pin_x, pin_y, 260, 28, 0xFF070B14);
vbe_draw_rect(pin_x, pin_y, 260, 28, COLOR_BORDER_CYAN);
font_draw_string(pin_x + 15, pin_y + 6, "* * * * * * * *", COLOR_CYAN_GLOW);
font_draw_char(pin_x + 235, pin_y + 6, '>', COLOR_CYAN_GLOW);
/* Alternate Options */
font_draw_string(cx - 85, card_y + 175, "[ PIN ] [ Fingerprint ]", COLOR_LIGHT_GREY);
font_draw_string(cx - 75, card_y + 195, "Sign in with Aira ID", COLOR_CYAN_GLOW);
}
/* App Launchers */
window_t* app_launch_hub(void) {
vbe_screen_t* scr = vbe_get_screen();
uint32_t sw = scr ? scr->width : 1920;
uint32_t sh = scr ? scr->height : 1080;
uint32_t w = 820;
uint32_t h = 500;
uint32_t x = (sw > w) ? ((sw - w) / 2) : 20;
uint32_t y = (sh > h) ? ((sh - h) / 2 - 25) : 20;
return compositor_create_window("Airlys Sovereign Hub", x, y, w, h, app_hub_draw);
}
window_t* app_launch_taskmgr(void) {
return compositor_create_window("Aira Task Manager", 80, 70, 620, 420, app_taskmgr_draw);
}
@@ -488,7 +645,7 @@ window_t* app_launch_files(void) {
}
window_t* app_launch_settings(void) {
return compositor_create_window("airlys-settings", 180, 110, 660, 420, app_settings_draw);
return app_launch_hub();
}
window_t* app_launch_code(void) {