Skip to content

Instantly share code, notes, and snippets.

@mgreenly
Last active November 17, 2019 17:23
Show Gist options
  • Save mgreenly/73dc5727833248e5ad3df7eda0948f59 to your computer and use it in GitHub Desktop.
Save mgreenly/73dc5727833248e5ad3df7eda0948f59 to your computer and use it in GitHub Desktop.
#!/bin/sh
tmux has-session -t notes > /dev/null 2>&1
if [ $? != 0 ]; then
echo 'starting session: notes'
tmux new-session -s notes -d
tmux rename-window -t notes notes
tmux send-keys -t notes "vim $DROPBOX_DIR/documents/notes.txt" C-M
fi
tmux has-session -t terminal > /dev/null 2>&1
if [ $? != 0 ]; then
echo 'starting session: terminal'
tmux new-session -s terminal -d
tmux rename-window -t terminal terminal
fi
tmux attach -t terminal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment