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
This commit is contained in:
@@ -48,8 +48,10 @@
|
|||||||
docker = "/run/current-system/sw/bin/docker";
|
docker = "/run/current-system/sw/bin/docker";
|
||||||
};
|
};
|
||||||
programs.tmux = {
|
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 = ''
|
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 = {
|
programs.go = {
|
||||||
|
|||||||
Reference in New Issue
Block a user