-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall-dotfiles.sh
executable file
·53 lines (43 loc) · 1.23 KB
/
install-dotfiles.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
#!/usr/bin/bash
dir=~/dotfiles
usage() {
echo "Usage: $0 [OPTIONS]"
echo "Options:"
echo " -a, --all Install all dotfiles, excluding those that require sudo"
echo " -s, --sudo Install only dotfiles that require sudo"
echo " -d, --dir DIR Directory where the dotfiles are installed (default: ~/dotfiles)"
echo " -h, --help Display this help message"
}
install_all_no_sudo() {
stow -d "$dir" -t ~/ zsh kitty nvim bat conky easyeffects ignores bin hyprland swaylock-effects spotify-launcher rofi brave wireplumber
}
install_all_sudo() {
sudo stow -d "$dir" -t /etc/ battery-optimizations
sudo stow -d "$dir" -t /usr/share/grub/themes/ grub-theme
}
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-a|--all)
install_all_no_sudo
echo "Note: battery-optimizations and grub-theme require sudo, skipping installation."
;;
-s|--sudo)
install_all_sudo
;;
-d|--dir)
dir="$2"
shift
;;
-h|--help)
usage
exit 0
;;
*)
echo "Invalid option: $1"
exit 1
;;
esac
shift
done