feat: add i3-style session-specific autostart support and documentation

This commit is contained in:
Luxferre committed 2026-11-26 11:55:17 +02:00
1 parent f73040a0be
commit 8d6236a63f
13 files changed
+1156 -8

No files matched your search

+13
View File
@@ -1295,6 +1295,10 @@ static void reloadxres(const Arg *arg) {
arrange(NULL);
drawbars();
XSync(dpy, False);
if (arg && arg->i) {
Arg a = {.v = autostartreloadcmd};
spawn(&a);
}
}
static void manage(Window w, XWindowAttributes *wa) {
@@ -2750,10 +2754,19 @@ int main(int argc, char *argv[]) {
checkotherwm();
setup();
scan();
{
const char *rs = getenv("ANODE_DWM_RESTARTED");
if (rs && rs[0] == '1') {
unsetenv("ANODE_DWM_RESTARTED");
Arg a = {.v = autostartreloadcmd};
spawn(&a);
}
}
run();
cleanup();
XCloseDisplay(dpy);
if (restart_dwm) {
setenv("ANODE_DWM_RESTARTED", "1", 1);
execvp(argv[0], argv);
}
return EXIT_SUCCESS;