auto up 11:52:14 up 0:59, 2 users, load average: 0.27, 0.30, 0.33

This commit is contained in:
2025-11-06 11:52:15 +01:00
parent ef5ace7084
commit 108bb5bee5
2 changed files with 10 additions and 0 deletions

View File

@@ -4,7 +4,10 @@ set -euo pipefail
PROJECT_DIR=$(find ~/projects -mindepth 1 -maxdepth 1 -type d | fzf --prompt='Select project: ')
[ -z "$PROJECT_DIR" ] && exit 0
# Sanitize session name
SESSION_NAME=$(basename "$PROJECT_DIR")
SESSION_NAME=${SESSION_NAME//./_}
SESSION_NAME=${SESSION_NAME// /_}
# If session exists, switch or attach depending on context
if tmux has-session -t "$SESSION_NAME" 2>/dev/null; then