From b605515f05fc3a4cc826abb40edf6274c5cdafcf Mon Sep 17 00:00:00 2001 From: Emma Thorpe Date: Mon, 29 Jun 2026 13:29:25 +0100 Subject: [PATCH] fix(work): guard the kube-tmux status line on the script's presence The tmux status-right shelled out to $HOME/code/kube-tmux/kube.tmux by absolute path; on a checkout without that external repo every status refresh errored. Wrap it in a file-existence test so it degrades quietly. Closes #50 --- users/emmathorpe/work.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/users/emmathorpe/work.nix b/users/emmathorpe/work.nix index 049f047..b435b95 100644 --- a/users/emmathorpe/work.nix +++ b/users/emmathorpe/work.nix @@ -48,8 +48,10 @@ docker = "/run/current-system/sw/bin/docker"; }; programs.tmux = { + # kube-tmux is an external checkout; guard on its presence so the status + # line degrades gracefully (no per-refresh error) when it isn't cloned. extraConfig = '' - set -g status-right "#(/run/current-system/sw/bin/bash $HOME/code/kube-tmux/kube.tmux 250 red black)" + set -g status-right "#(if [ -f $HOME/code/kube-tmux/kube.tmux ]; then /run/current-system/sw/bin/bash $HOME/code/kube-tmux/kube.tmux 250 red black; fi)" ''; }; programs.go = {