forked from Shinonome/dots-hyprland
Add pause(); distro specific also for setups
This commit is contained in:
@@ -1,15 +1,87 @@
|
||||
# This script is meant to be sourced.
|
||||
# It's not for directly running.
|
||||
|
||||
#####################################################################################
|
||||
# These python packages are installed using uv into the venv (virtual environment). Once the folder of the venv gets deleted, they are all gone cleanly. So it's considered as setups, not dependencies.
|
||||
showfun install-python-packages
|
||||
v install-python-packages
|
||||
####################
|
||||
# Detect distro
|
||||
# Helpful link(s):
|
||||
# http://stackoverflow.com/questions/29581754
|
||||
# https://github.com/which-distro/os-release
|
||||
export OS_RELEASE_FILE=${OS_RELEASE_FILE:-/etc/os-release}
|
||||
test -f ${OS_RELEASE_FILE} || \
|
||||
( echo "${OS_RELEASE_FILE} does not exist. Aborting..." ; exit 1 ; )
|
||||
export OS_DISTRO_ID=$(awk -F'=' '/^ID=/ { gsub("\"","",$2); print tolower($2) }' ${OS_RELEASE_FILE} 2> /dev/null)
|
||||
export OS_DISTRO_ID_LIKE=$(awk -F'=' '/^ID_LIKE=/ { gsub("\"","",$2); print tolower($2) }' ${OS_RELEASE_FILE} 2> /dev/null)
|
||||
|
||||
v sudo usermod -aG video,i2c,input "$(whoami)"
|
||||
v bash -c "echo i2c-dev | sudo tee /etc/modules-load.d/i2c-dev.conf"
|
||||
v systemctl --user enable ydotool --now
|
||||
v sudo systemctl enable bluetooth --now
|
||||
v gsettings set org.gnome.desktop.interface font-name 'Rubik 11'
|
||||
v gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
|
||||
v kwriteconfig6 --file kdeglobals --group KDE --key widgetStyle Darkly
|
||||
|
||||
|
||||
if [[ "$INSTALL_VIA_NIX" == "true" ]]; then
|
||||
|
||||
printf "${STY_YELLOW}"
|
||||
printf "===WARNING===\n"
|
||||
printf "Nix will be used to do setups.\n"
|
||||
printf "The process is still WIP.\n"
|
||||
printf "Proceed only at your own risk.\n"
|
||||
printf "\n"
|
||||
printf "${STY_RESET}"
|
||||
pause
|
||||
source ./scriptdata/install-setups-nix.sh
|
||||
|
||||
elif [[ "$OS_DISTRO_ID" == "arch" ]]; then
|
||||
|
||||
printf "${STY_GREEN}"
|
||||
printf "===INFO===\n"
|
||||
printf "Detected distro ID: ${OS_DISTRO_ID}\n"
|
||||
printf "./scriptdata/install-setups-arch.sh will be used.\n"
|
||||
printf "\n"
|
||||
printf "${STY_RESET}"
|
||||
pause
|
||||
source ./scriptdata/install-setups-arch.sh
|
||||
|
||||
elif [[ -f "./scriptdata/install-setups-${OS_DISTRO_ID}.sh" ]]; then
|
||||
|
||||
printf "${STY_PURPLE}"
|
||||
printf "===NOTICE===\n"
|
||||
printf "Detected distro ID: ${OS_DISTRO_ID}\n"
|
||||
printf "./scriptdata/install-setups-${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 "${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 "${STY_RESET}"
|
||||
pause
|
||||
source ./scriptdata/install-setups-${OS_DISTRO_ID}.sh
|
||||
|
||||
elif [[ "$OS_DISTRO_ID_LIKE" == "arch" ]]; then
|
||||
|
||||
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-setups-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 "Proceed only at your own risk.\n"
|
||||
printf "\n"
|
||||
printf "${STY_RESET}"
|
||||
pause
|
||||
source ./scriptdata/install-setups-arch.sh
|
||||
|
||||
else
|
||||
|
||||
printf "${STY_RED}"
|
||||
printf "===WARNING===\n"
|
||||
printf "Detected distro ID: ${OS_DISTRO_ID}\n"
|
||||
printf "Detected distro ID_LIKE: ${OS_DISTRO_ID_LIKE}\n"
|
||||
printf "./scriptdata/install-setups-${OS_DISTRO_ID}.sh not found.\n"
|
||||
printf "./scriptdata/install-setups-fallback.sh will be used.\n"
|
||||
printf "It might fail or disrupt your system.\n"
|
||||
printf "Proceed only at your own risk.\n"
|
||||
printf "\n"
|
||||
printf "${STY_RESET}"
|
||||
pause
|
||||
source ./scriptdata/install-setups-fallback.sh
|
||||
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user