Merge branch 'nightly'

This commit is contained in:
Yan Lin 2025-07-30 00:26:25 +02:00
commit 5f9b31295f
4 changed files with 14 additions and 3 deletions

View file

@ -1,10 +1,9 @@
## Nix Configuration System ## Nix Configuration System
- This is my nix configuration system. Whenever you need to introduce update to my config, remember to check the current config. - 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 `nightly` branch, (and remember that `master` branch might be newer), 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. - 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 ## 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 - 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

View file

@ -92,6 +92,11 @@ create_directory "$CODE_PATH" "code"
create_directory "$CONTENT_PATH" "content" create_directory "$CONTENT_PATH" "content"
create_directory "$PAPER_PATH" "paper" 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 # Create remote directory if server connection is configured
if [ -n "$SERVER" ] && [ -n "$REMOTE_DIR" ]; then if [ -n "$SERVER" ] && [ -n "$REMOTE_DIR" ]; then
printf "\033[2mEnsuring remote directory exists: %s:%s\033[0m\n" "$SERVER" "$REMOTE_DIR" printf "\033[2mEnsuring remote directory exists: %s:%s\033[0m\n" "$SERVER" "$REMOTE_DIR"

View file

@ -12,6 +12,9 @@ if [ -z "$SESSION_NAME" ] || [ -z "$CODE_PATH" ]; then
fi fi
tmux new-session -d -s $SESSION_NAME -c "$CODE_PATH" 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 rename-window -t $SESSION_NAME:1 "nvim"
tmux send-keys -t $SESSION_NAME:1 "nvim" C-m tmux send-keys -t $SESSION_NAME:1 "nvim" C-m
tmux new-window -t $SESSION_NAME:2 -n "ai" -c "$CODE_PATH" tmux new-window -t $SESSION_NAME:2 -n "ai" -c "$CODE_PATH"

View file

@ -16,6 +16,10 @@ fi
# Create windows for code # Create windows for code
tmux new-session -d -s $SESSION_NAME -c "$CODE_PATH" 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 rename-window -t $SESSION_NAME:1 "code"
tmux send-keys -t $SESSION_NAME:1 "nvim" C-m tmux send-keys -t $SESSION_NAME:1 "nvim" C-m
tmux new-window -t $SESSION_NAME:2 -n "code-ai" -c "$CODE_PATH" tmux new-window -t $SESSION_NAME:2 -n "code-ai" -c "$CODE_PATH"