aboutsummaryrefslogtreecommitdiffstats
path: root/zsh/.zsh/export.zsh
blob: 4e1de6da5a2e3fc6a2b11fec0f980c54e0361666 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
os=$(uname -s)

. $HOME/.nix-profile/etc/profile.d/nix.sh

[ -n "$SSH_CLIENT" ] && export MINIMAL_USER_CHAR="$(hostname)"

export GITHUB_HOME=$HOME/Projects
export FZF_DEFAULT_COMMAND='fd --type file --hidden --no-ignore'
export ALTERNATE_EDITOR="emacs -nw -Q"
export EDITOR='emacsclient -nw'
export VISUAL='emacsclient -c'
export TERM='xterm-256color'
export CLICOLOR=1

prepend_path() {
    [ -d "$1" ] && PATH="$1:$PATH"
}

append_path() {
    [ -d "$1" ] && PATH="$PATH:$1"
}

if [ $os = "Darwin" ]; then
    prepend_path "/Library/TeX/texbin"
    prepend_path "/usr/local/opt/bison/bin"

    append_path "${HOME}/Library/Python/3.7/bin"
fi

prepend_path "/usr/local/bin"
prepend_path "${HOME}/.gem/ruby/2.7.0/bin"
prepend_path "${HOME}/.yarn/bin"
prepend_path "${HOME}/.cargo/bin"
prepend_path "${HOME}/.cabal/bin"
prepend_path "${HOME}/.local/bin"

append_path "/opt/Xilinx/Vivado/2019.1/bin"
append_path "/opt/intelFPGA_lite/18.1/quartus/bin"

export PATH

# Stop dotnet telemetry
export DOTNET_CLI_TELEMETRY_OPTOUT=1

# Fix java windows for tiling window managers
[ $os = "Linux" ] && export _JAVA_AWT_WM_NONREPARENTING=1

# Direnv hook setup
command -v direnv >/dev/null 2>&1
[ "$?" -eq 0 ] && eval "$(direnv hook zsh)"

# Opam hook setup and initialising it
command -v opam >/dev/null 2>&1
if [ "$?" -eq 0 ]; then
    test -r /home/yannherklotz/.opam/opam-init/init.zsh && . /home/yannherklotz/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true
    eval "$(opam env)";
fi

# Load rust environment
[ -r "$HOME/.cargo/env" ] && source $HOME/.cargo/env

# Travis
[ -r "$HOME/.travis/travis.sh" ] && source "$HOME/.travis/travis.sh"