Skip to content

Instantly share code, notes, and snippets.

@doubleedesign
Created February 4, 2024 06:21
Show Gist options
  • Save doubleedesign/ac9b08245ea442e98390678fffc70cf9 to your computer and use it in GitHub Desktop.
Save doubleedesign/ac9b08245ea442e98390678fffc70cf9 to your computer and use it in GitHub Desktop.
# ZSH Theme based on Solus (https://gist.github.com/cloudnull/4cc7890acaae6cb809e811e09e9eaade#file-solus-zsh-theme)
# Modified with custom colours
# See https://coderwall.com/p/pb1uzq/z-shell-colors for colour codes
if [[ $UID -eq 0 ]]; then
local user_symbol='%F{196}#%f'
else
local user_symbol='%F{226}$%f'
fi
local return_code="%(?..%F{196}%? ↵%f)"
local user_host='%F{81}%n%f%F{245}@%F{206}%m%f '
local current_dir='%F{135}%~ %b%f'
local git_branch='$(git_prompt_info)'
local rvm_ruby='$(ruby_prompt_info)'
local venv_prompt='$(virtualenv_prompt_info)'
ZSH_THEME_RVM_PROMPT_OPTIONS="i v g"
PROMPT="╭─${user_host}${current_dir}${rvm_ruby}${git_branch}
╰─➤ ${venv_prompt} ${user_symbol} "
RPROMPT="${return_code}"
ZSH_THEME_GIT_PROMPT_PREFIX="%F{154}% ‹"
ZSH_THEME_GIT_PROMPT_SUFFIX="›%f"
ZSH_THEME_RUBY_PROMPT_PREFIX="%F{154}% ("
ZSH_THEME_RUBY_PROMPT_SUFFIX=")%f"
ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX="%F{202}% ("
ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX=")%f"
ZSH_THEME_VIRTUALENV_PREFIX=$ZSH_THEME_VIRTUAL_ENV_PROMPT_PREFIX
ZSH_THEME_VIRTUALENV_SUFFIX=$ZSH_THEME_VIRTUAL_ENV_PROMPT_SUFFIX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment