From 51bd33d7aba613e9fddb3791710529edbe2d8db5 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 15 Jul 2026 18:13:39 -0700 Subject: [PATCH] Keep tmux cursor colour on theme after apps reset it Apps like nvim clear the per-pane cursor colour with OSC 112, which made tmux reset the outer terminal's cursor. Terminals that can't reload their config (foot) then restore the cursor colour from whatever theme was active at launch, leaving a mix of old and new cursor colours across panes. Set the global cursor-colour option as a fallback so cleared panes land on the current theme instead. Co-Authored-By: Claude Fable 5 --- bin/omarchy-theme-set-tmux | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bin/omarchy-theme-set-tmux b/bin/omarchy-theme-set-tmux index 07fb6481..d2e0e0e5 100755 --- a/bin/omarchy-theme-set-tmux +++ b/bin/omarchy-theme-set-tmux @@ -56,17 +56,26 @@ theme_color() { } sync_tmux_window_style() { - local background foreground + local background foreground cursor [[ -f $COLORS_TOML ]] || return foreground=$(theme_color foreground) background=$(theme_color background) + cursor=$(theme_color cursor) [[ -n $foreground && -n $background ]] || return tmux set-option -g window-style "fg=$foreground,bg=$background" 2>/dev/null || true tmux set-option -g window-active-style "fg=$foreground,bg=$background" 2>/dev/null || true + + # Apps like nvim clear the per-pane cursor colour with OSC 112. Without a + # global fallback, tmux then resets the outer terminal's cursor, which in + # terminals that can't reload their config (foot) restores the colour from + # whatever theme was active when the terminal launched. + if [[ -n $cursor ]]; then + tmux set-option -g cursor-colour "$cursor" 2>/dev/null || true + fi } sync_tmux_pane_colors() {