Created
October 14, 2022 11:56
-
-
Save ePirat/2c4e7cde3ed7b40b0081fa839cc72915 to your computer and use it in GitHub Desktop.
This file contains 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
# Load git info module | |
autoload -Uz vcs_info | |
# Configure git info | |
local fmt_vcs_status='%F{yellow}‹%b%f%u%c%F{yellow}›%f' | |
zstyle ':vcs_info:*' enable git | |
zstyle ':vcs_info:git:*' check-for-changes true | |
zstyle ':vcs_info:git:*' unstagedstr '%F{red}●%f' | |
zstyle ':vcs_info:git:*' stagedstr '%F{green}+%f' | |
zstyle ':vcs_info:git:*' patch-format ' %p %n/%a' | |
zstyle ':vcs_info:git:*' actionformats "${fmt_vcs_status} [%a%m]" | |
zstyle ':vcs_info:git:*' formats "${fmt_vcs_status}" | |
precmd() { vcs_info } | |
prompt_likebira_setup() { | |
# Prompt (inspired by Oh my ZSHs Bira theme) | |
local return_code='%(?..%F{red}%? ↵%f)' | |
local user_host='%B%(!.%F{red}.%F{green})%n@%m%f%b ' | |
local user_symbol='%(!.#.$)' | |
local current_dir='%B%F{blue}%~ %f%b' | |
setopt prompt_subst | |
PROMPT='╭─${user_host}${current_dir}${vcs_info_msg_0_} | |
╰─%B%#%b ' | |
RPROMPT="%B${return_code}%b" | |
} | |
# Add the theme to promptsys | |
prompt_themes+=( likebira ) | |
# Load the theme | |
prompt likebira |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment