diff --git a/CLAUDE.md b/CLAUDE.md index b6698b7..522bdec 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,10 +1,9 @@ ## Nix Configuration System - This is my nix configuration system. Whenever you need to introduce update to my config, remember to check the current config. -- When you are going to introduce update to my nix config, do it on a experimental branch (use 'nightly'), and commit and push to that branch after you perform test to check the updates work as intended. Never work on the master branch which I will perform merge manually. +- When you are going to introduce update to my nix config, do it on a experimental branch (use 'nightly'), and commit and push to that branch after you perform `hms` to at least check the home-manager switch can pass. Never work on the master branch which I will perform merge manually. - After you introduce updates, remember to reflect those updates in the readme, should they bring any changes. -- You can use `hms` to perform home-manager switch and `exec zsh` to refresh shell environment ## Testing Considerations -- When you perform testing, remember you are in a non-interactive shell so things work for me might not work for your testing, unless you take your special testing environment into consideration \ No newline at end of file +- When you perform testing, remember you are in a non-interactive shell so things work for me might not work for your testing, unless you take your special testing environment into consideration diff --git a/scripts/project-launcher.sh b/scripts/project-launcher.sh index ea4fa27..a4e7dd2 100755 --- a/scripts/project-launcher.sh +++ b/scripts/project-launcher.sh @@ -92,6 +92,11 @@ create_directory "$CODE_PATH" "code" create_directory "$CONTENT_PATH" "content" create_directory "$PAPER_PATH" "paper" +# Record directories in zoxide for smart navigation +[ -n "$CODE_PATH" ] && [ "$CODE_PATH" != "null" ] && [ -d "$CODE_PATH" ] && zoxide add "$CODE_PATH" 2>/dev/null || true +[ -n "$CONTENT_PATH" ] && [ "$CONTENT_PATH" != "null" ] && [ -d "$CONTENT_PATH" ] && zoxide add "$CONTENT_PATH" 2>/dev/null || true +[ -n "$PAPER_PATH" ] && [ "$PAPER_PATH" != "null" ] && [ -d "$PAPER_PATH" ] && zoxide add "$PAPER_PATH" 2>/dev/null || true + # Create remote directory if server connection is configured if [ -n "$SERVER" ] && [ -n "$REMOTE_DIR" ]; then printf "\033[2mEnsuring remote directory exists: %s:%s\033[0m\n" "$SERVER" "$REMOTE_DIR" diff --git a/scripts/templates/basic.sh b/scripts/templates/basic.sh index 2315974..a4e50f2 100755 --- a/scripts/templates/basic.sh +++ b/scripts/templates/basic.sh @@ -12,6 +12,9 @@ if [ -z "$SESSION_NAME" ] || [ -z "$CODE_PATH" ]; then fi tmux new-session -d -s $SESSION_NAME -c "$CODE_PATH" + +# Record directory in zoxide for smart navigation +zoxide add "$CODE_PATH" 2>/dev/null || true tmux rename-window -t $SESSION_NAME:1 "nvim" tmux send-keys -t $SESSION_NAME:1 "nvim" C-m tmux new-window -t $SESSION_NAME:2 -n "ai" -c "$CODE_PATH" diff --git a/scripts/templates/research.sh b/scripts/templates/research.sh index 18b7ece..08a9550 100755 --- a/scripts/templates/research.sh +++ b/scripts/templates/research.sh @@ -16,6 +16,10 @@ fi # Create windows for code tmux new-session -d -s $SESSION_NAME -c "$CODE_PATH" + +# Record directories in zoxide for smart navigation +zoxide add "$CODE_PATH" 2>/dev/null || true +zoxide add "$PAPER_PATH" 2>/dev/null || true tmux rename-window -t $SESSION_NAME:1 "code" tmux send-keys -t $SESSION_NAME:1 "nvim" C-m tmux new-window -t $SESSION_NAME:2 -n "code-ai" -c "$CODE_PATH"