Last active
February 21, 2024 11:27
-
-
Save montethinks/2f4c43c900b6df5160422b4013d7c93f to your computer and use it in GitHub Desktop.
Revisions
-
montethinks revised this gist
Oct 5, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ session="work" # set up tmux tmux start-server # create a new tmux session with <NAME> tmux new-session -d -s $session -n servers # Select pane 1, set dir to <PROJECT NAME> -
montethinks created this gist
Sep 4, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,39 @@ #!/bin/sh # Setup a work space called `work` with four windows session="work" # set up tmux tmux start-server # create a new tmux session, starting vim from a saved session in the new window tmux new-session -d -s $session -n servers # Select pane 1, set dir to <PROJECT NAME> tmux selectp -t 1 tmux send-keys "cd ~/path/to/project" C-m # Select pane 2 tmux splitw -h tmux send-keys "cd ~/path/to/project" C-m # create a new window called <PROJECT NAME> tmux new-window -t $session:2 -n <PROJECT NAME> tmux send-keys "cd ~/path/to/project" C-m tmux send-keys "vim ." C-m # create a new window called <PROJECT NAME> tmux new-window -t $session:3 -n <PROJECT NAME> tmux send-keys "cd ~/path/to/project" C-m tmux send-keys "vim ." C-m # create a new window called <PROJECT NAME> tmux new-window -t $session:4 -n scratch # return to main servers window tmux select-window -t $session:1 # Finished setup, attach to the tmux session! tmux attach-session -t $session