From 4528ba722c91807f8ba9c89f4ba6ecac64dbb21c Mon Sep 17 00:00:00 2001
From: cowmonk
Find a Patch: Head over to the dwm patches page. Find a patch you like. Let’s say you want the autostart patch, which allows you to run commands automatically when dwm starts (I highly reccomend this especially if you’re running from a display manager!).
Download the Patch: Download the .diff file for the patch. Save it somewhere, perhaps in a patches subdirectory within your dwm source folder.
Apply the Patch: In your dwm source directory, use the patch command:
-bash
- patch -Np1 -i patchfile.diff
-
Apply the Patch: In your dwm source directory, use the patch command:
patch -Np1 -i patchfile.diff
+
+Resolve Conflicts (If Any): Sometimes, patches might conflict, especially if they modify the same lines of code or if you’re applying a patch meant for an older version of dwm. This will result in .rej (rejected) files. You’ll need to manually edit the source files to resolve these conflicts, looking at the .rej files to see what couldn’t be applied. This is the trickiest part, but it gets easier with practice. Start with simple, popular patches.
Find a Patch: Head over to the dwm patches page. Find a patch you like. Let’s say you want the autostart patch, which allows you to run commands automatically when dwm starts (I highly reccomend this especially if you’re running from a display manager!).
Download the Patch: Download the .diff file for the patch. Save it somewhere, perhaps in a patches subdirectory within your dwm source folder.
Apply the Patch: In your dwm source directory, use the patch command:
-bash
- patch -Np1 -i patchfile.diff
-
Apply the Patch: In your dwm source directory, use the patch command:
patch -Np1 -i patchfile.diff
+
+Resolve Conflicts (If Any): Sometimes, patches might conflict, especially if they modify the same lines of code or if you’re applying a patch meant for an older version of dwm. This will result in .rej (rejected) files. You’ll need to manually edit the source files to resolve these conflicts, looking at the .rej files to see what couldn’t be applied. This is the trickiest part, but it gets easier with practice. Start with simple, popular patches.