From e019a60b4e6defde11933db22203a999979f5482 Mon Sep 17 00:00:00 2001 From: 0xrsydn Date: Mon, 2 Nov 2026 19:45:57 +0700 Subject: [PATCH] feat(rex): make Rex Beta the default terminal --- modules/darwin/home/programs/aerospace/modes.nix | 5 +++-- modules/darwin/home/programs/aerospace/user-settings.nix | 7 ++++++- modules/home/shell/tmux.nix | 1 + modules/home/shell/zsh.nix | 6 ++++++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/modules/darwin/home/programs/aerospace/modes.nix b/modules/darwin/home/programs/aerospace/modes.nix index 9473248..a5d2403 100644 --- a/modules/darwin/home/programs/aerospace/modes.nix +++ b/modules/darwin/home/programs/aerospace/modes.nix @@ -19,7 +19,8 @@ "alt-comma" = "layout accordion horizontal vertical"; "alt-space" = "layout floating tiling"; - "alt-enter" = ''exec-and-forget open -na "kitty"''; + # Rex is a single app, so open focuses it. Cmd+N in Rex opens a new window. + "alt-enter" = ''exec-and-forget open -a "Rex Beta"''; "alt-backspace" = "close"; "alt-tab" = "workspace-back-and-forth"; @@ -33,7 +34,7 @@ // workspaceSendBindings; float.binding = { - enter = ''exec-and-forget open -na "kitty" && aerospace layout floating''; + enter = ''exec-and-forget open -a "Rex Beta" && aerospace layout floating''; i = [ ''exec-and-forget open -na "iTerm.app"'' "layout floating" diff --git a/modules/darwin/home/programs/aerospace/user-settings.nix b/modules/darwin/home/programs/aerospace/user-settings.nix index 7bf3c36..4a087c2 100644 --- a/modules/darwin/home/programs/aerospace/user-settings.nix +++ b/modules/darwin/home/programs/aerospace/user-settings.nix @@ -32,7 +32,12 @@ "if".window-title-regex-substring = "pet|hatch"; run = "layout floating"; } - # Exception: Kitty on workspace 5 floats + # Exception: Rex and Kitty on workspace 5 float + { + "if".app-id = "com.superlogical.rex"; + "if".workspace = "5"; + run = "layout floating"; + } { "if".app-id = "net.kovidgoyal.kitty"; "if".workspace = "5"; diff --git a/modules/home/shell/tmux.nix b/modules/home/shell/tmux.nix index dccae97..6cd8737 100644 --- a/modules/home/shell/tmux.nix +++ b/modules/home/shell/tmux.nix @@ -30,6 +30,7 @@ set-option -g focus-events on # Avoid CSI-u newline remapping that breaks Neovim pastes set -as terminal-features 'xterm-kitty:clipboard,RGB' + set -as terminal-features 'xterm-rex:clipboard,RGB' set -g status-interval 5 setw -g automatic-rename on set -g renumber-windows on diff --git a/modules/home/shell/zsh.nix b/modules/home/shell/zsh.nix index 35cfb2d..4bdddd2 100644 --- a/modules/home/shell/zsh.nix +++ b/modules/home/shell/zsh.nix @@ -53,6 +53,12 @@ "$HOME/.lmstudio/bin" ) + # Rex prepends its own bin dir to PATH, but the fixed list above drops it. + # Keep it first so the CLI matches the running server. Empty outside Rex. + if [ -n "$REX_BIN_DIR" ]; then + path=("$REX_BIN_DIR" $path) + fi + export PATH # kitten ssh refuses to run outside a kitty window.