28 lines
937 B
Plaintext
Executable File
28 lines
937 B
Plaintext
Executable File
# Change to the 'discworld-tintin' directory and remove the input history file
|
|
cd "$( dirname -- "$( readlink -f -- "$0"; )"; )"
|
|
rm logs/history.log
|
|
|
|
# Set hotkeys to switch in/out of "mobile" mode
|
|
tmux bind C-f resize-pane -x 80%
|
|
tmux bind C-g resize-pane -x 100%
|
|
|
|
# No existing discworld session? Then create one
|
|
if [[ ! $(tmux ls -F '#S') =~ discworld ]]; then
|
|
# Flag that we've just created a session
|
|
DISC_SESSION_CREATE=1
|
|
|
|
# Zero out log files to keep size down
|
|
rm logs/chat.log && touch logs/chat.log
|
|
|
|
# Start a new tmux session named "discworld" with our tmuxp setup
|
|
tmuxp load -s discworld ./discworld2.yaml
|
|
fi
|
|
|
|
# If there is already a session, just attach
|
|
if [ -z "$TMUX" ]; then
|
|
#tmux send-keys 'clear && tt++ -G config.tin' 'C-m'
|
|
echo "Not already in TMUX, so let's attach"
|
|
# If we aren't already inside of TMUX, then attach to our session
|
|
tmux -2 attach-session -t discworld -d
|
|
fi
|