Add daily email for 21/04/25

This commit is contained in:
Oliver Davies 2025-04-24 00:43:10 +01:00
parent 3c234c38dc
commit af7bd895a5

View file

@ -0,0 +1,50 @@
---
title: With patches, I can change anything I want
date: 2025-04-21
permalink: daily/2025/04/21/patch
tags:
- software-development
- linux
cta: ~
snippet: |
Using patches, I can change software in any way I want or need.
---
I've been a Drupal and Linux user for a long time, as well as using command-line tools and utilities like Neovim and tmux.
Since September 2022, I've used NixOS as my daily operating system on my computers.
Based on similar programs, in particular by ThePrimeagen, I wrote and use a program to automatically open tmux sessions and run initial commands for any project in my Code directory.
In October, he released [tmux-sessionizer as its own package][0].
There is a `tmux-sessionizer` already in nixpkgs, but [I wrote my own derivation][1] to use Prime's.
There was also this problem in the code:
```bash
# If someone wants to make this extensible, i'll accept
# PR
selected=$(find ~/ ~/personal ~/personal/dev/env/.config -mindepth 1 -maxdepth 1 -type d | fzf)
```
These directories don't match what I use on my computers.
People have submitted pull requests, but these haven't yet been merged.
Either I change my directory structure or I can't use it.
But, in my derivation, I can apply my own patch files to make any changes I want - such as changing the directories to ones I'd want to use - making it usable for me.
I can also apply other people's patches, the same as I'm doing with dwm.
Someone has created a pull request to make the directories dynamic based on a configuration file.
I can apply these changes as a patch to my configuration and remove my custom one.
I can make any other changes I want or need to.
The possibilities are endless.
[0]: https://github.com/ThePrimeagen/tmux-sessionizer
[1]: https://code.oliverdavies.uk/opdavies/nix-config/src/commit/28d75ce6b85e0852aa3f8454bab4f2206ad7e50a/pkgs/tmux-sessionizer/default.nix