Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ucl-arc/swc-shell-split-window
Script to split the shell using tmux
https://github.com/ucl-arc/swc-shell-split-window
software-carpentry split-window terminal tool tooling
Last synced: 3 months ago
JSON representation
Script to split the shell using tmux
- Host: GitHub
- URL: https://github.com/ucl-arc/swc-shell-split-window
- Owner: UCL-ARC
- License: mit
- Created: 2015-07-11T18:37:57.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-11-25T10:23:08.000Z (about 1 year ago)
- Last Synced: 2024-11-15T21:38:31.211Z (3 months ago)
- Topics: software-carpentry, split-window, terminal, tool, tooling
- Language: Shell
- Homepage:
- Size: 183 KB
- Stars: 36
- Watchers: 25
- Forks: 16
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Software Carpentry Shell Split Window
This is a script to split window for the shell lesson.
## License
Under MIT.
## Requirement
- [tmux](https://tmux.github.io/)
## Use
~~~
$ ./swc-shell-split-window.sh
~~~Various environment variables affect the behaviour of the script, these are:
* `SESSION`: The name of the session (default: swc)
* `LOG_FILE`: The location where the log file will be stored (default: /tmp/swc-split-log-file)
* `HISTORY_LINES`: How many lines of history to be shown (default: 5)
* `BGCOLOR`: Background colour of the sessionThese 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.shYou 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](screenshot.png "Screenshot - only commands appear in top part of the shell, while instructor types in the bottom part and output is interleaved with commands")