theme file updated

This commit is contained in:
Sameer Rahmani 2016-04-23 16:28:27 +04:30
parent 968350537f
commit d8f44a699c
3 changed files with 12 additions and 7 deletions

1
my.zsh
View File

@ -69,6 +69,7 @@ source $current_path/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# Load autosuggestions
#source $current_path/zsh-autosuggestions/autosuggestions.zsh
# Enable autosuggestions automatically
#zle-line-init() {
# zle autosuggest-start

View File

@ -8,7 +8,7 @@
function my_git_prompt_info() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || \
ref=$(git rev-parse --short HEAD 2> /dev/null) || return
echo "$ZSH_THEME_GIT_PROMPT_PREFIX$(parse_git_dirty)${ref#refs/heads/}$ZSH_THEME_GIT_PROMPT_SUFFIX"
echo "$ZSH_THEME_GIT_PROMPT_PREFIX $(parse_git_dirty)${ref#refs/heads/} %F{006}\uf126 $ZSH_THEME_GIT_PROMPT_SUFFIX"
}
function get_pwd() {
@ -20,7 +20,7 @@ function spaces() {
if [ ${#git} != 0 ]; then
local clean=$(parse_git_dirty)
if [ ${#clean} != 0 ]; then
(( git = ${#git} - 13 - ${#clean} + 1 ))
(( git = ${#git} - 17 - ${#clean} + 1 ))
else
(( git = ${#git} - 13 ))
fi
@ -29,7 +29,7 @@ function spaces() {
fi
local termwidth
(( termwidth = ${COLUMNS} - 3 - ${#$(get_pwd)} - ${git} ))
(( termwidth = ${COLUMNS} - 5 - ${#$(get_pwd)} - ${git} ))
local spacing=" "
for i in {1..$termwidth}; do
@ -39,14 +39,18 @@ function spaces() {
}
function user_sign () {
if [ $UID != 0 ]; then
echo "%F{027}»"
echo "%F{002}\uf058"
else
echo "%F{009}#"
echo "%F{009}\uf071"
fi
}
function path_icon () {
echo "%F{007} \uf0c1"
}
PROMPT='
%F{003}%~%F{008}$(spaces) $(my_git_prompt_info)
$(path_icon) %F{003}%~%F{008}$(spaces) $(my_git_prompt_info)
$(user_sign) %f'
# git settings

2
zaw

@ -1 +1 @@
Subproject commit 3066547d0db0f9bd8492409f7ce26592e831428a
Subproject commit d0fdc53b83d5b4fd948097d1e1ff84d304ec1019