Migration to slimline.
This commit is contained in:
parent
9c47fdf972
commit
622b9327d2
5 changed files with 47 additions and 31 deletions
41
legacy/abbr_pwd
Normal file
41
legacy/abbr_pwd
Normal file
|
@ -0,0 +1,41 @@
|
|||
#!/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
|
||||
}
|
15
legacy/agnoster.zsh
Normal file
15
legacy/agnoster.zsh
Normal file
|
@ -0,0 +1,15 @@
|
|||
export ZSH=$HOME/.oh-my-zsh
|
||||
ZSH_THEME="agnoster"
|
||||
CASE_SENSITIVE="true"
|
||||
ENABLE_CORRECTION="true"
|
||||
plugins=(git kube-ps1 command-time zsh-autosuggestions zsh-syntax-highlighting)
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
export DEFAULT_USER=$LOGNAME
|
||||
source ~/.dotfiles/zsh/abbr_pwd
|
||||
prompt_dir() {
|
||||
prompt_segment blue $CURRENT_FG $(felix_pwd_abbr)
|
||||
}
|
||||
PROMPT=$PROMPT'$(kube_ps1) '
|
||||
ZSH_COMMAND_TIME_MIN_SECONDS=2
|
||||
ZSH_COMMAND_TIME_MSG="(took $fg[yellow]%s$fg[default])"
|
||||
[ -e ~/.zshrc.local ] && source ~/.zshrc.local
|
17
legacy/fish.conf
Normal file
17
legacy/fish.conf
Normal file
|
@ -0,0 +1,17 @@
|
|||
# cleaning
|
||||
rm -rf ~/.config/fish ~/.local/share/fish ~/.config/omf ~/.local/share/omf
|
||||
# installing omf
|
||||
curl -L https://github.com/oh-my-fish/oh-my-fish/raw/master/bin/install > ~/install.omf
|
||||
fish ~/install.omf --noninteractive
|
||||
fish -c 'omf install bobthefish'
|
||||
rm -rf ~/install.omf
|
||||
# installing misc settings
|
||||
mkdir -p ~/.config/fish/functions
|
||||
echo 'function fish_greeting; end' > ~/.config/fish/functions/fish_greeting.fish
|
||||
echo 'function fish_right_prompt; end' > ~/.config/fish/functions/fish_right_prompt.fish
|
||||
touch ~/.fish.local
|
||||
echo 'set -x VIRTUAL_ENV_DISABLE_PROMPT 1' > ~/.config/fish/config.fish
|
||||
echo 'set -g theme_title_use_abbreviated_path no' >> ~/.config/fish/config.fish
|
||||
echo 'set -g fish_prompt_pwd_dir_length 0' >> ~/.config/fish/config.fish
|
||||
echo 'set -g theme_display_user yes' >> ~/.config/fish/config.fish
|
||||
echo 'source ~/.fish.local' >> ~/.config/fish/config.fish
|
Loading…
Add table
Add a link
Reference in a new issue