Make directories configurable using a patch

This commit is contained in:
Oliver Davies 2025-04-23 14:19:05 +01:00
parent 2bedd41d83
commit dc2de9334d
5 changed files with 77 additions and 38 deletions

View file

@ -1,15 +0,0 @@
diff --git a/tmux-sessionizer b/tmux-sessionizer
index fa1bec5..4d79e0b 100755
--- a/tmux-sessionizer
+++ b/tmux-sessionizer
@@ -22,9 +22,7 @@ hydrate() {
if [[ $# -eq 1 ]]; then
selected=$1
else
- # 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)
+ selected=$(find -L "${XDG_REPOS_DIR}" "${XDG_REPOS_DIR}"/* "${XDG_DOCUMENTS_DIR}" -maxdepth 1 -mindepth 1 -type d ! -name ".*" ! -name ".old" ! -name "_archive" | sort | fzf)
fi
if [[ -z $selected ]]; then

View file

@ -22,7 +22,11 @@ stdenv.mkDerivation {
patches = [
./move-default-script.patch
./add-tmux-file.patch
./configure-directories.patch
(fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/ThePrimeagen/tmux-sessionizer/pull/2.patch";
sha256 = "sha256-4/4rzve49T3FHnl9WWUPJVcb0NQojMQjIVnEZGwVAsY=";
})
];
installPhase = ''