feat: improve session switching, fractional DPI/GTK theming, XDG launcher, CPU/RAM status, and power policy

This commit is contained in:
Luxferre committed 2026-11-26 14:46:03 +02:00
1 parent 72b05b650e
commit 07d9134d2d
28 files changed
+2670 -302

No files matched your search

+7 -6
View File
@@ -32,9 +32,9 @@ typedef struct {
static inline anode_power_cfg_t anode_power_cfg_default(void) {
anode_power_cfg_t c;
c.dim_ms = 60000U;
c.lock_ms = 180000U;
c.suspend_ms = 600000U;
c.dim_ms = 300000U; /* 5 min */
c.lock_ms = 600000U; /* 10 min */
c.suspend_ms = 1800000U; /* 30 min (battery only) */
c.crit_batt_pct = 5;
c.suspend_on_ac = false;
return c;
@@ -67,9 +67,10 @@ static inline void anode_power_policy_step(const anode_power_cfg_t *cfg,
}
}
/* User activity resumes from dimmed/suspended */
if (idle_ms < cfg->dim_ms) {
if (*state == ANODE_PWR_DIMMED || *state == ANODE_PWR_SUSPENDED) {
/* User activity resumes from dimmed/locked/suspended */
uint32_t resume_thresh = cfg->dim_ms > 0 ? cfg->dim_ms : (cfg->lock_ms > 0 ? cfg->lock_ms : cfg->suspend_ms);
if (resume_thresh == 0 || idle_ms < resume_thresh) {
if (*state == ANODE_PWR_DIMMED || *state == ANODE_PWR_LOCKED || *state == ANODE_PWR_SUSPENDED) {
a.restore_brightness = true;
}
*state = screen_locked ? ANODE_PWR_LOCKED : ANODE_PWR_ACTIVE;