-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·118 lines (106 loc) · 3.21 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#! /bin/bash
set -e
set -x
cd ~
if [ -d ".dotfiles" ]; then
echo ".dotfiles directory exists. Pulling latest updates."
cd .dotfiles
git pull || true
git submodule update --init --recursive
else
cd .dotfiles
echo ".dotfiles directory does not exist. Cloning repo."
git clone https://github.com/snehrbass/dotfiles.git .dotfiles --recurse-submodules
fi
stow .
cd -
sudo pacman -S --needed base-devel
if ! command -v paru &> /dev/null; then
git clone https://aur.archlinux.org/paru.git
cd paru
makepkg -si
cd -
rm -r paru
fi
read -p "Do you want to update packages? (yes/no): " choice
if [[ "$choice" == "yes" ]]; then
paru -Syu
paru --needed -S - < ~/.dotfiles/pkglist.txt
else
echo "Skipping package update."
fi
read -p "Do you want to install greetd.service? (yes/no): " choice
if [[ "$choice" == "yes" ]]; then
cd ~/.dotfiles/ || exit
sudo cp -r greetd/ /etc/greetd/
sudo systemctl enable greetd.service
else
echo "Skipping Spicetify update."
fi
systemctl --user enable swaync.service
read -p "Do you want install/rebuild Eww? (yes/no): " choice
if [[ "$choice" == "yes" ]]; then
mkdir -p ~/src
cd ~/src/ || exit
if [ -d "eww" ]; then
echo "Eww directory exists. Pulling latest updates."
cd eww || exit
git pull
else
echo "Eww directory does not exist. Cloning repo."
git clone https://github.com/nehrbash/eww.git
cd eww || exit
fi
go install github.com/nehrbash/hyprshell@latest
cargo build --release --no-default-features --features=wayland && cargo build --release --no-default-features --features=wayland
cd ~
else
echo "Skipping Eww 😲."
fi
if [[ "$SHELL" == *"/zsh" ]]; then
echo "The current shell is already zsh. Skipping shell change."
else
read -p "Do you want to change the shell to zsh? (yes/no): " choice
if [[ "$choice" == "yes" ]]; then
chsh -s $(which zsh)
echo "Shell changed to zsh."
else
echo "Skipping shell change."
fi
fi
read -p "Do you want to update Firefox CSS? (yes/no): " choice
if [[ "$choice" == "yes" ]]; then
PROFILE=$(awk -F= -v section="$install_section" '$1 == "Default" && found {print $2; exit} $1 == section {found=1}' ~/.mozilla/firefox/profiles.ini)
# Create the symlink
ln -sfn ~/.dotfiles/.config/chrome/ ~/.mozilla/firefox/${PROFILE}/
else
echo "Skipping Firefox CSS update."
fi
read -p "Do you want to update Spicetify? (yes/no): " choice
if [[ "$choice" == "yes" ]]; then
spicetify config current_theme Onepunch color_scheme light
spicetify restore backup
spicetify backup
spicetify apply
else
echo "Skipping Spicetify update."
fi
read -p "Do you want install/rebuild Emacs? (yes/no): " choice
if [[ "$choice" == "yes" ]]; then
mkdir -p ~/src
cd ~/src/ || exit
if [ -d "emacs-git" ]; then
echo "Emacs-git directory exists. Pulling latest updates."
cd emacs-git || exit
git pull || true
else
echo "Emacs-git directory does not exist. Cloning repo."
git clone https://aur.archlinux.org/emacs-git.git
cd emacs-git || exit
fi
git reset --hard HEAD
git apply < ~/.dotfiles/emacs_build.patch && makepkg -si
cd ~ || exit
else
echo "Skipping Emacs 😞."
fi