feat(obsidian): polish tmuxp and tmux-notes-switch script
This commit is contained in:
parent
e0239c2e44
commit
91b02ef3d5
3 changed files with 5 additions and 5 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue