-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebsite-tmux
executable file
·32 lines (25 loc) · 997 Bytes
/
website-tmux
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh
# Set Session Name
SESSION="Website"
SESSIONEXISTS=$(tmux list-sessions | grep $SESSION)
# Only create tmux session if it doesn't already exist
if [ "$SESSIONEXISTS" = "" ]
then
# Start New Session with our name
tmux new-session -d -s $SESSION
# Name first Window and start zsh
tmux rename-window -t 0 'Main'
tmux send-keys -t 'Main' 'zsh' C-m 'clear' C-m # Switch to bind script?
# Create and setup Window for hugo server
tmux new-window -t $SESSION:1 -n 'Hugo Server'
tmux send-keys -t 'Hugo Server' 'hugo serve -D -F' C-m # Switch to bind script?
# setup Writting window
tmux new-window -t $SESSION:2 -n 'Writting'
tmux send-keys -t 'Writting' "nvim" C-m
# Setup an additional shell
tmux new-window -t $SESSION:3 -n 'Shell'
tmux send-keys -t 'Shell' "qutebrowser localhost:1313" C-m 'clear' C-m
tmux send-keys -t 'Shell' "zsh" C-m 'clear' C-m
fi
# Attach Session, on the Main window
tmux attach-session -t $SESSION:0