special prompt for smaller screens like a phone

This commit is contained in:
Nicole O'Connor 2020-10-21 23:03:05 -07:00
parent c8733f1cf1
commit c25175f511

View File

@ -2,7 +2,23 @@ source ~/.local/share/zeesh/base/zeesh.zsh
ticker_message "zeesh: bootstrap" ticker_message "zeesh: bootstrap"
cols=$(stty -a | grep -Po '(?<=columns )\d+')
if [[ $cols -lt 80 ]]; then
echo "debug: $cols"
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%}" PROMPT="%{$fg_bold[cyan]%}%n%{$fg_bold[white]%}@%{$fg_bold[magenta]%}%m %{$fg_bold[white]%}%~ %# %{$reset_color%}"
fi
TMOUT=60
TRAPALRM () {
zle reset-prompt
}
source ~/.local/share/zeesh/base/precmd.zsh source ~/.local/share/zeesh/base/precmd.zsh
source ~/.local/share/zeesh/base/updates.zsh source ~/.local/share/zeesh/base/updates.zsh