-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.fish
91 lines (66 loc) · 2.44 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
79
80
81
82
83
84
85
86
87
88
89
90
source "$HOME/.config/fish/colorscheme/colorscheme.fish"
# load aliases
source "$HOME/.config/fish/aliases/aliases.fish"
# load fish variables
source "$HOME/.config/fish/variables/variables.fish"
# load key bindings
source "$HOME/.config/fish/keybindings/keybindings.fish"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# load local fish configurations
if test -f "$HOME/.fish.local"
source "$HOME/.fish.local"
end
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# load 'brew' configurations
# see: https://docs.brew.sh/Installation
if test (uname) = "Darwin" # Check if OS is macOS
if test -f /opt/homebrew/bin/brew
eval "$(/opt/homebrew/bin/brew shellenv)"
end
if test -f /usr/local/bin/brew
eval "$(/usr/local/bin/brew shellenv)"
end
end
# see: https://docs.brew.sh/Homebrew-on-Linux
if test (uname) = "Linux" # Check if OS is Linux
if test -d /home/linuxbrew/.linuxbrew
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
end
end
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# bootstrap installation of fisher
# see: https://github.com/jorgebucaran/fisher#bootstrap-installation
if not functions -q fisher
set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config
curl https://git.io/fisher --create-dirs -sLo $XDG_CONFIG_HOME/fish/functions/fisher.fish
fish -c fisher
end
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# load 'thefuck' configurations
# see: https://github.com/nvbn/thefuck/wiki/Shell-aliases#fish
if type -q thefuck
thefuck --alias | source
end
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# load 'zoxide' configurations
# see: https://github.com/ajeetdsouza/zoxide
if type -q zoxide
zoxide init fish | source
end
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# load starship prompt
# see: https://starship.rs
if type -q starship
starship init fish | source
end
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Clear system messages (system copyright notice, the date
# and time of the last login, the message of the day, etc.).
clear
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# start tmux upon executing fish
# see: https://github.com/fish-shell/fish-shell/issues/4434#issuecomment-332743061
# if status is-interactive
# and not set -q TMUX
# exec tmux
# end