diff --git a/.woodpecker.yml b/.woodpecker.yml index 7e0bde0..44a8b29 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -8,6 +8,10 @@ steps: commands: - cp -f config.mk patches.h dwm-flexipatch/ - bash flexipatch-finalizer/flexipatch-finalizer.sh -r -d dwm-flexipatch -o dwm-final + - | + for patch in patches/*.patch; do + patch -d dwm-final <"$patch" + done - cp -f config.h dwm-final/ - cd dwm-final || exit 1 - make clean install DESTDIR="$${CI_WORKSPACE}/pkg" PREFIX="/usr" diff --git a/build.sh b/build.sh index e40c5f4..00e714b 100755 --- a/build.sh +++ b/build.sh @@ -3,9 +3,9 @@ cp config.mk patches.h dwm-flexipatch/ flexipatch-finalizer/flexipatch-finalizer.sh -r -d dwm-flexipatch -o dwm-final rm dwm-flexipatch/config.mk dwm-flexipatch/patches.h -# for patch in patches/*.diff; do -# patch -d dwm-final <"$patch" -# done +for patch in patches/*.diff; do + patch -d dwm-final <"$patch" +done cp config.h dwm-final/ -cd dwm-final +cd dwm-final || exit 1 make diff --git a/config.h b/config.h index aa6f37e..60a0bc9 100644 --- a/config.h +++ b/config.h @@ -135,6 +135,7 @@ static const char *layoutmenu_cmd = "xmenulayout"; // static const char *layoutxmenu = "$HOME/.local/libexec/dwm/xmenulayout"; // TODO: Patch layoutmenu to accept arguments // static const char *layoutdmenu = "$HOME/.local/libexec/dwm/dmenulayout"; // TODO: Patch layoutmenu to accept shell commands +static const int autostart_kill_signal = SIGHUP; static const char *const autostart[] = { "/bin/sh", "-c", "run-parts \"${XDG_CONFIG_HOME}/dwm/autorun.d\"", NULL, "/bin/sh", "-c", "runsvdir \"${SVDIR}\"", NULL, diff --git a/patches/autostart_signal.patch b/patches/autostart_signal.patch new file mode 100644 index 0000000..7b4e7ab --- /dev/null +++ b/patches/autostart_signal.patch @@ -0,0 +1,13 @@ +diff --git a/dwm.c b/dwm.c +index 46b3be6..060614e 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -693,7 +693,7 @@ cleanup(void) + /* kill child processes */ + for (i = 0; i < autostart_len; i++) { + if (0 < autostart_pids[i]) { +- kill(autostart_pids[i], SIGTERM); ++ kill(autostart_pids[i], autostart_kill_signal); + waitpid(autostart_pids[i], NULL, 0); + } + }