Last active
December 7, 2021 23:35
-
-
Save igolden/b13f9353014327743137 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @igolden 2021 | |
AT_SYMBOL="@" | |
IN_SYMBOL="" | |
ON_SYMBOL="" | |
SYMBOL="$" | |
USER_COLOR="%F{178}" | |
DEVICE_COLOR="%F{039}" | |
DIR_COLOR="%F{220}" | |
BRANCH_COLOR="%F{001}" | |
TIME_COLOR="%F{033}" | |
username() { | |
echo "$USER_COLOR%n%f" | |
} | |
# Returns device name | |
device() { | |
echo "$DEVICE_COLOR%m%f" | |
} | |
# The current directory | |
directory() { | |
echo "$DIR_COLOR%~%f" | |
} | |
# Current time with milliseconds | |
current_time() { | |
echo "$TIME_COLOR%*%f" | |
} | |
# Return status of the last command | |
return_status() { | |
echo "%(?..%F{001}out %?)%f" | |
} | |
# Set the git_prompt_info text | |
ZSH_THEME_GIT_PROMPT_PREFIX="${BRANCH_COLOR}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%f" | |
ZSH_THEME_GIT_PROMPT_DIRTY="" | |
ZSH_THEME_GIT_PROMPT_CLEAN="" | |
# %B and %b make the text bold | |
precmd () { | |
PROMPT="%b$(username)$AT_SYMBOL$(device):$(directory)%b $SYMBOL " | |
RPROMPT="$(git_prompt_info) %j [$(current_time)]" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment