-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate.fish
More file actions
executable file
·84 lines (70 loc) · 3.74 KB
/
Copy pathupdate.fish
File metadata and controls
executable file
·84 lines (70 loc) · 3.74 KB
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
#! /usr/bin/env fish
# get the latest
if cd ~/dotfiles; and git fetch >/dev/null; and git status | grep -i 'your branch is up to date' >/dev/null
echo (set_color cyan)"Copying homedir configs..."(set_color normal)
and ln -vfs ~/dotfiles/.gitconfig ~
and ln -vfs ~/dotfiles/.tmux.conf ~
and ln -vfs ~/dotfiles/.tmux-*.sh ~
and echo (set_color cyan)"Copying fish configs..."(set_color normal)
and mkdir -p ~/.config/fish/functions ~/.config/fish/conf.d
and ln -vfs ~/dotfiles/.config/fish/config.fish ~/.config/fish
and ln -vfs ~/dotfiles/.config/fish/functions/* ~/.config/fish/functions
and for f in (find ~/dotfiles/.config/fish/conf.d -maxdepth 1 -type f 2>/dev/null); ln -vfs $f ~/.config/fish/conf.d/; end
and echo (set_color cyan)"Copying fish-ai config..."(set_color normal)
and ln -vfs ~/dotfiles/.config/fish-ai.ini ~/.config/fish-ai.ini
and echo (set_color cyan)"Copying ghostty configs..."(set_color normal)
and mkdir -p ~/Library/"Application Support"/com.mitchellh.ghostty
and ln -vfs ~/dotfiles/.config/ghostty/config ~/Library/"Application Support"/com.mitchellh.ghostty/config
and echo (set_color cyan)"Copying nvim configs..."(set_color normal)
and mkdir -p ~/.config/nvim
and ln -vfs ~/dotfiles/.config/nvim/* ~/.config/nvim
and echo (set_color cyan)"Updating brew packages..."(set_color normal)
and brewm update
and echo (set_color cyan)"Syncing fisher plugins..."(set_color normal)
and begin
set -l desired (cat ~/dotfiles/fisher-list.txt)
set -l installed (fisher list)
# Remove plugins not in desired list (skip fisher itself)
for plugin in $installed
if not contains -- $plugin $desired; and test "$plugin" != jorgebucaran/fisher
echo " Removing $plugin..."
fisher remove $plugin
end
end
# Install new plugins, update existing ones
for plugin in $desired
if contains -- $plugin $installed
fisher update $plugin
else
echo " Installing $plugin..."
fisher install $plugin
end
end
end
and echo (set_color cyan)"Configuring tide prompt..."(set_color normal)
and tide configure --auto --style=Rainbow --prompt_colors='True color' --show_time='12-hour format' --rainbow_prompt_separators=Round --powerline_prompt_heads=Round --powerline_prompt_tails=Round --powerline_prompt_style='Two lines, character' --prompt_connection=Dotted --powerline_right_prompt_frame=No --prompt_connection_andor_frame_color=Darkest --prompt_spacing=Sparse --icons='Many icons' --transient=No
and echo (set_color cyan)"Updating nvim plugins..."(set_color normal)
# and pip3 install --upgrade pip
# and pip3 install neovim
and nvim --headless "+Lazy! sync" +qa
and nvim --headless "+TSUpdateSync" +qa
and echo (set_color cyan)"Updating global go binaries..."(set_color normal)
and go install golang.org/x/tools/gopls@latest
and go install golang.org/x/tools/cmd/goimports@latest
and go install github.com/GoogleCloudPlatform/cloud-sql-proxy/v2@latest
# and echo (set_color cyan)"Updating global js binaries..."(set_color normal)
# and nvm install latest
# and npm install -g npm
# and echo (set_color cyan)"Updating gcloud..."(set_color normal)
# and brew upgrade google-cloud-sdk
# and gcloud components update
# final message
and echo (set_color green)"Updates completed!!"(set_color normal)
or echo (set_color red)"Update FAILED (╯°□°)╯︵ ┻━┻ "(set_color normal)
else
cd ~/dotfiles
and echo (set_color yellow)"Updating the update script..."(set_color normal)
and git pull
and git push
and ./update.fish
end