Add geminux-imsd (VoLTE/VoWiFi/SMS), kernel XFRM, and hardware Airplane Mode (Fn+F)

This commit is contained in:
Luxferre committed 2026-11-25 08:44:27 +02:00
1 parent 92a31539e6
commit ac76431621
84 files changed
+4209 -103

No files matched your search

+33 -3
View File
@@ -79,12 +79,14 @@ typedef struct {
bool cellular_on;
bool cell_data_up;
bool cell_ims_on;
bool airplane_mode;
bool cell_physical_sim;
bool esim_loaded;
bool bt_on;
bool bt_svc_up;
bool hdmi_on;
int dns_mode;
char ims_state[32];
net_row_t rows[32];
esim_ui_row_t esim_profiles[16];
int esim_count;
@@ -496,10 +498,18 @@ static void refresh_cellular(net_state_t *st) {
snprintf(st->rows[r].col1, sizeof(st->rows[0].col1),
"IMS / VoLTE & VoWiFi Calling");
snprintf(st->rows[r].col2, sizeof(st->rows[0].col2), "%s",
st->cell_ims_on ? "Enabled (CEVDP=3)" : "Disabled");
if (strcmp(st->ims_state, "VoLTE") == 0) {
snprintf(st->rows[r].col2, sizeof(st->rows[0].col2), "VoLTE Registered");
} else if (strcmp(st->ims_state, "VoWiFi") == 0) {
snprintf(st->rows[r].col2, sizeof(st->rows[0].col2), "VoWiFi Registered");
} else {
snprintf(st->rows[r].col2, sizeof(st->rows[0].col2), "%s",
st->cell_ims_on ? "Enabled (Standby)" : "Disabled");
}
snprintf(st->rows[r].col3, sizeof(st->rows[0].col3), "%s",
st->cell_ims_on ? "ON" : "OFF");
(strcmp(st->ims_state, "VoLTE") == 0 || strcmp(st->ims_state, "VoWiFi") == 0)
? st->ims_state
: (st->cell_ims_on ? "ON" : "OFF"));
r++;
if (!st->esim_loaded) {
@@ -544,6 +554,11 @@ static void refresh_cellular(net_state_t *st) {
}
static void refresh_tab(net_state_t *st) {
char air[16] = {0};
st->airplane_mode = (gemui_read_file_line("/run/geminux/airplane-mode", air, sizeof(air)) == 0 && air[0] == '1');
st->ims_state[0] = '\0';
gemui_read_file_line("/run/geminux/ims-state", st->ims_state, sizeof(st->ims_state));
char prev_key[96] = {0};
if (st->tab == 0 && st->sel_row >= 0 && st->sel_row < st->num_rows) {
snprintf(prev_key, sizeof(prev_key), "%s", st->wifi_groups[st->sel_row].ssid);
@@ -583,6 +598,13 @@ static void refresh_tab(net_state_t *st) {
snprintf(st->status_text, sizeof(st->status_text),
"USB NCM Gadget: 172.16.42.1/24 | External HDMI (SiI9024)");
}
if (st->airplane_mode) {
st->wifi_on = false;
st->bt_on = false;
st->cellular_on = false;
snprintf(st->status_text, sizeof(st->status_text),
"[AIRPLANE MODE ON] All radios powered off (Fn+F or toggle radio to restore)");
}
}
static void on_worker_timer(gemui_app_t *app, void *ud);
@@ -1609,6 +1631,14 @@ static void on_ptr(gemui_app_t *app, int type, int x, int y, unsigned int btn, v
gemui_spawn_detached(acmd);
return;
} else if (hit->id == HIT_TOGGLE) {
if (st->airplane_mode && (hit->val == 0 || hit->val == 2 || hit->val == 3)) {
const char *aoff[] = {"doas", "/usr/bin/geminux-power-ctl", "airplane", "off", NULL};
gemui_run_cmd_timeout(aoff, NULL, 0, 5000);
gemui_show_toast(app, "Exiting Airplane Mode...", 2000);
refresh_tab(st);
gemui_request_redraw(app);
return;
}
if (hit->val == 0) {
const char *argv[] = {"nmcli", "radio", "wifi", st->wifi_on ? "off" : "on", NULL};
gemui_run_cmd_timeout(argv, NULL, 0, 2000);