Created
March 26, 2021 14:52
-
-
Save raek/ff64a084e146fe339e34de3b49506091 to your computer and use it in GitHub Desktop.
Script to create a new tmux session with the following windows: 0 = shared weechat window, 1 = emacs, 2 = bash
This file contains hidden or 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
| #!/usr/bin/env bash | |
| if (( $# != 1 )); then | |
| echo "Usage: $0 <session-name>" | |
| exit 1 | |
| fi | |
| session_name="$1" | |
| shift | |
| tmux new-session -d -s "$session_name" | |
| tmux move-window -d -s "$session_name":0 -t "$session_name":2 | |
| tmux link-window -d -s weechat:0 -t "$session_name":0 | |
| tmux new-window -d -n emacs -t "$session_name":1 emacsclient -t |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment