docs: update README with autostart, demo mode, XEmbed tray, window snapping, and Alt+F9 minimize keybinding

This commit is contained in:
2025-12-28 08:26:53 +00:00
parent c927e23f23
commit 3364464b43
53 changed files with 2921 additions and 56 deletions
+20
View File
@@ -75,6 +75,14 @@ void config_set_defaults(Config *cfg)
strncpy(cfg->config_path, "~/.config/dwn/config", sizeof(cfg->config_path) - 1);
strncpy(cfg->log_path, "~/.local/share/dwn/dwn.log", sizeof(cfg->log_path) - 1);
cfg->autostart_enabled = true;
cfg->autostart_xdg = true;
char *autostart_path = expand_path("~/.config/dwn/autostart.d");
if (autostart_path != NULL) {
strncpy(cfg->autostart_path, autostart_path, sizeof(cfg->autostart_path) - 1);
dwn_free(autostart_path);
}
}
@@ -152,6 +160,18 @@ static void handle_config_entry(const char *section, const char *key,
} else if (strcmp(key, "exa_api_key") == 0) {
strncpy(cfg->exa_api_key, value, sizeof(cfg->exa_api_key) - 1);
}
} else if (strcmp(section, "autostart") == 0) {
if (strcmp(key, "enabled") == 0) {
cfg->autostart_enabled = (strcmp(value, "true") == 0 || strcmp(value, "1") == 0);
} else if (strcmp(key, "xdg_autostart") == 0) {
cfg->autostart_xdg = (strcmp(value, "true") == 0 || strcmp(value, "1") == 0);
} else if (strcmp(key, "path") == 0) {
char *expanded = expand_path(value);
if (expanded != NULL) {
strncpy(cfg->autostart_path, expanded, sizeof(cfg->autostart_path) - 1);
dwn_free(expanded);
}
}
}
}