From f6a4a0103897fcaedc2158290e63a167351c3189 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Mon, 4 Nov 2024 21:05:07 +0100 Subject: Use a constant for zsh prompt hostname color --- zsh/custom/themes/mediocregopher.zsh-theme | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/zsh/custom/themes/mediocregopher.zsh-theme b/zsh/custom/themes/mediocregopher.zsh-theme index 529f46b..dd030e4 100644 --- a/zsh/custom/themes/mediocregopher.zsh-theme +++ b/zsh/custom/themes/mediocregopher.zsh-theme @@ -1,14 +1,6 @@ #!/usr/bin/env zsh -# Unique string based on hostname -sha1=$(echo $(hostname) | sha1sum | awk '{print $1}' | grep -oP '[0-9a-f]{8}' | head -n1) -# Turn sha1 into int -asint=$(printf "%d" 0x$sha1) - -colorint=$(printf "%03d" $(expr $asint % 255)) -color=$FG[$colorint] - -PROMPT='%{$color%} %~%{$reset_color%}$(git_prompt_info)$(git_prompt_status)%{$reset_color%} :: ' +PROMPT='%{$fg[blue]%} %~%{$reset_color%}$(git_prompt_info)$(git_prompt_status)%{$reset_color%} :: ' ZSH_THEME_GIT_PROMPT_PREFIX=" ::%{$fg[green]%} " ZSH_THEME_GIT_PROMPT_SUFFIX="" -- cgit v1.2.3