Configure tmuxinator

This commit is contained in:
Oliver Davies 2024-03-26 23:33:50 +00:00
parent 5a2008c5a5
commit 356ce143bc
2 changed files with 10 additions and 27 deletions

27
.tmux
View file

@ -1,27 +0,0 @@
#!/usr/bin/env bash
set -o errexit
set -o nounset
session_name="${1:-oliverdavies-uk}"
session_path="${2:-$(pwd)}"
if tmux has-session -t="${session_name}" 2> /dev/null; then
tmux attach -t "${session_name}" ||
tmux switch-client -t "${session_name}"
fi
tmux new-session -d -s "${session_name}" -n vim -c "${session_path}"
# 1. Main window: Vim.
tmux send-keys -t "${session_name}:vim" "nvim" Enter
tmux split-pane -t "${session_name}:vim" -h -c "${session_path}" -p 40
tmux send-keys -t "${session_name}:vim.right" "./run start" Enter
# 2. General shell use.
tmux new-window -t "${session_name}" -c "${session_path}"
tmux switch-client -t "${session_name}:vim.left" ||
tmux attach -t "${session_name}:vim.left"
# vim: ft=bash

10
.tmuxinator.yml Normal file
View file

@ -0,0 +1,10 @@
name: oliverdavies-uk
root: .
windows:
- vim: nvim
- workers:
panes:
- ./run start
- ./run npm:build:css
- shell: