diff options
| author | Kyren223 <Kyren223@proton.me> | 2024-12-26 16:39:54 +0200 |
|---|---|---|
| committer | Kyren223 <Kyren223@proton.me> | 2024-12-26 16:39:54 +0200 |
| commit | 3137d24a623e1f96837ebf4f48fded1fff26d4d5 (patch) | |
| tree | ae70c7ac107da69cf4ab451af861634267fc93a6 /scripts | |
| parent | 2c36da019d4f70fd03014062f30135d421c5da4e (diff) | |
Added tmux session for remote server
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/tmux-session-setup | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/tmux-session-setup b/scripts/tmux-session-setup index 97f79c3..17dd2ed 100755 --- a/scripts/tmux-session-setup +++ b/scripts/tmux-session-setup @@ -31,6 +31,16 @@ elif [ "$sess" = "eko" ]; then tmux send-keys -t $sess:logs.3 "go run ./cmd/server --stdout" C-m tmux select-window -t $sess:editor +elif [ "$sess" = "server" ]; then + tmux rename-window -t $sess:1 local + + tmux new-window -t $sess -n remote -c $dir + tmux send-keys -t $sess:remote.1 "ssh root@server" C-m + + tmux new-window -t $sess -n editor -c $dir + tmux send-keys -t $sess:editor.1 "vim" C-m + + tmux select-window -t $sess:remote elif [[ "$dir" == "$HOME/projects/"* ]]; then tmux rename-window -t $sess:1 editor tmux send-keys -t $sess:editor.1 "vim" C-m |
