From 96c7934a83673ebc31fdfaea2249a6e7302761f8 Mon Sep 17 00:00:00 2001 From: Nicole O'Connor Date: Tue, 2 Jul 2024 18:58:53 -0700 Subject: [PATCH] fix prompt builder overriding mobile prompts --- base/prompt.zsh | 18 ++++++++++++++++-- zeesh.zsh | 16 ---------------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/base/prompt.zsh b/base/prompt.zsh index 0f98f1e..df2e017 100644 --- a/base/prompt.zsh +++ b/base/prompt.zsh @@ -20,5 +20,19 @@ function rprompt_builder () { print "${result}" } -PROMPT='$(prompt_builder)' -RPROMPT='$(rprompt_builder)' \ No newline at end of file + +if [[ $cols -lt 80 ]]; then + if [[ $(uname -o) == "Android" ]]; then + hostemoji="📞" + else + hostemoji="🖥" + fi + PROMPT="👤%{$fg_bold[white]%}@${hostemoji} %~ %# %{$reset_color%}" +else + PROMPT='$(prompt_builder)' + RPROMPT='$(rprompt_builder)' +fi +TMOUT=60 +TRAPALRM () { + zle reset-prompt +} \ No newline at end of file diff --git a/zeesh.zsh b/zeesh.zsh index 01ea668..6eee372 100644 --- a/zeesh.zsh +++ b/zeesh.zsh @@ -3,22 +3,6 @@ source ~/.local/share/zeesh/base/zeesh.zsh ticker_message "zeesh: bootstrap" -if [[ $cols -lt 80 ]]; then - if [[ $(uname -o) == "Android" ]]; then - hostemoji="📞" - else - hostemoji="🖥" - fi - PROMPT="👤%{$fg_bold[white]%}@${hostemoji} %~ %# %{$reset_color%}" -#else -# PROMPT="%{$fg_bold[cyan]%}%n%{$fg_bold[white]%}@%{$fg_bold[magenta]%}%m %{$fg_bold[white]%}%~ %# %{$reset_color%}" -# RPROMPT="%(?..%{$fg[red]%}%? )$RPROMPT" -fi -TMOUT=60 -TRAPALRM () { - zle reset-prompt -} - source ~/.local/share/zeesh/base/precmd.zsh source ~/.local/share/zeesh/base/prompt.zsh source ~/.local/share/zeesh/base/updates.zsh