@@ -5,13 +5,36 @@ gpg_encryption_subkey=0x79C70BBE4865D828
5
5
6
6
base_path=$PWD
7
7
data_path=" $base_path " /data
8
+ git_submodule_path=" $base_path " /.git_submodules
9
+
10
+ symlink () {
11
+ if [[ -e " ${2} " ]]; then
12
+ if [[ ! -L " ${2} " ]]; then
13
+ echo " ${2} already exists and is an irregular type. Check manually whether this is safe to replace with ${1} ."
14
+ return 1
15
+ fi
16
+
17
+ echo " Removing existing symlink at ${2} "
18
+ rmrf " ${2} " || {
19
+ echo " failed to remove old symlink: ${2} "
20
+ return 1
21
+ }
22
+ fi
23
+
24
+ # Stow only supports relative symlinks
25
+ ln -s " ${1} " " ${2} " || {
26
+ echo " failed to symlink: ${1} to ${2} "
27
+ return 1
28
+ }
29
+ }
8
30
9
31
declare -a brew_pkgs=(
10
32
bat
11
33
font-hack-nerd-font
12
34
gnupg
13
35
go
14
36
helix
37
+ mpv
15
38
neovim
16
39
node
17
40
npm
@@ -34,7 +57,7 @@ brew install "${brew_pkgs[@]}" || {
34
57
echo " failed to install brew packages"
35
58
}
36
59
37
- git submodule update --init --remote --progress omz/.oh-my-zsh/themes/powerlevel10k || {
60
+ git submodule update --init --recursive --remote --progress || {
38
61
echo " failed to update git submodules"
39
62
exit 1
40
63
}
@@ -53,12 +76,14 @@ echo "Setting up GPG/SSH"
53
76
gpg --list-keys > /dev/null
54
77
55
78
declare -a mk_dirs=(
56
- ~ /.cargo
57
79
~ /.cargo
58
80
~ /.config
59
81
~ /.continue
60
82
~ /.local/bin
83
+ ~ /.local/share
61
84
~ /.ssh
85
+ ~ /Library/KeyBindings
86
+ ~ /Library/LaunchAgents
62
87
)
63
88
64
89
for mk_dir in " ${mk_dirs[@]} " ; do
@@ -98,6 +123,22 @@ cp -v "$data_path"/gpg/gpg-agent.conf "$base_path"/gpg/.gnupg/gpg-agent.conf ||
98
123
}
99
124
echo " pinentry-program $HOME /.local/bin/pinentry-auto" | tee -a " $HOME " /.gnupg/gpg-agent.conf
100
125
126
+ # Fix for spacing breaking the space delimited tuples
127
+ mv " ${git_submodule_path} " /catppuccin-bat/themes/Catppuccin\ Mocha.tmTheme " ${git_submodule_path} " /catppuccin-bat/themes/Catppuccin-Mocha.tmTheme || {
128
+ echo " failed to move catppuccin-bat theme"
129
+ exit 1
130
+ }
131
+
132
+ declare -a symlink_paths_tuples=(
133
+ " ${git_submodule_path} /alacritty-theme/themes ${base_path} /alacritty/.config/alacritty/themes"
134
+ " ${git_submodule_path} /catppuccin-bat/themes/Catppuccin-Mocha.tmTheme ${base_path} /bat/.config/bat/themes/Catppuccin-Mocha.tmTheme"
135
+ " ${git_submodule_path} /catppuccin-helix/themes/default/catppuccin_mocha.toml ${base_path} /helix/.config/helix/themes/catppuccin_mocha.toml"
136
+ )
137
+ for symlink_paths_tuple in " ${symlink_paths_tuples[@]} " ; do
138
+ read -ra symlink_paths <<< " $symlink_paths_tuple"
139
+ symlink " ${symlink_paths[0]} " " ${symlink_paths[1]} "
140
+ done
141
+
101
142
stow_config () {
102
143
stow -v " $1 " || {
103
144
echo " Failed to stow ${1} config"
@@ -109,6 +150,7 @@ declare -a stow_dirs_setup=(
109
150
bash
110
151
git
111
152
gpg
153
+ macos
112
154
ssh
113
155
stow
114
156
zsh
@@ -119,11 +161,6 @@ for stow_dir in "${stow_dirs_setup[@]}"; do
119
161
stow_config " $stow_dir "
120
162
done
121
163
122
- rsync --progress -ruacv -- macos/* " $HOME " / || {
123
- echo " failed to rsync macos config"
124
- return 1
125
- }
126
-
127
164
declare -a launch_agents=(
128
165
" $HOME " /Library/LaunchAgents/gnupg.gpg-agent.plist
129
166
" $HOME " /Library/LaunchAgents/gnupg.gpg-agent-symlink.plist
0 commit comments