From a90cabc778c087357fcf0db7c1b58b8c9dceddc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Machado?= <59934625+ttmachado@users.noreply.github.com> Date: Sun, 10 Aug 2025 21:21:39 +0100 Subject: [PATCH 1/8] feat: ask before setting up chaotic-aur on fresh install --- bin/omarchy-setup-chaotic-aur | 44 +++++++++++++++++++++++++++++++++++ install/preflight/aur.sh | 21 +---------------- 2 files changed, 45 insertions(+), 20 deletions(-) create mode 100755 bin/omarchy-setup-chaotic-aur diff --git a/bin/omarchy-setup-chaotic-aur b/bin/omarchy-setup-chaotic-aur new file mode 100755 index 000000000000..2951d9f22d52 --- /dev/null +++ b/bin/omarchy-setup-chaotic-aur @@ -0,0 +1,44 @@ +#!/bin/bash + +setup_chaotic_aur() { + if [[ "$(uname -m)" != "x86_64" ]]; then + echo "Chaotic-AUR is only supported on x86_64 architecture." + return 0 + fi + + if grep -q "^\[chaotic-aur\]" /etc/pacman.conf; then + echo "Chaotic-AUR is already configured." + return 0 + fi + + + if ! pacman-key --list-keys 3056513887B78AEB >/dev/null 2>&1 && + sudo pacman-key --recv-key 3056513887B78AEB && + sudo pacman-key --lsign-key 3056513887B78AEB && + sudo pacman -U --noconfirm 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' && + sudo pacman -U --noconfirm 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'; then + + echo -e '\n[chaotic-aur]\nInclude = /etc/pacman.d/chaotic-mirrorlist' | sudo tee -a /etc/pacman.conf >/dev/null + + sudo pacman -Sy --needed --noconfirm yay + else + echo "Failed to install Chaotic-AUR; skipping update to pacman.conf" + fi +} + +echo "Chaotic-AUR is an optional and unofficial repository that provides pre-built packages from the AUR." +echo "Before proceeding, please make sure you understand its implications." +echo "https://aur.chaotic.cx" + +echo -ne "\e[33m\nWould you like to setup the Chaotic-AUR repository? [Y/n]\e[0m" + +while true; do + read -rsn1 choice + if [[ "$choice" =~ ^[YyNn]$ || -z "$choice" ]]; then + case "$choice" in + [Yy] | "" ) setup_chaotic_aur; break ;; + [Nn] ) echo "Chaotic-AUR will not be setup."; break ;; + esac + fi +done +echo \ No newline at end of file diff --git a/install/preflight/aur.sh b/install/preflight/aur.sh index 525b17c1debe..94f5b048482d 100644 --- a/install/preflight/aur.sh +++ b/install/preflight/aur.sh @@ -1,25 +1,6 @@ #!/bin/bash -# Only add Chaotic-AUR if the architecture is x86_64 so ARM users can build the packages -if [[ "$(uname -m)" == "x86_64" ]] && ! command -v yay &>/dev/null; then - # Try installing Chaotic-AUR keyring and mirrorlist - if ! pacman-key --list-keys 3056513887B78AEB >/dev/null 2>&1 && - sudo pacman-key --recv-key 3056513887B78AEB && - sudo pacman-key --lsign-key 3056513887B78AEB && - sudo pacman -U --noconfirm 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' && - sudo pacman -U --noconfirm 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst'; then - - # Add Chaotic-AUR repo to pacman config - if ! grep -q "chaotic-aur" /etc/pacman.conf; then - echo -e '\n[chaotic-aur]\nInclude = /etc/pacman.d/chaotic-mirrorlist' | sudo tee -a /etc/pacman.conf >/dev/null - fi - - # Install yay directly from Chaotic-AUR - sudo pacman -Sy --needed --noconfirm yay - else - echo "Failed to install Chaotic-AUR, so won't include it in pacman config!" - fi -fi +source ~/.local/share/omarchy/bin/omarchy-setup-chaotic-aur # Manually install yay from AUR if not already available if ! command -v yay &>/dev/null; then From 48f890aad5f4dc349c26ac8f1292331fcdcff8e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Machado?= <59934625+ttmachado@users.noreply.github.com> Date: Sun, 10 Aug 2025 22:12:40 +0100 Subject: [PATCH 2/8] chore: change chaotic-aur wording and add preflight feedback --- bin/omarchy-setup-chaotic-aur | 6 +++--- install.sh | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/omarchy-setup-chaotic-aur b/bin/omarchy-setup-chaotic-aur index 2951d9f22d52..d0cca7ceca8a 100755 --- a/bin/omarchy-setup-chaotic-aur +++ b/bin/omarchy-setup-chaotic-aur @@ -26,11 +26,11 @@ setup_chaotic_aur() { fi } -echo "Chaotic-AUR is an optional and unofficial repository that provides pre-built packages from the AUR." -echo "Before proceeding, please make sure you understand its implications." +echo -e "Chaotic-AUR is an unofficial, \e[1moptional\e[0m repository that provides pre-built AUR packages." +echo "Using it is not required. Please ensure you understand the potential risks." echo "https://aur.chaotic.cx" -echo -ne "\e[33m\nWould you like to setup the Chaotic-AUR repository? [Y/n]\e[0m" +echo -ne "\e[33m\nWould you like to setup the Chaotic-AUR repository? [Y/n]\e[0m\n" while true; do read -rsn1 choice diff --git a/install.sh b/install.sh index f2a9f03f78ae..5ae84e27a11c 100755 --- a/install.sh +++ b/install.sh @@ -26,6 +26,8 @@ show_subtext() { } # Install prerequisites +show_logo blackhole +show_subtext "Installing prerequisites [0/5]" source $OMARCHY_INSTALL/preflight/aur.sh source $OMARCHY_INSTALL/preflight/presentation.sh source $OMARCHY_INSTALL/preflight/migrations.sh From 10c7d0716a32808594cf0888770a7239d1c24598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Machado?= <59934625+ttmachado@users.noreply.github.com> Date: Sun, 10 Aug 2025 22:16:53 +0100 Subject: [PATCH 3/8] fix: using texteffects before it's installed --- install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/install.sh b/install.sh index 5ae84e27a11c..f2a9f03f78ae 100755 --- a/install.sh +++ b/install.sh @@ -26,8 +26,6 @@ show_subtext() { } # Install prerequisites -show_logo blackhole -show_subtext "Installing prerequisites [0/5]" source $OMARCHY_INSTALL/preflight/aur.sh source $OMARCHY_INSTALL/preflight/presentation.sh source $OMARCHY_INSTALL/preflight/migrations.sh From 08e34e79a0b75cafd6b740f9318423aa7affce1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Machado?= <59934625+ttmachado@users.noreply.github.com> Date: Sun, 10 Aug 2025 23:24:59 +0100 Subject: [PATCH 4/8] chore: more chaotic-aur wording adjustments --- bin/omarchy-setup-chaotic-aur | 4 ++-- install.sh | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/omarchy-setup-chaotic-aur b/bin/omarchy-setup-chaotic-aur index d0cca7ceca8a..defdbde1c09e 100755 --- a/bin/omarchy-setup-chaotic-aur +++ b/bin/omarchy-setup-chaotic-aur @@ -30,14 +30,14 @@ echo -e "Chaotic-AUR is an unofficial, \e[1moptional\e[0m repository that provid echo "Using it is not required. Please ensure you understand the potential risks." echo "https://aur.chaotic.cx" -echo -ne "\e[33m\nWould you like to setup the Chaotic-AUR repository? [Y/n]\e[0m\n" +echo -ne "\e[33m\nWould you like to setup the Chaotic-AUR repository? [Y/n]\e[0m" while true; do read -rsn1 choice if [[ "$choice" =~ ^[YyNn]$ || -z "$choice" ]]; then case "$choice" in [Yy] | "" ) setup_chaotic_aur; break ;; - [Nn] ) echo "Chaotic-AUR will not be setup."; break ;; + [Nn] ) echo -e "\nChaotic-AUR will not be setup."; break ;; esac fi done diff --git a/install.sh b/install.sh index f2a9f03f78ae..8f537bf75527 100755 --- a/install.sh +++ b/install.sh @@ -26,6 +26,7 @@ show_subtext() { } # Install prerequisites +echo -e "Installing prerequisites [0/5]" source $OMARCHY_INSTALL/preflight/aur.sh source $OMARCHY_INSTALL/preflight/presentation.sh source $OMARCHY_INSTALL/preflight/migrations.sh From d527d0f4113d48cbe004408e8119eba83f7e5d66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Machado?= <59934625+ttmachado@users.noreply.github.com> Date: Sun, 10 Aug 2025 23:28:06 +0100 Subject: [PATCH 5/8] chore: clear terminal before starting the installation --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index 8f537bf75527..1642e138c537 100755 --- a/install.sh +++ b/install.sh @@ -26,6 +26,7 @@ show_subtext() { } # Install prerequisites +clear echo -e "Installing prerequisites [0/5]" source $OMARCHY_INSTALL/preflight/aur.sh source $OMARCHY_INSTALL/preflight/presentation.sh From b4ecf3aa6eb487e6fac72715f6a1b22654786a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Machado?= <59934625+ttmachado@users.noreply.github.com> Date: Sun, 10 Aug 2025 23:34:51 +0100 Subject: [PATCH 6/8] chore: make the prerequisites installation title bold --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 1642e138c537..221edf15a965 100755 --- a/install.sh +++ b/install.sh @@ -27,7 +27,7 @@ show_subtext() { # Install prerequisites clear -echo -e "Installing prerequisites [0/5]" +echo -e "\e[1mInstalling prerequisites [0/5]\e[0m" source $OMARCHY_INSTALL/preflight/aur.sh source $OMARCHY_INSTALL/preflight/presentation.sh source $OMARCHY_INSTALL/preflight/migrations.sh From e49774d0bc487ade4cbb09433c085a348e3ab19a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Machado?= <59934625+ttmachado@users.noreply.github.com> Date: Sun, 10 Aug 2025 23:36:29 +0100 Subject: [PATCH 7/8] chore: add new line after the prerequisites title --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 221edf15a965..f3619784b22a 100755 --- a/install.sh +++ b/install.sh @@ -27,7 +27,7 @@ show_subtext() { # Install prerequisites clear -echo -e "\e[1mInstalling prerequisites [0/5]\e[0m" +echo -e "\e[1mInstalling prerequisites [0/5]\e[0m\n" source $OMARCHY_INSTALL/preflight/aur.sh source $OMARCHY_INSTALL/preflight/presentation.sh source $OMARCHY_INSTALL/preflight/migrations.sh From 63245e3879e76a41cc6f6ded235ded1759f3ac02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Machado?= <59934625+ttmachado@users.noreply.github.com> Date: Mon, 11 Aug 2025 01:17:47 +0100 Subject: [PATCH 8/8] chore: new line after chaotic-aur choice --- bin/omarchy-setup-chaotic-aur | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/omarchy-setup-chaotic-aur b/bin/omarchy-setup-chaotic-aur index defdbde1c09e..c41d4894cb03 100755 --- a/bin/omarchy-setup-chaotic-aur +++ b/bin/omarchy-setup-chaotic-aur @@ -36,8 +36,8 @@ while true; do read -rsn1 choice if [[ "$choice" =~ ^[YyNn]$ || -z "$choice" ]]; then case "$choice" in - [Yy] | "" ) setup_chaotic_aur; break ;; - [Nn] ) echo -e "\nChaotic-AUR will not be setup."; break ;; + [Yy] | "" ) echo; setup_chaotic_aur; break ;; + [Nn] ) echo; echo "Chaotic-AUR will not be setup."; break ;; esac fi done