Move to Chezmoi
This commit is contained in:
parent
f216c4ff2c
commit
e3498e73b5
59 changed files with 499 additions and 2240 deletions
chezmoi/dot_zshrc.d
21
chezmoi/dot_zshrc.d/executable_sshtmux.sh
Normal file
21
chezmoi/dot_zshrc.d/executable_sshtmux.sh
Normal file
|
@ -0,0 +1,21 @@
|
|||
# create splits in a tmux session for each ssh host
|
||||
sshtmux() {
|
||||
if [ -z "${TMUX}" ]; then
|
||||
echo "This must be executed inside of a tmux session"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -z "${1}" ]; then
|
||||
echo "Please provide of list of hosts separated by spaces"
|
||||
return 1
|
||||
fi
|
||||
|
||||
tmux new-window "ssh"
|
||||
for i in "${@}"; do
|
||||
tmux split-window -h "ssh -o StrictHostKeyChecking=no $i"
|
||||
tmux select-layout tiled > /dev/null
|
||||
sleep .1s
|
||||
done
|
||||
|
||||
tmux select-pane -t 0
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue