aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/zshrc
blob: 10496688fe4c5f7d98faa817a6ef7a6fc8cf33b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env zsh

export DOTFILES="${HOME}/dotfiles"

# Directory hashtable
hash -d .=${HOME}/dotfiles
[ -n "${WSL_DISTRO_NAME+1}" ] && source $DOTFILES/zsh/wsl.zsh
source $DOTFILES/shell/env.sh
source $DOTFILES/zsh/plugins.zsh
source $DOTFILES/zsh/setopt.zsh
source $DOTFILES/zsh/aliases.zsh
source $DOTFILES/zsh/completions.zsh
source $DOTFILES/zsh/keybindings.zsh

eval "$(starship init zsh)"

function set_win_title() {
    folder=$(sed "s/$USER/~/g" <<<$PWD:t)

    window_title="\033]0;$USER@$HOST: $folder\007"
    echo -ne "$window_title"
}

precmd_functions+=(set_win_title)