summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AGENTS.md2
-rw-r--r--config/alacritty/alacritty.toml8
-rw-r--r--config/alacritty/mux.toml26
3 files changed, 31 insertions, 5 deletions
diff --git a/AGENTS.md b/AGENTS.md
index 64d3b52..bfdce1a 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -172,7 +172,7 @@ tracked config says so, and in no repo:
| `~/.config/hammerspoon/local.lua` | Hammerspoon: rebinding a hotkey set here shadows it, and `capslock_off()` gives this machine its Caps Lock back. `require("dotlib")` for the same helpers init.lua uses. See `config/hammerspoon/local-example.lua` | `config/hammerspoon/init.lua`, last, in a `pcall` |
| `~/.tmux.conf.local` | tmux, this host only: loaded last, so it can override anything, colours included | `config/tmux.conf`, last, with `source-file -q` |
| `~/.config/ghostty-local` | Ghostty: later values replace earlier ones, `keybind` accumulates. See `config/ghostty/ghostty-local-example` | `config/ghostty/config`, last, as an optional `config-file` |
-| `~/.local/share/alacritty/local.toml` | Alacritty | imported by `config/alacritty/alacritty.toml` |
+| `~/.local/share/alacritty/local.toml` | Alacritty. To change the mux a window opens in, `[terminal] shell = "/path/to/launcher"` -- the string form, since a `[terminal.shell]` table appends its args to the default's. See `config/alacritty/mux.toml` | imported by `config/alacritty/alacritty.toml`, after `mux.toml` |
| `~/.config/dot/skip` | which `link/` parts this machine does not want, one name per line | `link/lib.sh`, as each part starts |
| `~/.config/dot/inbox-key` | the key this machine signs change requests with | `bin/dot-request` |
| `~/.config/pi/models.d/*.json` | pi providers only this machine has -- a model served somewhere other than a vendor's own API | `link/pi.sh`, merged over `config/pi/models.json` |
diff --git a/config/alacritty/alacritty.toml b/config/alacritty/alacritty.toml
index bc6882d..1ac7b9a 100644
--- a/config/alacritty/alacritty.toml
+++ b/config/alacritty/alacritty.toml
@@ -14,10 +14,6 @@ history = 0
[selection]
semantic_escape_chars = ",│`|:\"' ()[]{}<>"
-[terminal.shell]
-args = ["--login", "-ic", "exec tmux new-session -As 0 -f ~/.tmux.conf"]
-program = "/bin/zsh"
-
[env]
term = "xterm-256color"
@@ -37,6 +33,10 @@ option_as_alt = "OnlyLeft"
[general]
import = [
+ # The mux every window starts in, tmux by default. Before local.toml, so a
+ # machine can replace it there -- with the string form, see mux.toml for
+ # why. Relative, so it resolves beside this file on either home layout.
+ "mux.toml",
"/Users/sz/.local/share/alacritty/local.toml",
"/home/sz/.local/share/alacritty/local.toml",
"/Users/sz/.local/share/alacritty/color.toml",
diff --git a/config/alacritty/mux.toml b/config/alacritty/mux.toml
new file mode 100644
index 0000000..93f6259
--- /dev/null
+++ b/config/alacritty/mux.toml
@@ -0,0 +1,26 @@
+# The multiplexer every Alacritty window starts in or attaches to, shared
+# default: tmux, the same launch as config/ghostty/config.
+#
+# In its own import, listed first, rather than inline in alacritty.toml,
+# because of how Alacritty merges config (v0.17.0, alacritty/src/config/):
+# imports merge in list order, later ones winning, and the importing file is
+# merged last and beats all of them -- `merge(imports, config)`. An inline
+# [terminal.shell] could never be overridden from an import.
+#
+# To replace it on one machine, in ~/.local/share/alacritty/local.toml, use
+# the string form, pointing at an executable that takes no arguments:
+#
+# [terminal]
+# shell = "/Users/me/.local/bin/my-mux"
+#
+# NOT a [terminal.shell] table with its own args. Alacritty's merge appends
+# arrays rather than replacing them (serde_utils.rs: base.append), so that
+# machine's args would land after these, zsh would run the first -c, and the
+# window would still open in tmux, with no error. A string replaces the whole
+# table, args and all.
+#
+# A missing local.toml is skipped, and every window starts here, as before.
+
+[terminal.shell]
+args = ["--login", "-ic", "exec tmux new-session -As 0 -f ~/.tmux.conf"]
+program = "/bin/zsh"