Add notes session akin to agent session

This commit is contained in:
2026-05-21 12:13:06 +01:00
parent daf76780eb
commit 6f1d30c1b7
3 changed files with 49 additions and 0 deletions

20
notes.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -e
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
notes_dir="$HOME/Documents/Notes"
# Create the notes session if it doesn't exist
if ! tmux has-session -t notes; then
tmux new-session -ds notes -c "$notes_dir" -n notes "$script_dir/notes-cmd.sh"
fi
# Apply session options on every invocation so updates propagate to live sessions
tmux set-option -t notes status off
tmux set-option -t notes remain-on-exit on
tmux set-option -t notes default-command "$script_dir/notes-cmd.sh"
# Attach to the session
tmux attach-session -t notes