From 7f0049952bba4ef0e22bf25dc85da6cdfe38f104 Mon Sep 17 00:00:00 2001 From: Igor Soarez Date: Mon, 21 Sep 2026 17:41:45 +0300 Subject: hammerspoon, ghostty: example files for their machine-local configs ssh and git each ship one; these two hooks were discoverable only by reading the config that loads them. Both examples carry what is easy to get wrong: init.lua's hotkey() helper and mod tables are locals, so a local.lua calls hs.hotkey.bind directly, and a binding there can only be shadowed, never deleted; in Ghostty a single-value key replaces while keybind accumulates, and `ignore` is how a binding is switched off rather than added to. Checked rather than assumed: the lua parses, and the Ghostty example validates and, dropped in as ~/.config/ghostty-local, does what it says -- font-size, command and background-opacity replaced, super+shift+n added, alt+enter turned off. --- config/ghostty/ghostty-local-example | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 config/ghostty/ghostty-local-example (limited to 'config/ghostty') diff --git a/config/ghostty/ghostty-local-example b/config/ghostty/ghostty-local-example new file mode 100644 index 0000000..98bdb02 --- /dev/null +++ b/config/ghostty/ghostty-local-example @@ -0,0 +1,25 @@ +# Example ~/.config/ghostty-local: Ghostty for one machine only. +# +# Not linked and never synced -- write it by hand where it is wanted. It cannot +# sit beside this file: link.sh links this whole directory, so ~/.config/ghostty +# is the checkout itself. config/ghostty/config reads it last, as an optional +# `config-file`, so a machine without one is not an error. +# +# Read last means: a single-value key here replaces the one set there, the +# theme's colours included; `keybind` accumulates instead, so a binding here is +# added to those. Reload with cmd-shift-, or restart Ghostty. + +# Single-value keys replace. +font-size = 14 +background-opacity = 0.95 + +# Start a plain shell instead of the tmux session config/ghostty/config asks +# for. --login runs ~/.zprofile, which is what restores PATH order after macOS +# rebuilds it; -i runs ~/.zshrc, for the prompt, keybindings and completions. +command = /bin/zsh --login -i + +# keybind accumulates, so this is added to the ones already set. +keybind = super+shift+n=new_window + +# To switch one off rather than add: bind it to `ignore`. +keybind = alt+enter=ignore -- cgit v1.2.3