-
-
Save fapestniegd/24190192afb740d009c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# /usr/bin/Eterm -O -f white -g 211x76+1+1 --tint blue --scrollbar 0 --buttonbar 0 -e <this_script> | |
# add the follwing env vars for spawning out of enlightenment keybindings | |
# /usr/bin/env LANG="en_US" LC_ALL="C" LANGUAGES="en_US" \ | |
# /usr/bin/Eterm -O -f white -g 242x75+1500+30 \ | |
# --tint blue --scrollbar 0 \ | |
# --buttonbar 0 | |
# | |
# -e /home/jameswhite/bin/soekrii | |
tmux list-sessions | grep -q soekrii | |
if [ $? -ne 0 ]; then | |
tmux new-session -x 242 -y 75 -d -s soekrii | |
################################################################################ | |
# all window widths | |
tmux split-window -h -t soekrii "ssh -t root@newton 'sw station_3'" | |
pane1width=$(tmux list-panes | grep "^1:" | awk '{print $2}' |cut -c 2- | cut -f 1 -d'x') | |
resizeNum=$(expr $pane1width - 161) | |
if [ $resizeNum -lt 0 ]; then | |
resizeNum=$(expr 0 - $resizeNum) | |
tmux resize-pane -L -t 1 $resizeNum | |
else | |
tmux resize-pane -R -t 1 $resizeNum | |
fi | |
################################################################################ | |
# first column window heights | |
tmux select-pane -t 1 | |
tmux split-window -h -t soekrii "ssh -t root@newton 'sw station_6'" | |
tmux select-pane -t 0 | |
tmux split-window -v -t soekrii "ssh -t root@newton 'sw station_2'" | |
pane1height=$(tmux list-panes | grep "^1:" | awk '{print $2}'| sed -e 's/.*x//' -e 's/\]//') | |
resizeNum=$(expr $pane1height - 24) | |
if [ $resizeNum -lt 0 ]; then | |
resizeNum=$(expr 0 - $resizeNum) | |
tmux resize-pane -U -t 1 $resizeNum | |
else | |
tmux resize-pane -D -t 1 $resizeNum | |
fi | |
tmux select-pane -t 0 | |
tmux split-window -v -t soekrii "ssh -t root@newton 'sw station_1'" | |
################################################################################ | |
# second column window heights | |
tmux select-pane -t 3 | |
tmux split-window -v -t soekrii "ssh -t root@newton 'sw station_5'" | |
pane4height=$(tmux list-panes | grep "^4:" | awk '{print $2}'| sed -e 's/.*x//' -e 's/\]//') | |
resizeNum=$(expr $pane4height - 24) | |
if [ $resizeNum -lt 0 ]; then | |
resizeNum=$(expr 0 - $resizeNum) | |
tmux resize-pane -U -t 4 $resizeNum | |
else | |
tmux resize-pane -D -t 4 $resizeNum | |
fi | |
tmux select-pane -t 3 | |
tmux split-window -v -t soekrii "ssh -t root@newton 'sw station_4'" | |
################################################################################ | |
# third column windo tmux select-pane -t 6 | |
tmux split-window -v -t soekrii "ssh -t root@newton 'sw station_8'" | |
pane7height=$(tmux list-panes | grep "^7:" | awk '{print $2}'| sed -e 's/.*x//' -e 's/\]//') | |
resizeNum=$(expr $pane7height - 24) | |
if [ $resizeNum -lt 0 ]; then | |
resizeNum=$(expr 0 - $resizeNum) | |
tmux resize-pane -U -t 7 $resizeNum | |
else | |
tmux resize-pane -D -t 7 $resizeNum | |
fi | |
tmux select-pane -t 6 | |
tmux split-window -v -t soekrii "ssh -t root@newton 'sw station_7'" | |
# | |
# tmux split-window -v /home/jameswhite/bin/playmusic | |
# | |
# pane2height=$(tmux list-panes | grep "^2:" | awk '{print $2}'| sed -e 's/.*x//' -e 's/\]//') | |
# resizeNum=$(expr $pane2height - 24) | |
# tmux resize-pane -U -t 2 $resizeNum | |
# | |
fi | |
tmux select-pane -t 0 | |
tmux -2 attach-session -t soekrii | |
w heights |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment