-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_symlinks.sh
executable file
·39 lines (33 loc) · 1.36 KB
/
setup_symlinks.sh
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
#!/bin/bash
# Setup spaceship symlink
spaceship_theme_file="$ZSH_CUSTOM/themes/spaceship.zsh-theme"
if [ -e "$spaceship_theme_file" ]; then
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"
else
echo "Skipping Spaceship symlink for ZSH theme"
fi
echo "--------------------------------------------------------------------"
echo "Starting stow process..."
# add stow-global-ignore to $HOME/.stow-global-ignore path first
cp ./.stow-global-ignore $HOME/.stow-global-ignore
# Below is just setting up GNU Stow
# List all directories in dotfiles
directories=$(find . -maxdepth 1 -type d ! -name . | sed 's/^\.\.\///' | sed '1s/^\.\.//')
ignored_directories=(".git" "scripts" "vivid")
# Remove specific directories depending on OSTYPE
if [[ $OSTYPE != 'linux-gnu' ]]; then
ignored_directories+=("rofi" "hyprland" "khard")
else
ignored_directories+=("sketchybar borders raycast")
fi
# Loop through the list of directories
for dir in $directories; do
# Check if dir is a valid directory
if [ -d "$dir" ] && [[ ! " ${ignored_directories[@]} " =~ " $(basename "$dir") " ]]; then
# Run the GNU Stow command `stow <directory_name>` to setup
echo "Stowing $(basename "$dir")"
stow "$(basename "$dir")"
fi
done
echo "--------------------------------------------------------------------"
echo "Finished stowing process..."