Advertisement
pentago

Untitled

Jul 4th, 2015
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.81 KB | None | 0 0
  1. # Autostart Tmux
  2. if [[ -z "$TMUX" ]] ;then
  3. ID="`tmux ls | grep attached | cut -d: -f1`"
  4. if [[ -z "$ID" ]] ;then
  5. tmux new-session -d -s $USER
  6. $(which tmux) rename-window -t $USER:1 'CLI'
  7. $(which tmux) new-window -t $USER:2 -n 'MON'
  8. $(which tmux) select-window -t 2
  9. $(which tmux) split-window -h -p 50
  10. $(which tmux) split-window -p 50
  11. $(which tmux) select-pane -L
  12. $(which tmux) split-window -p 50
  13. $(which tmux) select-pane -U
  14. $(which tmux) send-keys 'systat 3' 'C-m'
  15. $(which tmux) select-pane -D
  16. $(which tmux) send-keys 'systat -iostat 3' 'C-m'
  17. $(which tmux) select-pane -R
  18. $(which tmux) send-keys 'systat -ifstat 3' 'C-m'
  19. $(which tmux) select-pane -U
  20. $(which tmux) send-keys 'systat -netstat 3' 'C-m'
  21. $(which tmux) new-window -t $USER:3 -n 'TOP' 'top -o jid -P -a -j'
  22. else
  23. tmux attach-session -t "$ID"
  24. fi
  25. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement