-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.sh
executable file
·72 lines (57 loc) · 1.61 KB
/
setup.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
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
#!/bin/bash
echo -e "\n-- This Script is for recently formatted computers --\n"
echo -e "\n-- (If you've already configured your machine, don't run it) --\n"
read -p "So, do you want to run it? (Y/N): " opt
if [ "$opt" != "Y" ] && [ "$opt" != "y" ]; then
echo "Ok, goodbye."
exit 1
fi
# Function to create symbolic links
create_symlink() {
local target="$1"
local link_name="$2"
if [ -d "$link_name" ]; then
rm -rf "$link_name"
fi
ln -s "$target" "$link_name"
echo "-- Created symlink for $link_name --"
}
# Move to .config
echo -e "\n-- Creating symbolic links --\n"
echo -e "\n-- (ignore the messages) --\n"
# List of dotfiles directories
configs=(
bspwm
sxhkd
kitty
nvim
dunst
rofi
picom
eww
)
for config in "${configs[@]}"; do
create_symlink "$HOME/.dotfiles/$config" "$HOME/.config/$config"
done
# Local bin
create_symlink "$HOME/.dotfiles/bin" "$HOME/.local/bin"
# Move to ${HOME}
create_symlink "$HOME/.dotfiles/src" "$HOME/src"
# Fonts
echo -e "\n-- Copying fonts to system fonts --\n"
sudo cp -a "$HOME/.dotfiles/fonts" /usr/share/fonts
# Images
echo -e "\n-- Copying wallpapers --\n"
cp "$HOME/.dotfiles/wallpapers/macd2.jpg" "$HOME/Pictures"
cp "$HOME/.dotfiles/wallpapers/wallpaper_switch_1.png" "$HOME/Pictures"
# Zsh theme
echo -e "\n-- Copying Zsh theme --\n"
rm -rf "$HOME/.oh-my-zsh/themes/code.zsh-theme"
cp "$HOME/.dotfiles/zsh_theme/code.zsh-theme" "$HOME/.oh-my-zsh/themes"
# Screenshots directory
screenshots_dir="$HOME/Pictures/Screenshots"
if [ -d "$screenshots_dir" ]; then
rm -rf "$screenshots_dir"
fi
mkdir -p "$screenshots_dir"
echo -e "\nEnd of the script :D\n"