mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-02-19 19:27:31 -08:00
18 lines
407 B
Bash
18 lines
407 B
Bash
#!/bin/sh
|
|
|
|
DIR="~/.dotfiles"
|
|
|
|
SESSION="Dots"
|
|
SESSIONEXISTS=$(tmux list-sessions | grep $SESSION)
|
|
|
|
if [ "$SESSIONEXISTS" = "" ]
|
|
then
|
|
tmux new-session -s $SESSION -d
|
|
tmux rename-window -t $SESSION:1 'Edit'
|
|
tmux send-keys -t 'Edit' "cd ${DIR}" C-m 'nvim' C-m
|
|
tmux new-window -t $SESSION:2 -n 'Term'
|
|
tmux send-keys -t 'Term' "cd ${DIR}" C-m 'clear' C-m
|
|
fi
|
|
|
|
tmux attach-session -t $SESSION:1
|