UCL-ARC / swc-shell-split-window

Script to split the shell using tmux
MIT License
36 stars 16 forks source link
software-carpentry split-window terminal tool tooling

Software Carpentry Shell Split Window

This is a script to split window for the shell lesson.

License

Under MIT.

Requirement

Use

$ ./swc-shell-split-window.sh

Various environment variables affect the behaviour of the script, these are:

These can be used with, e.g.:

LOG_FILE=/tmp/log HISTORY_LINES=10 ./swc-shell-split-window.sh

Notes

Mouse scrolling

To enable mouse scrolling of the output edit $HOME/.tmux.conf to include the line:

setw -g mouse on

Background colours

You may wish to set the background color of a session in case you have to role play to different people. This comes in handy if, for instance, you are teaching about Git Conflicts.

To do so, you would want to start to sessions in separate terminal windows with, e.g.:

SESSION=swc1 BGCOLOR=12 ./swc-shell-split-window.sh
SESSION=swc2 BGCOLOR=90 ./swc-shell-split-window.sh

You can print all the available colours using:

for i in {0..255}; do
    printf "\x1b[38;5;${i}mcolour${i}\x1b[0m\n"
done

Screenshot

Screenshot of swc-shell-split-window