Use Build Configs for configuration files

This commit is contained in:
Oliver Davies 2024-01-29 22:05:52 +00:00 committed by Oliver Davies
parent 568451806e
commit 4c1c13e0e5
11 changed files with 237 additions and 84 deletions

14
.tmux
View file

@ -1,7 +1,5 @@
#!/usr/bin/env bash
# Based on https://github.com/opdavies/dotfiles/blob/main/bin/t.
set -o errexit
set -o nounset
@ -9,21 +7,21 @@ session_name="${1:-atdc}"
session_path="${2:-$(pwd)}"
if tmux has-session -t="${session_name}" 2> /dev/null; then
tmux attach -t "${session_name}"
exit
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, server, shell
# 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" "php -S 0.0.0.0:9000 -t web" Enter
tmux split-pane -t "${session_name}:vim" -c "${session_path}" -v
tmux send-keys -t "${session_name}:vim.bottom-right" "./run test && watch-changes web/modules/custom ./run test" Enter
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