-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.fish
78 lines (62 loc) · 1.62 KB
/
config.fish
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
# conf.d runs first!
# https://fishshell.com/docs/current/tutorial.html
# https://github.com/jorgebucaran/fish-shell-cookbook
# https://github.com/fish-shell/fish-shell/blob/master/share/config.fish
# https://github.com/fish-shell/fish-shell/blob/da32b6c172dcfe54c9dc4f19e46f35680fc8a91a/share/config.fish#L257-L269
#
# Env
#
# Set vars for dotfiles and special dirs.
set -g ZDOTDIR $XDG_CONFIG_HOME/zsh
set -gx DOTFILES $HOME/.dotfiles
set -gx MY_PROJECTS $HOME/Projects
# Set initial working directory.
set -g IWD $PWD
#
# Utils
#
# Initialize fuzzy finder.
if type -q fzf
if not test -r $__fish_cache_dir/fzf_init.fish
fzf --fish >$__fish_cache_dir/fzf_init.fish
end
source $__fish_cache_dir/fzf_init.fish
end
# Initialize zoxide for fast jumping with 'z'.
if type -q zoxide
if not test -r $__fish_cache_dir/zoxide_init.fish
zoxide init fish >$__fish_cache_dir/zoxide_init.fish
end
source $__fish_cache_dir/zoxide_init.fish
end
#
# Prompt
#
# Disable new user greeting.
set fish_greeting
# Initialize starship.
if type -q starship
set -gx STARSHIP_CONFIG $__fish_config_dir/themes/starship.toml
if not test -r $__fish_cache_dir/starship_init.fish
starship init fish --print-full-init >$__fish_cache_dir/starship_init.fish
end
source $__fish_cache_dir/starship_init.fish
enable_transience
end
#
# Theme
#
fish_config theme choose $FISH_THEME
#
# Terminal
#
# Set WezTerm title
if test -n "$TERM_PROGRAM"
set_term_var TERM_CURRENT_SHELL "fish $FISH_VERSION"
end
#
# Local
#
if test -r $DOTFILES.local/fish/config.fish
source $DOTFILES.local/fish/config.fish
end