by cmpb · 9y ago · 0 comments
I have a script called just c with the following:
------
name=$1
if !(tmux has-session -t "$name" 2> /dev/null); then
tmux start \;\
set -g set-remain-on-exit on \;\
new-session -d -s $name
tmux source-file "$HOME/.tmux.conf"
tmux source-file "$HOME/.tmux/profiles/$name.tmuxrc"
fitmux attach -t $name
-----
Then I cp a tmux profile from a template depending on the project language/framework into profiles and rename the directories in it then I can just do `c project` in the future to have everything started up.