From 1676481b5d5d5edb4e37df7324d268f5e276be2c Mon Sep 17 00:00:00 2001 From: "Aaron D. Lee" Date: Sun, 14 Dec 2025 02:57:29 -0500 Subject: [PATCH] Fixed stupid tmux bug. --- tmux/.tmux.conf | 15 ++++++++++++++- zsh/.zshrc | 2 +- zsh/themes/adlee.zsh-theme | 39 ++++++++++++++++++++++---------------- 3 files changed, 38 insertions(+), 18 deletions(-) diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index c89df2b..8bf4565 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -1,4 +1,17 @@ -set-option -g default-shell /usr/bin/zsh +#set-option -g default-shell /usr/bin/zsh +set -g default-command /usr/bin/zsh + + +# Enable RGB colors if your terminal supports it +#set -ga terminal-overrides ",xterm-256color:Tc" +set -g default-terminal "tmux-256color" + +# Fix key bindings +set -g xterm-keys on + +# Ensure proper escape sequence handling +set -sg escape-time 0 + set -g pane-border-format "#{pane_index} #{pane_title}" set -g pane-border-status bottom bind-key U resize-pane -U 8 diff --git a/zsh/.zshrc b/zsh/.zshrc index d7624b4..c349f1e 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -10,7 +10,7 @@ export ZSH="$HOME/.oh-my-zsh" # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes ZSH_THEME="adlee" -zstyle ':omz:alpha:lib:git' async-prompt no +#zstyle ':omz:alpha:lib:git' async-prompt no # Set list of themes to pick from when loading at random # Setting this variable when ZSH_THEME=random will cause zsh to load diff --git a/zsh/themes/adlee.zsh-theme b/zsh/themes/adlee.zsh-theme index aebe9d0..24ceaa5 100644 --- a/zsh/themes/adlee.zsh-theme +++ b/zsh/themes/adlee.zsh-theme @@ -8,34 +8,41 @@ # CONFIGURATION & CONSTANTS # ============================================================================ +setopt PROMPT_SUBST +# Ensure proper line handling in tmux +setopt PROMPT_CR +setopt PROMPT_SP +setopt TYPESET_SILENT +export PROMPT_EOL_MARK='' + # Prevent multiple initialization on reload -if [[ -z "$_ADLEE_THEME_LOADED" ]]; then +if [[ -z "$_ADLEE_THEME_LOADED" || "$TERM" = 'tmux-256color' ]] ; then export _ADLEE_THEME_LOADED=1 export KEYTIMEOUT=1 # Color definitions - typeset -gr COLOR_GREY='%{$FG[239]%}' - typeset -gr COLOR_YELLOW='%{$FG[179]%}' - typeset -gr COLOR_BLUE='%{$FG[069]%}' - typeset -gr COLOR_GREEN='%{$FG[118]%}' - typeset -gr COLOR_RED='%{$FG[196]%}' - typeset -gr COLOR_ORANGE='%{$FG[220]%}' - typeset -gr COLOR_LIGHT_ORANGE='%{$FG[228]%}' - typeset -gr COLOR_LIGHT_GREEN='%{$FG[002]%}' - typeset -gr COLOR_BRIGHT_GREEN='%{$FG[010]%}' - typeset -gr COLOR_RESET='%{$reset_color%}' - typeset -gr COLOR_BOLD='%{$FX[bold]%}' + typeset -g COLOR_GREY='%{$FG[239]%}' + typeset -g COLOR_YELLOW='%{$FG[179]%}' + typeset -g COLOR_BLUE='%{$FG[069]%}' + typeset -g COLOR_GREEN='%{$FG[118]%}' + typeset -g COLOR_RED='%{$FG[196]%}' + typeset -g COLOR_ORANGE='%{$FG[220]%}' + typeset -g COLOR_LIGHT_ORANGE='%{$FG[228]%}' + typeset -g COLOR_LIGHT_GREEN='%{$FG[002]%}' + typeset -g COLOR_BRIGHT_GREEN='%{$FG[010]%}' + typeset -g COLOR_RESET='%{$reset_color%}' + typeset -g COLOR_BOLD='%{$FX[bold]%}' # Prompt characters - typeset -gr PROMPT_CHAR_USER="${COLOR_GREY}└${COLOR_BOLD}${COLOR_BLUE}%#${COLOR_RESET} " - typeset -gr PROMPT_CHAR_ROOT="${COLOR_GREY}└${COLOR_BOLD}${COLOR_RED}%#${COLOR_RESET} " + typeset -g PROMPT_CHAR_USER="${COLOR_GREY}└${COLOR_BOLD}${COLOR_BLUE}%#${COLOR_RESET} " + typeset -g PROMPT_CHAR_ROOT="${COLOR_GREY}└${COLOR_BOLD}${COLOR_RED}%#${COLOR_RESET} " # Path truncation threshold - typeset -gr PATH_TRUNCATE_LENGTH=32 + typeset -g PATH_TRUNCATE_LENGTH=32 # Timer threshold (seconds) - typeset -gr TIMER_THRESHOLD=10 + typeset -g TIMER_THRESHOLD=10 fi # ============================================================================