diff --git a/shell/helper.sh b/shell/helper.sh index 260a351..88937cb 100755 --- a/shell/helper.sh +++ b/shell/helper.sh @@ -1,10 +1,17 @@ #!/usr/bin/env bash echo " +nv - Start new lecture mode +upda - Update system configuration +fla - Rebuild nix system +nt - Open quicknote ud - Open uni related pdf us - Start uni session typ - Traverse uni typst files rnt - Open hand drawings +tp - Teleport to project n - Neovim r - Yazi with dir change +f - Find files in current workdir downwards +g - Interactive grep with fuzzy finding " diff --git a/shell/open_sess.sh b/shell/open_sess.sh index 76274a8..9cfd539 100755 --- a/shell/open_sess.sh +++ b/shell/open_sess.sh @@ -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