-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.fishrc
137 lines (126 loc) · 4 KB
/
.fishrc
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# vim: set ft=fish:
if is-interactive
fish_add_path "$HOME/bin"
# Homebrew
if is-mac; and not set --query HOMEBREW_PREFIX
eval (/opt/homebrew/bin/brew shellenv)
end
# asdf
if is-mac
#brew --prefix asdf
set -gx ASDF_DIR $HOMEBREW_PREFIX/opt/asdf/libexec
else
set -gx ASDF_DIR "$HOME/.asdf"
end
source "$ASDF_DIR/asdf.fish"
source "$HOME/.asdf/plugins/dotnet-core/set-dotnet-home.fish"
source "$HOME/.asdf/plugins/java/set-java-home.fish"
source "$HOME/.asdf/plugins/golang/set-env.fish"
# VI
if not-emacs
fish_vi_key_bindings insert
fish_vi_cursor
end
set -g fish_cursor_default block blink
set -g fish_cursor_insert line blink
set -g fish_cursor_replace_one underscore blink
set -g fish_cursor_visual block
# Environment variables
set -gx HOST_NAME (hostname | tr '[:upper:]' '[:lower:]')".local"
set -gx SHELL $HOMEBREW_PREFIX/bin/fish
set -gx EDITOR vim
set -gx TZ Australia/Brisbane
if is-linux
set -gx UBUNTU_CODENAME (ag --only-matching '(?<=UBUNTU_CODENAME=).*' /etc/os-release)
end
## Tools
set -gx ANDROID_HOME "$HOME/Library/Android/sdk"
set -gx ANDROID_SDK_ROOT "$ANDROID_HOME"
set -gx ANDROID_NDK_HOME "$HOMEBREW_PREFIX/share/android-ndk"
set -gx ASDF_GOLANG_MOD_VERSION_ENABLED true
set -gx BABASHKA_LEAN true
set -gx FLUTTER_ROOT (asdf where flutter)
set -gx GOPATH "$HOME/go"
set -gx GPG_TTY (tty)
set -gx LEIN_SNAPSHOTS_IN_RELEASE 1
set -gx MAVEN_OPTS -Dmaven.artifact.threads=40
set -gx PGDATA "$HOME/.pgdata"
set -gx RUSTUP_INIT_SKIP_PATH_CHECK yes
## Homebrew
if is-mac
set -gx HOMEBEW_EDITOR $EDITOR
set -gx HOMEBREW_FORCE_VENDOR_RUBY 1
set -gx HOMEBREW_NO_INSTALL_FROM_API 1
end
set -gx HOMEBREW_NO_ENV_HINTS 1
## Less
set -gx PAGER less
set -gx LESS --use-color
set -gx LESS_TERMCAP_mb (printf "\e[1;31m")
set -gx LESS_TERMCAP_md (printf "\e[1;31m")
set -gx LESS_TERMCAP_me (printf "\e[0m")
set -gx LESS_TERMCAP_se (printf "\e[0m")
set -gx LESS_TERMCAP_so (printf "\e[1;44;33m")
set -gx LESS_TERMCAP_ue (printf "\e[0m")
set -gx LESS_TERMCAP_us (printf "\e[1;32m")
## Temp
if is-linux
set -gx TMPDIR /tmp
end
set -gx TEMP "$TMPDIR"
set -gx TMP "$TMPDIR"
# Terminal config
set -g fish_prompt_pwd_dir_length 0
set -g theme_color_scheme solarized-dark
set -g theme_date_format "+%a %H:%M"
set -g theme_date_timezone $TZ
set -gx VIRTUAL_ENV_DISABLE_PROMPT 1
set fish_color_error red --bold
if test -n "$EMACS"
set -x TERM eterm-color
end
set -e VISUAL
set -gx TAB_WIDTH 8
if not-emacs
tabs -$TAB_WIDTH
end
if not-emacs
eval (dircolors --csh "$HOME/.dircolors")
direnv hook fish | source
end
# Path
if is-mac
#brew --prefix postgresql@16
fish_add_path $HOMEBREW_PREFIX/opt/postgresql@16/bin
end
if is-mac
fish_add_path "$HOME/Library/Application Support/JetBrains/Toolbox/scripts"
else
fish_add_path "$HOME/.local/share/JetBrains/Toolbox/scripts"
end
fish_add_path \
/usr/libexec \
"$GOPATH/bin" \
"$ANDROID_HOME/platform-tools" \
"$ANDROID_HOME/cmdline-tools/latest/bin" \
"$ANDROID_HOME/bundletool" \
"$HOME/.local/bin" \
"$HOME/.cargo/bin" \
"$HOME/.dotnet/tools" \
"$HOME/.pub-cache/bin" \
"$HOME/jesi-dotfiles/bin" \
"$HOME/Projects/services/bin"
fish_add_path -m "$HOME/bin"
if is-linux
fish_add_path /home/linuxbrew/.linuxbrew/bin
end
_add_npm_bin_path
_activate_python_venv
#Source secret config
optional-source "$HOME/secret/.fishrc"
if not-emacs; and is-mac; and set --query ITERM_PROFILE
optional-source "$HOME/.config/iterm2/.iterm2_shell_integration.fish"
fish_add_path "$HOME/iterm-utils/utilities"
end
starship init fish | source
end