dotfiles/home/bin/executable_tmux_dot

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