-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·74 lines (56 loc) · 2.06 KB
/
install.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
73
74
#!/bin/bash
#################### Packages ####################
# List of packages to install
# Pre-Wayland packages: "i3-gaps" "picom" "dunst" "nitrogen"
packages=("sway" "swaylock" "swaybg" "swayidle" "waybar" "alacritty" "rofi" "fish" "bat" "fd" "fzf" "xorg-server-xwayland" "polkit-gnome" "otf-font-awesome")
echo "Install packages? This will install the following packages and their dependencies using pacman. This requires sudo (y/n) "
printf '%s\n' "${packages[@]}"
read -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
sudo pacman -Syu ${packages[*]}
fi
#################### Config Symlinks ####################
read -p "Symlink files and directories? (y/n)
WARNING: This can result in data loss, make sure to backup your current settings if they exist! " -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
# echo "============================"
# echo "===== Symlinking files ====="
# echo "============================"
# files=(".config/starship.toml")
# for i in "${files[@]}"
# do
# rm -f ~/$i
# echo ~/dotfiles/$i "==>" ~/$i
# ln -sf ~/dotfiles/$i ~/$i
# done
echo -e "\n==========================="
echo "===== Symlinking dirs ====="
echo "==========================="
dirs=("linux/sway" "linux/foot" "shared/bat" "linux/rofi" "shared/fish" "linux/waybar" "linux/mako" "shared/htop" "linux/pacman")
for i in "${dirs[@]}"
do
clean=${i//'linux/'}
clean=${clean//'shared/'}
rm -f ~/.config/$clean
echo ~/dotfiles/$i "==>" ~/.config/$clean
ln -sf ~/dotfiles/$i ~/.config/$clean
done
fi
#################### Fish ####################
echo
read -p "Set Fish as default shell? (y/n) " -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
chsh -s $(which fish)
fish -i -c "set -U fish_user_paths $HOME/dotfiles/shared/scripts $fish_user_paths"
fish -i -c "set -U fish_user_paths $HOME/dotfiles/linux/scripts $fish_user_paths"
fi
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
echo -e "\n==========================="
echo "======== Complete! ========"
echo "==========================="