-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStart.sh
More file actions
25 lines (17 loc) · 792 Bytes
/
Start.sh
File metadata and controls
25 lines (17 loc) · 792 Bytes
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
#!/bin/bash
SESSION_NAME="LinuxMonitor"
export TERM=xterm-256color
# start detached session with one pane (pane 0)
tmux new-session -d -s "$SESSION_NAME" -n monitor
# split window into top and bottom (pane 0 -> top, pane 1 -> bottom)
tmux split-window -v -t "$SESSION_NAME":0
# split the top pane into left (pane 0) and right (pane 1)
tmux split-window -h -t "$SESSION_NAME":0.0
# run disk script in left pane (top-left, pane 0)
tmux send-keys -t "$SESSION_NAME":0.0 'bash ~/disk.sh --hide-stats --hide-serial --hide-model' C-m
# run cpu script in right pane (top-right, pane 1)
tmux send-keys -t "$SESSION_NAME":0.1 'bash ~/cpu.sh -s -f -n' C-m
# make bottom pane active (ready to accept input)
tmux select-pane -t "$SESSION_NAME":0.2
# attach
tmux attach-session -t "$SESSION_NAME"