From e8510b925e1a3ee4d51ff252a663b352b57415a0 Mon Sep 17 00:00:00 2001 From: bbedward Date: Wed, 12 Nov 2025 20:34:58 -0500 Subject: [PATCH] meta: monorepo updates --- .github/ISSUE_TEMPLATE/bug_report.md | 10 +- .github/workflows/copr-release.yml | 16 +- .github/workflows/go-ci.yml | 46 ++ .github/workflows/release.yml | 483 ++++++++++++++++-- .github/workflows/update-vendor-hash.yml | 90 ++++ LICENSE | 3 +- README.md | 188 ++++++- assets/danklogo.svg | 113 ++++ assets/danklogo2.svg | 113 ++++ backend/LICENSE | 21 - backend/README.md | 324 +++--------- backend/cmd/dms/commands_features.go | 6 +- backend/flake.lock | 27 - backend/flake.nix | 61 --- backend/install.sh | 6 +- backend/internal/config/dms.go | 15 +- backend/internal/distros/base.go | 4 +- backend/internal/distros/manual_packages.go | 57 ++- backend/internal/tui/views_welcome.go | 2 +- backend/internal/version/version.go | 2 +- .../distro => distro}/fedora/dms-greeter.spec | 16 +- {quickshell/distro => distro}/fedora/dms.spec | 37 +- quickshell/flake.lock => flake.lock | 0 quickshell/flake.nix => flake.nix | 2 +- {quickshell/nix => nix}/default.nix | 0 {quickshell/nix => nix}/greeter.nix | 0 {quickshell/nix => nix}/niri.nix | 0 .../LICENSE_CHANGE_12_11_2025.md | 0 quickshell/README.md | 375 +++++++------- 29 files changed, 1340 insertions(+), 677 deletions(-) create mode 100644 .github/workflows/go-ci.yml create mode 100644 .github/workflows/update-vendor-hash.yml create mode 100644 assets/danklogo.svg create mode 100644 assets/danklogo2.svg delete mode 100644 backend/LICENSE delete mode 100644 backend/flake.lock delete mode 100644 backend/flake.nix rename {quickshell/distro => distro}/fedora/dms-greeter.spec (92%) rename {quickshell/distro => distro}/fedora/dms.spec (77%) rename quickshell/flake.lock => flake.lock (100%) rename quickshell/flake.nix => flake.nix (98%) rename {quickshell/nix => nix}/default.nix (100%) rename {quickshell/nix => nix}/greeter.nix (100%) rename {quickshell/nix => nix}/niri.nix (100%) rename LICENSE_CHANGE_12_11_2025.md => quickshell/LICENSE_CHANGE_12_11_2025.md (100%) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index c4c73553..ea66a71e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -9,17 +9,9 @@ assignees: "" - - ## Compositor - [ ] niri diff --git a/.github/workflows/copr-release.yml b/.github/workflows/copr-release.yml index 3015cb3e..bbeca672 100644 --- a/.github/workflows/copr-release.yml +++ b/.github/workflows/copr-release.yml @@ -1,10 +1,6 @@ -name: DMS Copr Stable Release +name: DMS Copr Stable Release (Manual) on: - workflow_run: - workflows: ["Create Release from DMS"] - types: [completed] - branches: [master] workflow_dispatch: inputs: version: @@ -15,7 +11,6 @@ on: jobs: build-and-upload: runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }} steps: - name: Checkout repository @@ -27,9 +22,6 @@ jobs: if [ -n "${{ github.event.inputs.version }}" ]; then VERSION="${{ github.event.inputs.version }}" echo "Using manual version: $VERSION" - elif [ "${{ github.event_name }}" = "workflow_run" ]; then - VERSION=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r '.tag_name' | sed 's/^v//') - echo "Using latest release version from workflow_run: $VERSION" else VERSION=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r '.tag_name' | sed 's/^v//') echo "Using latest release version: $VERSION" @@ -115,7 +107,7 @@ jobs: %package -n dms-cli Summary: DankMaterialShell CLI tool License: MIT - URL: https://github.com/AvengeMedia/danklinux + URL: https://github.com/AvengeMedia/DankMaterialShell %description -n dms-cli Command-line interface for DankMaterialShell configuration and management. @@ -151,7 +143,7 @@ jobs: esac # Download dms-cli for target architecture - wget -O %{_builddir}/dms-cli.gz "https://github.com/AvengeMedia/danklinux/releases/latest/download/dms-distropkg-${ARCH_SUFFIX}.gz" || { + wget -O %{_builddir}/dms-cli.gz "https://github.com/AvengeMedia/DankMaterialShell/releases/latest/download/dms-distropkg-${ARCH_SUFFIX}.gz" || { echo "Failed to download dms-cli for architecture %{_arch}" exit 1 } @@ -188,7 +180,7 @@ jobs: rm -rf %{buildroot}%{_datadir}/quickshell/dms/.git* rm -f %{buildroot}%{_datadir}/quickshell/dms/.gitignore rm -rf %{buildroot}%{_datadir}/quickshell/dms/.github - rm -f %{buildroot}%{_datadir}/quickshell/dms/*.spec + rm -rf %{buildroot}%{_datadir}/quickshell/dms/distro %posttrans # Clean up old installation path from previous versions (only if empty) diff --git a/.github/workflows/go-ci.yml b/.github/workflows/go-ci.yml new file mode 100644 index 00000000..2ee8c413 --- /dev/null +++ b/.github/workflows/go-ci.yml @@ -0,0 +1,46 @@ +name: Go CI + +on: + push: + branches: + - '**' + paths: + - 'backend/**' + - '.github/workflows/go-ci.yml' + +jobs: + test: + runs-on: ubuntu-latest + defaults: + run: + working-directory: backend + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: ./backend/go.mod + + - name: Format check + run: | + if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then + echo "The following files are not formatted:" + gofmt -s -l . + exit 1 + fi + + - name: Test + run: go test -v ./... + + - name: Build dms + run: | + cd cmd/dms + go build -v . + + - name: Build dankinstall + run: | + cd cmd/dankinstall + go build -v . diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index deefc949..2dac6fd4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,47 +1,177 @@ -# Release from a dispatch event from the danklinux repo -name: Create Release from DMS +name: Release on: - repository_dispatch: - types: [dms_release] + push: + tags: + - 'v*' permissions: contents: write actions: write concurrency: - group: release-${{ github.event.client_payload.tag }} + group: release-${{ github.ref_name }} cancel-in-progress: true jobs: - create_release_from_dms: - runs-on: ubuntu-24.04 - env: - TAG: ${{ github.event.client_payload.tag }} - DMS_REPO: ${{ github.event.client_payload.dms_repo }} + build-backend: + runs-on: ubuntu-latest + strategy: + matrix: + arch: [amd64, arm64] + + defaults: + run: + working-directory: backend + steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Ensure VERSION and tag + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: ./backend/go.mod + + - name: Run tests + run: go test -v ./... + + - name: Build dankinstall (${{ matrix.arch }}) + env: + GOOS: linux + CGO_ENABLED: 0 + GOARCH: ${{ matrix.arch }} run: | - set -euxo pipefail - git config user.name "github-actions[bot]" + set -eux + cd cmd/dankinstall + go build -trimpath -ldflags "-s -w -X main.Version=${GITHUB_REF#refs/tags/}" \ + -o ../../dankinstall-${{ matrix.arch }} + cd ../.. + gzip -9 -k dankinstall-${{ matrix.arch }} + sha256sum dankinstall-${{ matrix.arch }}.gz > dankinstall-${{ matrix.arch }}.gz.sha256 + + - name: Build dms (${{ matrix.arch }}) + env: + GOOS: linux + CGO_ENABLED: 0 + GOARCH: ${{ matrix.arch }} + run: | + set -eux + cd cmd/dms + go build -trimpath -ldflags "-s -w -X main.Version=${GITHUB_REF#refs/tags/}" \ + -o ../../dms-${{ matrix.arch }} + cd ../.. + gzip -9 -k dms-${{ matrix.arch }} + sha256sum dms-${{ matrix.arch }}.gz > dms-${{ matrix.arch }}.gz.sha256 + + - name: Generate shell completions + if: matrix.arch == 'amd64' + run: | + set -eux + chmod +x dms-amd64 + ./dms-amd64 completion bash > completion.bash + ./dms-amd64 completion fish > completion.fish + ./dms-amd64 completion zsh > completion.zsh + + - name: Build dms-distropkg (${{ matrix.arch }}) + env: + GOOS: linux + CGO_ENABLED: 0 + GOARCH: ${{ matrix.arch }} + run: | + set -eux + cd cmd/dms + go build -trimpath -tags distro_binary -ldflags "-s -w -X main.Version=${GITHUB_REF#refs/tags/}" \ + -o ../../dms-distropkg-${{ matrix.arch }} + cd ../.. + gzip -9 -k dms-distropkg-${{ matrix.arch }} + sha256sum dms-distropkg-${{ matrix.arch }}.gz > dms-distropkg-${{ matrix.arch }}.gz.sha256 + + - name: Upload artifacts (${{ matrix.arch }}) + if: matrix.arch == 'arm64' + uses: actions/upload-artifact@v4 + with: + name: backend-assets-${{ matrix.arch }} + path: | + backend/dankinstall-${{ matrix.arch }}.gz + backend/dankinstall-${{ matrix.arch }}.gz.sha256 + backend/dms-${{ matrix.arch }}.gz + backend/dms-${{ matrix.arch }}.gz.sha256 + backend/dms-distropkg-${{ matrix.arch }}.gz + backend/dms-distropkg-${{ matrix.arch }}.gz.sha256 + if-no-files-found: error + + - name: Upload artifacts with completions + if: matrix.arch == 'amd64' + uses: actions/upload-artifact@v4 + with: + name: backend-assets-${{ matrix.arch }} + path: | + backend/dankinstall-${{ matrix.arch }}.gz + backend/dankinstall-${{ matrix.arch }}.gz.sha256 + backend/dms-${{ matrix.arch }}.gz + backend/dms-${{ matrix.arch }}.gz.sha256 + backend/dms-distropkg-${{ matrix.arch }}.gz + backend/dms-distropkg-${{ matrix.arch }}.gz.sha256 + backend/completion.bash + backend/completion.fish + backend/completion.zsh + if-no-files-found: error + + update-versions: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 + + - name: Update VERSION and flake.nix + run: | + set -euo pipefail + git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - echo "${TAG}" > VERSION + version="${GITHUB_REF#refs/tags/}" + version_no_v="${version#v}" + echo "Updating to version: $version" - git add -A VERSION + # Update VERSION file in quickshell/ + echo "${version}" > quickshell/VERSION + + # Update version in backend/flake.nix + sed -i "s/version = \"[^\"]*\"/version = \"$version_no_v\"/" backend/flake.nix + + git add quickshell/VERSION backend/flake.nix if ! git diff --cached --quiet; then - git commit -m "Update VERSION to ${TAG} (from DMS)" + git commit -m "chore: bump version to $version" + git push origin HEAD:master || git push origin HEAD:main + echo "Pushed version updates to master" + else + echo "No version changes needed" fi - git tag -f "${TAG}" + release: + runs-on: ubuntu-24.04 + needs: build-backend + env: + TAG: ${{ github.ref_name }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 - git push origin HEAD - git push -f origin "${TAG}" + - name: Download backend artifacts + uses: actions/download-artifact@v4 + with: + pattern: backend-assets-* + merge-multiple: true + path: ./_backend_assets - name: Generate Changelog id: changelog @@ -55,6 +185,12 @@ jobs: fi cat > RELEASE_BODY.md << 'EOF' + ## Installation + + ```bash + curl -fsSL https://install.danklinux.com | sh + ``` + ## Assets ### Complete Packages @@ -66,6 +202,8 @@ jobs: - **`dms-cli-arm64.gz`** - DMS CLI binary for ARM64 systems - **`dms-distropkg-amd64.gz`** - DMS CLI binary built with distro_package tag for AMD64 systems - **`dms-distropkg-arm64.gz`** - DMS CLI binary built with distro_package tag for ARM64 systems + - **`dankinstall-amd64.gz`** - Installer binary for x86_64 systems + - **`dankinstall-arm64.gz`** - Installer binary for ARM64 systems - **`dms-qml.tar.gz`** - QML source code only ### Checksums @@ -89,30 +227,14 @@ jobs: cat RELEASE_BODY.md >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT - - name: Create/Update DankMaterialShell Release - uses: softprops/action-gh-release@v2 - with: - tag_name: ${{ env.TAG }} - name: Release ${{ env.TAG }} - body: ${{ steps.changelog.outputs.changelog }} - draft: false - prerelease: ${{ contains(env.TAG, '-') }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Download and prepare release assets - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Prepare release assets run: | set -euxo pipefail mkdir -p _release_assets - # Download DMS CLI binaries from the danklinux repo - gh release download "${TAG}" -R "${DMS_REPO}" --dir ./_dms_assets - - # Rename CLI binaries to dms-cli-* format and copy distropkg binaries - for file in _dms_assets/dms-*.gz*; do + # Copy backend binaries and rename dms-*.gz to dms-cli-*.gz + for file in _backend_assets/dms-*.gz*; do if [ -f "$file" ]; then basename=$(basename "$file") if [[ "$basename" == dms-distropkg-* ]]; then @@ -124,40 +246,51 @@ jobs: fi done - # Create QML source package (exclude .git, .github, build artifacts) - tar --exclude='.git' \ + # Copy dankinstall binaries + cp _backend_assets/dankinstall-*.gz* _release_assets/ + + # Copy completions + cp _backend_assets/completion.* _release_assets/ 2>/dev/null || true + + # Create QML source package (exclude build artifacts and git files) + # Tar the CONTENTS of quickshell/, not the directory itself + (cd quickshell && tar --exclude='.git' \ --exclude='.github' \ - --exclude='_dms_assets' \ - --exclude='_release_assets' \ --exclude='*.tar.gz' \ - -czf _release_assets/dms-qml.tar.gz . + -czf ../_release_assets/dms-qml.tar.gz .) # Generate checksum for QML package (cd _release_assets && sha256sum dms-qml.tar.gz > dms-qml.tar.gz.sha256) + # Create full packages for each architecture for arch in amd64 arm64; do mkdir -p _temp_full/dms mkdir -p _temp_full/bin mkdir -p _temp_full/completions + # Extract QML source tar -xzf _release_assets/dms-qml.tar.gz -C _temp_full/dms - if [ -f "_dms_assets/dms-${arch}.gz" ]; then - gunzip -c "_dms_assets/dms-${arch}.gz" > _temp_full/bin/dms + # Add CLI binaries + if [ -f "_backend_assets/dms-${arch}.gz" ]; then + gunzip -c "_backend_assets/dms-${arch}.gz" > _temp_full/bin/dms chmod +x _temp_full/bin/dms fi - if [ -f "_dms_assets/dms-distropkg-${arch}.gz" ]; then - gunzip -c "_dms_assets/dms-distropkg-${arch}.gz" > _temp_full/bin/dms-distropkg + if [ -f "_backend_assets/dms-distropkg-${arch}.gz" ]; then + gunzip -c "_backend_assets/dms-distropkg-${arch}.gz" > _temp_full/bin/dms-distropkg chmod +x _temp_full/bin/dms-distropkg fi - for completion in _dms_assets/completion.*; do + # Add shell completions + for completion in _backend_assets/completion.*; do if [ -f "$completion" ]; then cp "$completion" _temp_full/completions/ fi done - cat > _temp_full/INSTALL.md << 'EOF' + + # Create installation guide + cat > _temp_full/INSTALL.md << 'EOFINSTALL' # DankMaterialShell Installation ## Requirements @@ -207,7 +340,7 @@ jobs: - Run with verbose output: `quickshell -v -p ~/.config/quickshell/dms` - Check logs in `~/.local/state/DankMaterialShell/` - Ensure all dependencies are installed - EOF + EOFINSTALL # Create the full package (cd _temp_full && tar -czf "../_release_assets/dms-full-${arch}.tar.gz" .) @@ -219,11 +352,257 @@ jobs: rm -rf _temp_full done - - name: Attach all assets to release + - name: Create GitHub Release uses: softprops/action-gh-release@v2 with: tag_name: ${{ env.TAG }} + name: Release ${{ env.TAG }} + body: ${{ steps.changelog.outputs.changelog }} files: _release_assets/** + draft: false + prerelease: ${{ contains(env.TAG, '-') }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + copr-build: + runs-on: ubuntu-latest + needs: release + env: + TAG: ${{ github.ref_name }} + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Determine version + id: version + run: | + VERSION="${TAG#v}" + echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "Building DMS stable version: $VERSION" + + - name: Setup build environment + run: | + sudo apt-get update + sudo apt-get install -y rpm wget curl jq gzip + mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS} + + - name: Download release assets + run: | + VERSION="${{ steps.version.outputs.version }}" + cd ~/rpmbuild/SOURCES + + wget "https://github.com/AvengeMedia/DankMaterialShell/releases/download/v${VERSION}/dms-qml.tar.gz" || { + echo "Failed to download dms-qml.tar.gz for v${VERSION}" + exit 1 + } + + - name: Generate stable spec file + run: | + VERSION="${{ steps.version.outputs.version }}" + CHANGELOG_DATE="$(date '+%a %b %d %Y')" + + cat > ~/rpmbuild/SPECS/dms.spec <<'SPECEOF' + # Spec for DMS stable releases - Generated by GitHub Actions + + %global debug_package %{nil} + %global version VERSION_PLACEHOLDER + %global pkg_summary DankMaterialShell - Material 3 inspired shell for Wayland compositors + + Name: dms + Version: %{version} + Release: 1%{?dist} + Summary: %{pkg_summary} + + License: MIT + URL: https://github.com/AvengeMedia/DankMaterialShell + + Source0: dms-qml.tar.gz + + BuildRequires: gzip + BuildRequires: wget + BuildRequires: systemd-rpm-macros + + Requires: (quickshell or quickshell-git) + Requires: accountsservice + Requires: dms-cli + Requires: dgop + + Recommends: cava + Recommends: cliphist + Recommends: danksearch + Recommends: hyprpicker + Recommends: matugen + Recommends: wl-clipboard + Recommends: NetworkManager + Recommends: qt6-qtmultimedia + Suggests: qt6ct + + %description + DankMaterialShell (DMS) is a modern Wayland desktop shell built with Quickshell + and optimized for the niri and hyprland compositors. Features notifications, + app launcher, wallpaper customization, and fully customizable with plugins. + + Includes auto-theming for GTK/Qt apps with matugen, 20+ customizable widgets, + process monitoring, notification center, clipboard history, dock, control center, + lock screen, and comprehensive plugin system. + + %package -n dms-cli + Summary: DankMaterialShell CLI tool + License: MIT + URL: https://github.com/AvengeMedia/DankMaterialShell + + %description -n dms-cli + Command-line interface for DankMaterialShell configuration and management. + Provides native DBus bindings, NetworkManager integration, and system utilities. + + %package -n dgop + Summary: Stateless CPU/GPU monitor for DankMaterialShell + License: MIT + URL: https://github.com/AvengeMedia/dgop + Provides: dgop + + %description -n dgop + DGOP is a stateless system monitoring tool that provides CPU, GPU, memory, and + network statistics. Designed for integration with DankMaterialShell but can be + used standalone. This package always includes the latest stable dgop release. + + %prep + %setup -q -c -n dms-qml + + # Download architecture-specific binaries during build + case "%{_arch}" in + x86_64) + ARCH_SUFFIX="amd64" + ;; + aarch64) + ARCH_SUFFIX="arm64" + ;; + *) + echo "Unsupported architecture: %{_arch}" + exit 1 + ;; + esac + + wget -O %{_builddir}/dms-cli.gz "https://github.com/AvengeMedia/DankMaterialShell/releases/latest/download/dms-distropkg-${ARCH_SUFFIX}.gz" || { + echo "Failed to download dms-cli for architecture %{_arch}" + exit 1 + } + gunzip -c %{_builddir}/dms-cli.gz > %{_builddir}/dms-cli + chmod +x %{_builddir}/dms-cli + + wget -O %{_builddir}/dgop.gz "https://github.com/AvengeMedia/dgop/releases/latest/download/dgop-linux-${ARCH_SUFFIX}.gz" || { + echo "Failed to download dgop for architecture %{_arch}" + exit 1 + } + gunzip -c %{_builddir}/dgop.gz > %{_builddir}/dgop + chmod +x %{_builddir}/dgop + + %build + + %install + install -Dm755 %{_builddir}/dms-cli %{buildroot}%{_bindir}/dms + install -Dm755 %{_builddir}/dgop %{buildroot}%{_bindir}/dgop + + install -d %{buildroot}%{_datadir}/bash-completion/completions + install -d %{buildroot}%{_datadir}/zsh/site-functions + install -d %{buildroot}%{_datadir}/fish/vendor_completions.d + %{_builddir}/dms-cli completion bash > %{buildroot}%{_datadir}/bash-completion/completions/dms || : + %{_builddir}/dms-cli completion zsh > %{buildroot}%{_datadir}/zsh/site-functions/_dms || : + %{_builddir}/dms-cli completion fish > %{buildroot}%{_datadir}/fish/vendor_completions.d/dms.fish || : + + install -Dm644 %{_builddir}/dms-qml/assets/systemd/dms.service %{buildroot}%{_userunitdir}/dms.service + + install -dm755 %{buildroot}%{_datadir}/quickshell/dms + cp -r %{_builddir}/dms-qml/* %{buildroot}%{_datadir}/quickshell/dms/ + + rm -rf %{buildroot}%{_datadir}/quickshell/dms/.git* + rm -f %{buildroot}%{_datadir}/quickshell/dms/.gitignore + rm -rf %{buildroot}%{_datadir}/quickshell/dms/.github + rm -rf %{buildroot}%{_datadir}/quickshell/dms/distro + + %posttrans + if [ -d "%{_sysconfdir}/xdg/quickshell/dms" ]; then + rmdir "%{_sysconfdir}/xdg/quickshell/dms" 2>/dev/null || true + rmdir "%{_sysconfdir}/xdg/quickshell" 2>/dev/null || true + rmdir "%{_sysconfdir}/xdg" 2>/dev/null || true + fi + + if [ "$1" -ge 2 ]; then + pkill -USR1 -x dms >/dev/null 2>&1 || true + fi + + %files + %license LICENSE + %doc README.md CONTRIBUTING.md + %{_datadir}/quickshell/dms/ + %{_userunitdir}/dms.service + + %files -n dms-cli + %{_bindir}/dms + %{_datadir}/bash-completion/completions/dms + %{_datadir}/zsh/site-functions/_dms + %{_datadir}/fish/vendor_completions.d/dms.fish + + %files -n dgop + %{_bindir}/dgop + + %changelog + * CHANGELOG_DATE_PLACEHOLDER AvengeMedia - VERSION_PLACEHOLDER-1 + - Stable release VERSION_PLACEHOLDER + - Built from GitHub release + - Includes latest dms-cli and dgop binaries + SPECEOF + + sed -i "s/VERSION_PLACEHOLDER/${VERSION}/g" ~/rpmbuild/SPECS/dms.spec + sed -i "s/CHANGELOG_DATE_PLACEHOLDER/${CHANGELOG_DATE}/g" ~/rpmbuild/SPECS/dms.spec + + - name: Build SRPM + id: build + run: | + cd ~/rpmbuild/SPECS + rpmbuild -bs dms.spec + + SRPM=$(ls ~/rpmbuild/SRPMS/*.src.rpm | tail -n 1) + SRPM_NAME=$(basename "$SRPM") + + echo "srpm_path=$SRPM" >> $GITHUB_OUTPUT + echo "srpm_name=$SRPM_NAME" >> $GITHUB_OUTPUT + echo "SRPM built: $SRPM_NAME" + + - name: Upload SRPM artifact + uses: actions/upload-artifact@v4 + with: + name: dms-stable-srpm-${{ steps.version.outputs.version }} + path: ${{ steps.build.outputs.srpm_path }} + retention-days: 90 + + - name: Install Copr CLI + run: | + sudo apt-get install -y python3-pip + pip3 install copr-cli + + mkdir -p ~/.config + cat > ~/.config/copr << EOF + [copr-cli] + login = ${{ secrets.COPR_LOGIN }} + username = avengemedia + token = ${{ secrets.COPR_TOKEN }} + copr_url = https://copr.fedorainfracloud.org + EOF + chmod 600 ~/.config/copr + + - name: Upload to Copr + run: | + SRPM="${{ steps.build.outputs.srpm_path }}" + VERSION="${{ steps.version.outputs.version }}" + + echo "Uploading SRPM to avengemedia/dms..." + BUILD_OUTPUT=$(copr-cli build avengemedia/dms "$SRPM" --nowait 2>&1) + echo "$BUILD_OUTPUT" + + BUILD_ID=$(echo "$BUILD_OUTPUT" | grep -oP 'Build was added to.*\K[0-9]+' || echo "unknown") + + if [ "$BUILD_ID" != "unknown" ]; then + echo "Build submitted: https://copr.fedorainfracloud.org/coprs/avengemedia/dms/build/$BUILD_ID/" + fi diff --git a/.github/workflows/update-vendor-hash.yml b/.github/workflows/update-vendor-hash.yml new file mode 100644 index 00000000..3e5cfce9 --- /dev/null +++ b/.github/workflows/update-vendor-hash.yml @@ -0,0 +1,90 @@ +name: Update Vendor Hash + +on: + push: + paths: + - "backend/go.mod" + - "backend/go.sum" + branches: + - master + +jobs: + update-vendor-hash: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install Nix + uses: cachix/install-nix-action@v31 + + - name: Update vendorHash in backend/flake.nix + run: | + set -euo pipefail + + # Try to build and capture the expected hash from error message + echo "Attempting nix build to get new vendorHash..." + cd backend + if output=$(nix build .#dms-cli 2>&1); then + echo "Build succeeded, no hash update needed" + exit 0 + fi + + # Extract the expected hash from the error message + new_hash=$(echo "$output" | grep -oP "got:\s+\K\S+" | head -n1) + + if [ -z "$new_hash" ]; then + echo "Could not extract new vendorHash from build output" + echo "Build output:" + echo "$output" + exit 1 + fi + + echo "New vendorHash: $new_hash" + + # Get current hash from flake.nix + current_hash=$(grep -oP 'vendorHash = "\K[^"]+' flake.nix) + echo "Current vendorHash: $current_hash" + + if [ "$current_hash" = "$new_hash" ]; then + echo "vendorHash is already up to date" + exit 0 + fi + + # Update the hash in flake.nix + sed -i "s|vendorHash = \"$current_hash\"|vendorHash = \"$new_hash\"|" flake.nix + + # Verify the build works with the new hash + echo "Verifying build with new vendorHash..." + nix build .#dms-cli + + echo "vendorHash updated successfully!" + + - name: Commit and push vendorHash update + run: | + set -euo pipefail + + if ! git diff --quiet backend/flake.nix; then + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + git add backend/flake.nix + git commit -m "flake: update vendorHash for go.mod changes" + + for attempt in 1 2 3; do + if git push; then + echo "Successfully pushed vendorHash update" + exit 0 + fi + echo "Push attempt $attempt failed, pulling and retrying..." + git pull --rebase + sleep $((attempt*2)) + done + + echo "Failed to push after retries" >&2 + exit 1 + else + echo "No changes to backend/flake.nix" + fi diff --git a/LICENSE b/LICENSE index 7989986b..d8152be0 100644 --- a/LICENSE +++ b/LICENSE @@ -17,4 +17,5 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 46409041..7dfe519d 100644 --- a/README.md +++ b/README.md @@ -1 +1,187 @@ -# TODO +# DankMaterialShell + +
+ + DankMaterialShell + + + ### A modern desktop shell for Wayland + + Built with [Quickshell](https://quickshell.org/) and [Go](https://go.dev/) + +[![Documentation](https://img.shields.io/badge/docs-danklinux.com-9ccbfb?style=for-the-badge&labelColor=101418)](https://danklinux.com/docs) +[![GitHub stars](https://img.shields.io/github/stars/AvengeMedia/DankMaterialShell?style=for-the-badge&labelColor=101418&color=ffd700)](https://github.com/AvengeMedia/DankMaterialShell/stargazers) +[![GitHub License](https://img.shields.io/github/license/AvengeMedia/DankMaterialShell?style=for-the-badge&labelColor=101418&color=b9c8da)](https://github.com/AvengeMedia/DankMaterialShell/blob/master/LICENSE) +[![GitHub release](https://img.shields.io/github/v/release/AvengeMedia/DankMaterialShell?style=for-the-badge&labelColor=101418&color=9ccbfb)](https://github.com/AvengeMedia/DankMaterialShell/releases) +[![AUR version](https://img.shields.io/aur/version/dms-shell-bin?style=for-the-badge&labelColor=101418&color=9ccbfb)](https://aur.archlinux.org/packages/dms-shell-bin) +[![AUR version (git)](https://img.shields.io/aur/version/dms-shell-git?style=for-the-badge&labelColor=101418&color=9ccbfb&label=AUR%20(git))](https://aur.archlinux.org/packages/dms-shell-git) +[![Ko-Fi donate](https://img.shields.io/badge/donate-kofi?style=for-the-badge&logo=ko-fi&logoColor=ffffff&label=ko-fi&labelColor=101418&color=f16061&link=https%3A%2F%2Fko-fi.com%2Favengemediallc)](https://ko-fi.com/avengemediallc) + +
+ +DankMaterialShell is a complete desktop shell for [niri](https://github.com/YaLTeR/niri), [Hyprland](https://hyprland.org/), [MangoWC](https://github.com/DreamMaoMao/mangowc), [Sway](https://swaywm.org), and other Wayland compositors. It replaces waybar, swaylock, swayidle, mako, fuzzel, polkit, and everything else you'd normally stitch together to make a desktop. + +## Repository Structure + +This is a monorepo containing both the shell interface and backend services: + +``` +DankMaterialShell/ +├── quickshell/ # QML-based shell interface +│ ├── Modules/ # UI components (panels, widgets, overlays) +│ ├── Services/ # System integration (audio, network, bluetooth) +│ ├── Widgets/ # Reusable UI controls +│ └── Common/ # Shared resources and themes +├── backend/ # Go backend and CLI +│ ├── cmd/ # dms CLI and dankinstall binaries +│ ├── internal/ # System integration, IPC, distro support +│ └── pkg/ # Shared packages +├── distro/ # Distribution packaging (Fedora RPM specs) +├── nix/ # NixOS/home-manager modules +└── flake.nix # Nix flake for declarative installation +``` + +## See it in Action + +
+ +https://github.com/user-attachments/assets/1200a739-7770-4601-8b85-695ca527819a + +
+ +
More Screenshots + +
+ +Desktop + +Dashboard + +Launcher + +Control Center + +
+ +
+ +## Installation + +```bash +curl -fsSL https://install.danklinux.com | sh +``` + +One command installs DMS and all dependencies on Arch, Fedora, Debian, Ubuntu, openSUSE, or Gentoo. + +**[Manual installation guide](https://danklinux.com/docs/dankmaterialshell/installation)** + +## Features + +**Dynamic Theming** +Wallpaper-based color schemes that automatically theme GTK, Qt, terminals, editors (vscode, vscodium), and more using [matugen](https://github.com/InioX/matugen) and dank16. + +**System Monitoring** +Real-time CPU, RAM, GPU metrics and temperatures with [dgop](https://github.com/AvengeMedia/dgop). Process list with search and management. + +**Powerful Launcher** +Spotlight-style search for applications, files ([dsearch](https://github.com/AvengeMedia/danksearch)), emojis, running windows, calculator, and commands. Extensible with plugins. + +**Control Center** +Unified interface for network, Bluetooth, audio devices, display settings, and night mode. + +**Smart Notifications** +Notification center with grouping, rich text support, and keyboard navigation. + +**Media Integration** +MPRIS player controls, calendar sync, weather widgets, and clipboard history with image previews. + +**Session Management** +Lock screen, idle detection, auto-lock/suspend with separate AC/battery settings, and greeter support. + +**Plugin System** +Extend functionality with the [plugin registry](https://plugins.danklinux.com). + +## Supported Compositors + +Works best with [niri](https://github.com/YaLTeR/niri), [Hyprland](https://hyprland.org/), [Sway](https://swaywm.org/), and [MangoWC](https://github.com/DreamMaoMao/mangowc) with full workspace switching, overview integration, and monitor management. Other Wayland compositors work with reduced features. + +[Compositor configuration guide](https://danklinux.com/docs/dankmaterialshell/compositors) + +## Command Line Interface + +Control the shell from the command line or keybinds: + +```bash +dms run # Start the shell +dms ipc call spotlight toggle +dms ipc call audio setvolume 50 +dms ipc call wallpaper set /path/to/image.jpg +dms brightness list # List available displays +dms plugins search # Browse plugin registry +``` + +[Full CLI and IPC documentation](https://danklinux.com/docs/dankmaterialshell/keybinds-ipc) + +## Documentation + +- **Website:** [danklinux.com](https://danklinux.com) +- **Docs:** [danklinux.com/docs](https://danklinux.com/docs) +- **Theming:** [Application themes](https://danklinux.com/docs/dankmaterialshell/application-themes) | [Custom themes](https://danklinux.com/docs/dankmaterialshell/custom-themes) +- **Plugins:** [Development guide](https://danklinux.com/docs/dankmaterialshell/plugins-overview) +- **Support:** [Ko-fi](https://ko-fi.com/avengemediallc) + +## Development + +See component-specific documentation: + +- **[quickshell/](quickshell/)** - QML shell development, widgets, and modules +- **[backend/](backend/)** - Go backend, CLI tools, and system integration +- **[distro/](distro/)** - Distribution packaging +- **[nix/](nix/)** - NixOS and home-manager modules + +### Building from Source + +**Backend:** +```bash +cd backend +make # Build dms CLI +make dankinstall # Build installer +``` + +**Shell:** +```bash +quickshell -p quickshell/ +``` + +**NixOS:** +```nix +{ + inputs.dms.url = "github:AvengeMedia/DankMaterialShell"; + + # Use in home-manager or NixOS configuration + imports = [ inputs.dms.homeModules.dankMaterialShell.default ]; +} +``` + +## Contributing + +Contributions welcome. Bug fixes, widgets, features, documentation, and plugins all help. + +1. Fork the repository +2. Make your changes +3. Test thoroughly +4. Open a pull request + +For documentation contributions, see [DankLinux-Docs](https://github.com/AvengeMedia/DankLinux-Docs). + +## Credits + +- [quickshell](https://quickshell.org/) - Shell framework +- [niri](https://github.com/YaLTeR/niri) - Scrolling window manager +- [Ly-sec](http://github.com/ly-sec) - Wallpaper effects from [Noctalia](https://github.com/noctalia-dev/noctalia-shell) +- [soramanew](https://github.com/soramanew) - [Caelestia](https://github.com/caelestia-dots/shell) inspiration +- [end-4](https://github.com/end-4) - [dots-hyprland](https://github.com/end-4/dots-hyprland) inspiration + +## License + +MIT License - See [LICENSE](LICENSE) for details. diff --git a/assets/danklogo.svg b/assets/danklogo.svg new file mode 100644 index 00000000..1ee6d513 --- /dev/null +++ b/assets/danklogo.svg @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/danklogo2.svg b/assets/danklogo2.svg new file mode 100644 index 00000000..1ee6d513 --- /dev/null +++ b/assets/danklogo2.svg @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/backend/LICENSE b/backend/LICENSE deleted file mode 100644 index d8152be0..00000000 --- a/backend/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2025 Avenge Media LLC - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/backend/README.md b/backend/README.md index ef6778f7..d0d9ab8e 100644 --- a/backend/README.md +++ b/backend/README.md @@ -1,54 +1,43 @@ -
- - Dank Linux - +# DMS Backend & CLI - ### dms CLI & Backend + dankinstall +Go-based backend for DankMaterialShell providing system integration, IPC, and installation tools. -[![Documentation](https://img.shields.io/badge/docs-danklinux.com-9ccbfb?style=for-the-badge&labelColor=101418)](https://danklinux.com/docs) -[![GitHub release](https://img.shields.io/github/v/release/AvengeMedia/danklinux?style=for-the-badge&labelColor=101418&color=9ccbfb)](https://github.com/AvengeMedia/DankMaterialShell/backend/releases) -[![GitHub License](https://img.shields.io/badge/license-MIT-b9c8da?style=for-the-badge&labelColor=101418)](https://github.com/AvengeMedia/DankMaterialShell/backend/blob/master/LICENSE) +**See [root README](../README.md) for project overview and installation.** -
+## Components ---- +**dms CLI** +Command-line interface and daemon for shell management and system control. -A monorepo for dankinstall and dms (cli+go backend), a modern desktop suite for Wayland compositors. +**dankinstall** +Distribution-aware installer with TUI for deploying DMS and compositor configurations on Arch, Fedora, Debian, Ubuntu, openSUSE, and Gentoo. -**[Full documentation →](https://danklinux.com/docs)** +## System Integration -- **dms** DankMaterialShell (cli + go backend) - - The backend side of dms, provides APIs for the desktop and a management CLI. - - Shared dbus connection for networking (NetworkManager, iwd), loginctl, accountsservice, cups, and other interfaces. - - Implements wayland protocols - - wlr-gamma-control-unstable-v1 (for night mode/gamma control) - - dwl-ipc-unstable-v2 (for dwl/MangoWC integration) - - ext-workspace-v1 (for workspace integrations) - - wlr-output-management-unstable-v1 - - Exposes a json API over unix socket for interaction with these interfaces - - Provides plugin management APIs for the shell - - CUPS integration for printer management - - ddc/ci protocol implementation - - Allows controlling brightness of external monitors, like `ddcutil` - - backlight + led control integration - - Allows controlling backlight of integrated displays, or LED devices - - Uses `login1` when available, else falls back to sysfs writes. - - Optionally provides `update` interface - depending on build inputs. - - This is intended to be disabled when packaged as part of distribution packages. -- **dankinstall** Installs the Dank Linux suite for [niri](https://github.com/YaLTeR/niri) and/or [Hyprland](https://hypr.land) - - Features the [DankMaterialShell](https://github.com/AvengeMedia/DankMaterialShell) - - Which features a complete desktop experience with wallpapers, auto theming, notifications, lock screen, etc. - - Offers up solid out of the box configurations as usable, featured starting points. - - Can be installed if you already have niri/Hyprland configured - - Will allow you to keep your existing config, or replace with Dank ones (existing configs always backed up though) +**Wayland Protocols** +- `wlr-gamma-control-unstable-v1` - Night mode and gamma control +- `dwl-ipc-unstable-v2` - dwl/MangoWC workspace integration +- `ext-workspace-v1` - Workspace protocol support +- `wlr-output-management-unstable-v1` - Display configuration -# dms cli & backend +**DBus Interfaces** +- NetworkManager/iwd - Network management +- logind - Session control and inhibit locks +- accountsservice - User account information +- CUPS - Printer management +- Custom IPC via unix socket (JSON API) -Written in Go, provides a suite of APIs over unix socket via [godbus](https://github.com/godbus/dbus) and Wayland protocols. All features listed above are exposed over the socket API. +**Hardware Control** +- DDC/CI protocol - External monitor brightness control (like `ddcutil`) +- Backlight control - Internal display brightness via `login1` or sysfs +- LED control - Keyboard/device LED management -*Run `dms debug-srv` to start the socket service in standalone mode and see available APIs* +**Plugin System** +- Plugin registry integration +- Plugin lifecycle management +- Settings persistence -**CLI Commands:** +## CLI Commands - `dms run [-d]` - Start shell (optionally as daemon) - `dms restart` / `dms kill` - Manage running processes - `dms ipc ` - Send IPC commands (toggle launcher, notifications, etc.) @@ -57,254 +46,71 @@ Written in Go, provides a suite of APIs over unix socket via [godbus](https://gi - `dms update` - Update DMS and dependencies (disabled in distro packages) - `dms greeter install` - Install greetd greeter (disabled in distro packages) -## Build & Install +## Building -To build the dms CLI (Requires Go 1.24+): - -### For distribution package maintainers - -This produces a build without the `update` or `greeter` functionality, which are intended for manual installation. +Requires Go 1.24+ +**Development build:** ```bash -make dist +make # Build dms CLI +make dankinstall # Build installer +make test # Run tests ``` -Produces `bin/dms-linux-amd64` and `bin/dms-linux-arm64` - -### Manual Install - +**Distribution build:** ```bash -# Installs to /usr/local/bin/dms -make && sudo make install +make dist # Build without update/greeter features ``` -### Wayland Protocol Bindings +Produces `bin/dms-linux-amd64` and `bin/dms-linux-arm64` -The gamma control functionality uses Wayland protocol bindings generated from the protocol XML definition. To regenerate the Go bindings from `internal/proto/xml/wlr-gamma-control-unstable-v1.xml`: +**Installation:** +```bash +sudo make install # Install to /usr/local/bin/dms +``` +## Development + +**Regenerating Wayland Protocol Bindings:** ```bash go install github.com/rajveermalviya/go-wayland/cmd/go-wayland-scanner@latest go-wayland-scanner -i internal/proto/xml/wlr-gamma-control-unstable-v1.xml \ -pkg wlr_gamma_control -o internal/proto/wlr_gamma_control/gamma_control.go ``` -This is only needed if modifying the protocol or updating to a newer version. +**Module Structure:** +- `cmd/` - Binary entrypoints (dms, dankinstall) +- `internal/distros/` - Distribution-specific installation logic +- `internal/proto/` - Wayland protocol bindings +- `pkg/` - Shared packages -# Dank Linux/dankinstall - -Installs compositor, dms, terminal, and some optional dependencies - along with a default compositor & terminal configuration. - -## Quickstart +## Installation via dankinstall ```bash curl -fsSL https://install.danklinux.com | sh ``` -*Alternatively, download the latest [release](https://github.com/AvengeMedia/DankMaterialShell/backend/releases)* - ## Supported Distributions -**Note on Greeter**: dankinstall does not install a greeter automatically. -- To install the dms greeter, run `dms greeter install` after installation. -- Then you can disable any existing greeter, if present, and run `sudo systemctl enable --now greetd` +Arch, Fedora, Debian, Ubuntu, openSUSE, Gentoo (and derivatives) -### Arch Linux & Derivatives +**Arch Linux** +Uses `pacman` for system packages, builds AUR packages via `makepkg`, no AUR helper dependency. -**Supported:** Arch, ArchARM, Archcraft, CachyOS, EndeavourOS, Manjaro +**Fedora** -**Special Notes:** -- Uses native `pacman` for system packages -- AUR packages are built manually using `makepkg` (no AUR helper dependency) -- **Recommendations** - - Use NetworkManager to manage networking - - If using archinstall, you can choose `minimal` for profile, and `NetworkManager` under networking. +Uses COPR repositories (`avengemedia/danklinux`, `avengemedia/dms`). -**Package Sources:** -| Package | Source | Notes | -|---------|---------|-------| -| System packages (git, jq, etc.) | Official repos | Via `pacman` | -| quickshell | AUR | Built from source | -| matugen | AUR (`matugen-bin`) | Pre-compiled binary | -| dgop | Official repos | Available in Extra repository | -| niri | Official repos (`niri`) | Latest niri | -| hyprland | Official repos | Available in Extra repository | -| DankMaterialShell | Manual | Git clone to `~/.config/quickshell/dms` | +**Ubuntu** +Requires PPA support. Most packages built from source (slow first install). -### Fedora & Derivatives +**Debian** +Debian 13+ (Trixie). niri only, no Hyprland support. Builds from source. -**Supported:** Fedora, Nobara, Fedora Asahi Remix +**openSUSE** +Most packages available in standard repos. Minimal building required. -**Special Notes:** -- Requires `dnf-plugins-core` for COPR repository support -- Automatically enables required COPR repositories -- All COPR repos are enabled with automatic acceptance -- **Editions** dankinstall is tested on "Workstation Edition", but probably works fine on any fedora flavor. Report issues if anything doesn't work. -- [Fedora Asahi Remix](https://asahilinux.org/fedora/) hasn't been tested, but presumably it should work fine as all of the dependencies should provide arm64 variants. +**Gentoo** +Uses Portage with GURU overlay. Automatically configures USE flags. Variable success depending on system configuration. -**Package Sources:** -| Package | Source | Notes | -|---------|---------|-------| -| System packages | Official repos | Via `dnf` | -| quickshell | COPR | `avengemedia/danklinux` | -| matugen | COPR | `avengemedia/danklinux` | -| dgop | Manual | Built from source with Go | -| cliphist | COPR | `avengemedia/danklinux` | -| ghostty | COPR | `avengemedia/danklinux` | -| hyprland | COPR | `solopasha/hyprland` | -| niri | COPR | `yalter/niri` | -| DankMaterialShell | COPR | `avengemedia/dms` | - -### Ubuntu - -**Supported:** Ubuntu 25.04+ - -**Special Notes:** -- Requires PPA support via `software-properties-common` -- Go installed from PPA for building manual packages -- Most packages require manual building due to limited repository availability - - This means the install can be quite slow, as many need to be compiled from source. - - niri is packages as a `.deb` so it can be managed via `apt` -- Automatic PPA repository addition and package list updates - -**Package Sources:** -| Package | Source | Notes | -|---------|---------|-------| -| System packages | Official repos | Via `apt` | -| quickshell | Manual | Built from source with cmake | -| matugen | Manual | Built from source with Go | -| dgop | Manual | Built from source with Go | -| hyprland | PPA | `ppa:cppiber/hyprland` | -| hyprpicker | PPA | `ppa:cppiber/hyprland` | -| niri | Manual | Built from source with Rust | -| Go compiler | PPA | `ppa:longsleep/golang-backports` | -| DankMaterialShell | Manual | Git clone to `~/.config/quickshell/dms` | - -### Debian - -**Supported:** Debian 13+ (Trixie) - -**Special Notes:** -- **niri only** - Debian does not support Hyprland currently, only niri. -- Most packages require manual building due to limited repository availability - - This means the install can be quite slow, as many need to be compiled from source. - - niri is packages as a `.deb` so it can be managed via `apt` - -**Package Sources:** -| Package | Source | Notes | -|---------|---------|-------| -| System packages | Official repos | Via `apt` | -| quickshell | Manual | Built from source with cmake | -| matugen | Manual | Built from source with Go | -| dgop | Manual | Built from source with Go | -| niri | Manual | Built from source with Rust | -| DankMaterialShell | Manual | Git clone to `~/.config/quickshell/dms` | - -### openSUSE Tumbleweed - -**Special Notes:** -- Most packages available in standard repos, minimal manual building required -- quickshell and matugen require building from source - -**Package Sources:** -| Package | Source | Notes | -|---------|---------|-------| -| System packages (git, jq, etc.) | Official repos | Via `zypper` | -| hyprland | Official repos | Available in standard repos | -| niri | Official repos | Available in standard repos | -| xwayland-satellite | Official repos | For niri X11 app support | -| ghostty | Official repos | Latest terminal emulator | -| kitty, alacritty | Official repos | Alternative terminals | -| grim, slurp, hyprpicker | Official repos | Wayland screenshot utilities | -| wl-clipboard | Official repos | Via `wl-clipboard` package | -| cliphist | Official repos | Clipboard manager | -| quickshell | Manual | Built from source with cmake + openSUSE flags | -| matugen | Manual | Built from source with Rust | -| dgop | Manual | Built from source with Go | -| DankMaterialShell | Manual | Git clone to `~/.config/quickshell/dms` | - -### Gentoo - -**Special Notes:** -- Gentoo installs are **highly variable** and user-specific, success is not guaranteed. - - `dankinstall` is most likely to succeed on a fresh stage3/systemd system -- Uses Portage package manager with GURU overlay for additional packages -- Automatically configures global USE flags in `/etc/portage/make.conf` - - Will create or append to your existing USE flags. -- Automatically configures package-specific USE flags in `/etc/portage/package.use/danklinux` -- Unmasks packages as-needed with architecture keywords in `/etc/portage/package.accept_keywords/danklinux` -- Supports both `amd64` and `arm64` architectures dynamically -- If not using bin packages, prepare for long compilation times -- **Ghostty** is removed from the options, due to extremely long compilation time of its - -**Package Sources:** -| Package | Source | Notes | -|---------|---------|-------| -| System packages (git, etc.) | Official repos | Via `emerge` | -| niri | GURU overlay | With dbus and screencast USE flags | -| hyprland | Official repos (GURU for -git) | Depends on variant selection, with X USE flag | -| quickshell | GURU overlay | Always uses live ebuild (`**` keywords), full feature set | -| matugen | GURU overlay | Color generation tool | -| cliphist | GURU overlay | Clipboard manager | -| hyprpicker | GURU overlay | Color picker for Hyprland | -| xdg-desktop-portal-gtk | Official repos | With wayland and X USE flags | -| mate-polkit | Official repos | PolicyKit authentication agent | -| accountsservice | Official repos | User account management | -| dgop | Manual | Built from source with Go | -| xwayland-satellite | Manual | For niri X11 app support | -| grimblast | Manual | For Hyprland screenshot utility | -| DankMaterialShell | Manual | Git clone to `~/.config/quickshell/dms` | - -**Global USE Flags:** -`X dbus udev alsa policykit jpeg png webp gif tiff svg brotli gdbm accessibility gtk qt6 egl gbm` - -**Package-Specific USE Flags:** -- `sys-apps/xdg-desktop-portal-gtk`: wayland X -- `gui-wm/niri`: dbus screencast -- `gui-wm/hyprland`: X -- `dev-qt/qtbase`: wayland opengl vulkan widgets -- `dev-qt/qtdeclarative`: opengl vulkan -- `media-libs/mesa`: opengl vulkan -- `gui-apps/quickshell`: breakpad jemalloc sockets wayland layer-shell session-lock toplevel-management screencopy X pipewire tray mpris pam hyprland hyprland-global-shortcuts hyprland-focus-grab i3 i3-ipc bluetooth - -### NixOS (Not supported by Dank Linux, but with Flake) - -NixOS users should use the [dms flake](https://github.com/AvengeMedia/DankMaterialShell/tree/master?tab=readme-ov-file#nixos---via-home-manager) - -## Manual Package Building - -The installer handles manual package building for packages not available in repositories: - -### quickshell (Ubuntu, Debian, openSUSE) -- Built from source using cmake -- Requires Qt6 development libraries -- Automatically handles build dependencies -- **openSUSE:** Uses special CFLAGS with rpm optflags and wayland include path - -### matugen (Ubuntu, Debian, Fedora, openSUSE) -- Built from Rust source -- Requires cargo and rust toolchain -- Installed to `/usr/local/bin` - -### dgop (All distros) -- Built from Go source -- Simple dependency-free build -- Installed to `/usr/local/bin` - -### niri (Ubuntu, Debian) -- Built from Rust source -- Requires cargo and rust toolchain -- Complex build with multiple dependencies - -## Commands - -### dankinstall -Main installer with interactive TUI for initial setup - -### dms -Management interface for DankMaterialShell: -- `dms` - Interactive management TUI -- `dms run` - Start interactive shell -- `dms run -d` - Start shell as daemon -- `dms restart` - Restart running DMS shell -- `dms kill` - Kill running DMS shell processes -- `dms ipc ` - Send IPC commands to running shell \ No newline at end of file +See installer output for distribution-specific details during installation. \ No newline at end of file diff --git a/backend/cmd/dms/commands_features.go b/backend/cmd/dms/commands_features.go index 335ab2be..0ea5c572 100644 --- a/backend/cmd/dms/commands_features.go +++ b/backend/cmd/dms/commands_features.go @@ -392,7 +392,7 @@ func updateDMSBinary() error { } fmt.Println("Fetching latest release version...") - cmd := exec.Command("curl", "-s", "https://api.github.com/repos/AvengeMedia/danklinux/releases/latest") + cmd := exec.Command("curl", "-s", "https://api.github.com/repos/AvengeMedia/DankMaterialShell/releases/latest") output, err := cmd.Output() if err != nil { return fmt.Errorf("failed to fetch latest release: %w", err) @@ -421,8 +421,8 @@ func updateDMSBinary() error { } defer os.RemoveAll(tempDir) - binaryURL := fmt.Sprintf("https://github.com/AvengeMedia/DankMaterialShell/backend/releases/download/%s/dms-%s.gz", version, arch) - checksumURL := fmt.Sprintf("https://github.com/AvengeMedia/DankMaterialShell/backend/releases/download/%s/dms-%s.gz.sha256", version, arch) + binaryURL := fmt.Sprintf("https://github.com/AvengeMedia/DankMaterialShell/releases/download/%s/dms-cli-%s.gz", version, arch) + checksumURL := fmt.Sprintf("https://github.com/AvengeMedia/DankMaterialShell/releases/download/%s/dms-cli-%s.gz.sha256", version, arch) binaryPath := filepath.Join(tempDir, "dms.gz") checksumPath := filepath.Join(tempDir, "dms.gz.sha256") diff --git a/backend/flake.lock b/backend/flake.lock deleted file mode 100644 index 17542b59..00000000 --- a/backend/flake.lock +++ /dev/null @@ -1,27 +0,0 @@ -{ - "nodes": { - "nixpkgs": { - "locked": { - "lastModified": 1760878510, - "narHash": "sha256-K5Osef2qexezUfs0alLvZ7nQFTGS9DL2oTVsIXsqLgs=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "5e2a59a5b1a82f89f2c7e598302a9cacebb72a67", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "nixpkgs": "nixpkgs" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/backend/flake.nix b/backend/flake.nix deleted file mode 100644 index c62ce1d0..00000000 --- a/backend/flake.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ - description = "DankMaterialShell Command Line Interface"; - - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - }; - - outputs = - { self, nixpkgs }: - let - supportedSystems = [ - "x86_64-linux" - "aarch64-linux" - ]; - - forAllSystems = - f: - builtins.listToAttrs ( - map (system: { - name = system; - value = f system; - }) supportedSystems - ); - - in - { - packages = forAllSystems ( - system: - let - pkgs = import nixpkgs { inherit system; }; - lib = pkgs.lib; - in - { - dms-cli = pkgs.buildGoModule (finalAttrs: { - pname = "dms-cli"; - version = "0.4.3"; - src = ./.; - vendorHash = "sha256-XbCg6qQwD4g4R/hBReLGE4NOq9uv0LBqogmfpBs//Ic="; - - subPackages = [ "cmd/dms" ]; - - ldflags = [ - "-s" - "-w" - "-X main.Version=${finalAttrs.version}" - ]; - - meta = { - description = "DankMaterialShell Command Line Interface"; - homepage = "https://github.com/AvengeMedia/DankMaterialShell/backend"; - mainProgram = "dms"; - license = lib.licenses.mit; - platforms = lib.platforms.unix; - }; - }); - - default = self.packages.${system}.dms-cli; - } - ); - }; -} diff --git a/backend/install.sh b/backend/install.sh index 83d92c17..c6bac7b8 100755 --- a/backend/install.sh +++ b/backend/install.sh @@ -36,7 +36,7 @@ case "$ARCH" in esac # Get the latest release version -LATEST_VERSION=$(curl -s https://api.github.com/repos/AvengeMedia/danklinux/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') +LATEST_VERSION=$(curl -s https://api.github.com/repos/AvengeMedia/DankMaterialShell/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') if [ -z "$LATEST_VERSION" ]; then printf "%bError: Could not fetch latest version%b\n" "$RED" "$NC" @@ -51,8 +51,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/AvengeMedia/DankMaterialShell/backend/releases/download/$LATEST_VERSION/dankinstall-$ARCH.gz" -o "installer.gz" -curl -L "https://github.com/AvengeMedia/DankMaterialShell/backend/releases/download/$LATEST_VERSION/dankinstall-$ARCH.gz.sha256" -o "expected.sha256" +curl -L "https://github.com/AvengeMedia/DankMaterialShell/releases/download/$LATEST_VERSION/dankinstall-$ARCH.gz" -o "installer.gz" +curl -L "https://github.com/AvengeMedia/DankMaterialShell/releases/download/$LATEST_VERSION/dankinstall-$ARCH.gz.sha256" -o "expected.sha256" # Get the expected checksum EXPECTED_CHECKSUM=$(cat expected.sha256 | awk '{print $1}') diff --git a/backend/internal/config/dms.go b/backend/internal/config/dms.go index 2ecc3ef2..71dc7c46 100644 --- a/backend/internal/config/dms.go +++ b/backend/internal/config/dms.go @@ -9,7 +9,7 @@ import ( // LocateDMSConfig searches for DMS installation following XDG Base Directory specification func LocateDMSConfig() (string, error) { - var searchPaths []string + var primaryPaths []string configHome := os.Getenv("XDG_CONFIG_HOME") if configHome == "" { @@ -19,10 +19,10 @@ func LocateDMSConfig() (string, error) { } if configHome != "" { - searchPaths = append(searchPaths, filepath.Join(configHome, "quickshell", "dms")) + primaryPaths = append(primaryPaths, filepath.Join(configHome, "quickshell", "dms")) } - searchPaths = append(searchPaths, "/usr/share/quickshell/dms") + primaryPaths = append(primaryPaths, "/usr/share/quickshell/dms") configDirs := os.Getenv("XDG_CONFIG_DIRS") if configDirs == "" { @@ -31,10 +31,17 @@ func LocateDMSConfig() (string, error) { for _, dir := range strings.Split(configDirs, ":") { if dir != "" { - searchPaths = append(searchPaths, filepath.Join(dir, "quickshell", "dms")) + primaryPaths = append(primaryPaths, filepath.Join(dir, "quickshell", "dms")) } } + // Build search paths with secondary (monorepo) paths interleaved + var searchPaths []string + for _, path := range primaryPaths { + searchPaths = append(searchPaths, path) + searchPaths = append(searchPaths, filepath.Join(path, "quickshell")) + } + for _, path := range searchPaths { shellPath := filepath.Join(path, "shell.qml") if info, err := os.Stat(shellPath); err == nil && !info.IsDir() { diff --git a/backend/internal/distros/base.go b/backend/internal/distros/base.go index 3d6eaa69..371fa31f 100644 --- a/backend/internal/distros/base.go +++ b/backend/internal/distros/base.go @@ -587,7 +587,7 @@ func (b *BaseDistribution) installDMSBinary(ctx context.Context, sudoPassword st // Get latest release version latestVersionCmd := exec.CommandContext(ctx, "bash", "-c", - `curl -s https://api.github.com/repos/AvengeMedia/danklinux/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'`) + `curl -s https://api.github.com/repos/AvengeMedia/DankMaterialShell/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'`) versionOutput, err := latestVersionCmd.Output() if err != nil { return fmt.Errorf("failed to get latest DMS version: %w", err) @@ -608,7 +608,7 @@ func (b *BaseDistribution) installDMSBinary(ctx context.Context, sudoPassword st defer os.RemoveAll(tmpDir) // Download the gzipped binary - downloadURL := fmt.Sprintf("https://github.com/AvengeMedia/DankMaterialShell/backend/releases/download/%s/dms-%s.gz", version, arch) + downloadURL := fmt.Sprintf("https://github.com/AvengeMedia/DankMaterialShell/releases/download/%s/dms-cli-%s.gz", version, arch) gzPath := filepath.Join(tmpDir, "dms.gz") downloadCmd := exec.CommandContext(ctx, "curl", "-L", downloadURL, "-o", gzPath) diff --git a/backend/internal/distros/manual_packages.go b/backend/internal/distros/manual_packages.go index 316f9a22..8cc328ac 100644 --- a/backend/internal/distros/manual_packages.go +++ b/backend/internal/distros/manual_packages.go @@ -659,7 +659,7 @@ func (m *ManualPackageInstaller) installDankMaterialShell(ctx context.Context, s Progress: 0.90, Step: "Cloning DankMaterialShell config...", IsComplete: false, - CommandInfo: "git clone https://github.com/AvengeMedia/DankMaterialShell.git ~/.config/quickshell/dms", + CommandInfo: "git clone https://github.com/AvengeMedia/DankMaterialShell.git", } configDir := filepath.Dir(dmsPath) @@ -667,19 +667,22 @@ func (m *ManualPackageInstaller) installDankMaterialShell(ctx context.Context, s return fmt.Errorf("failed to create quickshell config directory: %w", err) } + tmpRepoPath := filepath.Join(os.TempDir(), "dms-clone-tmp") + defer os.RemoveAll(tmpRepoPath) + cloneCmd := exec.CommandContext(ctx, "git", "clone", - "https://github.com/AvengeMedia/DankMaterialShell.git", dmsPath) + "https://github.com/AvengeMedia/DankMaterialShell.git", tmpRepoPath) if err := cloneCmd.Run(); err != nil { return fmt.Errorf("failed to clone DankMaterialShell: %w", err) } if !forceDMSGit { - fetchCmd := exec.CommandContext(ctx, "git", "-C", dmsPath, "fetch", "--tags") + fetchCmd := exec.CommandContext(ctx, "git", "-C", tmpRepoPath, "fetch", "--tags") if err := fetchCmd.Run(); err == nil { - tagCmd := exec.CommandContext(ctx, "git", "-C", dmsPath, "describe", "--tags", "--abbrev=0", "origin/master") + tagCmd := exec.CommandContext(ctx, "git", "-C", tmpRepoPath, "describe", "--tags", "--abbrev=0", "origin/master") if tagOutput, err := tagCmd.Output(); err == nil { latestTag := strings.TrimSpace(string(tagOutput)) - checkoutCmd := exec.CommandContext(ctx, "git", "-C", dmsPath, "checkout", latestTag) + checkoutCmd := exec.CommandContext(ctx, "git", "-C", tmpRepoPath, "checkout", latestTag) if err := checkoutCmd.Run(); err == nil { m.log(fmt.Sprintf("Checked out latest tag: %s", latestTag)) } @@ -687,6 +690,12 @@ func (m *ManualPackageInstaller) installDankMaterialShell(ctx context.Context, s } } + srcPath := filepath.Join(tmpRepoPath, "quickshell") + cpCmd := exec.CommandContext(ctx, "cp", "-r", srcPath, dmsPath) + if err := cpCmd.Run(); err != nil { + return fmt.Errorf("failed to copy quickshell directory: %w", err) + } + m.log("DankMaterialShell config cloned successfully") } else { // Config exists, update it @@ -695,15 +704,41 @@ func (m *ManualPackageInstaller) installDankMaterialShell(ctx context.Context, s Progress: 0.90, Step: "Updating DankMaterialShell config...", IsComplete: false, - CommandInfo: "git pull in ~/.config/quickshell/dms", + CommandInfo: "Updating ~/.config/quickshell/dms", } - pullCmd := exec.CommandContext(ctx, "git", "pull") - pullCmd.Dir = dmsPath - if err := pullCmd.Run(); err != nil { - m.logError("Failed to update DankMaterialShell config", err) + tmpRepoPath := filepath.Join(os.TempDir(), "dms-update-tmp") + defer os.RemoveAll(tmpRepoPath) + + cloneCmd := exec.CommandContext(ctx, "git", "clone", + "https://github.com/AvengeMedia/DankMaterialShell.git", tmpRepoPath) + if err := cloneCmd.Run(); err != nil { + m.logError("Failed to clone DankMaterialShell for update", err) } else { - m.log("DankMaterialShell config updated successfully") + if !forceDMSGit { + fetchCmd := exec.CommandContext(ctx, "git", "-C", tmpRepoPath, "fetch", "--tags") + if err := fetchCmd.Run(); err == nil { + tagCmd := exec.CommandContext(ctx, "git", "-C", tmpRepoPath, "describe", "--tags", "--abbrev=0", "origin/master") + if tagOutput, err := tagCmd.Output(); err == nil { + latestTag := strings.TrimSpace(string(tagOutput)) + checkoutCmd := exec.CommandContext(ctx, "git", "-C", tmpRepoPath, "checkout", latestTag) + _ = checkoutCmd.Run() + } + } + } + + srcPath := filepath.Join(tmpRepoPath, "quickshell") + rsyncCmd := exec.CommandContext(ctx, "rsync", "-a", "--delete", srcPath+"/", dmsPath+"/") + if err := rsyncCmd.Run(); err != nil { + cpCmd := exec.CommandContext(ctx, "cp", "-rf", srcPath+"/.", dmsPath+"/") + if err := cpCmd.Run(); err != nil { + m.logError("Failed to update DankMaterialShell config", err) + } else { + m.log("DankMaterialShell config updated successfully") + } + } else { + m.log("DankMaterialShell config updated successfully") + } } } diff --git a/backend/internal/tui/views_welcome.go b/backend/internal/tui/views_welcome.go index 187c3226..64ff4295 100644 --- a/backend/internal/tui/views_welcome.go +++ b/backend/internal/tui/views_welcome.go @@ -71,7 +71,7 @@ func (m Model) viewWelcome() string { case "nixos": errorMsg = "NixOS is currently not supported, but there is a DankMaterialShell flake available." default: - errorMsg = fmt.Sprintf("%s is not supported.\nFeel free to request on https://github.com/AvengeMedia/DankMaterialShell/backend", m.osInfo.PrettyName) + errorMsg = fmt.Sprintf("%s is not supported.\nFeel free to request on https://github.com/AvengeMedia/DankMaterialShell", m.osInfo.PrettyName) } errorMsgStyled := lipgloss.NewStyle(). diff --git a/backend/internal/version/version.go b/backend/internal/version/version.go index 2993f306..28c7c3c4 100644 --- a/backend/internal/version/version.go +++ b/backend/internal/version/version.go @@ -130,7 +130,7 @@ func GetLatestDMSVersion() (string, error) { } // Add timeout to prevent hanging when GitHub is down - cmd := exec.Command("curl", "-s", "--max-time", "5", "https://api.github.com/repos/AvengeMedia/danklinux/releases/latest") + cmd := exec.Command("curl", "-s", "--max-time", "5", "https://api.github.com/repos/AvengeMedia/DankMaterialShell/releases/latest") output, err := cmd.Output() if err != nil { return "", fmt.Errorf("failed to fetch latest release: %w", err) diff --git a/quickshell/distro/fedora/dms-greeter.spec b/distro/fedora/dms-greeter.spec similarity index 92% rename from quickshell/distro/fedora/dms-greeter.spec rename to distro/fedora/dms-greeter.spec index add8df24..5f1ef90c 100644 --- a/quickshell/distro/fedora/dms-greeter.spec +++ b/distro/fedora/dms-greeter.spec @@ -44,18 +44,18 @@ authentication, and dynamic theming. {{{ git_repo_setup_macro }}} %install -# Install greeter files to shared data location +# Install greeter files to shared data location (from quickshell/ subdirectory) install -dm755 %{buildroot}%{_datadir}/quickshell/dms-greeter -cp -r * %{buildroot}%{_datadir}/quickshell/dms-greeter/ +cp -r %{_builddir}/%{name}-%{version}/quickshell/* %{buildroot}%{_datadir}/quickshell/dms-greeter/ # Install launcher script -install -Dm755 Modules/Greetd/assets/dms-greeter %{buildroot}%{_bindir}/dms-greeter +install -Dm755 %{_builddir}/%{name}-%{version}/quickshell/Modules/Greetd/assets/dms-greeter %{buildroot}%{_bindir}/dms-greeter # Install documentation -install -Dm644 Modules/Greetd/README.md %{buildroot}%{_docdir}/dms-greeter/README.md +install -Dm644 %{_builddir}/%{name}-%{version}/quickshell/Modules/Greetd/README.md %{buildroot}%{_docdir}/dms-greeter/README.md # Create cache directory for greeter data -install -Dpm0644 ./systemd/tmpfiles-dms-greeter.conf %{buildroot}%{_tmpfilesdir}/dms-greeter.conf +install -Dpm0644 %{_builddir}/%{name}-%{version}/quickshell/systemd/tmpfiles-dms-greeter.conf %{buildroot}%{_tmpfilesdir}/dms-greeter.conf # Create greeter home directory install -dm755 %{buildroot}%{_sharedstatedir}/greeter @@ -67,9 +67,7 @@ install -dm755 %{buildroot}%{_sharedstatedir}/greeter rm -rf %{buildroot}%{_datadir}/quickshell/dms-greeter/.git* rm -f %{buildroot}%{_datadir}/quickshell/dms-greeter/.gitignore rm -rf %{buildroot}%{_datadir}/quickshell/dms-greeter/.github -rm -f %{buildroot}%{_datadir}/quickshell/dms-greeter/*.spec -rm -f %{buildroot}%{_datadir}/quickshell/dms-greeter/dms.spec -rm -f %{buildroot}%{_datadir}/quickshell/dms-greeter/dms-greeter.spec +rm -rf %{buildroot}%{_datadir}/quickshell/dms-greeter/distro %posttrans # Clean up old installation path from previous versions (only if empty) @@ -81,7 +79,7 @@ if [ -d "%{_sysconfdir}/xdg/quickshell/dms-greeter" ]; then fi %files -%license LICENSE +%license %{_builddir}/%{name}-%{version}/LICENSE %doc %{_docdir}/dms-greeter/README.md %{_bindir}/dms-greeter %{_datadir}/quickshell/dms-greeter/ diff --git a/quickshell/distro/fedora/dms.spec b/distro/fedora/dms.spec similarity index 77% rename from quickshell/distro/fedora/dms.spec rename to distro/fedora/dms.spec index c838e44f..280e2ba2 100644 --- a/quickshell/distro/fedora/dms.spec +++ b/distro/fedora/dms.spec @@ -15,9 +15,6 @@ URL: https://github.com/AvengeMedia/DankMaterialShell VCS: {{{ git_repo_vcs }}} Source0: {{{ git_repo_pack }}} -# DMS CLI from danklinux latest commit -Source1: https://github.com/AvengeMedia/danklinux/archive/refs/heads/master.tar.gz - BuildRequires: git-core BuildRequires: rpkg BuildRequires: gzip @@ -58,7 +55,7 @@ lock screen, and comprehensive plugin system. %package -n dms-cli Summary: DankMaterialShell CLI tool License: MIT -URL: https://github.com/AvengeMedia/danklinux +URL: https://github.com/AvengeMedia/DankMaterialShell %description -n dms-cli Command-line interface for DankMaterialShell configuration and management. @@ -78,9 +75,6 @@ used standalone. This package always includes the latest stable dgop release. %prep {{{ git_repo_setup_macro }}} -# Extract DankLinux source -tar -xzf %{SOURCE1} -C %{_builddir} - # Download and extract DGOP binary for target architecture case "%{_arch}" in x86_64) @@ -103,8 +97,8 @@ gunzip -c %{_builddir}/dgop.gz > %{_builddir}/dgop chmod +x %{_builddir}/dgop %build -# Build DMS CLI from source -cd %{_builddir}/danklinux-master +# Build DMS CLI from source (backend/ subdirectory in monorepo) +cd %{_builddir}/%{name}-%{version}/backend make dist %install @@ -122,31 +116,31 @@ case "%{_arch}" in ;; esac -install -Dm755 %{_builddir}/danklinux-master/bin/${DMS_BINARY} %{buildroot}%{_bindir}/dms +install -Dm755 %{_builddir}/%{name}-%{version}/backend/bin/${DMS_BINARY} %{buildroot}%{_bindir}/dms -# Shell completions +# Shell completions install -d %{buildroot}%{_datadir}/bash-completion/completions install -d %{buildroot}%{_datadir}/zsh/site-functions install -d %{buildroot}%{_datadir}/fish/vendor_completions.d -%{_builddir}/danklinux-master/bin/${DMS_BINARY} completion bash > %{buildroot}%{_datadir}/bash-completion/completions/dms || : -%{_builddir}/danklinux-master/bin/${DMS_BINARY} completion zsh > %{buildroot}%{_datadir}/zsh/site-functions/_dms || : -%{_builddir}/danklinux-master/bin/${DMS_BINARY} completion fish > %{buildroot}%{_datadir}/fish/vendor_completions.d/dms.fish || : +%{_builddir}/%{name}-%{version}/backend/bin/${DMS_BINARY} completion bash > %{buildroot}%{_datadir}/bash-completion/completions/dms || : +%{_builddir}/%{name}-%{version}/backend/bin/${DMS_BINARY} completion zsh > %{buildroot}%{_datadir}/zsh/site-functions/_dms || : +%{_builddir}/%{name}-%{version}/backend/bin/${DMS_BINARY} completion fish > %{buildroot}%{_datadir}/fish/vendor_completions.d/dms.fish || : # Install dgop binary install -Dm755 %{_builddir}/dgop %{buildroot}%{_bindir}/dgop -# Install systemd user service -install -Dm644 assets/systemd/dms.service %{buildroot}%{_userunitdir}/dms.service +# Install systemd user service (from quickshell/ subdirectory) +install -Dm644 %{_builddir}/%{name}-%{version}/quickshell/assets/systemd/dms.service %{buildroot}%{_userunitdir}/dms.service -# Install shell files to shared data location +# Install shell files to shared data location (from quickshell/ subdirectory) install -dm755 %{buildroot}%{_datadir}/quickshell/dms -cp -r * %{buildroot}%{_datadir}/quickshell/dms/ +cp -r %{_builddir}/%{name}-%{version}/quickshell/* %{buildroot}%{_datadir}/quickshell/dms/ # Remove build files rm -rf %{buildroot}%{_datadir}/quickshell/dms/.git* rm -f %{buildroot}%{_datadir}/quickshell/dms/.gitignore rm -rf %{buildroot}%{_datadir}/quickshell/dms/.github -rm -f %{buildroot}%{_datadir}/quickshell/dms/*.spec +rm -rf %{buildroot}%{_datadir}/quickshell/dms/distro %posttrans # Clean up old installation path from previous versions (only if empty) @@ -163,8 +157,9 @@ if [ "$1" -ge 2 ]; then fi %files -%license LICENSE -%doc README.md CONTRIBUTING.md +%license %{_builddir}/%{name}-%{version}/LICENSE +%doc %{_builddir}/%{name}-%{version}/quickshell/README.md +%doc %{_builddir}/%{name}-%{version}/quickshell/CONTRIBUTING.md %{_datadir}/quickshell/dms/ %{_userunitdir}/dms.service diff --git a/quickshell/flake.lock b/flake.lock similarity index 100% rename from quickshell/flake.lock rename to flake.lock diff --git a/quickshell/flake.nix b/flake.nix similarity index 98% rename from quickshell/flake.nix rename to flake.nix index 27eece42..bccd7f93 100644 --- a/quickshell/flake.nix +++ b/flake.nix @@ -41,7 +41,7 @@ ]; in pkgs.stdenvNoCC.mkDerivation { pname = "dankMaterialShell"; - version = pkgs.lib.removePrefix "v" (pkgs.lib.trim (builtins.readFile ./VERSION)) + version = pkgs.lib.removePrefix "v" (pkgs.lib.trim (builtins.readFile ./quickshell/VERSION)) + "+date=" + mkDate (self.lastModifiedDate or "19700101") + "_" + (self.shortRev or "dirty"); src = pkgs.lib.cleanSourceWith { diff --git a/quickshell/nix/default.nix b/nix/default.nix similarity index 100% rename from quickshell/nix/default.nix rename to nix/default.nix diff --git a/quickshell/nix/greeter.nix b/nix/greeter.nix similarity index 100% rename from quickshell/nix/greeter.nix rename to nix/greeter.nix diff --git a/quickshell/nix/niri.nix b/nix/niri.nix similarity index 100% rename from quickshell/nix/niri.nix rename to nix/niri.nix diff --git a/LICENSE_CHANGE_12_11_2025.md b/quickshell/LICENSE_CHANGE_12_11_2025.md similarity index 100% rename from LICENSE_CHANGE_12_11_2025.md rename to quickshell/LICENSE_CHANGE_12_11_2025.md diff --git a/quickshell/README.md b/quickshell/README.md index 39aaa515..b3e4e13f 100644 --- a/quickshell/README.md +++ b/quickshell/README.md @@ -1,219 +1,238 @@ -# DankMaterialShell (dms) +# DMS Quickshell Interface -
- - DankMaterialShell Logo - +QML-based desktop shell interface for DankMaterialShell providing panels, widgets, and overlays. - ### A modern Wayland desktop shell +**See [root README](../README.md) for project overview and installation.** - Built with [Quickshell](https://quickshell.org/) and [Go](https://go.dev/) +## Architecture -[![Documentation](https://img.shields.io/badge/docs-danklinux.com-9ccbfb?style=for-the-badge&labelColor=101418)](https://danklinux.com/docs) -[![GitHub stars](https://img.shields.io/github/stars/AvengeMedia/DankMaterialShell?style=for-the-badge&labelColor=101418&color=ffd700)](https://github.com/AvengeMedia/DankMaterialShell/stargazers) -[![GitHub License](https://img.shields.io/github/license/AvengeMedia/DankMaterialShell?style=for-the-badge&labelColor=101418&color=b9c8da)](https://github.com/AvengeMedia/DankMaterialShell/blob/master/LICENSE) -[![GitHub release](https://img.shields.io/github/v/release/AvengeMedia/DankMaterialShell?style=for-the-badge&labelColor=101418&color=9ccbfb)](https://github.com/AvengeMedia/DankMaterialShell/releases) -[![AUR version](https://img.shields.io/aur/version/dms-shell-bin?style=for-the-badge&labelColor=101418&color=9ccbfb)](https://aur.archlinux.org/packages/dms-shell-bin) -[![AUR version (git)](https://img.shields.io/aur/version/dms-shell-git?style=for-the-badge&labelColor=101418&color=9ccbfb&label=AUR%20(git))](https://aur.archlinux.org/packages/dms-shell-git) -[![Ko-Fi donate](https://img.shields.io/badge/donate-kofi?style=for-the-badge&logo=ko-fi&logoColor=ffffff&label=ko-fi&labelColor=101418&color=f16061&link=https%3A%2F%2Fko-fi.com%2Favengemediallc)](https://ko-fi.com/avengemediallc) +**Modular QML Structure** +- `Modules/` - UI components (panels, widgets, overlays) +- `Services/` - System integration singletons (audio, network, bluetooth) +- `Widgets/` - Reusable UI controls +- `Common/` - Shared resources and themes -
+**Technology Stack** +- [Quickshell](https://quickshell.org/) - QML-based shell framework +- Qt/QtQuick - UI rendering and controls +- Material Design 3 - Design system and theming -DankMaterialShell is a complete desktop shell for [niri](https://github.com/YaLTeR/niri), [Hyprland](https://hypr.land), [MangoWC](https://github.com/DreamMaoMao/mangowc), [Sway](https://swaywm.org), and other Wayland compositors. It replaces waybar, swaylock, swayidle, mako, fuzzel, polkit, and everything else you'd normally stitch together to make a desktop - all in one cohesive package with a gorgeous interface. +## Development + +**Run the shell:** +```bash +quickshell -p quickshell/ +``` + +**Code formatting:** +```bash +qmlfmt -t 4 -i 4 -b 250 -w path/to/file.qml +qmllint **/*.qml +``` ## Components -DankMaterialShell combines two main components: +**Panels & Bars** +- `Modules/TopBar/` - Multi-monitor status bars with workspace switching +- `Modules/DankBar/` - Customizable widget bar with plugin support +- `Modules/Dock/` - Application dock with window management -- **[QML/UI Layer](https://github.com/AvengeMedia/DankMaterialShell)** (this repo) - All the visual components, widgets, and shell interface built with Quickshell -- **[Go Backend](https://github.com/AvengeMedia/danklinux)** - System integration, IPC, process management, and core services +**System Controls** +- `Modules/ControlCenter/` - WiFi, Bluetooth, audio, display settings +- `Modules/Notifications/` - Notification center with popups +- `Modules/Greetd/` - Login greeter interface ---- +**Overlays** +- `Modules/Spotlight/` - Application and file launcher +- `Modules/Overview/` - Workspace overview +- `Modules/Lock/` - Screen lock system -## See it in Action +**Utilities** +- `Modules/ProcessList/` - System monitoring and process management +- `Modules/Calendar/` - Calendar widget with event sync +- `Modules/Weather/` - Weather display -
+## Services -https://github.com/user-attachments/assets/1200a739-7770-4601-8b85-695ca527819a +Singletons providing system integration: -
+**Media & Audio** +- `AudioService` - PipeWire/PulseAudio volume and device control +- `MprisController` - Media player integration -
More Screenshots +**Network** +- `NetworkService` - NetworkManager WiFi control +- `BluetoothService` - BlueZ Bluetooth management -
+**Display** +- `DisplayService` - Brightness control and night mode +- `WallpaperService` - Wallpaper management and effects -Desktop +**System** +- `BatteryService` - Battery status and power profiles +- `IdleService` - Idle detection and inhibit locks +- `ClipboardService` - Clipboard history with images +- `DgopService` - System metrics (CPU, RAM, GPU) -Dashboard +**Integration** +- `NiriService` - Niri workspace integration +- `HyprlandService` - Hyprland workspace integration +- `PluginService` - Plugin discovery and lifecycle -Launcher +## Widgets -Control Center +Reusable Material Design 3 components in `Widgets/`: -
- -
- ---- - -## Quick Install - -```bash -curl -fsSL https://install.danklinux.com | sh -``` - -That's it. One command installs dms and all dependencies on Arch, Fedora, Debian, Ubuntu, openSUSE, or Gentoo. - -**[Manual Installation Guide →](https://danklinux.com/docs/dankmaterialshell/installation)** - ---- - -## What You Get - -**Dynamic Theming** -Wallpaper-based color schemes that automatically theme GTK, Qt, terminals, editors (like vscode, vscodium), and more with [matugen](https://github.com/InioX/matugen) and [dank16](https://github.com/AvengeMedia/danklinux/blob/master/internal/dank16/dank16.go). - -**System Monitoring** -Real-time CPU, RAM, GPU metrics and temps with [dgop](https://github.com/AvengeMedia/dgop). Full process list with search and management. - -**Powerful Launcher** -Spotlight-style search for apps, files (via [dsearch](https://github.com/AvengeMedia/danksearch)), emojis, running windows, calculator, commands - extensible with plugins. - -**Control Center** -Network, Bluetooth, audio devices, display settings, night mode - all in one clean interface. - -**Smart Notifications** -Notification center with grouping, rich text support, and keyboard navigation. - -**Media Integration** -MPRIS player controls, calendar sync, weather widgets, clipboard history with image previews. - -**Complete Session Management** -Lock screen, idle detection, auto-lock/suspend with separate AC/battery settings, greeter support. - -**Plugin System** -Endless customization with the [plugin registry](https://plugins.danklinux.com). - -**TL;DR** - One shell replaces waybar, swaylock, swayidle, mako, fuzzel, polkit and everything else you normally piece together to create a linux desktop. - ---- - -## Supported Compositors - -DankMaterialShell works best with **[niri](https://github.com/YaLTeR/niri)**, **[Hyprland](https://hyprland.org/)**, **[sway](https://swaywm.org/)**, and **[dwl/MangoWC](https://github.com/DreamMaoMao/mangowc)**. - with full workspace switching, overview integration, and monitor management. - -Other Wayland compositors work too, just with a reduced feature set. - -**[Compositor configuration guide →](https://danklinux.com/docs/dankmaterialshell/compositors)** - ---- - -## Keybinds & IPC - -Control everything from the command line or keybinds: - -```bash -dms ipc call spotlight toggle -dms ipc call audio setvolume 50 -dms ipc call wallpaper set /path/to/image.jpg -dms ipc call theme toggle -``` - -**[Full keybind and IPC documentation →](https://danklinux.com/docs/dankmaterialshell/keybinds-ipc)** - ---- +- `DankIcon` - Icon component with Material font +- `DankSlider` - Enhanced slider with animations +- `DankToggle` - Toggle switch component +- `DankTabBar` - Tab bar implementation +- `DankGridView` - Grid layout with adaptive columns +- `DankListView` - Scrollable list view +- `DankTextField` - Text input with validation +- `DankDropdown` - Dropdown selection +- `DankPopout` - Base for overlay components +- `StateLayer` - Material interaction states ## Theming -DankMaterialShell automatically generates color schemes from your wallpaper or theme and applies them to GTK, Qt, terminals, and more. +**Dynamic Color Schemes** -DMS is not opinionated or forcing these themes - they are created as optional themes you can enable. You can refer to the documentation if you want to use them: +Wallpaper-based theming using [matugen](https://github.com/InioX/matugen): -**Application theming:** [GTK, Qt, Firefox, terminals, vscode+vscodium →](https://danklinux.com/docs/dankmaterialshell/application-themes) +```qml +import qs.Common -**Custom themes:** [Create your own color schemes →](https://danklinux.com/docs/dankmaterialshell/custom-themes) - ---- - -## Plugins - -Extend dms with the plugin system. Browse community plugins at [plugins.danklinux.com](https://plugins.danklinux.com). - -**[Plugin development guide →](https://danklinux.com/docs/dankmaterialshell/plugins-overview)** - ---- - -## Documentation - -**Website:** [danklinux.com](https://danklinux.com) - -**Docs:** [danklinux.com/docs](https://danklinux.com/docs) - -**Support:** [Ko-fi](https://ko-fi.com/avengemediallc) - ---- - -## Contributing - -Contributions welcome! Bug fixes, new widgets, theme improvements, or docs - it all helps. - -**Contributing Code:** -1. Fork the repository -2. Set up the development environment -3. Make your changes -4. Open a pull request - -**Contributing Documentation:** -1. Fork the [DankLinux-Docs](https://github.com/AvengeMedia/DankLinux-Docs) repository -2. Update files in the `docs/` folder -3. Open a pull request - -### Development Setup - -**Requirements:** -- `python3` - Translation management - -**Git Hooks:** - -Enable the pre-commit hook to check translation sync status: - -```bash -git config core.hooksPath .githooks +Rectangle { + color: Theme.container + border.color: Theme.outline +} ``` -**Translation Workflow** +Theme singleton provides Material Design 3 color system, spacing, fonts, and elevation. -Set POEditor credentials: +**Application Themes** -```bash -export POEDITOR_API_TOKEN="your_api_token" -export POEDITOR_PROJECT_ID="your_project_id" +Templates in `scripts/templates/` generate themes for: +- GTK 3/4 +- Qt5/Qt6 +- Alacritty, Kitty, Foot terminals +- VSCode/VSCodium +- Firefox + +## Multi-Monitor Support + +Per-monitor panel instances using Quickshell `Variants`: + +```qml +Variants { + model: Quickshell.screens + PanelWindow { + screen: modelData + // Per-screen configuration + } +} ``` -Sync translations before committing: +Workspace switchers adapt to compositor (Niri/Hyprland). + +## Plugin System + +External plugins in `~/.config/DankMaterialShell/plugins/`: + +**Widget plugins** - UI components in DankBar +**Daemon plugins** - Background processes without UI + +Plugin manifest (`plugin.json`): +```json +{ + "id": "pluginId", + "name": "Plugin Name", + "version": "1.0.0", + "type": "widget", + "component": "./Widget.qml", + "settings": "./Settings.qml", + "permissions": ["settings_read", "settings_write"] +} +``` + +Plugins access `pluginService` for persistent data: +```qml +pluginService.savePluginData("pluginId", "key", value) +pluginService.loadPluginData("pluginId", "key", defaultValue) +``` + +## IPC Integration + +Backend IPC socket communication: + +```qml +import Quickshell.Io + +Process { + command: ["dms", "ipc", "call", "spotlight", "toggle"] + running: true +} +``` + +Common IPC commands exposed through services for reactive property bindings. + +## Code Conventions + +**Component Structure:** +```qml +import QtQuick +import Quickshell +import qs.Common +import qs.Services + +Item { + id: root + + property type name: value + + signal customSignal(type param) + + Component { /* children */ } +} +``` + +**Services (Singletons):** +```qml +import QtQuick +import Quickshell +pragma Singleton +pragma ComponentBehavior: Bound + +Singleton { + id: root + + property bool featureAvailable: false + property type currentValue: defaultValue + + function performAction(param) { /* implementation */ } +} +``` + +**Guidelines:** +- Use `Theme.propertyName` for consistent styling +- Bind directly to service properties for reactivity +- Use `DankIcon` for all icons +- Implement feature detection and graceful degradation +- 4-space indentation, no unnecessary comments + +## Translation + +Internationalization using POEditor: ```bash +export POEDITOR_API_TOKEN="token" +export POEDITOR_PROJECT_ID="id" python3 scripts/i18nsync.py sync ``` -This script: -- Extracts strings from QML files -- Uploads changed English terms to POEditor -- Downloads updated translations from POEditor -- Stages all changes for commit +Pre-commit hook checks translation sync status. -The pre-commit hook will block commits if translations are out of sync and remind you to run the sync script. +## License -Without POEditor credentials, the hook is skipped and commits proceed normally. - -Check the [issues](https://github.com/AvengeMedia/DankMaterialShell/issues) or join the community. - ---- - -## Credits - -- [quickshell](https://quickshell.org/) the core of what makes a shell like this possible. -- [niri](https://github.com/YaLTeR/niri) for the awesome scrolling compositor. -- [Ly-sec](http://github.com/ly-sec) for awesome wallpaper effects among other things from [Noctalia](https://github.com/noctalia-dev/noctalia-shell) -- [soramanew](https://github.com/soramanew) who built [caelestia](https://github.com/caelestia-dots/shell) which served as inspiration and guidance for many dank widgets. -- [end-4](https://github.com/end-4) for [dots-hyprland](https://github.com/end-4/dots-hyprland) which also served as inspiration and guidance for many dank widgets. +MIT License - See [LICENSE](../LICENSE) for details.