.

Options to do patches in dwm/st etc

0 another option

https://github.com/qguv/dwm

1. 1 config branch

Instead of merging all of the patch and config branches onto master, you can have one branch with all of your custom change history, and leave master untouched. You don’t need to run “–reset HARD” on master repeatedly. When you want to apply a patch, create a temporary branch for it from master, apply it within that branch (and commit), rebase your custom branch on that, and delete the patch branch. Then “make clean install” would be run with the custom branch checked out. You’re always left with just two branches, a clear linear commit history, and fewer steps to take overall.

2. https://dwm.suckless.org/customisation/patches_in_git/

3. each patch is a branch

config branch - for my config changes

How to create a config branch

1. Create config branch

git branch config

2. Edit config.def.h

3. Add / commit

git add config.def.h
git commit -m config
``

### 4. Switch to master

git checkout master


### 5. Merge config branch into the master branch

git merge config -m config


### 6. build dwm

sudo make clean install


## How to apply a new patch

### 1. Download patch from suckless site

### 2. Clean up master branch

git checkout master make clean && rm -f config.h && git reset –hard origin/master


### 3. Create new branch for patch

git branch pertag git checkout pertag


### 4. apply patch

git apply /location.diff


### 5. add files it changed

git add . git commit -m pertag


### 6. git merge

git merge pertag -m pertag ```

Example patches

Center - options a window in the center fo the screen Fakefullscreen movestack