Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring i3wm Script #255

Merged
merged 7 commits into from
Feb 5, 2025
Merged

Refactoring i3wm Script #255

merged 7 commits into from
Feb 5, 2025

Conversation

harilvfs
Copy link
Owner

@harilvfs harilvfs commented Feb 3, 2025

Description

This pull request adds/updates/fixes [describe the main goal or feature].

Changes

  • Updates
  • Remove
  • Fixed issue #[issue number].
  • Improved
  • Fixes.
  • Feature
  • UI/UX
  • ZIP

@harilvfs harilvfs self-assigned this Feb 3, 2025
@harilvfs harilvfs marked this pull request as draft February 3, 2025 18:05
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

shfmt

[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 254 to 263 in 417f679

echo "Wallpapers directory already exists. Do you want to remove and re-clone? (y/N)"
read -r choice
if [[ "$choice" == "y" || "$choice" == "Y" ]]; then
echo -e "${GREEN}Removing existing wallpapers directory...${ENDCOLOR}"
rm -rf "$WALLPAPER_DIR"
echo -e "${GREEN}Cloning wallpapers repository...${ENDCOLOR}"
git clone "$WALLPAPER_REPO" "$WALLPAPER_DIR"
else
echo -e "${GREEN}Skipping wallpaper cloning.${ENDCOLOR}"
fi


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 265 to 266 in 417f679

echo -e "${GREEN}Cloning wallpapers repository...${ENDCOLOR}"
git clone "$WALLPAPER_REPO" "$WALLPAPER_DIR"


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 270 to 284 in 417f679

if [ -f /etc/os-release ]; then
. /etc/os-release
case $ID in
arch*)
sudo pacman -S --noconfirm lxappearance
;;
fedora*)
sudo dnf install -y lxappearance
;;
*)
echo "Unsupported distribution."
exit 1
;;
esac
fi


[shfmt] reported by reviewdog 🐶

check_remove_dir ~/themes ~/icons


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 290 to 291 in 417f679

echo "Cloning themes repository..."
git clone https://github.com/harilvfs/themes.git ~/themes


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 293 to 294 in 417f679

echo "Cloning icons repository..."
git clone https://github.com/harilvfs/icons.git ~/icons


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 298 to 310 in 417f679

for dir in "$1" "$2"; do
if [ -d "$dir" ]; then
echo "$dir already exists."
echo "Do you want to remove it? (y/n)"
read -r remove_dir
if [[ "$remove_dir" =~ ^[Yy]$ ]]; then
rm -rf "$dir"
echo "$dir removed."
else
echo "$dir not removed."
fi
fi
done


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 314 to 315 in 417f679

check_remove_dir ~/.icons
check_remove_dir ~/.themes


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 317 to 318 in 417f679

echo "Creating ~/.themes and ~/.icons directories..."
mkdir -p ~/.themes ~/.icons


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 320 to 321 in 417f679

echo "Moving themes to ~/.themes..."
mv ~/themes/* ~/.themes/


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 323 to 324 in 417f679

echo "Moving icons to ~/.icons..."
mv ~/icons/* ~/.icons/


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 334 to 338 in 417f679

if command -v sddm &>/dev/null; then
return 0
else
return 1
fi


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 342 to 356 in 417f679

if [ -f /etc/os-release ]; then
. /etc/os-release
case $ID in
arch*)
sudo pacman -S --noconfirm sddm
;;
fedora*)
sudo dnf install -y sddm
;;
*)
echo "Unsupported distribution."
exit 1
;;
esac
fi


[shfmt] reported by reviewdog 🐶

theme_dir="/usr/share/sddm/themes/catppuccin-mocha"


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 362 to 373 in 417f679

if [ -d "$theme_dir" ]; then
echo "$theme_dir already exists."
echo "Do you want to remove the existing theme and continue? (y/n)"
read -r remove_dir
if [[ "$remove_dir" =~ ^[Yy]$ ]]; then
sudo rm -rf "$theme_dir"
echo "$theme_dir removed."
else
echo "$theme_dir not removed, exiting."
exit 1
fi
fi


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 375 to 377 in 417f679

temp_dir=$(mktemp -d)
echo "Downloading Catppuccin Mocha theme..."
wget https://github.com/catppuccin/sddm/releases/download/v1.0.0/catppuccin-mocha.zip -O "$temp_dir/catppuccin-mocha.zip"


[shfmt] reported by reviewdog 🐶

unzip "$temp_dir/catppuccin-mocha.zip" -d "$temp_dir"


[shfmt] reported by reviewdog 🐶

cd "$temp_dir/catppuccin-mocha" || exit


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 383 to 384 in 417f679

echo "Copying the theme to /usr/share/sddm/themes..."
sudo cp -r "$temp_dir/catppuccin-mocha" /usr/share/sddm/themes/


[shfmt] reported by reviewdog 🐶

rm -rf "$temp_dir"


[shfmt] reported by reviewdog 🐶

echo "Configuring sddm.conf to use the Catppuccin Mocha theme..."


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 392 to 394 in 417f679

if [ ! -f /etc/sddm.conf ]; then
sudo touch /etc/sddm.conf
fi


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 396 to 398 in 417f679

if ! grep -q "\[Theme\]" /etc/sddm.conf; then
echo "[Theme]" | sudo tee -a /etc/sddm.conf >/dev/null
fi


[shfmt] reported by reviewdog 🐶

sudo sed -i '/\[Theme\]/a Current=catppuccin-mocha' /etc/sddm.conf


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 404 to 433 in 417f679

echo "Checking for existing display managers..."
if [[ -f /etc/os-release ]]; then
. /etc/os-release
fi
if command -v gdm &>/dev/null; then
echo "GDM detected. Removing GDM..."
sudo systemctl stop gdm
sudo systemctl disable gdm --now
if [[ "$ID" == "arch" || "$ID_LIKE" == *"arch"* ]]; then
sudo pacman -Rns --noconfirm gdm
elif [[ "$ID" == "fedora" ]]; then
sudo dnf remove -y gdm
fi
fi
if command -v lightdm &>/dev/null; then
echo "LightDM detected. Removing LightDM..."
sudo systemctl stop lightdm
sudo systemctl disable lightdm --now
if [[ "$ID" == "arch" || "$ID_LIKE" == *"arch"* ]]; then
sudo pacman -Rns --noconfirm lightdm
elif [[ "$ID" == "fedora" ]]; then
sudo dnf remove -y lightdm
fi
fi
echo "Enabling and starting the sddm service..."
sudo systemctl enable sddm --now


[shfmt] reported by reviewdog 🐶

install_sddm


[shfmt] reported by reviewdog 🐶

echo "Sddm is already installed, skipping installation."


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 451 to 452 in 417f679

echo -e "${GREEN}Creating script...${ENDCOLOR}"
sudo tee "/usr/local/bin/numlock" >/dev/null <<'EOF'


[shfmt] reported by reviewdog 🐶

sudo chmod +x /usr/local/bin/numlock


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 465 to 466 in 417f679

echo -e "${GREEN}Creating service...${ENDCOLOR}"
sudo tee "/etc/systemd/system/numlock.service" >/dev/null <<'EOF'


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 481 to 502 in 417f679

if [ "$INIT_MANAGER" = "rc-service" ]; then
echo -e "${RED}Unsupported init system.${ENDCOLOR}"
exit 1
fi
if [ ! -f "/usr/local/bin/numlock" ]; then
create_file
fi
if [ ! -f "/etc/systemd/system/numlock.service" ]; then
create_service
fi
echo -n "Do you want to enable Numlock on boot? (y/N): "
read -r confirm
if [ "$confirm" = "y" ] || [ "$confirm" = "Y" ]; then
echo -e "${GREEN}Enabling Numlock on boot...${ENDCOLOR}"
sudo systemctl enable numlock.service
echo -e "${GREEN}Numlock will be enabled on boot.${ENDCOLOR}"
else
echo -e "${GREEN}Numlock will not be enabled on boot.${ENDCOLOR}"
fi


[shfmt] reported by reviewdog 🐶

gum style --border "normal" --width 50 --padding 1 --foreground "white" --background "blue" --align "center" "i3wm setup completed"


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 512 to 515 in 417f679

echo -e "${GREEN}Do you want to reboot now? (y/N): ${ENDCOLOR}"
read -r reboot_choice
if [[ "$reboot_choice" =~ ^[Yy]$ ]]; then
echo -e "${GREEN}Rebooting...${ENDCOLOR}"


[shfmt] reported by reviewdog 🐶

gum spin --title "Rebooting system" -- sh -c "sleep 3"


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 519 to 522 in 417f679

sudo reboot
else
echo -e "${RED}Skipping reboot. You can reboot later.${ENDCOLOR}"
fi

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

shfmt

[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 212 to 228 in be742e1

echo -e "${GREEN}Setting up Polybar...${ENDCOLOR}"
if command -v i3status &>/dev/null; then
echo -e "${GREEN}Removing i3status...${ENDCOLOR}"
if [[ "$OS" == "arch" ]]; then
sudo pacman -Rns --noconfirm i3status
elif [[ "$OS" == "fedora" ]]; then
sudo dnf remove -y i3status
fi
fi
cd "$DOTFILES_DIR" && git switch catppuccin
backup_and_replace "polybar"
git switch main
git switch polybar
backup_and_replace "i3"
git switch main


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 231 to 236 in be742e1

echo -e "${GREEN}Setting up I3status...${ENDCOLOR}"
cd "$DOTFILES_DIR" && git switch nord
backup_and_replace "i3status"
git switch i3status
backup_and_replace "i3"
git switch main


[shfmt] reported by reviewdog 🐶

echo -e "${GREEN}Invalid choice. Defaulting to Polybar.${ENDCOLOR}"


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 250 to 251 in be742e1

echo -e "${GREEN}Creating ~/Pictures directory...${ENDCOLOR}"
mkdir -p "$HOME/Pictures"


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 255 to 264 in be742e1

echo "Wallpapers directory already exists. Do you want to remove and re-clone? (y/N)"
read -r choice
if [[ "$choice" == "y" || "$choice" == "Y" ]]; then
echo -e "${GREEN}Removing existing wallpapers directory...${ENDCOLOR}"
rm -rf "$WALLPAPER_DIR"
echo -e "${GREEN}Cloning wallpapers repository...${ENDCOLOR}"
git clone "$WALLPAPER_REPO" "$WALLPAPER_DIR"
else
echo -e "${GREEN}Skipping wallpaper cloning.${ENDCOLOR}"
fi


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 266 to 267 in be742e1

echo -e "${GREEN}Cloning wallpapers repository...${ENDCOLOR}"
git clone "$WALLPAPER_REPO" "$WALLPAPER_DIR"


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 271 to 285 in be742e1

if [ -f /etc/os-release ]; then
. /etc/os-release
case $ID in
arch*)
sudo pacman -S --noconfirm lxappearance
;;
fedora*)
sudo dnf install -y lxappearance
;;
*)
echo "Unsupported distribution."
exit 1
;;
esac
fi


[shfmt] reported by reviewdog 🐶

check_remove_dir ~/themes ~/icons


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 291 to 292 in be742e1

echo "Cloning themes repository..."
git clone https://github.com/harilvfs/themes.git ~/themes


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 294 to 295 in be742e1

echo "Cloning icons repository..."
git clone https://github.com/harilvfs/icons.git ~/icons


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 299 to 311 in be742e1

for dir in "$1" "$2"; do
if [ -d "$dir" ]; then
echo "$dir already exists."
echo "Do you want to remove it? (y/n)"
read -r remove_dir
if [[ "$remove_dir" =~ ^[Yy]$ ]]; then
rm -rf "$dir"
echo "$dir removed."
else
echo "$dir not removed."
fi
fi
done


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 315 to 316 in be742e1

check_remove_dir ~/.icons
check_remove_dir ~/.themes


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 318 to 319 in be742e1

echo "Creating ~/.themes and ~/.icons directories..."
mkdir -p ~/.themes ~/.icons


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 321 to 322 in be742e1

echo "Moving themes to ~/.themes..."
mv ~/themes/* ~/.themes/


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 324 to 325 in be742e1

echo "Moving icons to ~/.icons..."
mv ~/icons/* ~/.icons/


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 335 to 339 in be742e1

if command -v sddm &>/dev/null; then
return 0
else
return 1
fi


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 343 to 357 in be742e1

if [ -f /etc/os-release ]; then
. /etc/os-release
case $ID in
arch*)
sudo pacman -S --noconfirm sddm
;;
fedora*)
sudo dnf install -y sddm
;;
*)
echo "Unsupported distribution."
exit 1
;;
esac
fi


[shfmt] reported by reviewdog 🐶

theme_dir="/usr/share/sddm/themes/catppuccin-mocha"


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 363 to 374 in be742e1

if [ -d "$theme_dir" ]; then
echo "$theme_dir already exists."
echo "Do you want to remove the existing theme and continue? (y/n)"
read -r remove_dir
if [[ "$remove_dir" =~ ^[Yy]$ ]]; then
sudo rm -rf "$theme_dir"
echo "$theme_dir removed."
else
echo "$theme_dir not removed, exiting."
exit 1
fi
fi


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 376 to 378 in be742e1

temp_dir=$(mktemp -d)
echo "Downloading Catppuccin Mocha theme..."
wget https://github.com/catppuccin/sddm/releases/download/v1.0.0/catppuccin-mocha.zip -O "$temp_dir/catppuccin-mocha.zip"


[shfmt] reported by reviewdog 🐶

unzip "$temp_dir/catppuccin-mocha.zip" -d "$temp_dir"


[shfmt] reported by reviewdog 🐶

cd "$temp_dir/catppuccin-mocha" || exit


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 384 to 385 in be742e1

echo "Copying the theme to /usr/share/sddm/themes..."
sudo cp -r "$temp_dir/catppuccin-mocha" /usr/share/sddm/themes/


[shfmt] reported by reviewdog 🐶

rm -rf "$temp_dir"


[shfmt] reported by reviewdog 🐶

echo "Configuring sddm.conf to use the Catppuccin Mocha theme..."


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 393 to 395 in be742e1

if [ ! -f /etc/sddm.conf ]; then
sudo touch /etc/sddm.conf
fi


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 397 to 399 in be742e1

if ! grep -q "\[Theme\]" /etc/sddm.conf; then
echo "[Theme]" | sudo tee -a /etc/sddm.conf >/dev/null
fi


[shfmt] reported by reviewdog 🐶

sudo sed -i '/\[Theme\]/a Current=catppuccin-mocha' /etc/sddm.conf


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 405 to 434 in be742e1

echo "Checking for existing display managers..."
if [[ -f /etc/os-release ]]; then
. /etc/os-release
fi
if command -v gdm &>/dev/null; then
echo "GDM detected. Removing GDM..."
sudo systemctl stop gdm
sudo systemctl disable gdm --now
if [[ "$ID" == "arch" || "$ID_LIKE" == *"arch"* ]]; then
sudo pacman -Rns --noconfirm gdm
elif [[ "$ID" == "fedora" ]]; then
sudo dnf remove -y gdm
fi
fi
if command -v lightdm &>/dev/null; then
echo "LightDM detected. Removing LightDM..."
sudo systemctl stop lightdm
sudo systemctl disable lightdm --now
if [[ "$ID" == "arch" || "$ID_LIKE" == *"arch"* ]]; then
sudo pacman -Rns --noconfirm lightdm
elif [[ "$ID" == "fedora" ]]; then
sudo dnf remove -y lightdm
fi
fi
echo "Enabling and starting the sddm service..."
sudo systemctl enable sddm --now


[shfmt] reported by reviewdog 🐶

install_sddm


[shfmt] reported by reviewdog 🐶

echo "Sddm is already installed, skipping installation."


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 452 to 453 in be742e1

echo -e "${GREEN}Creating script...${ENDCOLOR}"
sudo tee "/usr/local/bin/numlock" >/dev/null <<'EOF'


[shfmt] reported by reviewdog 🐶

sudo chmod +x /usr/local/bin/numlock


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 466 to 467 in be742e1

echo -e "${GREEN}Creating service...${ENDCOLOR}"
sudo tee "/etc/systemd/system/numlock.service" >/dev/null <<'EOF'


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 482 to 503 in be742e1

if [ "$INIT_MANAGER" = "rc-service" ]; then
echo -e "${RED}Unsupported init system.${ENDCOLOR}"
exit 1
fi
if [ ! -f "/usr/local/bin/numlock" ]; then
create_file
fi
if [ ! -f "/etc/systemd/system/numlock.service" ]; then
create_service
fi
echo -n "Do you want to enable Numlock on boot? (y/N): "
read -r confirm
if [ "$confirm" = "y" ] || [ "$confirm" = "Y" ]; then
echo -e "${GREEN}Enabling Numlock on boot...${ENDCOLOR}"
sudo systemctl enable numlock.service
echo -e "${GREEN}Numlock will be enabled on boot.${ENDCOLOR}"
else
echo -e "${GREEN}Numlock will not be enabled on boot.${ENDCOLOR}"
fi


[shfmt] reported by reviewdog 🐶

gum style --border "normal" --width 50 --padding 1 --foreground "white" --background "blue" --align "center" "i3wm setup completed"


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 513 to 516 in be742e1

echo -e "${GREEN}Do you want to reboot now? (y/N): ${ENDCOLOR}"
read -r reboot_choice
if [[ "$reboot_choice" =~ ^[Yy]$ ]]; then
echo -e "${GREEN}Rebooting...${ENDCOLOR}"


[shfmt] reported by reviewdog 🐶

gum spin --title "Rebooting system" -- sh -c "sleep 3"


[shfmt] reported by reviewdog 🐶

carch/scripts/i3wm.sh

Lines 520 to 523 in be742e1

sudo reboot
else
echo -e "${RED}Skipping reboot. You can reboot later.${ENDCOLOR}"
fi

@harilvfs harilvfs marked this pull request as ready for review February 5, 2025 18:06
Comment on lines +132 to +134
git clone "$DOTFILES_REPO" "$DOTFILES_DIR" || {
echo -e "${GREEN}Failed to clone repository.${ENDCOLOR}";
exit 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shfmt] reported by reviewdog 🐶

Suggested change
git clone "$DOTFILES_REPO" "$DOTFILES_DIR" || {
echo -e "${GREEN}Failed to clone repository.${ENDCOLOR}";
exit 1;
git clone "$DOTFILES_REPO" "$DOTFILES_DIR" || {
echo -e "${GREEN}Failed to clone repository.${ENDCOLOR}"
exit 1

if [[ "$OS" == "arch" ]]; then
sudo pacman -S --noconfirm --needed fish
elif [[ "$OS" == "fedora" ]]; then
sudo dnf install -y fish
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shfmt] reported by reviewdog 🐶

Suggested change
sudo dnf install -y fish
sudo dnf install -y fish

Comment on lines +251 to +252


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shfmt] reported by reviewdog 🐶

Suggested change


echo "Cloning themes repository..."
git clone https://github.com/harilvfs/themes.git ~/themes

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shfmt] reported by reviewdog 🐶

Suggested change

Comment on lines +339 to +340
if command -v sddm &> /dev/null; then
return 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shfmt] reported by reviewdog 🐶

Suggested change
if command -v sddm &> /dev/null; then
return 0
if command -v sddm &>/dev/null; then
return 0

echo ":: Copying GRUB theme..."
sudo cp -r CyberRe /usr/share/grub/themes
if ! grep -q "\[Theme\]" /etc/sddm.conf; then
echo "[Theme]" | sudo tee -a /etc/sddm.conf > /dev/null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shfmt] reported by reviewdog 🐶

Suggested change
echo "[Theme]" | sudo tee -a /etc/sddm.conf > /dev/null
echo "[Theme]" | sudo tee -a /etc/sddm.conf >/dev/null

if ! grep -q "\[Theme\]" /etc/sddm.conf; then
echo "[Theme]" | sudo tee -a /etc/sddm.conf > /dev/null
fi

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shfmt] reported by reviewdog 🐶

Suggested change

. /etc/os-release
fi

if command -v gdm &> /dev/null; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shfmt] reported by reviewdog 🐶

Suggested change
if command -v gdm &> /dev/null; then
if command -v gdm &>/dev/null; then

fi
fi

if command -v lightdm &> /dev/null; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shfmt] reported by reviewdog 🐶

Suggested change
if command -v lightdm &> /dev/null; then
if command -v lightdm &>/dev/null; then

read -r reboot_choice
if [[ "$reboot_choice" =~ ^[Yy]$ ]]; then
echo -e "${GREEN}Rebooting...${ENDCOLOR}"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[shfmt] reported by reviewdog 🐶

Suggested change

@harilvfs harilvfs merged commit c4a93e6 into main Feb 5, 2025
3 of 4 checks passed
@harilvfs harilvfs deleted the i3 branch February 5, 2025 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant