mirror of
https://github.com/opdavies/build-configs.git
synced 2025-01-22 18:27:31 +00:00
Add tmuxinator configuration
This commit is contained in:
parent
5957e20d63
commit
f55e19b6b7
24
.tmux
24
.tmux
|
@ -1,24 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
|
||||
session_name="${1:-'build-configs'}"
|
||||
session_path="${2:-$(pwd)}"
|
||||
|
||||
if tmux has-session -t="${session_name}" 2> /dev/null; then
|
||||
tmux switch-client -t "${session_name}" 2> /dev/null ||
|
||||
tmux attach -t "${session_name}"
|
||||
exit
|
||||
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.yml
Normal file
6
.tmuxinator.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
name: build-configs
|
||||
root: .
|
||||
|
||||
windows:
|
||||
- vim: nvim
|
||||
- shell:
|
Loading…
Reference in a new issue