-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInstall.sh
More file actions
executable file
·92 lines (77 loc) · 2.9 KB
/
Copy pathInstall.sh
File metadata and controls
executable file
·92 lines (77 loc) · 2.9 KB
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
#!/bin/bash
# Check if the terminal supports colors
supports_colors() {
[ -t 1 ] && [ "$(tput colors)" -ge 8 ]
}
# Set color codes if supported
set_colors() {
if supports_colors; then
red='\e[1;31m'
green='\e[1;32m'
yellow='\e[1;33m'
reset='\e[0m'
else
red=''
green=''
yellow=''
reset=''
fi
}
# Initialize color codes
set_colors
# Update package list
echo -e "${green}Updating package list...${reset}"
sudo apt update
if ! command -v git &> /dev/null; then
echo -e "${red}git is not installed. Installing git...${reset}\n"
sudo apt-get install -y git
else
echo -e "${yellow}git is already installed.${reset}\n"
fi
git clone https://github.com/pegasus-pulse/TWM_Scripts.git "$HOME/pulse_scripts"
clear
# Create folders in user directory(Downloads,Documents,etc)
xdg-user-dirs-update
mkdir ~/Screenshots
# Download OPTIONAL Scripts
git clone https://github.com/pegasus-pulse/Debian_Scripts.git "$HOME/pulse_scripts/extra"
install_i3() {
bash ~/pulse_scripts/i3/i3-install.sh
}
install_sway() {
bash ~/pulse_scripts/Sway/sway-install.sh
}
echo -e "${green} =========================================================================="
echo -e ""
echo -e " ██████╗ ███████╗ ██████╗ █████╗ ███████╗██╗ ██╗███████╗"
echo -e " ██╔══██╗██╔════╝██╔════╝ ██╔══██╗██╔════╝██║ ██║██╔════╝"
echo -e " ██████╔╝█████╗ ██║ ███╗███████║███████╗██║ ██║███████╗"
echo -e " ██╔═══╝ ██╔══╝ ██║ ██║██╔══██║╚════██║██║ ██║╚════██║"
echo -e " ██║ ███████╗╚██████╔╝██║ ██║███████║╚██████╔╝███████║"
echo -e " ╚═╝ ╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚══════╝"
echo -e ""
echo -e " ==========================================================================${reset}"
prompt_user() {
while true; do
echo "1) Install i3 Window Manager"
echo "2) Install Sway Window Manager"
echo ''
printf "${green}Pick an option by typing its number: ${reset}"
read choice
case $choice in
1 )
install_i3
break
;;
2 )
install_sway
break
;;
* )
clear
echo "Invalid option. Please select a valid number."
;;
esac
done
}
prompt_user