Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small startup script tidying #18

Open
wants to merge 2 commits into
base: canon
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions iipod-startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,27 @@
set -x

# Caclulate vars needod for REPO and ORGFILE
REPO_DIR=$(basename $GIT_REPO | sed 's:.git$::')
GIT_REPO_SSH=$(echo $GIT_REPO | sed 'sXhttps://Xgit@X' | sed 'sX/X:X')
ORGFILE=$(basename "$ORGFILE_URL")
REPO_DIR="$(basename "$GIT_REPO" | sed 's:.git$::')"
GIT_REPO_SSH="$(echo "$GIT_REPO" | sed 'sXhttps://Xgit@X' | sed 'sX/X:X')
ORGFILE="$(basename "$ORGFILE_URL")"

echo "Starting TMUX session: $SPACE_NAME:iipod"
tmux new -d -s $SPACENAME -n "iipod"
tmux new -d -s "$SPACENAME" -n "iipod"
tmux send-keys -t "$SPACENAME:iipod" "
wget $ORGFILE_URL
git clone $GIT_REPO
wget "$ORGFILE_URL"
git clone "$GIT_REPO"
cd "$REPO_DIR"
# ensure we can git push via ssh
mkdir -p ~/.ssh
ssh-keyscan -H github.com >>~/.ssh/known_hosts
git remote add ssh $GIT_REPO_SSH
git remote add ssh "$GIT_REPO_SSH"
"

echo "Starting TMUX session: $SPACE_NAME:emacs"
tmux new-window -d -t $SPACENAME -n "emacs"
tmux new-window -d -t "$SPACENAME" -n "emacs"
tmux send-keys -t "$SPACENAME:emacs" "
sleep 15
emacsclient -nw $ORGFILE
emacsclient -nw "$ORGFILE"
"

echo "Starting TMUX session: servers:ii"
Expand All @@ -33,7 +34,7 @@ echo These windows contain the services supporting your iipod
echo "Starting TMUX session: servers:ttyd"
tmux new-window -d -t "servers" -n "ttyd"
tmux send-keys -t "servers:ttyd" "
ttyd --writable tmux at -t $SPACENAME
ttyd --writable tmux at -t "$SPACENAME"
"

echo "Starting TMUX session: servers:web-server"
Expand All @@ -59,7 +60,7 @@ tmux new-window -d -t "servers" -n "emacs-pgtk"
tmux send-keys -t "servers:emacs-pgtk" "
export GDK_BACKEND=broadway
export BROADWAY_DISPLAY=:5
emacs $ORGFILE
emacs "$ORGFILE"
"

echo "Starting TMUX session: servers:novnc"
Expand All @@ -76,7 +77,7 @@ tmux new-window -d -t "servers" -n "tigervnc"
tmux send-keys -t "tigervnc" "
unset GDK_BACKEND # must not be set when using X
export PATH=/usr/local/stow/emacs-x/bin:$PATH
tigervncserver :1 -desktop $SESSION_NAME -SecurityTypes None -xstartup startplasma-x11
tigervncserver :1 -desktop "$SESSION_NAME" -SecurityTypes None -xstartup startplasma-x11
export DISPLAY=:1
setterm blank 0
setterm powerdown 0
Expand Down