<p>I used them before <a href="/blog/going-full-vim">I switched to using Neovim full time</a> in July 2021.</p>
<p>More recently, I've used a script that creates and attaches to tmux sessions based on the directories in my Code directory, making it easy to switch between projects.</p>
<p>It was based on others by <a href="/podcast/25-jess-archer-drush-laravel-prompts">Jess Archer</a> and ThePrimeagen, although Prime recently created a new version of his as its own project, so I decided to switch to his version.</p>
<p>But there was one issue - the paths to search for directory names is hard-coded and don't match mine.</p>
<p>I started by duplicating his and changing the paths, but that would mean missing any future updates and having to maintain my version separately.</p>
<p>Until I realised I could use his version and apply patches to it for my changes and customisations.</p>
<p>This is something I'm familiar with from my Drupal contributions, as we used to attach patch files to issues before moving to GitLab and merge requests.</p>
<p>I was able to make my changes and easily <a href="https://code.oliverdavies.uk/opdavies/dotfiles/commit/5fd27efa502bd48eb7d897acec8aa3344bef2247">apply the patch easily as part of my Nix derivation</a>.</p>
<p>This means I'll get any future updates to the script, keep my changes and Nix will automatically apply my patch whenever I rebuild my system.</p>
<p>I really like this approach, as I'm no longer duplicating the script and don't have the maintenance overhead whilst still making any customisations I need.</p>
<p>In fact, there are Linux applications such as dwm, dmenu and st (a simple terminal), all written by suckless.org, that use this approach as the main method of configuration and customisation.</p>
<p>They release the core package and people write and contribute patch files to customise it as they need.</p>
<p>Although patches are no longer used on Drupal.org, they're still a great way to customise and contribute to open source software.</p>
<p>More recently, I've used a script that creates and attaches to tmux sessions based on the directories in my Code directory, making it easy to switch between projects.</p>
<p>It was based on others by <a href="/podcast/25-jess-archer-drush-laravel-prompts">Jess Archer</a> and ThePrimeagen, although Prime recently created a new version of his as its own project, so I decided to switch to his version.</p>
<p>But there was one issue - the paths to search for directory names is hard-coded and don't match mine.</p>
<p>I started by duplicating his and changing the paths, but that would mean missing any future updates and having to maintain my version separately.</p>
<p>Until I realised I could use his version and apply patches to it for my changes and customisations.</p>
<p>This is something I'm familiar with from my Drupal contributions, as we used to attach patch files to issues before moving to GitLab and merge requests.</p>
<p>I was able to make my changes and easily <a href="https://code.oliverdavies.uk/opdavies/dotfiles/commit/5fd27efa502bd48eb7d897acec8aa3344bef2247">apply the patch easily as part of my Nix derivation</a>.</p>
<p>This means I'll get any future updates to the script, keep my changes and Nix will automatically apply my patch whenever I rebuild my system.</p>
<p>I really like this approach, as I'm no longer duplicating the script and don't have the maintenance overhead whilst still making any customisations I need.</p>
<p>In fact, there are Linux applications such as dwm, dmenu and st (a simple terminal), all written by suckless.org, that use this approach as the main method of configuration and customisation.</p>
<p>They release the core package and people write and contribute patch files to customise it as they need.</p>
<p>Although patches are no longer used on Drupal.org, they're still a great way to customise and contribute to open source software.</p>