From c19387917a42c5f1e6e6550993300b3d345e8cb4 Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Thu, 8 Oct 2026 11:41:44 -0400 Subject: [PATCH] refactor(cli): simplify tmux session handling and include mise shims --- dot_local/bin/executable_ghostty-tmux | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/dot_local/bin/executable_ghostty-tmux b/dot_local/bin/executable_ghostty-tmux index 4d5e6f3..0881475 100755 --- a/dot_local/bin/executable_ghostty-tmux +++ b/dot_local/bin/executable_ghostty-tmux @@ -6,18 +6,14 @@ # after boot starts the server, which is what triggers continuum's restore. # ponytail: two windows opened in the same instant can claim the same detached # session; take a lock (flock) here if that ever bites. -# -# The session's @tab-bg is set to Ghostty's own background (its theme, not -# Omarchy's), so the tab arrows tmux paints in that color match the window. + +# A server started here inherits this PATH. Ghostty launched from the desktop +# has no shell init, so add mise's shims for tools tmux plugins shell out to +# (bun for tmux-palette, fzf, zoxide). +[[ -d $HOME/.local/share/mise/shims ]] && PATH="$HOME/.local/share/mise/shims:$PATH" oldest=$(tmux list-sessions -f '#{==:#{session_attached},0}' \ -F '#{session_created} #{session_name}' 2>/dev/null | sort -n | head -1 | cut -d' ' -f2-) -bg=$(ghostty +show-config 2>/dev/null | sed -n 's/^background = //p') -set_bg=() -[[ -n $bg ]] && set_bg=(\; set-option @tab-bg "$bg") - -if [[ -n $oldest ]]; then - exec tmux attach-session -t "=$oldest" "${set_bg[@]}" -fi -exec tmux new-session "${set_bg[@]}" +[[ -n $oldest ]] && exec tmux attach-session -t "=$oldest" +exec tmux new-session