commit bc3fc0ecc873560a1b73b09d300b0b8e8b45e005
parent 746a7e0ec2a371693957bad628b2d36a5547409e
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Thu, 25 Oct 2018 10:09:33 +0200
Fix many SC warnings
Diffstat:
1 file changed, 34 insertions(+), 47 deletions(-)
diff --git a/links/bin/tmux-utility.sh b/links/bin/tmux-utility.sh
@@ -1,8 +1,8 @@
-#!/bin/bash
-SESSION=utility
+##!/bin/bash
+#SESSION=utility
echo "starting $SESSION tmux session"
-if ! tmux has-session -t $SESSION
+if ! "tmux has-session -t $SESSION"
then
# Start services
mpd ~/.mpd/mpd.conf
@@ -18,68 +18,55 @@ then
fi
# Create new session, name it, name the window, detach
- tmux new-session -s $SESSION -n misc -d
+ tmux new-session -s "$SESSION" -n misc -d
if [ "$(hostname)" = "mstdeb" ]; then
- tmux send-keys -t $SESSION C-m "$HOME/bin/idkfa-ssh" C-m
+ tmux send-keys -t "$SESSION" C-m "$HOME/bin/idkfa-ssh" C-m
else
- tmux send-keys -t $SESSION "echo $PWD" C-m
- tmux send-keys -t $SESSION "mutt" C-m
+ tmux send-keys -t "$SESSION" "echo $PWD" C-m
+ tmux send-keys -t "$SESSION" "mutt" C-m
- tmux split-window -h -t $SESSION
- tmux send-keys -t $SESSION "$HOME/bin/google-cloud-lamps-instance1-ssh.sh" C-m
+ tmux split-window -h -t "$SESSION"
+ tmux send-keys -t "$SESSION" "$HOME/bin/google-cloud-lamps-instance1-ssh.sh" C-m
- tmux select-pane -t $SESSION:1.1
- tmux split-window -p 33 -v -t $SESSION
- tmux send-keys -t $SESSION "fortune" C-m
- #tmux send-keys -t $SESSION "$EDITOR $HOME/iawriter/todo.md" C-m
+ tmux select-pane -t "$SESSION":1.1
+ tmux split-window -p 33 -v -t "$SESSION"
+ tmux send-keys -t "$SESSION" "fortune" C-m
+ #tmux send-keys -t "$SESSION" "$EDITOR $HOME/iawriter/todo.md" C-m
fi
- tmux new-window -t $SESSION -n "board"
- tmux select-pane -t $SESSION:2.1
- tmux send-keys -t $SESSION "board $HOME" C-m
+ tmux new-window -t "$SESSION" -n "board"
+ tmux select-pane -t "$SESSION":2.1
+ tmux send-keys -t "$SESSION" "board $HOME" C-m
- tmux new-window -t $SESSION -n "mpc"
- tmux select-pane -t $SESSION:3.1
- tmux send-keys -t $SESSION "ncmpcpp" C-m
+ tmux new-window -t "$SESSION" -n "mpc"
+ tmux select-pane -t "$SESSION":3.1
+ tmux send-keys -t "$SESSION" "ncmpcpp" C-m
# optionally load additional windows
if [ "$1" = "seaice" ]; then
- tmux new-window -t $SESSION -n Granular
- tmux select-pane -t $SESSION:4.1
- tmux send-keys -t $SESSION "cd ~/code/Granular && vim" C-m
- tmux split-window -p 33 -h -t $SESSION
- tmux send-keys -t $SESSION "cd ~/code/Granular && julia" C-m
+ tmux new-window -t "$SESSION" -n Granular
+ tmux select-pane -t "$SESSION":4.1
+ tmux send-keys -t "$SESSION" "cd ~/code/Granular && vim" C-m
+ tmux split-window -p 33 -h -t "$SESSION"
+ tmux send-keys -t "$SESSION" "cd ~/code/Granular && julia" C-m
- tmux new-window -t $SESSION -n SeaIce-exp
- tmux select-pane -t $SESSION:5.1
- tmux send-keys -t $SESSION "cd ~/code/SeaIce-experiments" C-m
- tmux split-window -p 33 -h -t $SESSION
- tmux send-keys -t $SESSION \
+ tmux new-window -t "$SESSION" -n SeaIce-exp
+ tmux select-pane -t "$SESSION":5.1
+ tmux send-keys -t "$SESSION" "cd ~/code/SeaIce-experiments" C-m
+ tmux split-window -p 33 -h -t "$SESSION"
+ tmux send-keys -t "$SESSION" \
"cd ~/code/SeaIce-experiments && ~/bin/granular-status.sh" C-m
- tmux new-window -t $SESSION -n idkfa
- tmux select-pane -t $SESSION:6.1
- tmux send-keys -t $SESSION "$HOME/bin/idkfa-ssh" C-m
+ tmux new-window -t "$SESSION" -n idkfa
+ tmux select-pane -t "$SESSION":6.1
+ tmux send-keys -t "$SESSION" "$HOME/bin/idkfa-ssh" C-m
#"sshfs ad@idkfa.ucsd.edu:/home/ad ~/idkfa && ~/bin/idkfa-ssh" C-m
fi
#tmux select-layout tiled
- tmux select-pane -t $SESSION:1.1
+ tmux select-pane -t "$SESSION":1.1
- #tmux send-keys -t $SESSION "irc.sh" C-m # process in first pane
- #tmux split-window -h -p 65 -t $SESSION # horizontal split
- #tmux split-window -v -p 10 -t $SESSION # bottom right
- #tmux send-keys -t $SESSION "htop" C-m
- #tmux select-pane -t $SESSION:1.1 # select first pane
- #tmux split-window -v -p 60 -t $SESSION # create a pane below first pane
- #tmux split-window -v -p 56 -t $SESSION # create a pane below first pane
- #tmux send-keys -t $SESSION "htop" C-m # process in third pane
- #tmux split-window -v -p 75 -t $SESSION # create a pane below second pane
- #tmux send-keys -t $SESSION "irc.sh" C-m # process in fourth pane
- #tmux send-keys -t $SESSION "ncmpcpp" C-m # process in fourth pane
- #tmux send-keys -t $SESSION "mpd; vimpc" C-m # process in fourth pane
- #tmux select-pane -t $SESSION:1.1 # select first pane
fi
-tmux attach -t $SESSION
+tmux attach -t "$SESSION"