From 91b02ef3d59cf9192dcba71a7e8c599bd19af07e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Mon, 23 Jun 2025 02:13:57 +0200 Subject: [PATCH] feat(obsidian): polish tmuxp and tmux-notes-switch script --- .config/fish/functions/op.fish | 2 +- .config/tmuxp/notes-tasks.yaml | 2 +- .local/bin/tmux-notes-switch | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.config/fish/functions/op.fish b/.config/fish/functions/op.fish index 0e5fe86e..5f2988f8 100644 --- a/.config/fish/functions/op.fish +++ b/.config/fish/functions/op.fish @@ -1,3 +1,3 @@ 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 diff --git a/.config/tmuxp/notes-tasks.yaml b/.config/tmuxp/notes-tasks.yaml index 4b2b1515..4fc644e5 100644 --- a/.config/tmuxp/notes-tasks.yaml +++ b/.config/tmuxp/notes-tasks.yaml @@ -1,7 +1,7 @@ session_name: notes-tasks windows: - window_name: notes - start_directory: ~/documents/obsidian/personal-brain/ + start_directory: ~/documents/obsidian/personal-brain/vault/ panes: - shell_command: - nvim diff --git a/.local/bin/tmux-notes-switch b/.local/bin/tmux-notes-switch index 671f1fa4..a2bc5298 100755 --- a/.local/bin/tmux-notes-switch +++ b/.local/bin/tmux-notes-switch @@ -3,11 +3,11 @@ SESSION_NOTES="notes-tasks" if [ "$(tmux display-message -p '#S')" == "$SESSION_NOTES" ]; then - tmux switch-client -l + tmux switch-client -l &>/dev/null else 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 - tmuxp load -y "$SESSION_NOTES" + tmuxp load -y "$SESSION_NOTES" &>/dev/null fi fi