Feat/shell tmux git tooling #20

Merged
lyrathorpe merged 16 commits from feat/shell-tmux-git-tooling into main 2026-06-10 14:40:40 +01:00
Showing only changes of commit af8ee1609b - Show all commits
+11 -1
View File
@@ -66,9 +66,11 @@
# not SSH -> don't force inbound SSH logins into a server tmux # not SSH -> don't force inbound SSH logins into a server tmux
# not VS Code -> its integrated terminal manages itself # not VS Code -> its integrated terminal manages itself
# tmux on PATH -> a failed exec would otherwise kill the login shell # tmux on PATH -> a failed exec would otherwise kill the login shell
# $NO_TMUX unset -> escape hatch: `NO_TMUX=1 <term>` opens a bare shell
(lib.mkOrder 200 '' (lib.mkOrder 200 ''
if [[ $- == *i* ]] \ if [[ $- == *i* ]] \
&& [[ -z "$TMUX" ]] \ && [[ -z "$TMUX" ]] \
&& [[ -z "$NO_TMUX" ]] \
&& [[ -z "$SSH_CONNECTION" && -z "$SSH_TTY" ]] \ && [[ -z "$SSH_CONNECTION" && -z "$SSH_TTY" ]] \
&& [[ "$TERM_PROGRAM" != "vscode" ]] \ && [[ "$TERM_PROGRAM" != "vscode" ]] \
&& command -v tmux >/dev/null 2>&1; then && command -v tmux >/dev/null 2>&1; then
@@ -139,7 +141,11 @@
programs.tmux = { programs.tmux = {
enable = true; enable = true;
reverseSplit = true; reverseSplit = true;
terminal = "tmux-direct"; # tmux-256color (not tmux-direct): the standard inside-tmux terminfo.
# tmux-direct's capabilities desync zsh's line redraw on some terminals
# (e.g. iTerm2 -> duplicated chars on Tab, stray newlines). Truecolor is
# advertised per outer terminal via the RGB terminal-features below.
terminal = "tmux-256color";
newSession = true; newSession = true;
keyMode = "vi"; keyMode = "vi";
historyLimit = 500000; historyLimit = 500000;
@@ -187,6 +193,10 @@
bind -n M-Up select-pane -U bind -n M-Up select-pane -U
bind -n M-Down select-pane -D bind -n M-Down select-pane -D
# Truecolor for the outer terminals (foot reports xterm-ish too; iTerm2 is
# xterm-256color). Without this, with tmux-256color as default-terminal,
# 24-bit colour would be quantised to 256.
set -as terminal-features ",xterm-256color:RGB"
# Tell tmux which capabilities the foot terminal supports, so truecolor, # Tell tmux which capabilities the foot terminal supports, so truecolor,
# synchronised output, the system clipboard (OSC 52), window titles and # synchronised output, the system clipboard (OSC 52), window titles and
# cursor styling all pass through. # cursor styling all pass through.