From 2c4668bcb0a18669f93038158a09361e3119946d Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sun, 9 Nov 2025 23:31:51 +0100 Subject: [PATCH 1/6] move panel enable/disable to config --- .../quickshell/ii/modules/common/Config.qml | 5 ++ dots/.config/quickshell/ii/shell.qml | 72 ++++++++----------- 2 files changed, 34 insertions(+), 43 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/common/Config.qml b/dots/.config/quickshell/ii/modules/common/Config.qml index f2d058a18..1b13540ef 100644 --- a/dots/.config/quickshell/ii/modules/common/Config.qml +++ b/dots/.config/quickshell/ii/modules/common/Config.qml @@ -76,6 +76,11 @@ Singleton { JsonAdapter { id: configOptionsJsonAdapter + + property list enabledPanels: [ + "iiBar", "iiBackground", "iiCheatsheet", "iiDock", "iiLock", "iiMediaControls", "iiNotificationPopup", "iiOnScreenDisplay", "iiOnScreenKeyboard", "iiOverlay", "iiOverview", "iiPolkit", "iiRegionSelector", "iiReloadPopup", "iiScreenCorners", "iiSessionScreen", "iiSidebarLeft", "iiSidebarRight", "iiVerticalBar", "iiWallpaperSelector" + ] + property JsonObject policies: JsonObject { property int ai: 1 // 0: No | 1: Yes | 2: Local property int weeb: 1 // 0: No | 1: Open | 2: Closet diff --git a/dots/.config/quickshell/ii/shell.qml b/dots/.config/quickshell/ii/shell.qml index 81bd468b1..b497b6b5c 100644 --- a/dots/.config/quickshell/ii/shell.qml +++ b/dots/.config/quickshell/ii/shell.qml @@ -34,29 +34,6 @@ import Quickshell import qs.services ShellRoot { - // Enable/disable modules here. False = not loaded at all, so rest assured - // no unnecessary stuff will take up memory if you decide to only use, say, the overview. - property bool enableBar: true - property bool enableBackground: true - property bool enableCheatsheet: true - property bool enableDock: true - property bool enableLock: true - property bool enableMediaControls: true - property bool enableNotificationPopup: true - property bool enablePolkit: true - property bool enableOnScreenDisplay: true - property bool enableOnScreenKeyboard: true - property bool enableOverlay: true - property bool enableOverview: true - property bool enableRegionSelector: true - property bool enableReloadPopup: true - property bool enableScreenCorners: true - property bool enableSessionScreen: true - property bool enableSidebarLeft: true - property bool enableSidebarRight: true - property bool enableVerticalBar: true - property bool enableWallpaperSelector: true - // Force initialization of some singletons Component.onCompleted: { MaterialThemeLoader.reapplyTheme() @@ -67,25 +44,34 @@ ShellRoot { Wallpapers.load() } - LazyLoader { active: enableBar && Config.ready && !Config.options.bar.vertical; component: Bar {} } - LazyLoader { active: enableBackground; component: Background {} } - LazyLoader { active: enableCheatsheet; component: Cheatsheet {} } - LazyLoader { active: enableDock && Config.options.dock.enable; component: Dock {} } - LazyLoader { active: enableLock; component: Lock {} } - LazyLoader { active: enableMediaControls; component: MediaControls {} } - LazyLoader { active: enableNotificationPopup; component: NotificationPopup {} } - LazyLoader { active: enableOnScreenDisplay; component: OnScreenDisplay {} } - LazyLoader { active: enableOnScreenKeyboard; component: OnScreenKeyboard {} } - LazyLoader { active: enableOverlay; component: Overlay {} } - LazyLoader { active: enableOverview; component: Overview {} } - LazyLoader { active: enablePolkit; component: Polkit {} } - LazyLoader { active: enableRegionSelector; component: RegionSelector {} } - LazyLoader { active: enableReloadPopup; component: ReloadPopup {} } - LazyLoader { active: enableScreenCorners; component: ScreenCorners {} } - LazyLoader { active: enableSessionScreen; component: SessionScreen {} } - LazyLoader { active: enableSidebarLeft; component: SidebarLeft {} } - LazyLoader { active: enableSidebarRight; component: SidebarRight {} } - LazyLoader { active: enableVerticalBar && Config.ready && Config.options.bar.vertical; component: VerticalBar {} } - LazyLoader { active: enableWallpaperSelector; component: WallpaperSelector {} } + // Load enabled stuff + // Well, these loaders only *allow* them to be loaded, to always load or not is defined in each component + // The media controls for example is not loaded if it's not opened + PanelLoader { identifier: "iiBar"; extraCondition: !Config.options.bar.vertical; component: Bar {} } + PanelLoader { identifier: "iiBackground"; component: Background {} } + PanelLoader { identifier: "iiCheatsheet"; component: Cheatsheet {} } + PanelLoader { identifier: "iiDock"; component: Dock {} } + PanelLoader { identifier: "iiLock"; component: Lock {} } + PanelLoader { identifier: "iiMediaControls"; component: MediaControls {} } + PanelLoader { identifier: "iiNotificationPopup"; component: NotificationPopup {} } + PanelLoader { identifier: "iiOnScreenDisplay"; component: OnScreenDisplay {} } + PanelLoader { identifier: "iiOnScreenKeyboard"; component: OnScreenKeyboard {} } + PanelLoader { identifier: "iiOverlay"; component: Overlay {} } + PanelLoader { identifier: "iiOverview"; component: Overview {} } + PanelLoader { identifier: "iiPolkit"; component: Polkit {} } + PanelLoader { identifier: "iiRegionSelector"; component: RegionSelector {} } + PanelLoader { identifier: "iiReloadPopup"; component: ReloadPopup {} } + PanelLoader { identifier: "iiScreenCorners"; component: ScreenCorners {} } + PanelLoader { identifier: "iiSessionScreen"; component: SessionScreen {} } + PanelLoader { identifier: "iiSidebarLeft"; component: SidebarLeft {} } + PanelLoader { identifier: "iiSidebarRight"; component: SidebarRight {} } + PanelLoader { identifier: "iiVerticalBar"; extraCondition: Config.options.bar.vertical; component: VerticalBar {} } + PanelLoader { identifier: "iiWallpaperSelector"; component: WallpaperSelector {} } + + component PanelLoader: LazyLoader { + required property string identifier + property bool extraCondition: true + active: Config.ready && Config.options.enabledPanels.includes(identifier) && extraCondition + } } From fb7dbaa187227e54470fb44495b732039ee5428e Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sun, 9 Nov 2025 23:33:39 +0100 Subject: [PATCH 2/6] add missing dock loading extra condition --- dots/.config/quickshell/ii/shell.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dots/.config/quickshell/ii/shell.qml b/dots/.config/quickshell/ii/shell.qml index b497b6b5c..ee2217bf7 100644 --- a/dots/.config/quickshell/ii/shell.qml +++ b/dots/.config/quickshell/ii/shell.qml @@ -50,7 +50,7 @@ ShellRoot { PanelLoader { identifier: "iiBar"; extraCondition: !Config.options.bar.vertical; component: Bar {} } PanelLoader { identifier: "iiBackground"; component: Background {} } PanelLoader { identifier: "iiCheatsheet"; component: Cheatsheet {} } - PanelLoader { identifier: "iiDock"; component: Dock {} } + PanelLoader { identifier: "iiDock"; extraCondition: Config.options.dock.enable; component: Dock {} } PanelLoader { identifier: "iiLock"; component: Lock {} } PanelLoader { identifier: "iiMediaControls"; component: MediaControls {} } PanelLoader { identifier: "iiNotificationPopup"; component: NotificationPopup {} } From 74941d15bf44e4119418540b46e34784eca58e68 Mon Sep 17 00:00:00 2001 From: clsty Date: Mon, 10 Nov 2025 08:56:07 +0800 Subject: [PATCH 3/6] Not use setups-selector but 2.setups.sh --- sdata/dist-arch/install-setups.sh | 15 ---- sdata/dist-fallback/install-setups.sh | 15 ---- sdata/dist-fedora/install-setups.sh | 19 ----- sdata/dist-gentoo/install-setups.sh | 39 ---------- sdata/dist-nix/install-setups.sh | 39 ---------- sdata/subcmd-install/2.setups-selector.sh | 95 ----------------------- sdata/subcmd-install/2.setups.sh | 64 +++++++++++++++ setup | 4 +- 8 files changed, 66 insertions(+), 224 deletions(-) delete mode 100644 sdata/dist-arch/install-setups.sh delete mode 100644 sdata/dist-fallback/install-setups.sh delete mode 100644 sdata/dist-fedora/install-setups.sh delete mode 100644 sdata/dist-gentoo/install-setups.sh delete mode 100644 sdata/dist-nix/install-setups.sh delete mode 100644 sdata/subcmd-install/2.setups-selector.sh create mode 100644 sdata/subcmd-install/2.setups.sh diff --git a/sdata/dist-arch/install-setups.sh b/sdata/dist-arch/install-setups.sh deleted file mode 100644 index 923ac2bc5..000000000 --- a/sdata/dist-arch/install-setups.sh +++ /dev/null @@ -1,15 +0,0 @@ -# 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 - -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 diff --git a/sdata/dist-fallback/install-setups.sh b/sdata/dist-fallback/install-setups.sh deleted file mode 100644 index 923ac2bc5..000000000 --- a/sdata/dist-fallback/install-setups.sh +++ /dev/null @@ -1,15 +0,0 @@ -# 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 - -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 diff --git a/sdata/dist-fedora/install-setups.sh b/sdata/dist-fedora/install-setups.sh deleted file mode 100644 index 6364ca3f5..000000000 --- a/sdata/dist-fedora/install-setups.sh +++ /dev/null @@ -1,19 +0,0 @@ -# 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 - -v sudo usermod -aG video,input "$(whoami)" -v mkdir -p "${XDG_CONFIG_HOME}/systemd/user" -v ln -s /usr/lib/systemd/system/ydotool.service "${XDG_CONFIG_HOME}/systemd/user/ydotool.service" -v bash -c "echo uinput | sudo tee /etc/modules-load.d/uinput.conf" -v bash -c 'echo SUBSYSTEM==\"misc\", KERNEL==\"uinput\", MODE=\"0660\", GROUP=\"input\" | - sudo tee /etc/udev/rules.d/99-uinput.rules' -v systemctl --user enable ydotool -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 diff --git a/sdata/dist-gentoo/install-setups.sh b/sdata/dist-gentoo/install-setups.sh deleted file mode 100644 index db75e555d..000000000 --- a/sdata/dist-gentoo/install-setups.sh +++ /dev/null @@ -1,39 +0,0 @@ -# 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 - -if [[ -z $(getent group i2c) ]]; then - v sudo groupadd i2c -fi - -v sudo usermod -aG video,i2c,input "$(whoami)" - -if [[ ! -z $(systemctl --version) ]]; then - 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 -elif [[ ! -z $(openrc --version) ]]; then - v bash -c "echo 'modules=i2c-dev' | sudo tee -a /etc/conf.d/modules" - v sudo rc-update add modules boot - v sudo rc-update add ydotool default - v sudo rc-update add bluetooth default - - x sudo rc-service ydotool start - x sudo rc-service bluetooth start -else - printf "${STY_RED}" - printf "====================INIT SYSTEM NOT FOUND====================\n" - printf "${STY_RST}" - pause -fi - -v sudo chown -R $(whoami):$(whoami) ~/.config/hypr/ -v sudo chown -R $(whoami):$(whoami) ~/.config/quickshell/ - -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 diff --git a/sdata/dist-nix/install-setups.sh b/sdata/dist-nix/install-setups.sh deleted file mode 100644 index 0ddcfcf37..000000000 --- a/sdata/dist-nix/install-setups.sh +++ /dev/null @@ -1,39 +0,0 @@ -# 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 - -if [[ -z $(getent group i2c) ]]; then - v sudo groupadd i2c -fi - -v sudo usermod -aG video,i2c,input "$(whoami)" - -if [[ ! -z $(systemctl --version) ]]; then - v bash -c "echo i2c-dev | sudo tee /etc/modules-load.d/i2c-dev.conf" - # TODO: find a proper way for enable Nix installed ydotool - if ! [[ "${INSTALL_VIA_NIX}" == true ]]; then - v systemctl --user enable ydotool --now - fi - v sudo systemctl enable bluetooth --now -elif [[ ! -z $(openrc --version) ]]; then - v bash -c "echo 'modules=i2c-dev' | sudo tee -a /etc/conf.d/modules" - v sudo rc-update add modules boot - v sudo rc-update add ydotool default - v sudo rc-update add bluetooth default - - x sudo rc-service ydotool start - x sudo rc-service bluetooth start -else - printf "${STY_RED}" - printf "====================INIT SYSTEM NOT FOUND====================\n" - printf "${STY_RST}" - pause -fi - -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 diff --git a/sdata/subcmd-install/2.setups-selector.sh b/sdata/subcmd-install/2.setups-selector.sh deleted file mode 100644 index 0a72e8728..000000000 --- a/sdata/subcmd-install/2.setups-selector.sh +++ /dev/null @@ -1,95 +0,0 @@ -# This script is meant to be sourced. -# It's not for directly running. -printf "${STY_CYAN}[$0]: 2. Setup for permissions/services etc\n${STY_RST}" - -# shellcheck shell=bash - -#################### -# 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) - - - -if [[ "$INSTALL_VIA_NIX" == "true" ]]; then - - TARGET_ID=nix - printf "${STY_YELLOW}" - printf "===WARNING===\n" - printf "./sdata/dist-${TARGET_ID}/install-setups.sh will be used.\n" - printf "The process is still WIP.\n" - printf "Proceed only at your own risk.\n" - printf "\n" - printf "${STY_RST}" - pause - source ./sdata/dist-${TARGET_ID}/install-setups.sh - -elif [[ "$OS_DISTRO_ID" == "arch" ]]; then - - TARGET_ID=arch - printf "${STY_GREEN}" - printf "===INFO===\n" - printf "Detected distro ID: ${OS_DISTRO_ID}\n" - printf "./sdata/dist-${TARGET_ID}/install-setups.sh will be used.\n" - printf "\n" - printf "${STY_RST}" - pause - source ./sdata/dist-${TARGET_ID}/install-setups.sh - -elif [[ -f "./sdata/dist-${OS_DISTRO_ID}/install-setups.sh" ]]; then - - TARGET_ID=${OS_DISTRO_ID} - printf "${STY_PURPLE}" - printf "===NOTICE===\n" - printf "Detected distro ID: ${OS_DISTRO_ID}\n" - printf "./sdata/dist-${TARGET_ID}/install-setups.sh 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_INVERT}" - 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_RST}\n" - printf "${STY_PURPLE}" - printf "Proceed only at your own risk.\n" - printf "\n" - printf "${STY_RST}" - pause - source ./sdata/dist-${TARGET_ID}/install-setups.sh - -elif [[ "$OS_DISTRO_ID_LIKE" == "arch" || "$OS_DISTRO_ID" == "cachyos" ]]; then - - TARGET_ID=arch - 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 "./sdata/dist-${TARGET_ID}/install-setups.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_RST}" - pause - source ./sdata/dist-${TARGET_ID}/install-setups.sh - -else - - TARGET_ID=fallback - 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 "./sdata/dist-${OS_DISTRO_ID}/install-setups.sh not found.\n" - printf "./sdata/dist-${TARGET_ID}/install-setups.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_RST}" - pause - source ./sdata/dist-${TARGET_ID}/install-setups.sh - -fi diff --git a/sdata/subcmd-install/2.setups.sh b/sdata/subcmd-install/2.setups.sh new file mode 100644 index 000000000..2d8e03ba1 --- /dev/null +++ b/sdata/subcmd-install/2.setups.sh @@ -0,0 +1,64 @@ +# This script is meant to be sourced. +# It's not for directly running. + +function prepare_systemd_user_service(){ + if [[ ! -d "${XDG_CONFIG_HOME}/systemd/user" ]]; then + x mkdir -p "${XDG_CONFIG_HOME}/systemd/user" + fi + if [[ ! -e "${XDG_CONFIG_HOME}/systemd/user/ydotool.service" ]]; then + x ln -s /usr/lib/systemd/system/ydotool.service "${XDG_CONFIG_HOME}/systemd/user/ydotool.service" + fi +} +##################################################################################### +# 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 + +if [[ -z $(getent group i2c) ]]; then + v sudo groupadd i2c +fi +v sudo usermod -aG video,i2c,input "$(whoami)" + +if [[ ! -z $(systemctl --version) ]]; then + if [[ "$OS_DISTRO_ID" == "fedora" ]]; then + v bash -c "echo uinput | sudo tee /etc/modules-load.d/uinput.conf" + v bash -c 'echo SUBSYSTEM==\"misc\", KERNEL==\"uinput\", MODE=\"0660\", GROUP=\"input\" | sudo tee /etc/udev/rules.d/99-uinput.rules' + else + v bash -c "echo i2c-dev | sudo tee /etc/modules-load.d/i2c-dev.conf" + fi + # TODO: find a proper way for enable Nix installed ydotool. When running `systemctl --user enable ydotool, it errors "Failed to enable unit: Unit ydotool.service does not exist". + if [[ ! "${INSTALL_VIA_NIX}" == true ]]; then + if [[ "$OS_DISTRO_ID" == "fedora" ]]; then + v prepare_systemd_user_service + fi + # When $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR are empty, it commonly means that the current user has been logged in with `su - user` or `ssh user@hostname`. In such case `systemctl --user enable ` is not usable. It should be `sudo systemctl --machine=$(whoami)@.host --user enable ` instead. + if [[ ! -z "${DBUS_SESSION_BUS_ADDRESS}" ]]; then + v systemctl --user enable ydotool --now + else + v sudo systemctl --machine=$(whoami)@.host --user enable ydotool --now + fi + fi + v sudo systemctl enable bluetooth --now +elif [[ ! -z $(openrc --version) ]]; then + v bash -c "echo 'modules=i2c-dev' | sudo tee -a /etc/conf.d/modules" + v sudo rc-update add modules boot + v sudo rc-update add ydotool default + v sudo rc-update add bluetooth default + + x sudo rc-service ydotool start + x sudo rc-service bluetooth start +else + printf "${STY_RED}" + printf "====================INIT SYSTEM NOT FOUND====================\n" + printf "${STY_RST}" + pause +fi + +if [[ "$OS_DISTRO_ID" == "gentoo" ]]; then + v sudo chown -R $(whoami):$(whoami) ~/.config/hypr/ + v sudo chown -R $(whoami):$(whoami) ~/.config/quickshell/ +fi + +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 diff --git a/setup b/setup index 9309491e2..342471210 100755 --- a/setup +++ b/setup @@ -70,7 +70,7 @@ case ${SUBCMD_NAME} in source ${SUBCMD_DIR}/1.deps-selector.sh fi if [[ "${SKIP_ALLSETUPS}" != true ]]; then - source ${SUBCMD_DIR}/2.setups-selector.sh + source ${SUBCMD_DIR}/2.setups.sh fi if [[ "${SKIP_ALLFILES}" != true ]]; then source ${SUBCMD_DIR}/3.files.sh @@ -83,7 +83,7 @@ case ${SUBCMD_NAME} in ;; install-setups) if [[ "${SKIP_ALLSETUPS}" != true ]]; then - source ${SUBCMD_DIR}/2.setups-selector.sh + source ${SUBCMD_DIR}/2.setups.sh fi ;; install-files) From 051accbe2fcdcf6dea7687c41ce5225444de2e32 Mon Sep 17 00:00:00 2001 From: clsty Date: Mon, 10 Nov 2025 09:05:31 +0800 Subject: [PATCH 4/6] Update dist-gentoo/README --- sdata/dist-gentoo/README.md | 19 ++++++------------- sdata/subcmd-install/2.setups.sh | 1 + 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/sdata/dist-gentoo/README.md b/sdata/dist-gentoo/README.md index c488d50e8..630a3a178 100644 --- a/sdata/dist-gentoo/README.md +++ b/sdata/dist-gentoo/README.md @@ -10,7 +10,6 @@ Note: ## Contributors - Author: [jwihardi](https://github.com/jwihardi) - ## install-deps.sh 1. Enables localrepo and guru overlays if not already enabled. 2. Copies _keywords_ to _keywords-user_ and appends the correct unmask keywords for the user's architecture (adm64, arm64, and x86 are supported). @@ -19,19 +18,13 @@ Note: 5. Copies over the custom live ebuilds (hyprgraphics, hyprland-qt-support, hyprland-qtutils, hyprlang, hyprwayland-scanner) into localrepo and digests them. 6. Loops through all illogical-impulse ebuilds to digest and emerge them. -## install-setup.sh -1. Creates the _i2c_ group since Gentoo doesn't have this by default, then adds the user to it. -2. Enables _bluetooth_ and _ydotool_ services (systemd or openrc) -3. _icons_, _konsole_, _hypr_, and _quickshell_ are are chowned to user since they're emerge in as root by default. -4. gsettings and kwriteconfig6 are set (same as sdata/dist-arch). - ## Recommended use flags (useflags) - **The recommended useflags are not required, this is a more out of the box experience with these** - Pipewire is used, alsa and pulseaudio are disabled (enabling them won't hurt). - Init system is not assumed or considered so disabling systemd should be done in make.conf, same with session managers (elogind is recommended). ## Making the dot-files work -- elogind is expected to be installed and run as a service on OpenRC to set ```XDG_RUNTIME_DIR``` +- elogind is expected to be installed and run as a service on OpenRC to set `XDG_RUNTIME_DIR` - NOT recommended: seatd will require more manual setup - pipewire, pipewire-pulse, and wireplumber must be started after a dbus-session is created and before Hyprland is launched. @@ -54,8 +47,8 @@ end ``` ## Known Issues -- If Hyprland is just blank, rebuild Quickshell (emerge -q gui-apps/quickshell) -- ```Hyprland: error while loading shared libraries: libhyprgraphics.so.0: cannot open shared object file: No such file or directory``` - - The Hyprland live ebuild sometimes has linkage issues, deleting _Hyprland_ and _hyprland_ from ```/usr/bin/``` and then re-emerging usually fixes this. -- When emerging Hyprland if you get an issue relating to```undefined reference to `Hyprutils::Math::Vector2D::˜Vector2D()` ``` - - Clear the cache folder (```rm -fr /var/tmp/portage/gui-wm/hyprland*```) then try again +- If Hyprland is just blank, rebuild Quickshell (`emerge -q gui-apps/quickshell`) +- `Hyprland: error while loading shared libraries: libhyprgraphics.so.0: cannot open shared object file: No such file or directory` + - The Hyprland live ebuild sometimes has linkage issues, deleting _Hyprland_ and _hyprland_ from `/usr/bin/` and then re-emerging usually fixes this. +- When emerging Hyprland if you get an issue relating to `undefined reference to ``Hyprutils::Math::Vector2D::˜Vector2D()`` ` + - Clear the cache folder (`rm -fr /var/tmp/portage/gui-wm/hyprland*`) then try again diff --git a/sdata/subcmd-install/2.setups.sh b/sdata/subcmd-install/2.setups.sh index 2d8e03ba1..464dba1cd 100644 --- a/sdata/subcmd-install/2.setups.sh +++ b/sdata/subcmd-install/2.setups.sh @@ -54,6 +54,7 @@ else pause fi +# _icons_, _konsole_, _hypr_, and _quickshell_ are are chowned to user since they're emerge in as root by default. if [[ "$OS_DISTRO_ID" == "gentoo" ]]; then v sudo chown -R $(whoami):$(whoami) ~/.config/hypr/ v sudo chown -R $(whoami):$(whoami) ~/.config/quickshell/ From 98d2c4f881bbe622e415a85497ca76acc6ba7b2c Mon Sep 17 00:00:00 2001 From: clsty Date: Mon, 10 Nov 2025 10:38:14 +0800 Subject: [PATCH 5/6] Introduce OS_GROUP_ID --- sdata/dist-fallback/install-deps.sh | 11 -- sdata/dist-fallback/outdate-detect-mode | 1 - sdata/lib/dist-determine.sh | 116 +++++++++++++++++ sdata/subcmd-install/1.deps-selector.sh | 159 +++++------------------- sdata/subcmd-install/2.setups.sh | 6 +- sdata/subcmd-install/3.files-legacy.sh | 2 +- setup | 6 + 7 files changed, 155 insertions(+), 146 deletions(-) delete mode 100644 sdata/dist-fallback/install-deps.sh delete mode 100644 sdata/dist-fallback/outdate-detect-mode create mode 100644 sdata/lib/dist-determine.sh diff --git a/sdata/dist-fallback/install-deps.sh b/sdata/dist-fallback/install-deps.sh deleted file mode 100644 index b106cfbe6..000000000 --- a/sdata/dist-fallback/install-deps.sh +++ /dev/null @@ -1,11 +0,0 @@ -# This script is meant to be sourced. -# It's not for directly running. - -# This file is currently WIP. - -v install-Rubik -v install-Gabarito -v install-OneUI -v install-bibata -v install-MicroTeX -v install-uv diff --git a/sdata/dist-fallback/outdate-detect-mode b/sdata/dist-fallback/outdate-detect-mode deleted file mode 100644 index 00d7bdd40..000000000 --- a/sdata/dist-fallback/outdate-detect-mode +++ /dev/null @@ -1 +0,0 @@ -WIP diff --git a/sdata/lib/dist-determine.sh b/sdata/lib/dist-determine.sh new file mode 100644 index 000000000..8a39e463d --- /dev/null +++ b/sdata/lib/dist-determine.sh @@ -0,0 +1,116 @@ +# This script is meant to be sourced. +# It's not for directly running. +function print_os_group_id(){ + printf "${STY_CYAN}" + printf "===INFO===\n" + printf "Detected OS_DISTRO_ID: ${OS_DISTRO_ID}\n" + printf "Detected OS_DISTRO_ID_LIKE: ${OS_DISTRO_ID_LIKE}\n" + printf "Determined OS_GROUP_ID: ${OS_GROUP_ID}\n" + printf "==========\n\n" + printf "${STY_RST}" +} +function print_os_group_id_alike(){ + printf "${STY_YELLOW}" + printf "===WARNING===\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\n" + printf "${STY_RST}" +} +function print_os_group_id_unofficial(){ + printf "${STY_PURPLE}" + printf "===NOTICE===\n" + printf "The support for your distro is provided by the community.\n" + printf "It is not officially supported by github:end-4/dots-hyprland .\n" + printf "${STY_BOLD}" + 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_RST}\n" + printf "${STY_PURPLE}" + printf "Proceed only at your own risk.\n" + printf "============\n\n" + printf "${STY_RST}" +} +function print_os_group_id_fallback(){ + printf "${STY_RED}" + printf "===CAUTION===\n" + printf "No support provided for your distro, using fallback method.\n" + printf "Proceed only at your own risk.\n" + printf "=============\n\n" + printf "${STY_RST}" +} +function print_os_group_id_force_vianix(){ + printf "${STY_RED}" + printf "===CAUTION===\n" + printf "\"--via-nix\" is forcely specified as the only method to support your distro.\n" + printf "It is still experimental and some functionalities are missing.\n" + printf "It may also behave unexpectedly.\n" + printf "Proceed only at your own risk.\n" + printf "=============\n\n" + printf "${STY_RST}" +} +##################################################################################### + +#################### +# Detect architecture +# Helpful link(s): +# http://stackoverflow.com/questions/45125516 +export MACHINE_ARCH=$(uname -m) +case "${MACHINE_ARCH}" in + "x86_64") sleep 0;; + *) + 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 "\n" + printf "${STY_RST}" + pause + ;; +esac + +#################### +# Detect distro +# Helpful link(s): +# http://stackoverflow.com/questions/29581754 +# https://github.com/which-distro/os-release +OS_RELEASE_FILE_CUSTOM="${REPO_ROOT}/os-release" +if test -f "${OS_RELEASE_FILE_CUSTOM}"; then + printf "${STY_YELLOW}Warning: using custom os-release file \"${OS_RELEASE_FILE_CUSTOM}\".${STY_RST}\n" + OS_RELEASE_FILE="${OS_RELEASE_FILE_CUSTOM}" +elif test -f /etc/os-release; then + OS_RELEASE_FILE=/etc/os-release +else + printf "${STY_RED}/etc/os-release does not exist, aborting...${STY_RST}\n" ; exit 1 +fi +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) + + +#################### +# Determine distro ID + +if [[ "$OS_DISTRO_ID" =~ ^(arch|endeavouros|cachyos)$ ]]; then + OS_GROUP_ID="arch" + print_os_group_id_functions=(print_os_group_id) +elif [[ "$OS_DISTRO_ID_LIKE" == "arch" ]]; then + OS_GROUP_ID="arch" + print_os_group_id_functions=(print_os_group_id{,_alike}) +elif [[ "$OS_DISTRO_ID" == "gentoo" ]]; then + OS_GROUP_ID="gentoo" + print_os_group_id_functions=(print_os_group_id{,_unofficial}) +elif [[ "$OS_DISTRO_ID_LIKE" == "gentoo" ]]; then + OS_GROUP_ID="gentoo" + print_os_group_id_functions=(print_os_group_id{,_alike,_unofficial}) +elif [[ "$OS_DISTRO_ID" == "fedora" ]]; then + OS_GROUP_ID="fedora" + print_os_group_id_functions=(print_os_group_id{,_unofficial}) +elif [[ "$OS_DISTRO_ID_LIKE" == "fedora" ]]; then + OS_GROUP_ID="fedora" + print_os_group_id_functions=(print_os_group_id{,_alike,_unofficial}) +else + OS_GROUP_ID="fallback" + INSTALL_VIA_NIX=true + print_os_group_id_functions=(print_os_group_id{,_fallback,_force_vianix}) +fi diff --git a/sdata/subcmd-install/1.deps-selector.sh b/sdata/subcmd-install/1.deps-selector.sh index 6ab87afd6..1287e4c6f 100644 --- a/sdata/subcmd-install/1.deps-selector.sh +++ b/sdata/subcmd-install/1.deps-selector.sh @@ -41,42 +41,7 @@ function outdate_detect(){ echo "UPDATED" fi } -#################### -# Detect architecture -# Helpful link(s): -# http://stackoverflow.com/questions/45125516 -export MACHINE_ARCH=$(uname -m) -case $MACHINE_ARCH in - "x86_64") sleep 0;; - *) - 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 "${STY_RST}" - pause - ;; -esac - -#################### -# Detect distro -# Helpful link(s): -# http://stackoverflow.com/questions/29581754 -# https://github.com/which-distro/os-release -OS_RELEASE_FILE_CUSTOM="${REPO_ROOT}/os-release" -if test -f "${OS_RELEASE_FILE_CUSTOM}"; then - printf "${STY_YELLOW}Warning: using custom os-release file \"${OS_RELEASE_FILE_CUSTOM}\".${STY_RST}\n" - OS_RELEASE_FILE="${OS_RELEASE_FILE_CUSTOM}" -elif test -f /etc/os-release; then - OS_RELEASE_FILE=/etc/os-release -else - printf "${STY_RED}/etc/os-release does not exist, aborting...${STY_RST}\n" ; exit 1 -fi -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) - +##################################################################################### if [[ "$INSTALL_VIA_NIX" == "true" ]]; then @@ -91,103 +56,37 @@ if [[ "$INSTALL_VIA_NIX" == "true" ]]; then pause source ./sdata/dist-${TARGET_ID}/install-deps.sh -elif [[ "$OS_DISTRO_ID" =~ ^(arch|endeavouros)$ ]]; then +elif [[ "$OS_GROUP_ID" =~ ^(arch|gentoo|fedora)$ ]]; then - TARGET_ID=arch - printf "${STY_GREEN}" - printf "===INFO===\n" - printf "Detected distro ID: ${OS_DISTRO_ID}\n" - printf "./sdata/dist-${TARGET_ID}/install-deps.sh will be used.\n" - printf "\n" - printf "${STY_RST}" - pause - source ./sdata/dist-${TARGET_ID}/install-deps.sh - -elif [[ -f "./sdata/dist-${OS_DISTRO_ID}/install-deps.sh" ]]; then - - TARGET_ID=${OS_DISTRO_ID} - printf "${STY_PURPLE}" - printf "===NOTICE===\n" - printf "Detected distro ID: ${OS_DISTRO_ID}\n" - printf "./sdata/dist-${TARGET_ID}/install-deps.sh 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" - test -f "./sdata/dist-${TARGET_ID}/README.md" && \ - printf "Read ${STY_INVERT} ./sdata/dist-${TARGET_ID}/README.md ${STY_RST}${STY_PURPLE} for more information.\n" - printf "${STY_BOLD}" - 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_RST}\n" - printf "${STY_PURPLE}" - printf "Proceed only at your own risk.\n" - printf "\n" - printf "${STY_RST}" - pause - tmp_update_status="$(outdate_detect sdata/dist-arch sdata/dist-${TARGET_ID})" - if [[ "${tmp_update_status}" =~ ^(OUTDATED|EMPTY_TARGET|EMPTY_SOURCE|FORCE_OUTDATED|WIP)$ ]]; then - printf "${STY_RED}${STY_BOLD}===URGENT===${STY_RST}\n" - printf "${STY_RED}" - printf "The community provided ./sdata/dist-${TARGET_ID}/ is outdated (status: ${tmp_update_status}),\n" - printf "which means it probably does not reflect all latest changes of ./sdata/dist-arch/ .\n" - printf "\n" - printf "According to the actual changes, it may still works, but it can also work unexpectedly.\n" - printf "It's highly recommended to check the following links before continue:${STY_RST}\n" - printf "${STY_UNDERLINE}https://github.com/end-4/dots-hyprland/discussions/2140${STY_RST}\n" - printf "${STY_UNDERLINE}https://github.com/end-4/dots-hyprland/commits/main/sdata/dist-arch${STY_RST}\n" - printf "${STY_UNDERLINE}https://github.com/end-4/dots-hyprland/commits/main/sdata/dist-${TARGET_ID}${STY_RST}\n" - printf "\n" - printf "${STY_PURPLE}${STY_INVERT}PR on ./sdata/dist-${TARGET_ID}/ to properly reflect the latest changes of ./sdata/dist-arch is welcomed.${STY_RST}\n" - printf "\n" - if [ "$ask" = "false" ]; then - echo "Urgent problem encountered, aborting...";exit 1 - else - printf "${STY_RED}Still proceed?${STY_RST}\n" - read -p "[y/N]: " p - case "$p" in - [yY])sleep 0;; - *)echo "Aborting...";exit 1;; - esac + TARGET_ID=$OS_GROUP_ID + if ! [[ "${TARGET_ID}" = "arch" ]]; then + tmp_update_status="$(outdate_detect sdata/dist-arch sdata/dist-${TARGET_ID})" + if [[ "${tmp_update_status}" =~ ^(OUTDATED|EMPTY_TARGET|EMPTY_SOURCE|FORCE_OUTDATED|WIP)$ ]]; then + printf "${STY_RED}${STY_BOLD}===URGENT===${STY_RST}\n" + printf "${STY_RED}" + printf "The community provided ./sdata/dist-${TARGET_ID}/ is outdated (status: ${tmp_update_status}),\n" + printf "which means it probably does not reflect all latest changes of ./sdata/dist-arch/ .\n" + printf "\n" + printf "According to the actual changes, it may still works, but it can also work unexpectedly.\n" + printf "It's highly recommended to check the following links before continue:${STY_RST}\n" + printf "${STY_UNDERLINE}https://github.com/end-4/dots-hyprland/discussions/2140${STY_RST}\n" + printf "${STY_UNDERLINE}https://github.com/end-4/dots-hyprland/commits/main/sdata/dist-arch${STY_RST}\n" + printf "${STY_UNDERLINE}https://github.com/end-4/dots-hyprland/commits/main/sdata/dist-${TARGET_ID}${STY_RST}\n" + printf "\n" + printf "${STY_PURPLE}${STY_INVERT}PR on ./sdata/dist-${TARGET_ID}/ to properly reflect the latest changes of ./sdata/dist-arch is welcomed.${STY_RST}\n" + printf "\n" + if [ "$ask" = "false" ]; then + echo "Urgent problem encountered, aborting...";exit 1 + else + printf "${STY_RED}Still proceed?${STY_RST}\n" + read -p "[y/N]: " p + case "$p" in + [yY])sleep 0;; + *)echo "Aborting...";exit 1;; + esac + fi fi fi - source ./sdata/dist-${TARGET_ID}/install-deps.sh - -elif [[ "$OS_DISTRO_ID_LIKE" == "arch" || "$OS_DISTRO_ID" == "cachyos" ]]; then - - TARGET_ID=arch - 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 "./sdata/dist-${TARGET_ID}/install-deps.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_RST}" - pause source ./sdata/dist-${TARGET_ID}/install-deps.sh - -else - - TARGET_ID=fallback - printf "${STY_RED}${STY_BOLD}===URGENT===${STY_RST}\n" - printf "${STY_RED}" - printf "Detected distro ID: ${OS_DISTRO_ID}\n" - printf "Detected distro ID_LIKE: ${OS_DISTRO_ID_LIKE}\n" - printf "./sdata/dist-${OS_DISTRO_ID}/install-deps.sh not found.\n" - printf "./sdata/dist-${TARGET_ID}/install-deps.sh will be used.\n" - printf "1. It may disrupt your system and will likely fail without your manual intervention.\n" - printf "2. It is WIP and only contains small number of dependencies far from enough.\n" - printf "Proceed only at your own risk.\n" - printf "${STY_RST}" - if [ "$ask" = "false" ]; then - echo "Urgent problem encountered, aborting...";exit 1 - else - printf "${STY_RED}Still proceed?${STY_RST}\n" - read -p "[y/N]: " p - case "$p" in - [yY])sleep 0;; - *)echo "Aborting...";exit 1;; - esac - fi - source ./sdata/dist-${TARGET_ID}/install-deps.sh - fi diff --git a/sdata/subcmd-install/2.setups.sh b/sdata/subcmd-install/2.setups.sh index 464dba1cd..9ef30fbab 100644 --- a/sdata/subcmd-install/2.setups.sh +++ b/sdata/subcmd-install/2.setups.sh @@ -20,7 +20,7 @@ fi v sudo usermod -aG video,i2c,input "$(whoami)" if [[ ! -z $(systemctl --version) ]]; then - if [[ "$OS_DISTRO_ID" == "fedora" ]]; then + if [[ "$OS_GROUP_ID" == "fedora" ]]; then v bash -c "echo uinput | sudo tee /etc/modules-load.d/uinput.conf" v bash -c 'echo SUBSYSTEM==\"misc\", KERNEL==\"uinput\", MODE=\"0660\", GROUP=\"input\" | sudo tee /etc/udev/rules.d/99-uinput.rules' else @@ -28,7 +28,7 @@ if [[ ! -z $(systemctl --version) ]]; then fi # TODO: find a proper way for enable Nix installed ydotool. When running `systemctl --user enable ydotool, it errors "Failed to enable unit: Unit ydotool.service does not exist". if [[ ! "${INSTALL_VIA_NIX}" == true ]]; then - if [[ "$OS_DISTRO_ID" == "fedora" ]]; then + if [[ "$OS_GROUP_ID" == "fedora" ]]; then v prepare_systemd_user_service fi # When $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR are empty, it commonly means that the current user has been logged in with `su - user` or `ssh user@hostname`. In such case `systemctl --user enable ` is not usable. It should be `sudo systemctl --machine=$(whoami)@.host --user enable ` instead. @@ -55,7 +55,7 @@ else fi # _icons_, _konsole_, _hypr_, and _quickshell_ are are chowned to user since they're emerge in as root by default. -if [[ "$OS_DISTRO_ID" == "gentoo" ]]; then +if [[ "$OS_GROUP_ID" == "gentoo" ]]; then v sudo chown -R $(whoami):$(whoami) ~/.config/hypr/ v sudo chown -R $(whoami):$(whoami) ~/.config/quickshell/ fi diff --git a/sdata/subcmd-install/3.files-legacy.sh b/sdata/subcmd-install/3.files-legacy.sh index 6b950ccd1..1ff430edf 100644 --- a/sdata/subcmd-install/3.files-legacy.sh +++ b/sdata/subcmd-install/3.files-legacy.sh @@ -59,7 +59,7 @@ case $SKIP_HYPRLAND in true) sleep 0;; *) warning_rsync_delete; v rsync -av --delete "${arg_excludes[@]}" dots/.config/hypr/ "$XDG_CONFIG_HOME"/hypr/ - if [ "$OS_DISTRO_ID" = "fedora" ];then + if [ "$OS_GROUP_ID" = "fedora" ];then v rsync -av "${REPO_ROOT}/dots-extra/fedora/hypr/hyprland/execs.conf" "$XDG_CONFIG_HOME/hypr/hyprland/execs.conf" fi # When hypr/custom does not exist, we assume that it's the firstrun. diff --git a/setup b/setup index 342471210..65857d5de 100755 --- a/setup +++ b/setup @@ -5,6 +5,7 @@ REPO_ROOT="$(pwd)" source ./sdata/lib/environment-variables.sh source ./sdata/lib/functions.sh source ./sdata/lib/package-installers.sh +source ./sdata/lib/dist-determine.sh prevent_sudo_or_root set -e @@ -58,6 +59,11 @@ case $1 in *)printf "${STY_RED}Unknown subcommand \"$1\".${STY_RST}\n";showhelp_global;exit 1;; esac ##################################################################################### +for function in ${print_os_group_id_functions[@]}; do + $function +done +pause + if [[ -f "${SUBCMD_DIR}/options.sh" ]]; then source "${SUBCMD_DIR}/options.sh" fi From d001bc1269c1499b1e96e7be449f19ca825f99c4 Mon Sep 17 00:00:00 2001 From: "Celestial.y" Date: Mon, 10 Nov 2025 11:25:18 +0800 Subject: [PATCH 6/6] Add a TODO in 1-issue.yml --- .github/ISSUE_TEMPLATE/1-issue.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/1-issue.yml b/.github/ISSUE_TEMPLATE/1-issue.yml index 55a1d0f73..481611013 100644 --- a/.github/ISSUE_TEMPLATE/1-issue.yml +++ b/.github/ISSUE_TEMPLATE/1-issue.yml @@ -18,7 +18,7 @@ body: required: false # Not required cuz user may have failed to do so - label: I've ticked the checkboxes without reading their contents required: false # Obviously - + # TODO: Use GitHub Action to auto add folding tag if the log contains more than 15 lines, instead of tell user to "paste here" cuz many users actually does not know its meaning (It's also not convenient anyway). - type: textarea attributes: label: "Step 2. Quick diagnose info"