From defab4fbc86eabec759d7f56d8123aa0d46628b3 Mon Sep 17 00:00:00 2001 From: purian23 Date: Sun, 25 Oct 2026 04:18:01 -0400 Subject: [PATCH] rebrand(installer): convert dankinstall to duxinstall (cherry picked from commit 6d65f304e58377258975bfb22a31faffed3789c3) --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- .github/ISSUE_TEMPLATE/support_request.yml | 2 +- .github/workflows/go-ci.yml | 4 +-- .github/workflows/release.yml | 26 +++++++++---------- .gitignore | 2 +- AGENTS.md | 2 +- README.md | 6 ++--- core/Makefile | 22 ++++++++-------- core/README.md | 14 +++++----- ...ild_dankinstall.sh => build_duxinstall.sh} | 14 +++++----- core/cmd/dms/commands_doctor.go | 2 +- core/cmd/{dankinstall => duxinstall}/main.go | 10 +++---- core/install.sh | 6 ++--- core/internal/config/deployer_test.go | 26 +++++++++---------- core/internal/distros/arch.go | 2 +- core/internal/distros/base.go | 2 +- core/internal/distros/immutable.go | 2 +- core/internal/distros/manual_packages.go | 10 +++---- core/internal/distros/opensuse.go | 2 +- core/internal/headless/runner.go | 8 +++--- core/internal/log/filelogger.go | 13 ++++++---- core/internal/tui/resume.go | 2 +- core/internal/tui/views_layer.go | 4 +-- core/internal/tui/views_welcome.go | 6 ++--- distro/void/README.md | 2 +- 25 files changed, 97 insertions(+), 94 deletions(-) rename core/{build_dankinstall.sh => build_duxinstall.sh} (64%) rename core/cmd/{dankinstall => duxinstall}/main.go (96%) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index c8b63031b..5684bc0b8 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -47,7 +47,7 @@ body: attributes: label: Select your Installation Method options: - - DankInstaller + - Dux Installer - Distro Packaging - Source validations: diff --git a/.github/ISSUE_TEMPLATE/support_request.yml b/.github/ISSUE_TEMPLATE/support_request.yml index 62185cb74..8d31bd2a9 100644 --- a/.github/ISSUE_TEMPLATE/support_request.yml +++ b/.github/ISSUE_TEMPLATE/support_request.yml @@ -54,7 +54,7 @@ body: attributes: label: Select your Installation Method options: - - DankInstaller + - Dux Installer - Distro Packaging - Source validations: diff --git a/.github/workflows/go-ci.yml b/.github/workflows/go-ci.yml index 8aef79d92..ab59c6935 100644 --- a/.github/workflows/go-ci.yml +++ b/.github/workflows/go-ci.yml @@ -63,8 +63,8 @@ jobs: - name: Build dms (distropkg) run: go build -v -tags 'distro_binary withshell' ./cmd/dms - - name: Build dankinstall - run: go build -v ./cmd/dankinstall + - name: Build duxinstall + run: go build -v ./cmd/duxinstall build-freebsd: runs-on: ubuntu-latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7882b7f51..9ad243e3d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -88,7 +88,7 @@ jobs: if: matrix.goos == 'linux' run: go test -v ./... - - name: Build dankinstall (${{ env.ASSET }}) + - name: Build duxinstall (${{ env.ASSET }}) if: matrix.goos == 'linux' env: GOOS: ${{ matrix.goos }} @@ -96,12 +96,12 @@ jobs: GOARCH: ${{ matrix.arch }} run: | set -eux - cd cmd/dankinstall + cd cmd/duxinstall go build -trimpath -ldflags "-s -w -X main.Version=${TAG}" \ - -o ../../dankinstall-${{ env.ASSET }} + -o ../../duxinstall-${{ env.ASSET }} cd ../.. - gzip -9 -k dankinstall-${{ env.ASSET }} - sha256sum dankinstall-${{ env.ASSET }}.gz > dankinstall-${{ env.ASSET }}.gz.sha256 + gzip -9 -k duxinstall-${{ env.ASSET }} + sha256sum duxinstall-${{ env.ASSET }}.gz > duxinstall-${{ env.ASSET }}.gz.sha256 - name: Sync embedded shell run: make sync-shell @@ -149,8 +149,8 @@ jobs: with: name: core-assets-${{ env.ASSET }} path: | - core/dankinstall-${{ env.ASSET }}.gz - core/dankinstall-${{ env.ASSET }}.gz.sha256 + core/duxinstall-${{ env.ASSET }}.gz + core/duxinstall-${{ env.ASSET }}.gz.sha256 core/dms-${{ env.ASSET }}.gz core/dms-${{ env.ASSET }}.gz.sha256 core/dms-distropkg-${{ env.ASSET }}.gz @@ -175,8 +175,8 @@ jobs: with: name: core-assets-${{ env.ASSET }} path: | - core/dankinstall-${{ env.ASSET }}.gz - core/dankinstall-${{ env.ASSET }}.gz.sha256 + core/duxinstall-${{ env.ASSET }}.gz + core/duxinstall-${{ env.ASSET }}.gz.sha256 core/dms-${{ env.ASSET }}.gz core/dms-${{ env.ASSET }}.gz.sha256 core/dms-distropkg-${{ env.ASSET }}.gz @@ -302,8 +302,8 @@ jobs: - **`dms-distropkg-arm64.gz`** - DMS CLI binary built with distro_package tag for ARM64 systems - **`dms-distropkg-freebsd-amd64.gz`** - DMS CLI binary built with distro_package tag for FreeBSD x86_64 systems - **`dms-distropkg-freebsd-arm64.gz`** - DMS CLI binary built with distro_package tag for FreeBSD ARM64 systems - - **`dankinstall-amd64.gz`** - Installer binary for x86_64 systems - - **`dankinstall-arm64.gz`** - Installer binary for ARM64 systems + - **`duxinstall-amd64.gz`** - Installer binary for x86_64 systems + - **`duxinstall-arm64.gz`** - Installer binary for ARM64 systems - **`dms-cli-.tar.gz`** - Go source code with vendored modules (for distro packaging) - **`dms-qml.tar.gz`** - QML source code only - **`dms-source.tar.gz`** - Full repository source with bundled DCommon (for distro packaging) @@ -348,8 +348,8 @@ jobs: fi done - # Copy dankinstall binaries - cp _core_assets/dankinstall-*.gz* _release_assets/ + # Copy duxinstall binaries + cp _core_assets/duxinstall-*.gz* _release_assets/ # Copy completions cp _core_assets/completion.* _release_assets/ 2>/dev/null || true diff --git a/.gitignore b/.gitignore index 511f6eebc..7d8caf5d5 100644 --- a/.gitignore +++ b/.gitignore @@ -130,6 +130,6 @@ distro/void/masterdir*/ # Often gets built core/dms -core/dankinstall +core/duxinstall core/internal/shellembed/dist diff --git a/AGENTS.md b/AGENTS.md index e09d1917a..1a528cf81 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,7 +4,7 @@ DMS is an open-source desktop shell for Wayland compositors on linux, built to w ## Repo Structure -- core/ - Go. `cmd/dms` runs quickshell, CLI utilities, and the unix socket server the UI depends on. `cmd/dankinstall` is a separate installer TUI. +- core/ - Go. `cmd/dms` runs quickshell, CLI utilities, and the unix socket server the UI depends on. `cmd/duxinstall` is a separate installer TUI. - quickshell/ - the entire UI: Common/ (singletons, Theme, settings), Services/ (system and core access), Modules/ (bar, dock, lock, ...), Modals/, Widgets/ (shell-specific widgets and deprecated Dank* shims), PLUGINS/, translations/ - dux-qml-common/ - submodule of shared QML widgets - docs/, distro/ - IPC and theme docs, packaging diff --git a/README.md b/README.md index 1dd4fce11..70c9788c8 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ dux-shell/ │ ├── Widgets/ # Reusable UI controls │ └── Common/ # Shared resources and themes ├── core/ # Go backend and CLI -│ ├── cmd/ # dms CLI and dankinstall binaries +│ ├── cmd/ # dms CLI and duxinstall binaries │ ├── internal/ # System integration, IPC, distro support │ └── pkg/ # Shared packages ├── distro/ # Distribution packaging @@ -159,12 +159,12 @@ See component-specific documentation: ### Building from Source -**Core + Dankinstall:** +**Core + Duxinstall:** ```bash cd core make # Build dms CLI -make dankinstall # Build installer +make duxinstall # Build installer ``` **Shell:** diff --git a/core/Makefile b/core/Makefile index b6631508d..bea99b92c 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1,7 +1,7 @@ BINARY_NAME=dms -BINARY_NAME_INSTALL=dankinstall +BINARY_NAME_INSTALL=duxinstall SOURCE_DIR=cmd/dms -SOURCE_DIR_INSTALL=cmd/dankinstall +SOURCE_DIR_INSTALL=cmd/duxinstall BUILD_DIR=bin SHELL_SRC=../quickshell EMBED_DIR=internal/shellembed/dist @@ -32,7 +32,7 @@ else DIST_ARCHS = $(ARCH) endif -.PHONY: all build sync-shell dankinstall dist clean install install-all install-dankinstall uninstall uninstall-all uninstall-dankinstall install-config uninstall-config test fmt vet deps print-version help +.PHONY: all build sync-shell duxinstall dist clean install install-all install-duxinstall uninstall uninstall-all uninstall-duxinstall install-config uninstall-config test fmt vet deps print-version help # Default target all: build @@ -58,7 +58,7 @@ build: sync-shell CGO_ENABLED=0 $(GO) build -tags withshell $(BUILD_LDFLAGS) -o $(BUILD_DIR)/$(BINARY_NAME) ./$(SOURCE_DIR) @echo "Build complete: $(BUILD_DIR)/$(BINARY_NAME)" -dankinstall: +duxinstall: @echo "Building $(BINARY_NAME_INSTALL)..." @mkdir -p $(BUILD_DIR) CGO_ENABLED=0 $(GO) build $(BUILD_LDFLAGS) -o $(BUILD_DIR)/$(BINARY_NAME_INSTALL) ./$(SOURCE_DIR_INSTALL) @@ -77,7 +77,7 @@ dist: sync-shell done @echo "Distribution builds complete" -build-all: build dankinstall +build-all: build duxinstall install: @echo "Installing $(BINARY_NAME) to $(INSTALL_DIR)..." @@ -91,7 +91,7 @@ install-all: @install -D -m 755 $(BUILD_DIR)/$(BINARY_NAME_INSTALL) $(INSTALL_DIR)/$(BINARY_NAME_INSTALL) @echo "Installation complete" -install-dankinstall: +install-duxinstall: @echo "Installing $(BINARY_NAME_INSTALL) to $(INSTALL_DIR)..." @install -D -m 755 $(BUILD_DIR)/$(BINARY_NAME_INSTALL) $(INSTALL_DIR)/$(BINARY_NAME_INSTALL) @echo "Installation complete" @@ -108,7 +108,7 @@ uninstall-all: @rm -f $(INSTALL_DIR)/$(BINARY_NAME_INSTALL) @echo "Uninstall complete" -uninstall-dankinstall: +uninstall-duxinstall: @echo "Uninstalling $(BINARY_NAME_INSTALL) from $(INSTALL_DIR)..." @rm -f $(INSTALL_DIR)/$(BINARY_NAME_INSTALL) @echo "Uninstall complete" @@ -160,16 +160,16 @@ help: @echo " all - Build the main binary (dms) (default)" @echo " build - Build the main binary (dms) with the embedded UI" @echo " sync-shell - Copy quickshell/ into the embed dir (runs before tagged builds)" - @echo " dankinstall - Build dankinstall binary" + @echo " duxinstall - Build duxinstall binary" @echo " dist - Build dms for linux/freebsd amd64/arm64 (no update/greeter)" @echo " Use ARCH=amd64 or ARCH=arm64 and/or DIST_OSES=linux to narrow" @echo " build-all - Build both binaries" @echo " install - Install dms to $(INSTALL_DIR)" - @echo " install-all - Install both dms and dankinstall to $(INSTALL_DIR)" - @echo " install-dankinstall - Install only dankinstall to $(INSTALL_DIR)" + @echo " install-all - Install both dms and duxinstall to $(INSTALL_DIR)" + @echo " install-duxinstall - Install only duxinstall to $(INSTALL_DIR)" @echo " uninstall - Remove dms from $(INSTALL_DIR)" @echo " uninstall-all - Remove both binaries from $(INSTALL_DIR)" - @echo " uninstall-dankinstall - Remove only dankinstall from $(INSTALL_DIR)" + @echo " uninstall-duxinstall - Remove only duxinstall from $(INSTALL_DIR)" @echo " clean - Clean build artifacts" @echo " test - Run tests" @echo " fmt - Format Go code" diff --git a/core/README.md b/core/README.md index 198c15e1d..d1d607d7f 100644 --- a/core/README.md +++ b/core/README.md @@ -9,7 +9,7 @@ Go-based backend for Dux Shell providing system integration, IPC, and installati **dms CLI** Command-line interface and daemon for shell management and system control. -**dankinstall** +**duxinstall** Distribution-aware installer for deploying DMS and compositor configurations on Arch, Fedora, Debian, Ubuntu, openSUSE, Gentoo, and Void. Supports both an interactive TUI and a headless (unattended) mode via CLI flags. ## System Integration @@ -102,7 +102,7 @@ Requires Go 1.25+ ```bash make # Build dms CLI -make dankinstall # Build installer +make duxinstall # Build installer make test # Run tests ``` @@ -142,12 +142,12 @@ go run github.com/duxlabs-dev/dux-go/cmd/go-wayland-scanner@latest \ **Module Structure:** -- `cmd/` - Binary entrypoints (dms, dankinstall) +- `cmd/` - Binary entrypoints (dms, duxinstall) - `internal/distros/` - Distribution-specific installation logic - `internal/proto/` - Wayland protocol bindings - `pkg/` - Shared packages -## Installation via dankinstall +## Installation via duxinstall **Interactive (TUI):** @@ -186,7 +186,7 @@ Headless mode requires `--yes` to proceed; without it, the installer exits with Configuration files are not replaced by default unless `--replace-configs` or `--replace-configs-all` is specified. Optional packages (`dms-greeter`, `danksearch`, `dankcalendar`) are disabled by default; enable them with their dedicated flags, `--include-deps`, or `--all-features`. -When no flags are provided, `dankinstall` launches the interactive TUI. +When no flags are provided, `duxinstall` launches the interactive TUI. ### Headless mode validation rules @@ -198,8 +198,8 @@ Headless mode activates when `--compositor` or `--term` is provided. ### Log file location -`dankinstall` writes logs to `/tmp` by default. -Set the `DANKINSTALL_LOG_DIR` environment variable to override the log directory. +`duxinstall` writes logs to `/tmp` by default. +Set the `DUXINSTALL_LOG_DIR` environment variable to override the log directory. ## Supported Distributions diff --git a/core/build_dankinstall.sh b/core/build_duxinstall.sh similarity index 64% rename from core/build_dankinstall.sh rename to core/build_duxinstall.sh index c430e7357..43babf135 100755 --- a/core/build_dankinstall.sh +++ b/core/build_duxinstall.sh @@ -10,7 +10,7 @@ NC='\033[0m' # No Color # Get latest version tag VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0") -echo -e "${GREEN}Building dankinstall ${VERSION}${NC}" +echo -e "${GREEN}Building duxinstall ${VERSION}${NC}" # Create bin directory if it doesn't exist mkdir -p bin @@ -19,20 +19,20 @@ mkdir -p bin for ARCH in amd64 arm64; do echo -e "${BLUE}Building for ${ARCH}...${NC}" - cd cmd/dankinstall + cd cmd/duxinstall GOOS=linux CGO_ENABLED=0 GOARCH=${ARCH} \ go build -trimpath -ldflags "-s -w -X main.Version=${VERSION}" \ - -o ../../bin/dankinstall-${ARCH} + -o ../../bin/duxinstall-${ARCH} cd ../.. # Compress - gzip -9 -k -f bin/dankinstall-${ARCH} + gzip -9 -k -f bin/duxinstall-${ARCH} # Generate checksum - (cd bin && sha256sum dankinstall-${ARCH}.gz > dankinstall-${ARCH}.gz.sha256) + (cd bin && sha256sum duxinstall-${ARCH}.gz > duxinstall-${ARCH}.gz.sha256) - echo -e "${GREEN}✓ Built bin/dankinstall-${ARCH}.gz${NC}" + echo -e "${GREEN}✓ Built bin/duxinstall-${ARCH}.gz${NC}" done echo -e "${GREEN}Done! Files ready in bin/:${NC}" -ls -lh bin/dankinstall-* +ls -lh bin/duxinstall-* diff --git a/core/cmd/dms/commands_doctor.go b/core/cmd/dms/commands_doctor.go index 2a64a0aa0..1e6cf288e 100644 --- a/core/cmd/dms/commands_doctor.go +++ b/core/cmd/dms/commands_doctor.go @@ -288,7 +288,7 @@ func checkSystemInfo() []checkResult { details := fmt.Sprintf("ID: %s, Version: %s, Arch: %s", osInfo.ID, osInfo.VersionID, osInfo.Architecture) switch { case osInfo.Immutable: - details += "; image-based (" + osInfo.ImmutableReason + "), dankinstall deploys configuration only" + details += "; image-based (" + osInfo.ImmutableReason + "), duxinstall deploys configuration only" case distros.IsUnsupportedDistro(osInfo.Distribution.ID, osInfo.VersionID): status = statusWarn message += " (version may not be fully supported)" diff --git a/core/cmd/dankinstall/main.go b/core/cmd/duxinstall/main.go similarity index 96% rename from core/cmd/dankinstall/main.go rename to core/cmd/duxinstall/main.go index 73db7970a..d5efdfa01 100644 --- a/core/cmd/dankinstall/main.go +++ b/core/cmd/duxinstall/main.go @@ -32,9 +32,9 @@ var ( ) var rootCmd = &cobra.Command{ - Use: "dankinstall", + Use: "duxinstall", Short: "Install Dux Shell and its dependencies", - Long: `dankinstall sets up Dux Shell with your chosen compositor and terminal. + Long: `duxinstall sets up Dux Shell with your chosen compositor and terminal. Without flags, it launches an interactive TUI. Providing either --compositor or --term activates headless (unattended) mode, which requires both flags. @@ -42,7 +42,7 @@ or --term activates headless (unattended) mode, which requires both flags. Headless mode requires cached credentials or a passwordless rule for your privilege escalation tool (sudo, doas, or run0).`, Args: cobra.NoArgs, - RunE: runDankinstall, + RunE: runDuxinstall, SilenceErrors: true, SilenceUsage: true, } @@ -66,7 +66,7 @@ func init() { func main() { if os.Getuid() == 0 { - fmt.Fprintln(os.Stderr, "Error: dankinstall must not be run as root") + fmt.Fprintln(os.Stderr, "Error: duxinstall must not be run as root") os.Exit(1) } @@ -76,7 +76,7 @@ func main() { } } -func runDankinstall(cmd *cobra.Command, args []string) error { +func runDuxinstall(cmd *cobra.Command, args []string) error { headlessMode := compositor != "" || term != "" if !headlessMode { diff --git a/core/install.sh b/core/install.sh index 67846850a..4bbcc7c7e 100755 --- a/core/install.sh +++ b/core/install.sh @@ -43,7 +43,7 @@ if [ -z "$LATEST_VERSION" ]; then exit 1 fi -printf "%bInstalling Dankinstall %s for %s...%b\n" "$GREEN" "$LATEST_VERSION" "$ARCH" "$NC" +printf "%bInstalling Duxinstall %s for %s...%b\n" "$GREEN" "$LATEST_VERSION" "$ARCH" "$NC" # Download and install TEMP_DIR=$(mktemp -d) @@ -52,8 +52,8 @@ cd "$TEMP_DIR" || exit 1 # Download the gzipped binary and its checksum printf "%bDownloading installer...%b\n" "$GREEN" "$NC" -curl -L "https://github.com/duxlabs-dev/dux-shell/releases/download/$LATEST_VERSION/dankinstall-$ARCH.gz" -o "installer.gz" -curl -L "https://github.com/duxlabs-dev/dux-shell/releases/download/$LATEST_VERSION/dankinstall-$ARCH.gz.sha256" -o "expected.sha256" +curl -L "https://github.com/duxlabs-dev/dux-shell/releases/download/$LATEST_VERSION/duxinstall-$ARCH.gz" -o "installer.gz" +curl -L "https://github.com/duxlabs-dev/dux-shell/releases/download/$LATEST_VERSION/duxinstall-$ARCH.gz.sha256" -o "expected.sha256" # Get the expected checksum EXPECTED_CHECKSUM=$(awk '{print $1}' expected.sha256) diff --git a/core/internal/config/deployer_test.go b/core/internal/config/deployer_test.go index dec61b20b..6894a19e8 100644 --- a/core/internal/config/deployer_test.go +++ b/core/internal/config/deployer_test.go @@ -182,7 +182,7 @@ layout { } func TestConfigDeploymentFlow(t *testing.T) { - tempDir, err := os.MkdirTemp("", "dankinstall-test") + tempDir, err := os.MkdirTemp("", "duxinstall-test") require.NoError(t, err) defer os.RemoveAll(tempDir) @@ -312,7 +312,7 @@ func TestHyprlangMonitorLineToLuaPreservesOptions(t *testing.T) { } func TestHyprlandConfigDeployment(t *testing.T) { - tempDir, err := os.MkdirTemp("", "dankinstall-hyprland-test") + tempDir, err := os.MkdirTemp("", "duxinstall-hyprland-test") require.NoError(t, err) defer os.RemoveAll(tempDir) @@ -324,7 +324,7 @@ func TestHyprlandConfigDeployment(t *testing.T) { cd := NewConfigDeployer(logChan) t.Run("deploy hyprland config to empty directory", func(t *testing.T) { - td, err := os.MkdirTemp("", "dankinstall-hyprland-empty") + td, err := os.MkdirTemp("", "duxinstall-hyprland-empty") require.NoError(t, err) defer os.RemoveAll(td) os.Setenv("HOME", td) @@ -344,7 +344,7 @@ func TestHyprlandConfigDeployment(t *testing.T) { }) t.Run("deploy hyprland config with existing monitors", func(t *testing.T) { - td, err := os.MkdirTemp("", "dankinstall-hyprland-merge") + td, err := os.MkdirTemp("", "duxinstall-hyprland-merge") require.NoError(t, err) defer os.RemoveAll(td) os.Setenv("HOME", td) @@ -408,7 +408,7 @@ general { }) t.Run("deploy hyprland config removes root legacy symlink when lua exists", func(t *testing.T) { - td, err := os.MkdirTemp("", "dankinstall-hyprland-lua-conf-symlink") + td, err := os.MkdirTemp("", "duxinstall-hyprland-lua-conf-symlink") require.NoError(t, err) defer os.RemoveAll(td) os.Setenv("HOME", td) @@ -431,7 +431,7 @@ general { }) t.Run("deploy hyprland config refreshes managed binds but preserves user binds", func(t *testing.T) { - td, err := os.MkdirTemp("", "dankinstall-hyprland-refresh-binds") + td, err := os.MkdirTemp("", "duxinstall-hyprland-refresh-binds") require.NoError(t, err) defer os.RemoveAll(td) os.Setenv("HOME", td) @@ -457,7 +457,7 @@ general { } func TestKittyConfigDeployment(t *testing.T) { - tempDir, err := os.MkdirTemp("", "dankinstall-kitty-test") + tempDir, err := os.MkdirTemp("", "duxinstall-kitty-test") require.NoError(t, err) defer os.RemoveAll(tempDir) @@ -495,7 +495,7 @@ func TestKittyConfigDeployment(t *testing.T) { } func TestAlacrittyConfigDeployment(t *testing.T) { - tempDir, err := os.MkdirTemp("", "dankinstall-alacritty-test") + tempDir, err := os.MkdirTemp("", "duxinstall-alacritty-test") require.NoError(t, err) defer os.RemoveAll(tempDir) @@ -570,7 +570,7 @@ func TestShouldReplaceConfigDeployIfMissing(t *testing.T) { } t.Run("replaceConfigs nil deploys config", func(t *testing.T) { - tempDir, err := os.MkdirTemp("", "dankinstall-replace-nil-test") + tempDir, err := os.MkdirTemp("", "duxinstall-replace-nil-test") require.NoError(t, err) defer os.RemoveAll(tempDir) @@ -603,7 +603,7 @@ func TestShouldReplaceConfigDeployIfMissing(t *testing.T) { }) t.Run("replaceConfigs all false and config missing deploys config", func(t *testing.T) { - tempDir, err := os.MkdirTemp("", "dankinstall-replace-missing-test") + tempDir, err := os.MkdirTemp("", "duxinstall-replace-missing-test") require.NoError(t, err) defer os.RemoveAll(tempDir) @@ -636,7 +636,7 @@ func TestShouldReplaceConfigDeployIfMissing(t *testing.T) { }) t.Run("replaceConfigs false and config exists skips config", func(t *testing.T) { - tempDir, err := os.MkdirTemp("", "dankinstall-replace-exists-test") + tempDir, err := os.MkdirTemp("", "duxinstall-replace-exists-test") require.NoError(t, err) defer os.RemoveAll(tempDir) @@ -678,7 +678,7 @@ func TestShouldReplaceConfigDeployIfMissing(t *testing.T) { }) t.Run("replaceConfigs true and config exists deploys config", func(t *testing.T) { - tempDir, err := os.MkdirTemp("", "dankinstall-replace-true-test") + tempDir, err := os.MkdirTemp("", "duxinstall-replace-true-test") require.NoError(t, err) defer os.RemoveAll(tempDir) @@ -725,7 +725,7 @@ func TestShouldReplaceConfigDeployIfMissing(t *testing.T) { }) t.Run("hyprland legacy config exists skips when replace false", func(t *testing.T) { - tempDir, err := os.MkdirTemp("", "dankinstall-hyprland-legacy-skip-test") + tempDir, err := os.MkdirTemp("", "duxinstall-hyprland-legacy-skip-test") require.NoError(t, err) defer os.RemoveAll(tempDir) diff --git a/core/internal/distros/arch.go b/core/internal/distros/arch.go index c25e99f0a..4bf2eb771 100644 --- a/core/internal/distros/arch.go +++ b/core/internal/distros/arch.go @@ -735,7 +735,7 @@ func (a *ArchDistribution) installSingleAURPackageInternal(ctx context.Context, return fmt.Errorf("failed to get user home directory: %w", err) } - buildDir := filepath.Join(homeDir, ".cache", "dankinstall", "aur-builds", pkg) + buildDir := filepath.Join(homeDir, ".cache", "duxinstall", "aur-builds", pkg) // Clean up any existing cache first if err := os.RemoveAll(buildDir); err != nil { diff --git a/core/internal/distros/base.go b/core/internal/distros/base.go index 3a076be8c..cd7d5cc5d 100644 --- a/core/internal/distros/base.go +++ b/core/internal/distros/base.go @@ -659,7 +659,7 @@ func (b *BaseDistribution) installDMSBinary(ctx context.Context, sudoPassword st if err != nil { return fmt.Errorf("failed to get user home directory: %w", err) } - tmpDir := filepath.Join(homeDir, ".cache", "dankinstall", "manual-builds") + tmpDir := filepath.Join(homeDir, ".cache", "duxinstall", "manual-builds") if err := os.MkdirAll(tmpDir, 0o755); err != nil { return fmt.Errorf("failed to create temp directory: %w", err) } diff --git a/core/internal/distros/immutable.go b/core/internal/distros/immutable.go index 8e194c9ea..119537211 100644 --- a/core/internal/distros/immutable.go +++ b/core/internal/distros/immutable.go @@ -81,7 +81,7 @@ func detectImmutable(fs afero.Fs, osRelease map[string]string) (bool, string) { func ImmutableGuidance(info *OSInfo) string { var b strings.Builder fmt.Fprintf(&b, "%s is an image-based system: %s.\n\n", info.PrettyName, info.ImmutableReason) - b.WriteString("dankinstall has no package mapping for this image, so it cannot tell what is installed or deploy configuration for it. Nothing was changed on this system.\n\n") + b.WriteString("duxinstall has no package mapping for this image, so it cannot tell what is installed or deploy configuration for it. Nothing was changed on this system.\n\n") b.WriteString("See " + site.Docs + "/getting-started for other options.") return b.String() } diff --git a/core/internal/distros/manual_packages.go b/core/internal/distros/manual_packages.go index 8c5e99d77..7b138120c 100644 --- a/core/internal/distros/manual_packages.go +++ b/core/internal/distros/manual_packages.go @@ -95,8 +95,8 @@ func (m *ManualPackageInstaller) installNiri(ctx context.Context, sudoPassword s m.log("Installing niri from source...") homeDir, _ := os.UserHomeDir() - buildDir := filepath.Join(homeDir, ".cache", "dankinstall", "niri-build") - tmpDir := filepath.Join(homeDir, ".cache", "dankinstall", "tmp") + buildDir := filepath.Join(homeDir, ".cache", "duxinstall", "niri-build") + tmpDir := filepath.Join(homeDir, ".cache", "duxinstall", "tmp") if err := os.MkdirAll(buildDir, 0o755); err != nil { return fmt.Errorf("failed to create build directory: %w", err) } @@ -173,7 +173,7 @@ func (m *ManualPackageInstaller) installQuickshell(ctx context.Context, variant return fmt.Errorf("HOME environment variable not set") } - cacheDir := filepath.Join(homeDir, ".cache", "dankinstall") + cacheDir := filepath.Join(homeDir, ".cache", "duxinstall") if err := os.MkdirAll(cacheDir, 0o755); err != nil { return fmt.Errorf("failed to create cache directory: %w", err) } @@ -279,7 +279,7 @@ func (m *ManualPackageInstaller) installHyprland(ctx context.Context, sudoPasswo return fmt.Errorf("HOME environment variable not set") } - cacheDir := filepath.Join(homeDir, ".cache", "dankinstall") + cacheDir := filepath.Join(homeDir, ".cache", "duxinstall") if err := os.MkdirAll(cacheDir, 0o755); err != nil { return fmt.Errorf("failed to create cache directory: %w", err) } @@ -342,7 +342,7 @@ func (m *ManualPackageInstaller) installGhostty(ctx context.Context, sudoPasswor return fmt.Errorf("HOME environment variable not set") } - cacheDir := filepath.Join(homeDir, ".cache", "dankinstall") + cacheDir := filepath.Join(homeDir, ".cache", "duxinstall") if err := os.MkdirAll(cacheDir, 0o755); err != nil { return fmt.Errorf("failed to create cache directory: %w", err) } diff --git a/core/internal/distros/opensuse.go b/core/internal/distros/opensuse.go index 703312b9d..088c33e82 100644 --- a/core/internal/distros/opensuse.go +++ b/core/internal/distros/opensuse.go @@ -703,7 +703,7 @@ func (o *OpenSUSEDistribution) installQuickshell(ctx context.Context, variant de return fmt.Errorf("HOME environment variable not set") } - cacheDir := filepath.Join(homeDir, ".cache", "dankinstall") + cacheDir := filepath.Join(homeDir, ".cache", "duxinstall") if err := os.MkdirAll(cacheDir, 0o755); err != nil { return fmt.Errorf("failed to create cache directory: %w", err) } diff --git a/core/internal/headless/runner.go b/core/internal/headless/runner.go index 9b3b0f2f3..7c8fc1525 100644 --- a/core/internal/headless/runner.go +++ b/core/internal/headless/runner.go @@ -518,14 +518,14 @@ func (r *Runner) resolveSudoPassword() (string, error) { return "", fmt.Errorf( "sudo authentication required but no cached credentials found\n" + "Options:\n" + - " 1. Run 'sudo -v' before dankinstall to cache credentials\n" + + " 1. Run 'sudo -v' before duxinstall to cache credentials\n" + " 2. Configure passwordless sudo for your user", ) case privesc.ToolDoas: return "", fmt.Errorf( "doas authentication required but no cached credentials found\n" + "Options:\n" + - " 1. Run 'doas true' before dankinstall to cache credentials (requires 'persist' in /etc/doas.conf)\n" + + " 1. Run 'doas true' before duxinstall to cache credentials (requires 'persist' in /etc/doas.conf)\n" + " 2. Configure a 'nopass' rule in /etc/doas.conf for your user", ) case privesc.ToolRun0: @@ -565,9 +565,9 @@ func (r *Runner) requireLayeredPackages(distro distros.Distribution, dependencie layerer, ok := distro.(distros.PackageLayerer) if !ok { - return fmt.Errorf("this image has no known way to add packages; install them with the image's own tooling, reboot, and run dankinstall again") + return fmt.Errorf("this image has no known way to add packages; install them with the image's own tooling, reboot, and run duxinstall again") } - fmt.Fprintln(os.Stdout, "Packages must be added to the image first. Run these, reboot, then run dankinstall again:") + fmt.Fprintln(os.Stdout, "Packages must be added to the image first. Run these, reboot, then run duxinstall again:") fmt.Fprintln(os.Stdout) for _, cmd := range layerer.LayerCommands(dependencies, wm, reinstallItems, disabledItems) { fmt.Fprintf(os.Stdout, " %s\n", cmd) diff --git a/core/internal/log/filelogger.go b/core/internal/log/filelogger.go index e3ff42b52..2b5d6b056 100644 --- a/core/internal/log/filelogger.go +++ b/core/internal/log/filelogger.go @@ -23,15 +23,18 @@ type FileLogger struct { func NewFileLogger() (*FileLogger, error) { timestamp := time.Now().Unix() - // Use DANKINSTALL_LOG_DIR if set, otherwise fall back to /tmp. - logDir := os.Getenv("DANKINSTALL_LOG_DIR") + logDir := os.Getenv("DUXINSTALL_LOG_DIR") + if logDir == "" { + // Pre-rename name, still set in existing scripts. + logDir = os.Getenv("DANKINSTALL_LOG_DIR") + } if logDir == "" { logDir = "/tmp" } if err := os.MkdirAll(logDir, 0o755); err != nil { return nil, fmt.Errorf("failed to create log directory: %w", err) } - logPath := filepath.Join(logDir, fmt.Sprintf("dankinstall-%d.log", timestamp)) + logPath := filepath.Join(logDir, fmt.Sprintf("duxinstall-%d.log", timestamp)) file, err := os.Create(logPath) if err != nil { @@ -49,7 +52,7 @@ func NewFileLogger() (*FileLogger, error) { passwordRe: passwordRe, } - header := fmt.Sprintf("=== DankInstall Log ===\nStarted: %s\n\n", time.Now().Format(time.RFC3339)) + header := fmt.Sprintf("=== DuxInstall Log ===\nStarted: %s\n\n", time.Now().Format(time.RFC3339)) logger.writeToFile(header) return logger, nil @@ -102,7 +105,7 @@ func (l *FileLogger) Close() error { l.mu.Lock() defer l.mu.Unlock() - footer := fmt.Sprintf("\n=== DankInstall Log End ===\nCompleted: %s\n", time.Now().Format(time.RFC3339)) + footer := fmt.Sprintf("\n=== DuxInstall Log End ===\nCompleted: %s\n", time.Now().Format(time.RFC3339)) l.writer.WriteString(footer) //nolint:errcheck l.writer.Flush() diff --git a/core/internal/tui/resume.go b/core/internal/tui/resume.go index a6a38b048..1de982be6 100644 --- a/core/internal/tui/resume.go +++ b/core/internal/tui/resume.go @@ -19,7 +19,7 @@ func resumePath() string { if dir == "" { dir = filepath.Join(os.Getenv("HOME"), ".local", "state") } - return filepath.Join(dir, "dankinstall", "resume.json") + return filepath.Join(dir, "duxinstall", "resume.json") } func saveLayerResume(r layerResume) error { diff --git a/core/internal/tui/views_layer.go b/core/internal/tui/views_layer.go index c016b57ee..556b09367 100644 --- a/core/internal/tui/views_layer.go +++ b/core/internal/tui/views_layer.go @@ -78,10 +78,10 @@ func (m Model) viewLayerPackages() string { commands := m.layerCommands() if len(commands) == 0 { - b.WriteString(m.styles.Normal.Render(wrapText("This image has no known way to add these packages. Install them from the image's own tooling, reboot, and run dankinstall again.", 70))) + b.WriteString(m.styles.Normal.Render(wrapText("This image has no known way to add these packages. Install them from the image's own tooling, reboot, and run duxinstall again.", 70))) b.WriteString("\n\n") } else { - b.WriteString(m.styles.Normal.Render("Run these, reboot, then run dankinstall again. It picks up from here and deploys configuration:")) + b.WriteString(m.styles.Normal.Render("Run these, reboot, then run duxinstall again. It picks up from here and deploys configuration:")) b.WriteString("\n\n") for _, cmd := range commands { b.WriteString(" " + m.styles.Accent.Render(cmd)) diff --git a/core/internal/tui/views_welcome.go b/core/internal/tui/views_welcome.go index 48b473e59..b23199b05 100644 --- a/core/internal/tui/views_welcome.go +++ b/core/internal/tui/views_welcome.go @@ -18,7 +18,7 @@ func (m Model) viewWelcome() string { b.WriteString(m.styles.Accent.Render(strings.Repeat("━", 58))) b.WriteByte('\n') b.WriteString(m.styles.TitleBox.Render( - m.styles.Highlight.Render("dankinstall") + m.styles.AccentItalic.Render(" // Dux Labs Installer"))) + m.styles.Highlight.Render("duxinstall") + m.styles.AccentItalic.Render(" // Dux Labs Installer"))) b.WriteByte('\n') b.WriteString(m.styles.SubtleItalic.Render("Quickstart for a Dux Desktop")) b.WriteString("\n\n") @@ -67,14 +67,14 @@ func (m Model) writeImmutableSystem(b *strings.Builder) { func (m Model) writeImmutableNotice(b *strings.Builder) { title := m.styles.Warning.Bold(true).Render("Image-based system: " + m.osInfo.ImmutableReason) - msg := wrapText("dankinstall will not install packages or ask for a password here. It checks what is installed, lists anything missing with the command to layer it, and deploys configuration into your home directory.", 70) + msg := wrapText("duxinstall will not install packages or ask for a password here. It checks what is installed, lists anything missing with the command to layer it, and deploys configuration into your home directory.", 70) b.WriteString(m.styles.InfoBox.Render(title + "\n" + m.styles.Normal.Render(msg))) b.WriteString("\n\n") } func (m Model) writeResumeNotice(b *strings.Builder) { title := m.styles.Success.Bold(true).Render(fmt.Sprintf("▶ Resuming setup: %s with %s", m.resume.WindowManager, m.resume.Terminal)) - msg := wrapText("Press Enter to finish. dankinstall checks that the layered packages are installed and deploys configuration into your home directory. No packages are installed and no password is needed.", 70) + msg := wrapText("Press Enter to finish. duxinstall checks that the layered packages are installed and deploys configuration into your home directory. No packages are installed and no password is needed.", 70) b.WriteString(m.styles.InfoBox.Render(title + "\n" + m.styles.Normal.Render(msg))) b.WriteString("\n\n") } diff --git a/distro/void/README.md b/distro/void/README.md index 6b9049d14..bad070baf 100644 --- a/distro/void/README.md +++ b/distro/void/README.md @@ -126,4 +126,4 @@ sudo ln -sf /etc/sv/dbus /var/service/dbus sudo ln -sf /etc/sv/elogind /var/service/elogind ``` -The `dankinstall` Void path enables both services after installing packages. +The `duxinstall` Void path enables both services after installing packages.