mirror of
https://github.com/Ascyii/scripts.git
synced 2026-01-01 04:44:24 -05:00
auto up 11:52:14 up 0:59, 2 users, load average: 0.27, 0.30, 0.33
This commit is contained in:
@@ -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
|
||||
"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user