Skip to content

Instantly share code, notes, and snippets.

@raek
Created March 26, 2021 14:52
Show Gist options
  • Select an option

  • Save raek/ff64a084e146fe339e34de3b49506091 to your computer and use it in GitHub Desktop.

Select an option

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
#!/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