From d520b8d5056e38e11072261392bcce3704578e71 Mon Sep 17 00:00:00 2001 From: Corey Smith Date: Thu, 17 Jul 2025 21:51:51 -0700 Subject: [PATCH] Add docker and hostname --- makehome.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/makehome.sh b/makehome.sh index 5a35d8a..5b76fc3 100644 --- a/makehome.sh +++ b/makehome.sh @@ -34,7 +34,7 @@ set -g status-interval 5 # Add a space to the beginning of the status bar # This keeps the default session name '[#S]' and adds a space before it set -g status-left-length 300 -set -g status-left ' #[bold]  #{session_name}#[nobold] | #{user}@#{host} | #(curl -s ifconfig.me) | ' +set -g status-left ' #[bold]  #{session_name}#[nobold] | #{user}@#{host} | #(curl -s ifconfig.me) | #(if docker info >/dev/null 2>&1; then echo " $(docker ps -q | wc -l)/$(docker ps -aq | wc -l)"; else echo "#[fg=red] down#[default]"; fi) | ' # Add a space to the end of the status bar # This keeps the default hostname and date/time, and adds a space after @@ -164,7 +164,7 @@ fi # Automatically start tmux if not already running in an interactive session if [[ -z "$TMUX" ]] && [[ "$-" == *i* ]]; then - tmux attach -t Default || tmux new -s Default + tmux attach -t "$HOSTNAME" || tmux new -s "$HOSTNAME" fi EOF