Skip to content

Commit 06c47c8

Browse files
harilvfsaayushrg7aayushxvfnissxnix
committed
Initial Support For Fedora Linux
Co-Authored-By: aayush <[email protected]> Co-Authored-By: aayushxvf <[email protected]> Co-Authored-By: Smriti Bhandari <[email protected]>
1 parent 8273f0d commit 06c47c8

File tree

16 files changed

+865
-353
lines changed

16 files changed

+865
-353
lines changed

core/tabs/applications-setup/alacritty.sh

Lines changed: 53 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,38 +14,67 @@ echo -e "${BLUE}"
1414
figlet -f slant "Alacritty"
1515
echo -e "${ENDCOLOR}"
1616

17-
checkAlacritty() {
18-
if command -v alacritty &> /dev/null; then
19-
printf "${GREEN}Alacritty is already installed.${RESET}\n"
17+
confirm_continue() {
18+
echo -e "${YELLOW}Warning: If you already have an Alacritty configuration, make sure to back it up before proceeding.${RESET}"
19+
while true; do
20+
read -rp "Do you want to continue with the setup? (y/n): " choice
21+
case "$choice" in
22+
[Yy]) break ;;
23+
[Nn])
24+
echo -e "${RED}Setup aborted by the user.${RESET}"
25+
exit 1
26+
;;
27+
*) echo -e "${YELLOW}Please enter y or n.${RESET}" ;;
28+
esac
29+
done
30+
}
31+
32+
installAlacritty() {
33+
if command -v alacritty &>/dev/null; then
34+
echo -e "${GREEN}Alacritty is already installed.${RESET}"
35+
return
36+
fi
37+
38+
echo -e "${YELLOW}Alacritty is not installed. Installing now...${RESET}"
39+
40+
if [ -x "$(command -v pacman)" ]; then
41+
sudo pacman -S alacritty --noconfirm
42+
elif [ -x "$(command -v dnf)" ]; then
43+
sudo dnf install alacritty -y
2044
else
21-
printf "${YELLOW}Alacritty is not installed. :: Installing now...${RESET}\n"
22-
if [ -x "$(command -v pacman)" ]; then
23-
sudo pacman -S alacritty --noconfirm
24-
elif [ -x "$(command -v apt)" ]; then
25-
sudo apt install alacritty -y
26-
else
27-
printf "${RED}Unsupported package manager! Please install Alacritty manually.${RESET}\n"
28-
exit 1
29-
fi
30-
printf "${GREEN}Alacritty has been installed.${RESET}\n"
45+
echo -e "${RED}Unsupported package manager! Please install Alacritty manually.${RESET}"
46+
exit 1
3147
fi
48+
49+
echo -e "${GREEN}Alacritty has been installed.${RESET}"
3250
}
3351

3452
setupAlacrittyConfig() {
35-
printf "${CYAN}:: Copying Alacritty config files...${RESET}\n"
36-
if [ -d "${HOME}/.config/alacritty" ] && [ ! -d "${HOME}/.config/alacritty-bak" ]; then
37-
cp -r "${HOME}/.config/alacritty" "${HOME}/.config/alacritty-bak"
38-
printf "${YELLOW}:: Existing Alacritty configuration backed up to alacritty-bak.${RESET}\n"
53+
local alacritty_config="${HOME}/.config/alacritty"
54+
55+
echo -e "${CYAN}:: Setting up Alacritty configuration...${RESET}"
56+
57+
if [ -d "$alacritty_config" ] && [ ! -d "${alacritty_config}-bak" ]; then
58+
mv "$alacritty_config" "${alacritty_config}-bak"
59+
echo -e "${YELLOW}:: Existing Alacritty configuration backed up to alacritty-bak.${RESET}"
3960
fi
40-
mkdir -p "${HOME}/.config/alacritty/"
41-
curl -sSLo "${HOME}/.config/alacritty/alacritty.toml" "https://raw.githubusercontent.com/harilvfs/dwm/refs/heads/main/config/alacritty/alacritty.toml"
42-
curl -sSLo "${HOME}/.config/alacritty/keybinds.toml" "https://raw.githubusercontent.com/harilvfs/dwm/refs/heads/main/config/alacritty/keybinds.toml"
43-
curl -sSLo "${HOME}/.config/alacritty/nordic.toml" "https://raw.githubusercontent.com/harilvfs/dwm/refs/heads/main/config/alacritty/nordic.toml"
44-
printf "${GREEN}:: Alacritty configuration files copied.${RESET}\n"
61+
62+
mkdir -p "$alacritty_config"
63+
64+
base_url="https://raw.githubusercontent.com/harilvfs/dwm/refs/heads/main/config/alacritty"
65+
for file in alacritty.toml keybinds.toml nordic.toml; do
66+
curl -sSLo "$alacritty_config/$file" "$base_url/$file"
67+
done
68+
69+
echo -e "${CYAN}:: Running 'alacritty migrate' to update the config...${RESET}"
70+
(cd "$alacritty_config" && alacritty migrate)
71+
72+
echo -e "${GREEN}:: Alacritty configuration files copied and migrated.${RESET}"
4573
}
4674

47-
checkAlacritty
75+
confirm_continue
76+
installAlacritty
4877
setupAlacrittyConfig
4978

50-
printf "${GREEN}::Alacritty setup complete.${RESET}\n"
79+
echo -e "${GREEN}:: Alacritty setup complete.${RESET}"
5180

core/tabs/applications-setup/fastfetch.sh

100644100755
Lines changed: 52 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,44 +5,85 @@ clear
55
GREEN='\033[0;32m'
66
RED='\033[0;31m'
77
CYAN='\033[0;36m'
8-
NC='\033[0m'
8+
NC='\033[0m'
99
BLUE="\e[34m"
1010
ENDCOLOR="\e[0m"
1111

1212
echo -e "${BLUE}"
1313
figlet -f slant "Fastfetch"
14-
1514
echo -e "${ENDCOLOR}"
1615

16+
while true; do
17+
read -rp "Do you want to continue with the Fastfetch setup? (y/n): " choice
18+
case "$choice" in
19+
[Yy]) break ;;
20+
[Nn])
21+
echo -e "${RED}Setup aborted by the user.${NC}"
22+
exit 1
23+
;;
24+
*) echo -e "${CYAN}Please enter y or n.${NC}" ;;
25+
esac
26+
done
27+
1728
FASTFETCH_DIR="$HOME/.config/fastfetch"
1829
BACKUP_DIR="$HOME/.config/fastfetch_backup"
1930

20-
if command -v fastfetch &> /dev/null; then
31+
if command -v fastfetch &>/dev/null; then
2132
echo -e "${GREEN}Fastfetch is already installed.${NC}"
2233
else
23-
echo -e "${CYAN}Fastfetch is not installed. :: Installing...${NC}"
24-
sudo pacman -S fastfetch --noconfirm
34+
echo -e "${CYAN}Fastfetch is not installed. Installing...${NC}"
35+
36+
if command -v pacman &>/dev/null; then
37+
sudo pacman -S fastfetch --noconfirm
38+
elif command -v dnf &>/dev/null; then
39+
sudo dnf install fastfetch -y
40+
else
41+
echo -e "${RED}Unsupported package manager! Please install Fastfetch manually.${NC}"
42+
exit 1
43+
fi
44+
echo -e "${GREEN}Fastfetch has been installed.${NC}"
2545
fi
2646

2747
if [ -d "$FASTFETCH_DIR" ]; then
2848
echo -e "${RED}Fastfetch configuration directory already exists.${NC}"
2949

3050
if [ ! -d "$BACKUP_DIR" ]; then
3151
echo -e "${CYAN}Creating backup directory...${NC}"
32-
mkdir "$BACKUP_DIR"
52+
mkdir -p "$BACKUP_DIR"
3353
fi
3454

35-
echo -e "${CYAN}:: Backing up existing Fastfetch configuration...${NC}"
36-
mv "$FASTFETCH_DIR"/* "$BACKUP_DIR/"
55+
echo -e "${CYAN}Backing up existing Fastfetch configuration...${NC}"
56+
mv "$FASTFETCH_DIR"/* "$BACKUP_DIR/" 2>/dev/null
3757
echo -e "${GREEN}Backup completed.${NC}"
3858
fi
3959

40-
echo -e "${CYAN}:: Cloning Fastfetch repository...${NC}"
60+
echo -e "${CYAN}Cloning Fastfetch repository...${NC}"
4161
git clone https://github.com/harilvfs/fastfetch "$FASTFETCH_DIR"
4262

43-
echo -e "${CYAN}:: Cleaning up unnecessary files...${NC}"
63+
echo -e "${CYAN}Cleaning up unnecessary files...${NC}"
4464
rm -rf "$FASTFETCH_DIR/.git" "$FASTFETCH_DIR/LICENSE" "$FASTFETCH_DIR/README.md"
4565

46-
echo -e "${GREEN}Fastfetch setup completed successfully!${NC}"
66+
while true; do
67+
read -rp "Are you using Alacritty? (y/n): " alacritty_choice
68+
case "$alacritty_choice" in
69+
[Yy])
70+
echo -e "${CYAN}Applying Alacritty-specific configuration...${NC}"
71+
if cd "$FASTFETCH_DIR"; then
72+
rm -f config.jsonc
73+
curl -sSLo config.jsonc "https://raw.githubusercontent.com/harilvfs/i3wmdotfiles/refs/heads/main/fastfetch/config.jsonc"
74+
echo -e "${GREEN}Updated Fastfetch config for Alacritty.${NC}"
75+
else
76+
echo -e "${RED}Error: Could not change to Fastfetch directory.${NC}"
77+
fi
78+
break
79+
;;
80+
[Nn])
81+
echo -e "${CYAN}Skipping Alacritty-specific configuration.${NC}"
82+
break
83+
;;
84+
*) echo -e "${CYAN}Please enter y or n.${NC}" ;;
85+
esac
86+
done
4787

88+
echo -e "${GREEN}Fastfetch setup completed successfully!${NC}"
4889

core/tabs/system-setup/aur.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ while true; do
4747
figlet -f slant "Aur"
4848
echo -e "${ENDCOLOR}"
4949

50-
echo -e "${CYAN}:: AUR Setup Menu${NC}"
50+
echo -e "${CYAN}:: AUR Setup Menu [ For Arch Only ]${NC}"
5151
echo -e "Please select an option:"
5252
echo -e "1) Install Paru"
5353
echo -e "2) Install Yay"

scripts/Alacritty.sh

Lines changed: 41 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,47 +15,59 @@ figlet -f slant "Alacritty"
1515
echo -e "${ENDCOLOR}"
1616

1717
confirm_continue() {
18-
printf "${YELLOW}Warning: If you already have an Alacritty configuration, make sure to back it up before proceeding.${RESET}\n"
19-
if gum confirm "Do you want to continue with the setup?"; then
20-
return 0
21-
else
22-
printf "${RED}Setup aborted by the user.${RESET}\n"
18+
echo -e "${YELLOW}Warning: If you already have an Alacritty configuration, make sure to back it up before proceeding.${RESET}"
19+
if ! gum confirm "Do you want to continue with the setup?"; then
20+
echo -e "${RED}Setup aborted by the user.${RESET}"
2321
exit 1
2422
fi
2523
}
2624

27-
checkAlacritty() {
28-
if command -v alacritty &> /dev/null; then
29-
printf "${GREEN}Alacritty is already installed.${RESET}\n"
25+
installAlacritty() {
26+
if command -v alacritty &>/dev/null; then
27+
echo -e "${GREEN}Alacritty is already installed.${RESET}"
28+
return
29+
fi
30+
31+
echo -e "${YELLOW}Alacritty is not installed. Installing now...${RESET}"
32+
33+
if [ -x "$(command -v pacman)" ]; then
34+
sudo pacman -S alacritty --noconfirm
35+
elif [ -x "$(command -v dnf)" ]; then
36+
sudo dnf install alacritty -y
3037
else
31-
printf "${YELLOW}Alacritty is not installed. :: Installing now...${RESET}\n"
32-
if [ -x "$(command -v pacman)" ]; then
33-
sudo pacman -S alacritty --noconfirm
34-
elif [ -x "$(command -v apt)" ]; then
35-
sudo apt install alacritty -y
36-
else
37-
printf "${RED}Unsupported package manager! Please install Alacritty manually.${RESET}\n"
38-
exit 1
39-
fi
40-
printf "${GREEN}Alacritty has been installed.${RESET}\n"
38+
echo -e "${RED}Unsupported package manager! Please install Alacritty manually.${RESET}"
39+
exit 1
4140
fi
41+
42+
echo -e "${GREEN}Alacritty has been installed.${RESET}"
4243
}
4344

4445
setupAlacrittyConfig() {
45-
printf "${CYAN}:: Copying Alacritty config files...${RESET}\n"
46-
if [ -d "${HOME}/.config/alacritty" ] && [ ! -d "${HOME}/.config/alacritty-bak" ]; then
47-
cp -r "${HOME}/.config/alacritty" "${HOME}/.config/alacritty-bak"
48-
printf "${YELLOW}:: Existing Alacritty configuration backed up to alacritty-bak.${RESET}\n"
46+
local alacritty_config="${HOME}/.config/alacritty"
47+
48+
echo -e "${CYAN}:: Setting up Alacritty configuration...${RESET}"
49+
50+
if [ -d "$alacritty_config" ] && [ ! -d "${alacritty_config}-bak" ]; then
51+
mv "$alacritty_config" "${alacritty_config}-bak"
52+
echo -e "${YELLOW}:: Existing Alacritty configuration backed up to alacritty-bak.${RESET}"
4953
fi
50-
mkdir -p "${HOME}/.config/alacritty/"
51-
curl -sSLo "${HOME}/.config/alacritty/alacritty.toml" "https://raw.githubusercontent.com/harilvfs/dwm/refs/heads/main/config/alacritty/alacritty.toml"
52-
curl -sSLo "${HOME}/.config/alacritty/keybinds.toml" "https://raw.githubusercontent.com/harilvfs/dwm/refs/heads/main/config/alacritty/keybinds.toml"
53-
curl -sSLo "${HOME}/.config/alacritty/nordic.toml" "https://raw.githubusercontent.com/harilvfs/dwm/refs/heads/main/config/alacritty/nordic.toml"
54-
printf "${GREEN}:: Alacritty configuration files copied.${RESET}\n"
54+
55+
mkdir -p "$alacritty_config"
56+
57+
base_url="https://raw.githubusercontent.com/harilvfs/dwm/refs/heads/main/config/alacritty"
58+
for file in alacritty.toml keybinds.toml nordic.toml; do
59+
curl -sSLo "$alacritty_config/$file" "$base_url/$file"
60+
done
61+
62+
echo -e "${CYAN}:: Running 'alacritty migrate' to update the config...${RESET}"
63+
(cd "$alacritty_config" && alacritty migrate)
64+
65+
echo -e "${GREEN}:: Alacritty configuration files copied and migrated.${RESET}"
5566
}
5667

5768
confirm_continue
58-
checkAlacritty
69+
installAlacritty
5970
setupAlacrittyConfig
6071

61-
printf "${GREEN}::Alacritty setup complete.${RESET}\n"
72+
echo -e "${GREEN}:: Alacritty setup complete.${RESET}"
73+

scripts/Aur.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/bin/bash
22

3-
tput init
4-
tput clear
3+
clear
54

65
RED='\033[0;31m'
76
GREEN='\033[0;32m'
@@ -48,7 +47,7 @@ while true; do
4847
figlet -f slant "Aur"
4948
echo -e "${ENDCOLOR}"
5049

51-
echo -e "${CYAN}:: AUR Setup Menu${NC}"
50+
echo -e "${CYAN}:: AUR Setup Menu [ For Arch Only ]${NC}"
5251
choice=$(gum choose "Install Paru" "Install Yay" "Exit")
5352

5453
case $choice in

scripts/Fastfetch.sh

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,8 @@ ENDCOLOR="\e[0m"
1212

1313
echo -e "${BLUE}"
1414
figlet -f slant "Fastfetch"
15-
1615
echo -e "${ENDCOLOR}"
1716

18-
echo -e "${BLUE}Do you want to continue with the Fastfetch setup?${ENDCOLOR}"
19-
2017
if ! gum confirm "Continue with Fastfetch setup?"; then
2118
echo -e "${RED}Setup aborted by the user.${NC}"
2219
exit 1
@@ -25,31 +22,62 @@ fi
2522
FASTFETCH_DIR="$HOME/.config/fastfetch"
2623
BACKUP_DIR="$HOME/.config/fastfetch_backup"
2724

28-
if command -v fastfetch &> /dev/null; then
25+
if command -v fastfetch &>/dev/null; then
2926
echo -e "${GREEN}Fastfetch is already installed.${NC}"
3027
else
31-
echo -e "${CYAN}Fastfetch is not installed. :: Installing...${NC}"
32-
sudo pacman -S fastfetch --noconfirm
28+
echo -e "${CYAN}Fastfetch is not installed. Installing...${NC}"
29+
30+
if [ -x "$(command -v pacman)" ]; then
31+
sudo pacman -S fastfetch --noconfirm
32+
elif [ -x "$(command -v dnf)" ]; then
33+
sudo dnf install fastfetch -y
34+
else
35+
echo -e "${RED}Unsupported package manager! Please install Fastfetch manually.${NC}"
36+
exit 1
37+
fi
38+
echo -e "${GREEN}Fastfetch has been installed.${NC}"
3339
fi
3440

3541
if [ -d "$FASTFETCH_DIR" ]; then
3642
echo -e "${RED}Fastfetch configuration directory already exists.${NC}"
3743

3844
if [ ! -d "$BACKUP_DIR" ]; then
3945
echo -e "${CYAN}Creating backup directory...${NC}"
40-
mkdir "$BACKUP_DIR"
46+
mkdir -p "$BACKUP_DIR"
4147
fi
4248

43-
echo -e "${CYAN}:: Backing up existing Fastfetch configuration...${NC}"
44-
mv "$FASTFETCH_DIR"/* "$BACKUP_DIR/"
49+
echo -e "${CYAN}Backing up existing Fastfetch configuration...${NC}"
50+
mv "$FASTFETCH_DIR"/* "$BACKUP_DIR/" 2>/dev/null
4551
echo -e "${GREEN}Backup completed.${NC}"
4652
fi
4753

48-
echo -e "${CYAN}:: Cloning Fastfetch repository...${NC}"
54+
echo -e "${CYAN}Cloning Fastfetch repository...${NC}"
4955
git clone https://github.com/harilvfs/fastfetch "$FASTFETCH_DIR"
5056

51-
echo -e "${CYAN}:: Cleaning up unnecessary files...${NC}"
57+
echo -e "${CYAN}Cleaning up unnecessary files...${NC}"
5258
rm -rf "$FASTFETCH_DIR/.git" "$FASTFETCH_DIR/LICENSE" "$FASTFETCH_DIR/README.md"
5359

60+
while true; do
61+
read -rp "Are you using Alacritty? (y/n): " alacritty_choice
62+
case "$alacritty_choice" in
63+
[Yy])
64+
echo -e "${CYAN}Applying Alacritty-specific configuration...${NC}"
65+
if cd "$FASTFETCH_DIR"; then
66+
rm -f config.jsonc
67+
curl -sSLo config.jsonc "https://raw.githubusercontent.com/harilvfs/i3wmdotfiles/refs/heads/main/fastfetch/config.jsonc"
68+
echo -e "${GREEN}Updated Fastfetch config for Alacritty.${NC}"
69+
else
70+
echo -e "${RED}Error: Could not change to Fastfetch directory.${NC}"
71+
fi
72+
break
73+
;;
74+
[Nn])
75+
echo -e "${CYAN}Skipping Alacritty-specific configuration.${NC}"
76+
break
77+
;;
78+
*) echo -e "${CYAN}Please enter y or n.${NC}" ;;
79+
esac
80+
done
81+
5482
echo -e "${GREEN}Fastfetch setup completed successfully!${NC}"
5583

0 commit comments

Comments
 (0)