feat(obsidian): polish tmuxp and tmux-notes-switch script

This commit is contained in:
Sergio Laín 2025-06-23 02:13:57 +02:00
parent e0239c2e44
commit 91b02ef3d5
No known key found for this signature in database
GPG key ID: 51BB28D8B42FB438
3 changed files with 5 additions and 5 deletions

View file

@ -1,3 +1,3 @@
function op --wraps='cd ~/Documents/Obsidian/obsidianVault' --description 'alias op=cd ~/Documents/Obsidian/obsidianVault' function op --wraps='cd ~/Documents/Obsidian/obsidianVault' --description 'alias op=cd ~/Documents/Obsidian/obsidianVault'
cd ~/documents/obsidian/personal-brain/ $argv tmuxp load -y notes-tasks
end end

View file

@ -1,7 +1,7 @@
session_name: notes-tasks session_name: notes-tasks
windows: windows:
- window_name: notes - window_name: notes
start_directory: ~/documents/obsidian/personal-brain/ start_directory: ~/documents/obsidian/personal-brain/vault/
panes: panes:
- shell_command: - shell_command:
- nvim - nvim

View file

@ -3,11 +3,11 @@
SESSION_NOTES="notes-tasks" SESSION_NOTES="notes-tasks"
if [ "$(tmux display-message -p '#S')" == "$SESSION_NOTES" ]; then if [ "$(tmux display-message -p '#S')" == "$SESSION_NOTES" ]; then
tmux switch-client -l tmux switch-client -l &>/dev/null
else else
if tmux has-session -t "$SESSION_NOTES" 2>/dev/null; then if tmux has-session -t "$SESSION_NOTES" 2>/dev/null; then
tmux switch-client -t "$SESSION_NOTES" tmux switch-client -t "$SESSION_NOTES" &>/dev/null
else else
tmuxp load -y "$SESSION_NOTES" tmuxp load -y "$SESSION_NOTES" &>/dev/null
fi fi
fi fi