Replace .tmux with tmuxinator

This commit is contained in:
Oliver Davies 2024-03-30 22:15:05 +00:00
parent 1418a2333f
commit 0ff3724c58
2 changed files with 6 additions and 23 deletions

23
.tmux
View file

@ -1,23 +0,0 @@
#!/usr/bin/env bash
set -o errexit
set -o nounset
session_name="${1:-dotfiles-nix}"
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
# 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"

6
.tmuxinator.yaml Normal file
View file

@ -0,0 +1,6 @@
name: dotfiles-nix
root: .
windows:
- vim: nvim
- shell: