Migration to slimline.

This commit is contained in:
Bartek Stalewski 2020-01-10 15:12:24 +01:00
parent 9c47fdf972
commit 622b9327d2
5 changed files with 47 additions and 31 deletions

View file

@ -1,41 +0,0 @@
#!/bin/zsh
function felix_pwd_abbr {
base_pwd=$PWD
tilda_notation=${base_pwd//$HOME/\~}
pwd_list=(${(s:/:)tilda_notation})
list_len=${#pwd_list}
if [[ $list_len -le 1 ]]; then
echo $tilda_notation
return
fi
if [[ ${pwd_list[1]} != '~' ]]; then
formed_pwd='/'
fi
firstchar=$(echo ${pwd_list[1]} | cut -c1)
if [[ $firstchar == '.' ]] ; then
firstchar=$(echo ${pwd_list[1]} | cut -c1,2)
fi
formed_pwd=${formed_pwd}$firstchar
for ((i=2; i <= $list_len; i++)) do
if [[ $i != ${list_len} ]]; then
firstchar=$(echo ${pwd_list[$i]} | cut -c1)
if [[ $firstchar == '.' ]] ; then
firstchar=$(echo ${pwd_list[$i]} | cut -c1,2)
fi
formed_pwd=${formed_pwd}/$firstchar
else
formed_pwd=${formed_pwd}/${pwd_list[$i]}
fi
done
echo $formed_pwd
return
}

13
zsh/zshrc Normal file
View file

@ -0,0 +1,13 @@
export ZSH=$HOME/.oh-my-zsh
ZSH_THEME="agnoster"
CASE_SENSITIVE="true"
ENABLE_CORRECTION="true"
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
source $ZSH/oh-my-zsh.sh
source ~/slimline/slimline.zsh
SLIMLINE_USER_HOST_INFO_FORMAT="%F{green}|user|%F{white}@%F{cyan}|host|%f"
SLIMLINE_SYMBOL_WORKING_FORMAT="%F{red}➜%f"
SLIMLINE_SYMBOL_READY_FORMAT="%F{white}➜%f"
SLIMLINE_MAX_EXEC_TIME=2
[ -e ~/.zshrc.local ] && source ~/.zshrc.local