diff --git a/README.md b/README.md index 982f10273..28e0552d2 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ | [Hyprland](https://github.com/hyprwm/hyprland) | The compositor (manages and renders windows) | | [Quickshell](https://quickshell.outfoxxed.me/) | A QtQuick-based widget system, used for the status bar, sidebars, etc. | - - For the full list of dependencies, see the [arch-packages folder](https://github.com/end-4/dots-hyprland/tree/main/arch-packages) + - For the full list of dependencies, see the [dist-arch folder](https://github.com/end-4/dots-hyprland/tree/main/dist-arch) - THERE IS NO WAYBAR STOP FUCKING CALLING EVERY BAR WAYBAR diff --git a/diagnose b/diagnose index 3d67cdb81..667cba850 100755 --- a/diagnose +++ b/diagnose @@ -2,14 +2,14 @@ # # This script is for quickly generate helpful info # It should be as independent as possible and should not source other files unless it has to -COLOR_RED='\e[31m' -COLOR_RESET='\e[00m' +STY_RED='\e[31m' +STY_RESET='\e[00m' cd "$(dirname "$0")";export base="$(pwd)" output_file=diagnose.result;rm $output_file export LANG=C;export LC_ALL=C case $(whoami) in - root)echo -e "${COLOR_RED}[$0]: This script is NOT to be executed with sudo or as root. Aborting...${COLOR_RESET}";exit 1;; + root)echo -e "${STY_RED}[$0]: This script is NOT to be executed with sudo or as root. Aborting...${STY_RESET}";exit 1;; esac diff --git a/arch-packages/.gitignore b/dist-arch/.gitignore similarity index 100% rename from arch-packages/.gitignore rename to dist-arch/.gitignore diff --git a/arch-packages/illogical-impulse-audio/PKGBUILD b/dist-arch/illogical-impulse-audio/PKGBUILD similarity index 100% rename from arch-packages/illogical-impulse-audio/PKGBUILD rename to dist-arch/illogical-impulse-audio/PKGBUILD diff --git a/arch-packages/illogical-impulse-backlight/PKGBUILD b/dist-arch/illogical-impulse-backlight/PKGBUILD similarity index 100% rename from arch-packages/illogical-impulse-backlight/PKGBUILD rename to dist-arch/illogical-impulse-backlight/PKGBUILD diff --git a/arch-packages/illogical-impulse-basic/PKGBUILD b/dist-arch/illogical-impulse-basic/PKGBUILD similarity index 100% rename from arch-packages/illogical-impulse-basic/PKGBUILD rename to dist-arch/illogical-impulse-basic/PKGBUILD diff --git a/arch-packages/illogical-impulse-bibata-modern-classic-bin/PKGBUILD b/dist-arch/illogical-impulse-bibata-modern-classic-bin/PKGBUILD similarity index 100% rename from arch-packages/illogical-impulse-bibata-modern-classic-bin/PKGBUILD rename to dist-arch/illogical-impulse-bibata-modern-classic-bin/PKGBUILD diff --git a/arch-packages/illogical-impulse-fonts-themes/PKGBUILD b/dist-arch/illogical-impulse-fonts-themes/PKGBUILD similarity index 100% rename from arch-packages/illogical-impulse-fonts-themes/PKGBUILD rename to dist-arch/illogical-impulse-fonts-themes/PKGBUILD diff --git a/arch-packages/illogical-impulse-hyprland/PKGBUILD b/dist-arch/illogical-impulse-hyprland/PKGBUILD similarity index 100% rename from arch-packages/illogical-impulse-hyprland/PKGBUILD rename to dist-arch/illogical-impulse-hyprland/PKGBUILD diff --git a/arch-packages/illogical-impulse-kde/PKGBUILD b/dist-arch/illogical-impulse-kde/PKGBUILD similarity index 100% rename from arch-packages/illogical-impulse-kde/PKGBUILD rename to dist-arch/illogical-impulse-kde/PKGBUILD diff --git a/arch-packages/illogical-impulse-microtex-git/.gitignore b/dist-arch/illogical-impulse-microtex-git/.gitignore similarity index 100% rename from arch-packages/illogical-impulse-microtex-git/.gitignore rename to dist-arch/illogical-impulse-microtex-git/.gitignore diff --git a/arch-packages/illogical-impulse-microtex-git/PKGBUILD b/dist-arch/illogical-impulse-microtex-git/PKGBUILD similarity index 100% rename from arch-packages/illogical-impulse-microtex-git/PKGBUILD rename to dist-arch/illogical-impulse-microtex-git/PKGBUILD diff --git a/arch-packages/illogical-impulse-oneui4-icons-git/.gitignore b/dist-arch/illogical-impulse-oneui4-icons-git/.gitignore similarity index 100% rename from arch-packages/illogical-impulse-oneui4-icons-git/.gitignore rename to dist-arch/illogical-impulse-oneui4-icons-git/.gitignore diff --git a/arch-packages/illogical-impulse-oneui4-icons-git/PKGBUILD b/dist-arch/illogical-impulse-oneui4-icons-git/PKGBUILD similarity index 100% rename from arch-packages/illogical-impulse-oneui4-icons-git/PKGBUILD rename to dist-arch/illogical-impulse-oneui4-icons-git/PKGBUILD diff --git a/arch-packages/illogical-impulse-portal/PKGBUILD b/dist-arch/illogical-impulse-portal/PKGBUILD similarity index 100% rename from arch-packages/illogical-impulse-portal/PKGBUILD rename to dist-arch/illogical-impulse-portal/PKGBUILD diff --git a/arch-packages/illogical-impulse-python/PKGBUILD b/dist-arch/illogical-impulse-python/PKGBUILD similarity index 100% rename from arch-packages/illogical-impulse-python/PKGBUILD rename to dist-arch/illogical-impulse-python/PKGBUILD diff --git a/arch-packages/illogical-impulse-screencapture/PKGBUILD b/dist-arch/illogical-impulse-screencapture/PKGBUILD similarity index 100% rename from arch-packages/illogical-impulse-screencapture/PKGBUILD rename to dist-arch/illogical-impulse-screencapture/PKGBUILD diff --git a/arch-packages/illogical-impulse-toolkit/PKGBUILD b/dist-arch/illogical-impulse-toolkit/PKGBUILD similarity index 100% rename from arch-packages/illogical-impulse-toolkit/PKGBUILD rename to dist-arch/illogical-impulse-toolkit/PKGBUILD diff --git a/arch-packages/illogical-impulse-widgets/PKGBUILD b/dist-arch/illogical-impulse-widgets/PKGBUILD similarity index 100% rename from arch-packages/illogical-impulse-widgets/PKGBUILD rename to dist-arch/illogical-impulse-widgets/PKGBUILD diff --git a/install.sh b/install.sh index ce0ce1a35..4acf78f7e 100755 --- a/install.sh +++ b/install.sh @@ -14,16 +14,16 @@ set -e source ./scriptdata/install-greeting.sh ##################################################################################### if [[ "${SKIP_ALLDEPS}" != true ]]; then - printf "${COLOR_CYAN}[$0]: 1. Install dependencies\n${COLOR_RESET}" + printf "${STY_CYAN}[$0]: 1. Install dependencies\n${STY_RESET}" source ./scriptdata/install-deps.sh fi ##################################################################################### if [[ "${SKIP_ALLSETUPS}" != true ]]; then - printf "${COLOR_CYAN}[$0]: 2. Setup for user groups/services etc\n${COLOR_RESET}" + printf "${STY_CYAN}[$0]: 2. Setup for user groups/services etc\n${STY_RESET}" source ./scriptdata/install-setups.sh fi ##################################################################################### if [[ "${SKIP_ALLFILES}" != true ]]; then - printf "${COLOR_CYAN}[$0]: 3. Copying + Configuring\n${COLOR_RESET}" + printf "${STY_CYAN}[$0]: 3. Copying + Configuring\n${STY_RESET}" source ./scriptdata/install-files.sh fi diff --git a/manual-install-helper.sh b/manual-install-helper.sh deleted file mode 100755 index 7ea34ebee..000000000 --- a/manual-install-helper.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash -# -# This script is for installing/updating some "packages" for non-Arch users. -# - -cd "$(dirname "$0")" -export base="$(pwd)" -source ./scriptdata/environment-variables.sh -source ./scriptdata/functions.sh -source ./scriptdata/installers.sh -prevent_sudo_or_root - -if command -v pacman >/dev/null 2>&1;then printf "${COLOR_RED}[$0]: pacman found, it seems that the system is ArchLinux or Arch-based distro. Aborting...${COLOR_RESET}\n";exit 1;fi -v install-Rubik -v install-Gabarito -v install-OneUI -v install-bibata -v install-MicroTeX -v install-uv -v install-python-packages - -if [[ -z "${ILLOGICAL_IMPULSE_VIRTUAL_ENV}" ]]; then - printf "\n${COLOR_RED}[$0]: \!! Important \!! : Please ensure environment variable ${COLOR_RESET} \$ILLOGICAL_IMPULSE_VIRTUAL_ENV ${COLOR_RED} is set to proper value (by default \"~/.local/state/ags/.venv\"), or AGS config will not work. We have already provided this configuration in ~/.config/hypr/hyprland/env.conf, but you need to ensure it is included in hyprland.conf, and also a restart is needed for applying it.${COLOR_RESET}\n" -fi diff --git a/scriptdata/environment-variables.sh b/scriptdata/environment-variables.sh index 44057679c..0da81f112 100644 --- a/scriptdata/environment-variables.sh +++ b/scriptdata/environment-variables.sh @@ -7,14 +7,19 @@ XDG_STATE_HOME=${XDG_STATE_HOME:-$HOME/.local/state} BACKUP_DIR=${BACKUP_DIR:-$HOME/backup} -COLOR_RED='\e[00m\e[31m' -COLOR_GREEN='\e[00m\e[32m' -COLOR_YELLOW='\e[00m\e[33m' -COLOR_BLUE='\e[00m\e[34m' -COLOR_PURPLE='\e[00m\e[35m' -COLOR_CYAN='\e[00m\e[36m' -COLOR_RESET='\e[00m' +STY_RED='\e[00m\e[31m' +STY_GREEN='\e[00m\e[32m' +STY_YELLOW='\e[00m\e[33m' +STY_BLUE='\e[00m\e[34m' +STY_PURPLE='\e[00m\e[35m' +STY_CYAN='\e[00m\e[36m' -STYLE_UNDERLINE='\e[4m' -BG_COLOR_CYAN='\e[30m\e[46m' -BG_COLOR_RED='\e[30m\e[41m' +STY_BG_RED='\e[30m\e[41m' +STY_BG_GREEN='\e[30m\e[42m' +STY_BG_YELLOW='\e[30m\e[43m' +STY_BG_BLUE='\e[30m\e[44m' +STY_BG_PURPLE='\e[30m\e[45m' +STY_BG_CYAN='\e[30m\e[46m' + +STY_UNDERLINE='\e[4m' +STY_RESET='\e[00m' diff --git a/scriptdata/functions.sh b/scriptdata/functions.sh index e5477fa0c..19410b5eb 100644 --- a/scriptdata/functions.sh +++ b/scriptdata/functions.sh @@ -8,60 +8,60 @@ function try { "$@" || sleep 0; } function v(){ echo -e "####################################################" - echo -e "${COLOR_BLUE}[$0]: Next command:${COLOR_RESET}" - echo -e "${COLOR_GREEN}$@${COLOR_RESET}" + echo -e "${STY_BLUE}[$0]: Next command:${STY_RESET}" + echo -e "${STY_GREEN}$@${STY_RESET}" execute=true if $ask;then while true;do - echo -e "${COLOR_BLUE}Execute? ${COLOR_RESET}" + echo -e "${STY_BLUE}Execute? ${STY_RESET}" echo " y = Yes" echo " e = Exit now" echo " s = Skip this command (NOT recommended - your setup might not work correctly)" echo " yesforall = Yes and don't ask again; NOT recommended unless you really sure" read -p "====> " p case $p in - [yY]) echo -e "${COLOR_BLUE}OK, executing...${COLOR_RESET}" ;break ;; - [eE]) echo -e "${COLOR_BLUE}Exiting...${COLOR_RESET}" ;exit ;break ;; - [sS]) echo -e "${COLOR_BLUE}Alright, skipping this one...${COLOR_RESET}" ;execute=false ;break ;; - "yesforall") echo -e "${COLOR_BLUE}Alright, won't ask again. Executing...${COLOR_RESET}"; ask=false ;break ;; - *) echo -e "${COLOR_RED}Please enter [y/e/s/yesforall].${COLOR_RESET}";; + [yY]) echo -e "${STY_BLUE}OK, executing...${STY_RESET}" ;break ;; + [eE]) echo -e "${STY_BLUE}Exiting...${STY_RESET}" ;exit ;break ;; + [sS]) echo -e "${STY_BLUE}Alright, skipping this one...${STY_RESET}" ;execute=false ;break ;; + "yesforall") echo -e "${STY_BLUE}Alright, won't ask again. Executing...${STY_RESET}"; ask=false ;break ;; + *) echo -e "${STY_RED}Please enter [y/e/s/yesforall].${STY_RESET}";; esac done fi if $execute;then x "$@";else - echo -e "${COLOR_YELLOW}[$0]: Skipped \"$@\"${COLOR_RESET}" + echo -e "${STY_YELLOW}[$0]: Skipped \"$@\"${STY_RESET}" fi } # When use v() for a defined function, use x() INSIDE its definition to catch errors. function x(){ if "$@";then cmdstatus=0;else cmdstatus=1;fi # 0=normal; 1=failed; 2=failed but ignored while [ $cmdstatus == 1 ] ;do - echo -e "${COLOR_RED}[$0]: Command \"${COLOR_GREEN}$@${COLOR_RED}\" has failed." + echo -e "${STY_RED}[$0]: Command \"${STY_GREEN}$@${STY_RED}\" has failed." echo -e "You may need to resolve the problem manually BEFORE repeating this command." - echo -e "[Tip] If a certain package is failing to install, try installing it separately in another terminal.${COLOR_RESET}" + echo -e "[Tip] If a certain package is failing to install, try installing it separately in another terminal.${STY_RESET}" echo " r = Repeat this command (DEFAULT)" echo " e = Exit now" echo " i = Ignore this error and continue (your setup might not work correctly)" read -p " [R/e/i]: " p case $p in - [iI]) echo -e "${COLOR_BLUE}Alright, ignore and continue...${COLOR_RESET}";cmdstatus=2;; - [eE]) echo -e "${COLOR_BLUE}Alright, will exit.${COLOR_RESET}";break;; - *) echo -e "${COLOR_BLUE}OK, repeating...${COLOR_RESET}" + [iI]) echo -e "${STY_BLUE}Alright, ignore and continue...${STY_RESET}";cmdstatus=2;; + [eE]) echo -e "${STY_BLUE}Alright, will exit.${STY_RESET}";break;; + *) echo -e "${STY_BLUE}OK, repeating...${STY_RESET}" if "$@";then cmdstatus=0;else cmdstatus=1;fi ;; esac done case $cmdstatus in - 0) echo -e "${COLOR_BLUE}[$0]: Command \"${COLOR_GREEN}$@${COLOR_BLUE}\" finished.${COLOR_RESET}";; - 1) echo -e "${COLOR_RED}[$0]: Command \"${COLOR_GREEN}$@${COLOR_RED}\" has failed. Exiting...${COLOR_RESET}";exit 1;; - 2) echo -e "${COLOR_RED}[$0]: Command \"${COLOR_GREEN}$@${COLOR_RED}\" has failed but ignored by user.${COLOR_RESET}";; + 0) echo -e "${STY_BLUE}[$0]: Command \"${STY_GREEN}$@${STY_BLUE}\" finished.${STY_RESET}";; + 1) echo -e "${STY_RED}[$0]: Command \"${STY_GREEN}$@${STY_RED}\" has failed. Exiting...${STY_RESET}";exit 1;; + 2) echo -e "${STY_RED}[$0]: Command \"${STY_GREEN}$@${STY_RED}\" has failed but ignored by user.${STY_RESET}";; esac } function showfun(){ - echo -e "${COLOR_BLUE}[$0]: The definition of function \"$1\" is as follows:${COLOR_RESET}" - printf "${COLOR_GREEN}" + echo -e "${STY_BLUE}[$0]: The definition of function \"$1\" is as follows:${STY_RESET}" + printf "${STY_GREEN}" type -a $1 - printf "${COLOR_RESET}" + printf "${STY_RESET}" } function remove_bashcomments_emptylines(){ mkdir -p $(dirname $2) @@ -69,6 +69,6 @@ function remove_bashcomments_emptylines(){ } function prevent_sudo_or_root(){ case $(whoami) in - root) echo -e "${COLOR_RED}[$0]: This script is NOT to be executed with sudo or as root. Aborting...${COLOR_RESET}";exit 1;; + root) echo -e "${STY_RED}[$0]: This script is NOT to be executed with sudo or as root. Aborting...${STY_RESET}";exit 1;; esac } diff --git a/scriptdata/install-deps-arch.sh b/scriptdata/install-deps-arch.sh index ecf1402ed..ed906efef 100644 --- a/scriptdata/install-deps-arch.sh +++ b/scriptdata/install-deps-arch.sh @@ -13,7 +13,7 @@ install-yay(){ } handle-deprecated-dependencies(){ - printf "${COLOR_CYAN}[$0]: Removing deprecated dependencies:${COLOR_RESET}\n" + printf "${STY_CYAN}[$0]: Removing deprecated dependencies:${STY_RESET}\n" for i in illogical-impulse-{microtex,pymyc-aur,ags,agsv1} {hyprutils,hyprpicker,hyprlang,hypridle,hyprland-qt-support,hyprland-qtutils,hyprlock,xdg-desktop-portal-hyprland,hyprcursor,hyprwayland-scanner,hyprland}-git;do try sudo pacman --noconfirm -Rdd $i;done # Convert old dependencies to non explicit dependencies so that they can be orphaned if not in meta packages remove_bashcomments_emptylines ./scriptdata/previous_dependencies.conf ./cache/old_deps_stripped.conf @@ -31,7 +31,7 @@ handle-deprecated-dependencies(){ ##################################################################################### if ! command -v pacman >/dev/null 2>&1; then - printf "${COLOR_RED}[$0]: pacman not found, it seems that the system is not ArchLinux or Arch-based distros. Aborting...${COLOR_RESET}\n" + printf "${STY_RED}[$0]: pacman not found, it seems that the system is not ArchLinux or Arch-based distros. Aborting...${STY_RESET}\n" exit 1 fi @@ -47,7 +47,7 @@ readarray -t pkglist < ./cache/dependencies_stripped.conf # Use yay. Because paru does not support cleanbuild. # Also see https://wiki.hyprland.org/FAQ/#how-do-i-update if ! command -v yay >/dev/null 2>&1;then - echo -e "${COLOR_YELLOW}[$0]: \"yay\" not found.${COLOR_RESET}" + echo -e "${STY_YELLOW}[$0]: \"yay\" not found.${STY_RESET}" showfun install-yay v install-yay fi @@ -82,12 +82,12 @@ install-local-pkgbuild() { } # Install core dependencies from the meta-packages -metapkgs=(./arch-packages/illogical-impulse-{audio,backlight,basic,fonts-themes,kde,portal,python,screencapture,toolkit,widgets}) -metapkgs+=(./arch-packages/illogical-impulse-hyprland) -metapkgs+=(./arch-packages/illogical-impulse-microtex-git) -# metapkgs+=(./arch-packages/illogical-impulse-oneui4-icons-git) +metapkgs=(./dist-arch/illogical-impulse-{audio,backlight,basic,fonts-themes,kde,portal,python,screencapture,toolkit,widgets}) +metapkgs+=(./dist-arch/illogical-impulse-hyprland) +metapkgs+=(./dist-arch/illogical-impulse-microtex-git) +# metapkgs+=(./dist-arch/packages/illogical-impulse-oneui4-icons-git) [[ -f /usr/share/icons/Bibata-Modern-Classic/index.theme ]] || \ - metapkgs+=(./arch-packages/illogical-impulse-bibata-modern-classic-bin) + metapkgs+=(./dist-arch/illogical-impulse-bibata-modern-classic-bin) for i in "${metapkgs[@]}"; do metainstallflags="--needed" @@ -101,9 +101,9 @@ case $SKIP_PLASMAINTG in true) sleep 0;; *) if $ask;then - echo -e "${COLOR_YELLOW}[$0]: NOTE: The size of \"plasma-browser-integration\" is about 600 MiB.${COLOR_RESET}" - echo -e "${COLOR_YELLOW}It is needed if you want playtime of media in Firefox to be shown on the music controls widget.${COLOR_RESET}" - echo -e "${COLOR_YELLOW}Install it? [y/N]${COLOR_RESET}" + echo -e "${STY_YELLOW}[$0]: NOTE: The size of \"plasma-browser-integration\" is about 600 MiB.${STY_RESET}" + echo -e "${STY_YELLOW}It is needed if you want playtime of media in Firefox to be shown on the music controls widget.${STY_RESET}" + echo -e "${STY_YELLOW}Install it? [y/N]${STY_RESET}" read -p "====> " p else p=y diff --git a/scriptdata/install-deps.sh b/scriptdata/install-deps.sh index 5351686a3..a100d7885 100644 --- a/scriptdata/install-deps.sh +++ b/scriptdata/install-deps.sh @@ -9,13 +9,13 @@ export MACHINE_ARCH=$(uname -m) case $MACHINE_ARCH in "x86_64") sleep 0;; *) - printf "${COLOR_YELLOW}" + printf "${STY_YELLOW}" printf "===WARNING===\n" printf "Detected machine architecture: ${MACHINE_ARCH}\n" printf "This script only supports x86_64.\n" printf "It is very likely to fail when installing dependencies on your machine.\n" printf "\n" - printf "${COLOR_RESET}" + printf "${STY_RESET}" ;; esac @@ -34,64 +34,68 @@ export OS_DISTRO_ID_LIKE=$(awk -F'=' '/^ID_LIKE=/ { gsub("\"","",$2); print tolo if [[ "$INSTALL_VIA_NIX" == "true" ]]; then - printf "${COLOR_YELLOW}" + printf "${STY_YELLOW}" printf "===WARNING===\n" printf "Nix will be used to install dependencies.\n" printf "The process is still WIP.\n" - printf "Only continue at your own risk.\n" + printf "Proceed only at your own risk.\n" printf "\n" - printf "${COLOR_RESET}" + printf "${STY_RESET}" source ./scriptdata/install-deps-nix.sh elif [[ "$OS_DISTRO_ID" =~ ^(arch|endeavouros)$ ]]; then - printf "${COLOR_GREEN}" + printf "${STY_GREEN}" printf "===INFO===\n" printf "Detected distro ID: ${OS_DISTRO_ID}\n" printf "./scriptdata/install-deps-arch.sh will be used.\n" printf "\n" - printf "${COLOR_RESET}" + printf "${STY_RESET}" source ./scriptdata/install-deps-arch.sh elif [[ -f "./scriptdata/install-deps-${OS_DISTRO_ID}.sh" ]]; then - printf "${COLOR_PURPLE}" + printf "${STY_PURPLE}" printf "===NOTICE===\n" printf "Detected distro ID: ${OS_DISTRO_ID}\n" printf "./scriptdata/install-deps-${OS_DISTRO_ID}.sh detected and will be used.\n" + printf "This file is provided by the community.\n" printf "It is not officially supported by github:end-4/dots-hyprland .\n" - printf "Use it only at your own risk.\n" + printf "${STY_BG_PURPLE}" + printf "If you find out any problems about it, PR is welcomed if you are able to address it. Or, create a discussion about it, but please do not submit issue, because the developers do not use this distro, therefore they cannot help.${STY_RESET}\n" + printf "${STY_PURPLE}" + printf "Proceed only at your own risk.\n" printf "\n" - printf "${COLOR_RESET}" + printf "${STY_RESET}" source ./scriptdata/install-deps-${OS_DISTRO_ID}.sh elif [[ "$OS_DISTRO_ID_LIKE" == "arch" ]]; then - printf "${COLOR_YELLOW}" + printf "${STY_YELLOW}" printf "===WARNING===\n" printf "Detected distro ID: ${OS_DISTRO_ID}\n" printf "Detected distro ID_LIKE: ${OS_DISTRO_ID_LIKE}\n" printf "./scriptdata/install-deps-arch.sh will be used.\n" printf "Ideally, it should also work for your distro.\n" printf "Still, there is a chance that it not works as expected or even fails.\n" - printf "Use it only at your own risk.\n" + printf "Proceed only at your own risk.\n" printf "\n" - printf "${COLOR_RESET}" + printf "${STY_RESET}" source ./scriptdata/install-deps-arch.sh else - printf "${COLOR_RED}" + printf "${STY_RED}" printf "===URGENT===\n" printf "Detected distro ID: ${OS_DISTRO_ID}\n" printf "Detected distro ID_LIKE: ${OS_DISTRO_ID_LIKE}\n" - printf "No suitable dependency installation script found.\n" + printf "./scriptdata/install-deps-${OS_DISTRO_ID}.sh not found.\n" printf "./scriptdata/install-deps-fallback.sh will be used.\n" printf "It may disrupt your system and will likely fail without your manual intervention.\n" - printf "Only continue at your own risk.\n" - printf "${COLOR_RESET}" - printf "${BG_COLOR_RED}" - printf "To tell you the truth, it is completely not worky at this time. The prompt here is only for testing and WIP. PLEASE JUST QUIT IMMEDIATELY.${COLOR_RESET}\n" + printf "Proceed only at your own risk.\n" + printf "${STY_RESET}" + printf "${STY_BG_RED}" + printf "To tell you the truth, it is completely not worky at this time. The prompt here is only for testing and WIP. PLEASE JUST QUIT IMMEDIATELY.${STY_RESET}\n" read -p "Still continue? [y/N] ====> " p case $p in [yY]) sleep 0 ;; diff --git a/scriptdata/install-files.sh b/scriptdata/install-files.sh index 845f45c4b..7d39f2b4d 100644 --- a/scriptdata/install-files.sh +++ b/scriptdata/install-files.sh @@ -13,14 +13,14 @@ function backup_configs(){ } function ask_backup_configs(){ - printf "${COLOR_RED}" + printf "${STY_RED}" printf "Would you like to create a backup for \"$XDG_CONFIG_HOME\" and \"$HOME/.local/\" folders?\n[y/N]: " read -p " " backup_confirm case $backup_confirm in [yY][eE][sS]|[yY]) backup_configs ;; *) echo "Skipping backup..." ;; esac - printf "${COLOR_RESET}" + printf "${STY_RESET}" } ##################################################################################### @@ -65,40 +65,40 @@ case $SKIP_HYPRLAND in v rsync -av --delete --exclude '/custom' --exclude '/hyprlock.conf' --exclude '/hypridle.conf' --exclude '/hyprland.conf' .config/hypr/ "$XDG_CONFIG_HOME"/hypr/ t="$XDG_CONFIG_HOME/hypr/hyprland.conf" if [ -f $t ];then - echo -e "${COLOR_BLUE}[$0]: \"$t\" already exists.${COLOR_RESET}" + echo -e "${STY_BLUE}[$0]: \"$t\" already exists.${STY_RESET}" v mv $t $t.old v cp -f .config/hypr/hyprland.conf $t existed_hypr_conf_firstrun=y else - echo -e "${COLOR_YELLOW}[$0]: \"$t\" does not exist yet.${COLOR_RESET}" + echo -e "${STY_YELLOW}[$0]: \"$t\" does not exist yet.${STY_RESET}" v cp .config/hypr/hyprland.conf $t existed_hypr_conf=n fi t="$XDG_CONFIG_HOME/hypr/hypridle.conf" if [ -f $t ];then - echo -e "${COLOR_BLUE}[$0]: \"$t\" already exists.${COLOR_RESET}" + echo -e "${STY_BLUE}[$0]: \"$t\" already exists.${STY_RESET}" v cp -f .config/hypr/hypridle.conf $t.new existed_hypridle_conf=y else - echo -e "${COLOR_YELLOW}[$0]: \"$t\" does not exist yet.${COLOR_RESET}" + echo -e "${STY_YELLOW}[$0]: \"$t\" does not exist yet.${STY_RESET}" v cp .config/hypr/hypridle.conf $t existed_hypridle_conf=n fi t="$XDG_CONFIG_HOME/hypr/hyprlock.conf" if [ -f $t ];then - echo -e "${COLOR_BLUE}[$0]: \"$t\" already exists.${COLOR_RESET}" + echo -e "${STY_BLUE}[$0]: \"$t\" already exists.${STY_RESET}" v cp -f .config/hypr/hyprlock.conf $t.new existed_hyprlock_conf=y else - echo -e "${COLOR_YELLOW}[$0]: \"$t\" does not exist yet.${COLOR_RESET}" + echo -e "${STY_YELLOW}[$0]: \"$t\" does not exist yet.${STY_RESET}" v cp .config/hypr/hyprlock.conf $t existed_hyprlock_conf=n fi t="$XDG_CONFIG_HOME/hypr/custom" if [ -d $t ];then - echo -e "${COLOR_BLUE}[$0]: \"$t\" already exists, will not do anything.${COLOR_RESET}" + echo -e "${STY_BLUE}[$0]: \"$t\" already exists, will not do anything.${STY_RESET}" else - echo -e "${COLOR_YELLOW}[$0]: \"$t\" does not exist yet.${COLOR_RESET}" + echo -e "${STY_YELLOW}[$0]: \"$t\" does not exist yet.${STY_RESET}" v rsync -av --delete .config/hypr/custom/ $t/ fi ;; @@ -138,39 +138,39 @@ done printf "\n" printf "\n" printf "\n" -printf "${COLOR_CYAN}[$0]: Finished${COLOR_RESET}\n" +printf "${STY_CYAN}[$0]: Finished${STY_RESET}\n" printf "\n" -printf "${COLOR_CYAN}When starting Hyprland from your display manager (login screen) ${COLOR_RED} DO NOT SELECT UWSM ${COLOR_RESET}\n" +printf "${STY_CYAN}When starting Hyprland from your display manager (login screen) ${STY_RED} DO NOT SELECT UWSM ${STY_RESET}\n" printf "\n" -printf "${COLOR_CYAN}If you are already running Hyprland,${COLOR_RESET}\n" -printf "${COLOR_CYAN}Press ${BG_COLOR_CYAN} Ctrl+Super+T ${BG_COLOR_CYAN} to select a wallpaper${COLOR_RESET}\n" -printf "${COLOR_CYAN}Press ${BG_COLOR_CYAN} Super+/ ${COLOR_CYAN} for a list of keybinds${COLOR_RESET}\n" +printf "${STY_CYAN}If you are already running Hyprland,${STY_RESET}\n" +printf "${STY_CYAN}Press ${STY_BG_CYAN} Ctrl+Super+T ${STY_BG_CYAN} to select a wallpaper${STY_RESET}\n" +printf "${STY_CYAN}Press ${STY_BG_CYAN} Super+/ ${STY_CYAN} for a list of keybinds${STY_RESET}\n" printf "\n" -printf "${COLOR_CYAN}For suggestions/hints after installation:${COLOR_RESET}\n" -printf "${COLOR_CYAN}${STYLE_UNDERLINE} https://end-4.github.io/dots-hyprland-wiki/en/ii-qs/01setup/#post-installation ${COLOR_RESET}\n" +printf "${STY_CYAN}For suggestions/hints after installation:${STY_RESET}\n" +printf "${STY_CYAN}${STY_UNDERLINE} https://end-4.github.io/dots-hyprland-wiki/en/ii-qs/01setup/#post-installation ${STY_RESET}\n" printf "\n" case $existed_hypr_conf_firstrun in - y) printf "\n${COLOR_YELLOW}[$0]: Warning: \"$XDG_CONFIG_HOME/hypr/hyprland.conf\" already existed before. As it seems it is your first run, we replaced it with a new one. ${COLOR_RESET}\n" - printf "${COLOR_YELLOW}As it seems it is your first run, we replaced it with a new one. The old one has been renamed to \"$XDG_CONFIG_HOME/hypr/hyprland.conf.old\".${COLOR_RESET}\n" + y) printf "\n${STY_YELLOW}[$0]: Warning: \"$XDG_CONFIG_HOME/hypr/hyprland.conf\" already existed before. As it seems it is your first run, we replaced it with a new one. ${STY_RESET}\n" + printf "${STY_YELLOW}As it seems it is your first run, we replaced it with a new one. The old one has been renamed to \"$XDG_CONFIG_HOME/hypr/hyprland.conf.old\".${STY_RESET}\n" ;;esac case $existed_hypr_conf in - y) printf "\n${COLOR_YELLOW}[$0]: Warning: \"$XDG_CONFIG_HOME/hypr/hyprland.conf\" already existed before and we didn't overwrite it. ${COLOR_RESET}\n" - printf "${COLOR_YELLOW}Please use \"$XDG_CONFIG_HOME/hypr/hyprland.conf.new\" as a reference for a proper format.${COLOR_RESET}\n" + y) printf "\n${STY_YELLOW}[$0]: Warning: \"$XDG_CONFIG_HOME/hypr/hyprland.conf\" already existed before and we didn't overwrite it. ${STY_RESET}\n" + printf "${STY_YELLOW}Please use \"$XDG_CONFIG_HOME/hypr/hyprland.conf.new\" as a reference for a proper format.${STY_RESET}\n" ;;esac case $existed_hypridle_conf in - y) printf "\n${COLOR_YELLOW}[$0]: Warning: \"$XDG_CONFIG_HOME/hypr/hypridle.conf\" already existed before and we didn't overwrite it. ${COLOR_RESET}\n" - printf "${COLOR_YELLOW}Please use \"$XDG_CONFIG_HOME/hypr/hypridle.conf.new\" as a reference for a proper format.${COLOR_RESET}\n" + y) printf "\n${STY_YELLOW}[$0]: Warning: \"$XDG_CONFIG_HOME/hypr/hypridle.conf\" already existed before and we didn't overwrite it. ${STY_RESET}\n" + printf "${STY_YELLOW}Please use \"$XDG_CONFIG_HOME/hypr/hypridle.conf.new\" as a reference for a proper format.${STY_RESET}\n" ;;esac case $existed_hyprlock_conf in - y) printf "\n${COLOR_YELLOW}[$0]: Warning: \"$XDG_CONFIG_HOME/hypr/hyprlock.conf\" already existed before and we didn't overwrite it. ${COLOR_RESET}\n" - printf "${COLOR_YELLOW}Please use \"$XDG_CONFIG_HOME/hypr/hyprlock.conf.new\" as a reference for a proper format.${COLOR_RESET}\n" + y) printf "\n${STY_YELLOW}[$0]: Warning: \"$XDG_CONFIG_HOME/hypr/hyprlock.conf\" already existed before and we didn't overwrite it. ${STY_RESET}\n" + printf "${STY_YELLOW}Please use \"$XDG_CONFIG_HOME/hypr/hyprlock.conf.new\" as a reference for a proper format.${STY_RESET}\n" ;;esac if [[ -z "${ILLOGICAL_IMPULSE_VIRTUAL_ENV}" ]]; then - printf "\n${COLOR_RED}[$0]: \!! Important \!! : Please ensure environment variable ${COLOR_RESET} \$ILLOGICAL_IMPULSE_VIRTUAL_ENV ${COLOR_RED} is set to proper value (by default \"~/.local/state/quickshell/.venv\"), or Quickshell config will not work. We have already provided this configuration in ~/.config/hypr/hyprland/env.conf, but you need to ensure it is included in hyprland.conf, and also a restart is needed for applying it.${COLOR_RESET}\n" + printf "\n${STY_RED}[$0]: \!! Important \!! : Please ensure environment variable ${STY_RESET} \$ILLOGICAL_IMPULSE_VIRTUAL_ENV ${STY_RED} is set to proper value (by default \"~/.local/state/quickshell/.venv\"), or Quickshell config will not work. We have already provided this configuration in ~/.config/hypr/hyprland/env.conf, but you need to ensure it is included in hyprland.conf, and also a restart is needed for applying it.${STY_RESET}\n" fi if [[ ! -z "${warn_files[@]}" ]]; then - printf "\n${COLOR_RED}[$0]: \!! Important \!! : Please delete ${COLOR_RESET} ${warn_files[*]} ${COLOR_RED} manually as soon as possible, since we\'re now using AUR package or local PKGBUILD to install them for Arch(based) Linux distros, and they'll take precedence over our installation, or at least take up more space.${COLOR_RESET}\n" + printf "\n${STY_RED}[$0]: \!! Important \!! : Please delete ${STY_RESET} ${warn_files[*]} ${STY_RED} manually as soon as possible, since we\'re now using AUR package or local PKGBUILD to install them for Arch(based) Linux distros, and they'll take precedence over our installation, or at least take up more space.${STY_RESET}\n" fi diff --git a/scriptdata/install-greeting.sh b/scriptdata/install-greeting.sh index 3da9615c1..8fe80fda8 100644 --- a/scriptdata/install-greeting.sh +++ b/scriptdata/install-greeting.sh @@ -3,7 +3,7 @@ ##################################################################################### -printf "${COLOR_BLUE}[$0]: Hi there! Before we start:\n" +printf "${STY_BLUE}[$0]: Hi there! Before we start:\n" printf '\n' printf '[NEW] illogical-impulse is now powered by Quickshell. If you were using the old version with AGS and would like to keep it, do not run this script.\n' printf ' The AGS version, although uses less memory, has much worse performance (it uses Gtk3). \n' @@ -12,12 +12,12 @@ printf ' If you would like the AGS version anyway, run the script in its br printf '\n' printf 'This script does not handle system-level/hardware stuff like Nvidia drivers.\n' printf "\n" -printf "${COLOR_RESET}" +printf "${STY_RESET}" case $ask in false) sleep 0 ;; *) - printf "${COLOR_RED}" + printf "${STY_RED}" printf '\n' printf 'Do you want to confirm every time before a command executes?\n' printf ' y = Yes, ask me before executing each of them. (DEFAULT)\n' @@ -29,6 +29,6 @@ case $ask in a) exit 1 ;; *) ask=true ;; esac - printf "${COLOR_RESET}" + printf "${STY_RESET}" ;; esac diff --git a/uninstall.sh b/uninstall.sh index a7528de86..d76104166 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -5,8 +5,8 @@ source ./scriptdata/functions.sh prevent_sudo_or_root function v() { - echo -e "[$0]: ${COLOR_GREEN}Now executing:${COLOR_RESET}" - echo -e "${COLOR_GREEN}$@${COLOR_RESET}" + echo -e "[$0]: ${STY_GREEN}Now executing:${STY_RESET}" + echo -e "${STY_GREEN}$@${STY_RESET}" "$@" } @@ -21,7 +21,7 @@ set -e ############################################################################################################################## # Undo Step 3: Removing copied config and local folders -printf "${COLOR_CYAN}Removing copied config and local folders...\n${COLOR_RESET}" +printf "${STY_CYAN}Removing copied config and local folders...\n${STY_RESET}" for i in ags fish fontconfig foot fuzzel hypr mpv wlogout "starship.toml" rubyshot do v rm -rf "$XDG_CONFIG_HOME/$i" @@ -43,7 +43,7 @@ v sudo rm -rf "$XDG_STATE_HOME/ags" ############################################################################################################################## # Undo Step 1: Remove added user from video, i2c, and input groups and remove yay packages -printf "${COLOR_CYAN}Removing user from video, i2c, and input groups and removing packages...\n${COLOR_RESET}" +printf "${STY_CYAN}Removing user from video, i2c, and input groups and removing packages...\n${STY_RESET}" user=$(whoami) v sudo gpasswd -d "$user" video v sudo gpasswd -d "$user" i2c @@ -57,4 +57,4 @@ Ctrl+C to exit, or press Enter to proceed" # Removing installed yay packages and dependencies v yay -Rns illogical-impulse-{agsv1,audio,backlight,basic,bibata-modern-classic-bin,fonts-themes,gnome,gtk,hyprland,microtex-git,oneui4-icons-git,portal,python,screencapture,widgets} plasma-browser-integration -printf "${COLOR_CYAN}Uninstall Complete.\n${COLOR_RESET}" +printf "${STY_CYAN}Uninstall Complete.\n${STY_RESET}" diff --git a/update.sh b/update.sh index 875a841ad..8fb7a299a 100755 --- a/update.sh +++ b/update.sh @@ -14,7 +14,7 @@ set -uo pipefail FORCE_CHECK=false CHECK_PACKAGES=false REPO_DIR="$(cd "$(dirname $0)" &>/dev/null && pwd)" -ARCH_PACKAGES_DIR="${REPO_DIR}/arch-packages" +ARCH_PACKAGES_DIR="${REPO_DIR}/dist-arch" UPDATE_IGNORE_FILE="${REPO_DIR}/.updateignore" HOME_UPDATE_IGNORE_FILE="${HOME}/.updateignore" @@ -333,7 +333,7 @@ list_packages() { local changed_packages=() if [[ ! -d "$ARCH_PACKAGES_DIR" ]]; then - log_warning "No arch-packages directory found" + log_warning "No dist-arch directory found" return 1 fi @@ -349,7 +349,7 @@ list_packages() { done if [[ ${#available_packages[@]} -eq 0 ]]; then - log_info "No packages found in arch-packages directory" + log_info "No packages found in dist-arch directory" return 1 fi @@ -635,7 +635,7 @@ if [[ "$CHECK_PACKAGES" == true ]]; then log_header "Package Management" if [[ ! -d "$ARCH_PACKAGES_DIR" ]]; then - log_warning "No arch-packages directory found. Skipping package management." + log_warning "No dist-arch directory found. Skipping package management." else # Check if any PKGBUILDs have changed changed_pkgbuilds=()