From 8a2e1006b3b272126332aa064f3ad95387129544 Mon Sep 17 00:00:00 2001 From: Biswakalyan Bhuyan Date: Thu, 13 Feb 2025 14:13:49 +0530 Subject: new dot files --- .config/zsh/oh-my-zsh/themes/gentoo.zsh-theme | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .config/zsh/oh-my-zsh/themes/gentoo.zsh-theme (limited to '.config/zsh/oh-my-zsh/themes/gentoo.zsh-theme') diff --git a/.config/zsh/oh-my-zsh/themes/gentoo.zsh-theme b/.config/zsh/oh-my-zsh/themes/gentoo.zsh-theme new file mode 100644 index 0000000..b1aef21 --- /dev/null +++ b/.config/zsh/oh-my-zsh/themes/gentoo.zsh-theme @@ -0,0 +1,30 @@ +autoload -Uz colors && colors + +autoload -Uz vcs_info +zstyle ':vcs_info:*' check-for-changes true +zstyle ':vcs_info:*' unstagedstr '%F{red}*' # display this when there are unstaged changes +zstyle ':vcs_info:*' stagedstr '%F{yellow}+' # display this when there are staged changes +zstyle ':vcs_info:*' actionformats '%F{5}(%F{2}%b%F{3}|%F{1}%a%c%u%m%F{5})%f ' +zstyle ':vcs_info:*' formats '%F{5}(%F{2}%b%c%u%m%F{5})%f ' +zstyle ':vcs_info:svn:*' branchformat '%b' +zstyle ':vcs_info:svn:*' actionformats '%F{5}(%F{2}%b%F{1}:%{3}%i%F{3}|%F{1}%a%c%u%m%F{5})%f ' +zstyle ':vcs_info:svn:*' formats '%F{5}(%F{2}%b%F{1}:%F{3}%i%c%u%m%F{5})%f ' +zstyle ':vcs_info:*' enable git cvs svn +zstyle ':vcs_info:git*+set-message:*' hooks untracked-git + ++vi-untracked-git() { + if command git status --porcelain 2>/dev/null | command grep -q '??'; then + hook_com[misc]='%F{red}?' + else + hook_com[misc]='' + fi +} + +gentoo_precmd() { + vcs_info +} + +autoload -U add-zsh-hook +add-zsh-hook precmd gentoo_precmd + +PROMPT='%(!.%B%F{red}.%B%F{green}%n@)%m %F{blue}%(!.%1~.%~) ${vcs_info_msg_0_}%F{blue}%(!.#.$)%k%b%f ' -- cgit v1.2.3-59-g8ed1b