Implement live-reload of config colors on SIGUSR1.

This commit is contained in:
wreald 2024-09-18 18:40:26 +10:00
parent a50f78c599
commit 341cdabdd2
7 changed files with 87 additions and 0 deletions

View file

@ -591,6 +591,20 @@ err:
return NULL;
}
/* Reload configured colors from disk. */
void
server_hard_reload_config_colors(struct server *server) {
config_reload_colors((struct config *)server->conf);
tll_foreach(server->wayl->terms, it) {
struct terminal *term = it->item;
((struct config *)term->conf)->colors = server->conf->colors;
term_soft_reload_config_colors(term);
}
}
void
server_destroy(struct server *server)
{