Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Autostart Tmux
- if [[ -z "$TMUX" ]] ;then
- ID="`tmux ls | grep attached | cut -d: -f1`"
- if [[ -z "$ID" ]] ;then
- tmux new-session -d -s $USER
- $(which tmux) rename-window -t $USER:1 'CLI'
- $(which tmux) new-window -t $USER:2 -n 'MON'
- $(which tmux) select-window -t 2
- $(which tmux) split-window -h -p 50
- $(which tmux) split-window -p 50
- $(which tmux) select-pane -L
- $(which tmux) split-window -p 50
- $(which tmux) select-pane -U
- $(which tmux) send-keys 'systat 3' 'C-m'
- $(which tmux) select-pane -D
- $(which tmux) send-keys 'systat -iostat 3' 'C-m'
- $(which tmux) select-pane -R
- $(which tmux) send-keys 'systat -ifstat 3' 'C-m'
- $(which tmux) select-pane -U
- $(which tmux) send-keys 'systat -netstat 3' 'C-m'
- $(which tmux) new-window -t $USER:3 -n 'TOP' 'top -o jid -P -a -j'
- else
- tmux attach-session -t "$ID"
- fi
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement