From 0ff3724c5861e827cb4007a5aafe89d7d6645bac Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sat, 30 Mar 2024 22:15:05 +0000 Subject: [PATCH] Replace .tmux with tmuxinator --- .tmux | 23 ----------------------- .tmuxinator.yaml | 6 ++++++ 2 files changed, 6 insertions(+), 23 deletions(-) delete mode 100755 .tmux create mode 100644 .tmuxinator.yaml diff --git a/.tmux b/.tmux deleted file mode 100755 index 9a2c232..0000000 --- a/.tmux +++ /dev/null @@ -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" diff --git a/.tmuxinator.yaml b/.tmuxinator.yaml new file mode 100644 index 0000000..9760194 --- /dev/null +++ b/.tmuxinator.yaml @@ -0,0 +1,6 @@ +name: dotfiles-nix +root: . + +windows: + - vim: nvim + - shell: