-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
executable file
·87 lines (78 loc) · 3.8 KB
/
install
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
#!/usr/bin/env bash
echo "
██████╗ ██████╗ ████████╗███████╗██╗██╗ ███████╗███████╗
██╔══██╗██╔═══██╗╚══██╔══╝██╔════╝██║██║ ██╔════╝██╔════╝
██║ ██║██║ ██║ ██║ █████╗ ██║██║ █████╗ ███████╗
██║ ██║██║ ██║ ██║ ██╔══╝ ██║██║ ██╔══╝ ╚════██║
██╗██████╔╝╚██████╔╝ ██║ ██║ ██║███████╗███████╗███████║
╚═╝╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝
"
# Define the scripts directory path
scripts_dir="$HOME/.dotfiles/scripts"
# Define an array of script paths relative to the scripts directory
scripts=(
"dependency.sh"
"flatpak-apps.sh"
"zsh-plugins.sh"
"prog_languages.sh"
"fonts.sh"
"catppuccin_colorscheme.sh"
)
# Define prompts for each script
prompts=(
"Do you want to install all dependencies for your Debian or Fedora based system? (y/n): "
"Do you want to install apps from flatpak? (y/n): "
"Do you want to install zsh plugins? (y/n): "
"Do you want to install programming languages and it's dependencies for go, python, rust, node and more? (y/n): "
"Do you want to install Nerd fonts and other fonts? (y/n): "
"Do you want to install Catppuccin colorscheme for gnome and qt? (y/n): "
)
# Check for arguments
if [ $# -gt 0 ]; then
case "$1" in
--config=i3)
read -p "Are you sure, Want to continue with i3 dwm config?" answeri3
if [ "$answeri3" == "y" ] || [ "$answeri3" == "Y" ]; then
bash "$scripts_dir/i3-config.sh"
fi
;;
--config=sway)
read -p "Are you sure, Want to continue with sway config?" answerSway
if [ "$answerSway" == "y" ] || [ "$answerSway" == "Y" ]; then
bash "$scripts_dir/sway-nvidia.sh"
fi
;;
--config=hypr)
echo "if you are preparing for hyprland then do not forget 'n' last question for copy dotfiles from sources of otherdirectory this repo already contains the preconfigured dotfiles for hyprland "
read -p "Are you sure, Want to continue with hyperland config?" answerHypr
if [ "$answerHypr" == "y" ] || [ "$answerHypr" == "Y" ]; then
bash "$scripts_dir/hyperland.sh"
fi
;;
*)
echo "Invalid argument: $1"
echo "Usage: $0 [--config=i3|--config=sway|--config=hypr]"
exit 1
;;
esac
else
echo "You didn't choose any dwm to install use --config=i3 for installing i3 dwm or --config=sway for sway with nvidia graphics card suppots or --config=hypr to install hyperland with preconfigured setup commands by other felow developer"fi
fi
# Array to store user responses
responses=()
# Iterate over each prompt and gather user responses
for prompt in "${prompts[@]}"; do
read -p "$prompt" answer
responses+=("$answer")
done
# Iterate over each response and execute the corresponding script if the answer is 'y' or 'Y'
for ((i=0; i<${#responses[@]}; i++)); do
if [ "${responses[$i]}" == "y" ] || [ "${responses[$i]}" == "Y" ]; then
bash "$scripts_dir/${scripts[$i]}"
fi
done
echo "All dependencies and apps have been installed."
echo "Stowing Links "
./stowlink
echo "All links have been stowed."
echo "Reboot your system to apply changes."