1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-05-15 08:42:47 -04:00

Compare commits

..

8 Commits

Author SHA1 Message Date
bbedward 830dd93af5 chore: bump version to v1.0.1 2025-12-12 10:04:47 -05:00
bbedward 75f28c5ea7 ci: switch to dispatch-based release flow 2025-12-12 10:04:20 -05:00
bbedward 6c9b8c590e dankinstall: call add-wants for niri/hyprland with dms service 2025-12-12 10:04:20 -05:00
bbedward 24d9b77307 niri: fix keybind handling of cooldown-ms parameter 2025-12-12 10:04:20 -05:00
bbedward d4be68912c workspaces: make icons scale with bar size, fixi valign of numbers fixes #990 2025-12-12 10:04:20 -05:00
bbedward a443721000 core: fix socket reported CLI version 2025-12-12 10:03:32 -05:00
bbedward 786b097187 plugins: hide uninstall and update buttons for system plugins 2025-12-12 10:03:18 -05:00
bbedward 8ca60c7d2a dwl: fix layout popout not opening fixes #980 2025-12-12 10:03:04 -05:00
34 changed files with 328 additions and 536 deletions
+30 -17
View File
@@ -1,16 +1,19 @@
name: Release name: Release
on: on:
push: workflow_dispatch:
tags: inputs:
- "v*" tag:
description: 'Tag to release (e.g., v1.0.1)'
required: true
type: string
permissions: permissions:
contents: write contents: write
actions: write actions: write
concurrency: concurrency:
group: release-${{ github.ref_name }} group: release-${{ inputs.tag }}
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
@@ -24,10 +27,14 @@ jobs:
run: run:
working-directory: core working-directory: core
env:
TAG: ${{ inputs.tag }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: ${{ inputs.tag }}
fetch-depth: 0 fetch-depth: 0
- name: Set up Go - name: Set up Go
@@ -54,7 +61,7 @@ jobs:
run: | run: |
set -eux set -eux
cd cmd/dankinstall cd cmd/dankinstall
go build -trimpath -ldflags "-s -w -X main.Version=${GITHUB_REF#refs/tags/}" \ go build -trimpath -ldflags "-s -w -X main.Version=${TAG}" \
-o ../../dankinstall-${{ matrix.arch }} -o ../../dankinstall-${{ matrix.arch }}
cd ../.. cd ../..
gzip -9 -k dankinstall-${{ matrix.arch }} gzip -9 -k dankinstall-${{ matrix.arch }}
@@ -68,7 +75,7 @@ jobs:
run: | run: |
set -eux set -eux
cd cmd/dms cd cmd/dms
go build -trimpath -ldflags "-s -w -X main.Version=${GITHUB_REF#refs/tags/}" \ go build -trimpath -ldflags "-s -w -X main.Version=${TAG}" \
-o ../../dms-${{ matrix.arch }} -o ../../dms-${{ matrix.arch }}
cd ../.. cd ../..
gzip -9 -k dms-${{ matrix.arch }} gzip -9 -k dms-${{ matrix.arch }}
@@ -91,7 +98,7 @@ jobs:
run: | run: |
set -eux set -eux
cd cmd/dms cd cmd/dms
go build -trimpath -tags distro_binary -ldflags "-s -w -X main.Version=${GITHUB_REF#refs/tags/}" \ go build -trimpath -tags distro_binary -ldflags "-s -w -X main.Version=${TAG}" \
-o ../../dms-distropkg-${{ matrix.arch }} -o ../../dms-distropkg-${{ matrix.arch }}
cd ../.. cd ../..
gzip -9 -k dms-distropkg-${{ matrix.arch }} gzip -9 -k dms-distropkg-${{ matrix.arch }}
@@ -171,17 +178,18 @@ jobs:
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
needs: [build-core] #, update-versions] needs: [build-core] #, update-versions]
env: env:
TAG: ${{ github.ref_name }} TAG: ${{ inputs.tag }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: ${{ inputs.tag }}
fetch-depth: 0 fetch-depth: 0
- name: Fetch updated tag after version bump - name: Fetch updated tag after version bump
run: | run: |
git fetch origin --force tag ${{ github.ref_name }} git fetch origin --force tag ${TAG}
git checkout ${{ github.ref_name }} git checkout ${TAG}
- name: Download core artifacts - name: Download core artifacts
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
@@ -272,9 +280,6 @@ jobs:
# Create QML source package (exclude build artifacts and git files) # Create QML source package (exclude build artifacts and git files)
# Copy root LICENSE and CONTRIBUTING.md to quickshell/ for packaging # Copy root LICENSE and CONTRIBUTING.md to quickshell/ for packaging
cp LICENSE CONTRIBUTING.md quickshell/ cp LICENSE CONTRIBUTING.md quickshell/
# Copy root assets directory to quickshell for systemd service and desktop file
cp -r assets quickshell/
# Tar the CONTENTS of quickshell/, not the directory itself # Tar the CONTENTS of quickshell/, not the directory itself
(cd quickshell && tar --exclude='.git' \ (cd quickshell && tar --exclude='.git' \
@@ -394,9 +399,13 @@ jobs:
trigger-obs-update: trigger-obs-update:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: release needs: release
env:
TAG: ${{ inputs.tag }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
ref: ${{ inputs.tag }}
- name: Install OSC - name: Install OSC
run: | run: |
@@ -416,16 +425,19 @@ jobs:
- name: Update OBS packages - name: Update OBS packages
run: | run: |
VERSION="${{ github.ref_name }}"
cd distro cd distro
bash scripts/obs-upload.sh dms "Update to $VERSION" bash scripts/obs-upload.sh dms "Update to ${TAG}"
trigger-ppa-update: trigger-ppa-update:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: release needs: release
env:
TAG: ${{ inputs.tag }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
ref: ${{ inputs.tag }}
- name: Install build dependencies - name: Install build dependencies
run: | run: |
@@ -449,7 +461,6 @@ jobs:
- name: Upload to PPA - name: Upload to PPA
run: | run: |
VERSION="${{ github.ref_name }}"
cd distro/ubuntu/ppa cd distro/ubuntu/ppa
bash create-and-upload.sh ../dms dms questing bash create-and-upload.sh ../dms dms questing
@@ -457,11 +468,13 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: release needs: release
env: env:
TAG: ${{ github.ref_name }} TAG: ${{ inputs.tag }}
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
ref: ${{ inputs.tag }}
- name: Determine version - name: Determine version
id: version id: version
+4 -10
View File
@@ -130,12 +130,6 @@ jobs:
run: | run: |
PACKAGES="${{ steps.packages.outputs.packages }}" PACKAGES="${{ steps.packages.outputs.packages }}"
# Export to ensure it's available to subprocesses
if [ -n "$REBUILD_RELEASE" ]; then
export REBUILD_RELEASE
echo "✓ Using rebuild release number: ppa$REBUILD_RELEASE"
fi
if [[ "$PACKAGES" == "all" ]]; then if [[ "$PACKAGES" == "all" ]]; then
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "Uploading dms to PPA..." echo "Uploading dms to PPA..."
@@ -143,25 +137,25 @@ jobs:
echo "🔄 Using rebuild release number: ppa$REBUILD_RELEASE" echo "🔄 Using rebuild release number: ppa$REBUILD_RELEASE"
fi fi
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
REBUILD_RELEASE="$REBUILD_RELEASE" bash distro/scripts/ppa-upload.sh "distro/ubuntu/dms" dms questing bash distro/scripts/ppa-upload.sh "distro/ubuntu/dms" dms questing
echo "" echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "Uploading dms-git to PPA..." echo "Uploading dms-git to PPA..."
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
REBUILD_RELEASE="$REBUILD_RELEASE" bash distro/scripts/ppa-upload.sh "distro/ubuntu/dms-git" dms-git questing bash distro/scripts/ppa-upload.sh "distro/ubuntu/dms-git" dms-git questing
echo "" echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "Uploading dms-greeter to PPA..." echo "Uploading dms-greeter to PPA..."
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
REBUILD_RELEASE="$REBUILD_RELEASE" bash distro/scripts/ppa-upload.sh "distro/ubuntu/dms-greeter" danklinux questing bash distro/scripts/ppa-upload.sh "distro/ubuntu/dms-greeter" danklinux questing
else else
PPA_NAME="$PACKAGES" PPA_NAME="$PACKAGES"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "Uploading $PACKAGES to PPA..." echo "Uploading $PACKAGES to PPA..."
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
REBUILD_RELEASE="$REBUILD_RELEASE" bash distro/scripts/ppa-upload.sh "distro/ubuntu/$PACKAGES" "$PPA_NAME" questing bash distro/scripts/ppa-upload.sh "distro/ubuntu/$PACKAGES" "$PPA_NAME" questing
fi fi
- name: Summary - name: Summary
+1 -1
View File
@@ -344,7 +344,7 @@ func (a *ArchDistribution) InstallPackages(ctx context.Context, dependencies []d
a.log(fmt.Sprintf("Warning: failed to write window manager config: %v", err)) a.log(fmt.Sprintf("Warning: failed to write window manager config: %v", err))
} }
if err := a.EnableDMSService(ctx); err != nil { if err := a.EnableDMSService(ctx, wm); err != nil {
a.log(fmt.Sprintf("Warning: failed to enable dms service: %v", err)) a.log(fmt.Sprintf("Warning: failed to enable dms service: %v", err))
} }
+13 -1
View File
@@ -597,12 +597,24 @@ TERMINAL=%s
return nil return nil
} }
func (b *BaseDistribution) EnableDMSService(ctx context.Context) error { func (b *BaseDistribution) EnableDMSService(ctx context.Context, wm deps.WindowManager) error {
cmd := exec.CommandContext(ctx, "systemctl", "--user", "enable", "--now", "dms") cmd := exec.CommandContext(ctx, "systemctl", "--user", "enable", "--now", "dms")
if err := cmd.Run(); err != nil { if err := cmd.Run(); err != nil {
return fmt.Errorf("failed to enable dms service: %w", err) return fmt.Errorf("failed to enable dms service: %w", err)
} }
b.log("Enabled dms systemd user service") b.log("Enabled dms systemd user service")
switch wm {
case deps.WindowManagerNiri:
if err := exec.CommandContext(ctx, "systemctl", "--user", "add-wants", "niri.service", "dms").Run(); err != nil {
b.log("Warning: failed to add dms as a want for niri.service")
}
case deps.WindowManagerHyprland:
if err := exec.CommandContext(ctx, "systemctl", "--user", "add-wants", "hyprland-session.target", "dms").Run(); err != nil {
b.log("Warning: failed to add dms as a want for hyprland-session.target")
}
}
return nil return nil
} }
+1 -1
View File
@@ -312,7 +312,7 @@ func (d *DebianDistribution) InstallPackages(ctx context.Context, dependencies [
d.log(fmt.Sprintf("Warning: failed to write window manager config: %v", err)) d.log(fmt.Sprintf("Warning: failed to write window manager config: %v", err))
} }
if err := d.EnableDMSService(ctx); err != nil { if err := d.EnableDMSService(ctx, wm); err != nil {
d.log(fmt.Sprintf("Warning: failed to enable dms service: %v", err)) d.log(fmt.Sprintf("Warning: failed to enable dms service: %v", err))
} }
+1 -1
View File
@@ -353,7 +353,7 @@ func (f *FedoraDistribution) InstallPackages(ctx context.Context, dependencies [
f.log(fmt.Sprintf("Warning: failed to write window manager config: %v", err)) f.log(fmt.Sprintf("Warning: failed to write window manager config: %v", err))
} }
if err := f.EnableDMSService(ctx); err != nil { if err := f.EnableDMSService(ctx, wm); err != nil {
f.log(fmt.Sprintf("Warning: failed to enable dms service: %v", err)) f.log(fmt.Sprintf("Warning: failed to enable dms service: %v", err))
} }
+1 -1
View File
@@ -410,7 +410,7 @@ func (g *GentooDistribution) InstallPackages(ctx context.Context, dependencies [
g.log(fmt.Sprintf("Warning: failed to write window manager config: %v", err)) g.log(fmt.Sprintf("Warning: failed to write window manager config: %v", err))
} }
if err := g.EnableDMSService(ctx); err != nil { if err := g.EnableDMSService(ctx, wm); err != nil {
g.log(fmt.Sprintf("Warning: failed to enable dms service: %v", err)) g.log(fmt.Sprintf("Warning: failed to enable dms service: %v", err))
} }
+1 -1
View File
@@ -371,7 +371,7 @@ func (o *OpenSUSEDistribution) InstallPackages(ctx context.Context, dependencies
o.log(fmt.Sprintf("Warning: failed to write window manager config: %v", err)) o.log(fmt.Sprintf("Warning: failed to write window manager config: %v", err))
} }
if err := o.EnableDMSService(ctx); err != nil { if err := o.EnableDMSService(ctx, wm); err != nil {
o.log(fmt.Sprintf("Warning: failed to enable dms service: %v", err)) o.log(fmt.Sprintf("Warning: failed to enable dms service: %v", err))
} }
+1 -1
View File
@@ -331,7 +331,7 @@ func (u *UbuntuDistribution) InstallPackages(ctx context.Context, dependencies [
u.log(fmt.Sprintf("Warning: failed to write window manager config: %v", err)) u.log(fmt.Sprintf("Warning: failed to write window manager config: %v", err))
} }
if err := u.EnableDMSService(ctx); err != nil { if err := u.EnableDMSService(ctx, wm); err != nil {
u.log(fmt.Sprintf("Warning: failed to enable dms service: %v", err)) u.log(fmt.Sprintf("Warning: failed to enable dms service: %v", err))
} }
+13 -2
View File
@@ -6,6 +6,7 @@ import (
"os/exec" "os/exec"
"path/filepath" "path/filepath"
"sort" "sort"
"strconv"
"strings" "strings"
"github.com/AvengeMedia/DankMaterialShell/core/internal/keybinds" "github.com/AvengeMedia/DankMaterialShell/core/internal/keybinds"
@@ -153,6 +154,7 @@ func (n *NiriProvider) convertKeybind(kb *NiriKeyBinding, subcategory string, co
Subcategory: subcategory, Subcategory: subcategory,
Source: source, Source: source,
HideOnOverlay: kb.HideOnOverlay, HideOnOverlay: kb.HideOnOverlay,
CooldownMs: kb.CooldownMs,
} }
if source == "dms" && conflicts != nil { if source == "dms" && conflicts != nil {
@@ -310,7 +312,9 @@ func (n *NiriProvider) extractOptions(node *document.Node) map[string]any {
opts["repeat"] = val.String() == "true" opts["repeat"] = val.String() == "true"
} }
if val, ok := node.Properties.Get("cooldown-ms"); ok { if val, ok := node.Properties.Get("cooldown-ms"); ok {
opts["cooldown-ms"] = val.String() if ms, err := strconv.Atoi(val.String()); err == nil {
opts["cooldown-ms"] = ms
}
} }
if val, ok := node.Properties.Get("allow-when-locked"); ok { if val, ok := node.Properties.Get("allow-when-locked"); ok {
opts["allow-when-locked"] = val.String() == "true" opts["allow-when-locked"] = val.String() == "true"
@@ -336,7 +340,14 @@ func (n *NiriProvider) buildBindNode(bind *overrideBind) *document.Node {
node.AddProperty("repeat", false, "") node.AddProperty("repeat", false, "")
} }
if v, ok := bind.Options["cooldown-ms"]; ok { if v, ok := bind.Options["cooldown-ms"]; ok {
node.AddProperty("cooldown-ms", v, "") switch val := v.(type) {
case int:
node.AddProperty("cooldown-ms", val, "")
case string:
if ms, err := strconv.Atoi(val); err == nil {
node.AddProperty("cooldown-ms", ms, "")
}
}
} }
if v, ok := bind.Options["allow-when-locked"]; ok && v == true { if v, ok := bind.Options["allow-when-locked"]; ok && v == true {
node.AddProperty("allow-when-locked", true, "") node.AddProperty("allow-when-locked", true, "")
@@ -4,6 +4,7 @@ import (
"fmt" "fmt"
"os" "os"
"path/filepath" "path/filepath"
"strconv"
"strings" "strings"
"github.com/sblinch/kdl-go" "github.com/sblinch/kdl-go"
@@ -17,6 +18,7 @@ type NiriKeyBinding struct {
Args []string Args []string
Description string Description string
HideOnOverlay bool HideOnOverlay bool
CooldownMs int
Source string Source string
} }
@@ -275,6 +277,7 @@ func (p *NiriParser) parseKeybindNode(node *document.Node, _ string) *NiriKeyBin
var description string var description string
var hideOnOverlay bool var hideOnOverlay bool
var cooldownMs int
if node.Properties != nil { if node.Properties != nil {
if val, ok := node.Properties.Get("hotkey-overlay-title"); ok { if val, ok := node.Properties.Get("hotkey-overlay-title"); ok {
switch val.ValueString() { switch val.ValueString() {
@@ -284,6 +287,9 @@ func (p *NiriParser) parseKeybindNode(node *document.Node, _ string) *NiriKeyBin
description = val.ValueString() description = val.ValueString()
} }
} }
if val, ok := node.Properties.Get("cooldown-ms"); ok {
cooldownMs, _ = strconv.Atoi(val.String())
}
} }
return &NiriKeyBinding{ return &NiriKeyBinding{
@@ -293,6 +299,7 @@ func (p *NiriParser) parseKeybindNode(node *document.Node, _ string) *NiriKeyBin
Args: args, Args: args,
Description: description, Description: description,
HideOnOverlay: hideOnOverlay, HideOnOverlay: hideOnOverlay,
CooldownMs: cooldownMs,
Source: p.currentSource, Source: p.currentSource,
} }
} }
+1
View File
@@ -7,6 +7,7 @@ type Keybind struct {
Subcategory string `json:"subcat,omitempty"` Subcategory string `json:"subcat,omitempty"`
Source string `json:"source,omitempty"` Source string `json:"source,omitempty"`
HideOnOverlay bool `json:"hideOnOverlay,omitempty"` HideOnOverlay bool `json:"hideOnOverlay,omitempty"`
CooldownMs int `json:"cooldownMs,omitempty"`
Conflict *Keybind `json:"conflict,omitempty"` Conflict *Keybind `json:"conflict,omitempty"`
} }
+1 -2
View File
@@ -1,6 +1,5 @@
dms-git (1.0.0+git2419.993f14a3) nightly; urgency=medium dms-git (0.6.2+git2419.993f14a3) nightly; urgency=medium
* Major stable release v1.0.0
* widgets: make dank icon picker a popup * widgets: make dank icon picker a popup
* Previous updates included in build * Previous updates included in build
+3 -3
View File
@@ -3,19 +3,19 @@
<service name="download_url"> <service name="download_url">
<param name="protocol">https</param> <param name="protocol">https</param>
<param name="host">github.com</param> <param name="host">github.com</param>
<param name="path">/AvengeMedia/DankMaterialShell/archive/refs/tags/v1.0.0.tar.gz</param> <param name="path">/AvengeMedia/DankMaterialShell/archive/refs/tags/v0.6.2.tar.gz</param>
<param name="filename">dms-source.tar.gz</param> <param name="filename">dms-source.tar.gz</param>
</service> </service>
<!-- Download amd64 binary --> <!-- Download amd64 binary -->
<service name="download_url"> <service name="download_url">
<param name="protocol">https</param> <param name="protocol">https</param>
<param name="host">github.com</param> <param name="host">github.com</param>
<param name="path">/AvengeMedia/DankMaterialShell/releases/download/v1.0.0/dms-distropkg-amd64.gz</param> <param name="path">/AvengeMedia/DankMaterialShell/releases/download/v0.6.2/dms-distropkg-amd64.gz</param>
</service> </service>
<!-- Download arm64 binary --> <!-- Download arm64 binary -->
<service name="download_url"> <service name="download_url">
<param name="protocol">https</param> <param name="protocol">https</param>
<param name="host">github.com</param> <param name="host">github.com</param>
<param name="path">/AvengeMedia/DankMaterialShell/releases/download/v1.0.0/dms-distropkg-arm64.gz</param> <param name="path">/AvengeMedia/DankMaterialShell/releases/download/v0.6.2/dms-distropkg-arm64.gz</param>
</service> </service>
</services> </services>
+2 -3
View File
@@ -1,7 +1,6 @@
dms (1.0.0) stable; urgency=medium dms (0.6.2) stable; urgency=medium
* Update to v1.0.0 release * Update to v0.6.2 release
* Major stable release
* Fix binary download paths for OBS builds * Fix binary download paths for OBS builds
* Native format: removed revisions * Native format: removed revisions
+4 -10
View File
@@ -42,10 +42,8 @@ override_dh_auto_build:
elif [ -f dms-source.tar.gz ]; then \ elif [ -f dms-source.tar.gz ]; then \
tar -xzf dms-source.tar.gz; \ tar -xzf dms-source.tar.gz; \
fi; \ fi; \
SOURCE_DIR=$$(find . -maxdepth 1 -type d -name "DankMaterialShell-*" ! -name "DankMaterialShell-$(UPSTREAM_VERSION)" | head -n1); \ if [ ! -d DankMaterialShell-$(UPSTREAM_VERSION) ] && [ -d DankMaterialShell-0.6.2 ]; then \
if [ -n "$$SOURCE_DIR" ] && [ "$$SOURCE_DIR" != "./DankMaterialShell-$(UPSTREAM_VERSION)" ]; then \ mv DankMaterialShell-0.6.2 DankMaterialShell-$(UPSTREAM_VERSION); \
echo "Renaming $$SOURCE_DIR to DankMaterialShell-$(UPSTREAM_VERSION)"; \
mv "$$SOURCE_DIR" DankMaterialShell-$(UPSTREAM_VERSION); \
fi; \ fi; \
fi fi
@@ -55,12 +53,8 @@ override_dh_auto_install:
mkdir -p debian/dms/usr/share/quickshell/dms debian/dms/usr/lib/systemd/user mkdir -p debian/dms/usr/share/quickshell/dms debian/dms/usr/lib/systemd/user
# Handle directory name mismatch again for install step if needed # Handle directory name mismatch again for install step if needed
if [ ! -d DankMaterialShell-$(UPSTREAM_VERSION) ]; then \ if [ ! -d DankMaterialShell-$(UPSTREAM_VERSION) ] && [ -d DankMaterialShell-0.6.2 ]; then \
SOURCE_DIR=$$(find . -maxdepth 1 -type d -name "DankMaterialShell-*" | head -n1); \ mv DankMaterialShell-0.6.2 DankMaterialShell-$(UPSTREAM_VERSION); \
if [ -n "$$SOURCE_DIR" ]; then \
echo "Renaming $$SOURCE_DIR to DankMaterialShell-$(UPSTREAM_VERSION) for install"; \
mv "$$SOURCE_DIR" DankMaterialShell-$(UPSTREAM_VERSION); \
fi; \
fi fi
if [ -d DankMaterialShell-$(UPSTREAM_VERSION) ]; then \ if [ -d DankMaterialShell-$(UPSTREAM_VERSION) ]; then \
cp -r DankMaterialShell-$(UPSTREAM_VERSION)/quickshell/* debian/dms/usr/share/quickshell/dms/; \ cp -r DankMaterialShell-$(UPSTREAM_VERSION)/quickshell/* debian/dms/usr/share/quickshell/dms/; \
+10
View File
@@ -12,6 +12,14 @@ in
qmlPath = "${dmsPkgs.dms-shell}/share/quickshell/dms"; qmlPath = "${dmsPkgs.dms-shell}/share/quickshell/dms";
packages = [ packages = [
pkgs.material-symbols
pkgs.inter
pkgs.fira-code
pkgs.ddcutil
pkgs.libsForQt5.qt5ct
pkgs.kdePackages.qt6ct
dmsPkgs.dms-shell dmsPkgs.dms-shell
] ]
++ lib.optional cfg.enableSystemMonitoring dmsPkgs.dgop ++ lib.optional cfg.enableSystemMonitoring dmsPkgs.dgop
@@ -23,6 +31,8 @@ in
pkgs.glib pkgs.glib
pkgs.networkmanager pkgs.networkmanager
] ]
++ lib.optional cfg.enableBrightnessControl pkgs.brightnessctl
++ lib.optional cfg.enableColorPicker pkgs.hyprpicker
++ lib.optional cfg.enableDynamicTheming pkgs.matugen ++ lib.optional cfg.enableDynamicTheming pkgs.matugen
++ lib.optional cfg.enableAudioWavelength pkgs.cava ++ lib.optional cfg.enableAudioWavelength pkgs.cava
++ lib.optional cfg.enableCalendarEvents pkgs.khal ++ lib.optional cfg.enableCalendarEvents pkgs.khal
+10 -8
View File
@@ -63,14 +63,6 @@ in
allow-when-locked = true; allow-when-locked = true;
action = dms-ipc "audio" "micmute"; action = dms-ipc "audio" "micmute";
}; };
"XF86MonBrightnessUp" = {
allow-when-locked = true;
action = dms-ipc "brightness" "increment" "5" "";
};
"XF86MonBrightnessDown" = {
allow-when-locked = true;
action = dms-ipc "brightness" "decrement" "5" "";
};
"Mod+Alt+N" = { "Mod+Alt+N" = {
allow-when-locked = true; allow-when-locked = true;
action = dms-ipc "night" "toggle"; action = dms-ipc "night" "toggle";
@@ -88,6 +80,16 @@ in
action = dms-ipc "clipboard" "toggle"; action = dms-ipc "clipboard" "toggle";
hotkey-overlay.title = "Toggle Clipboard Manager"; hotkey-overlay.title = "Toggle Clipboard Manager";
}; };
}
// lib.attrsets.optionalAttrs cfg.enableBrightnessControl {
"XF86MonBrightnessUp" = {
allow-when-locked = true;
action = dms-ipc "brightness" "increment" "5" "";
};
"XF86MonBrightnessDown" = {
allow-when-locked = true;
action = dms-ipc "brightness" "decrement" "5" "";
};
}; };
}) })
-3
View File
@@ -40,8 +40,5 @@ in
}; };
environment.systemPackages = [ cfg.quickshell.package ] ++ common.packages; environment.systemPackages = [ cfg.quickshell.package ] ++ common.packages;
services.power-profiles-daemon.enable = lib.mkDefault true;
services.accounts-daemon.enable = lib.mkDefault true;
}; };
} }
+11 -11
View File
@@ -5,21 +5,11 @@
}: }:
let let
inherit (lib) types; inherit (lib) types;
path = [
"programs"
"dankMaterialShell"
];
builtInRemovedMsg = "This is now built-in in DMS and doesn't need additional dependencies.";
in in
{ {
imports = [
(lib.mkRemovedOptionModule (path ++ [ "enableBrightnessControl" ]) builtInRemovedMsg)
(lib.mkRemovedOptionModule (path ++ [ "enableColorPicker" ]) builtInRemovedMsg)
];
options.programs.dankMaterialShell = { options.programs.dankMaterialShell = {
enable = lib.mkEnableOption "DankMaterialShell"; enable = lib.mkEnableOption "DankMaterialShell";
systemd = { systemd = {
enable = lib.mkEnableOption "DankMaterialShell systemd startup"; enable = lib.mkEnableOption "DankMaterialShell systemd startup";
restartIfChanged = lib.mkOption { restartIfChanged = lib.mkOption {
@@ -43,6 +33,16 @@ in
default = true; default = true;
description = "Add needed dependencies to use the VPN widget"; description = "Add needed dependencies to use the VPN widget";
}; };
enableBrightnessControl = lib.mkOption {
type = types.bool;
default = true;
description = "Add needed dependencies to have brightness/backlight support";
};
enableColorPicker = lib.mkOption {
type = types.bool;
default = true;
description = "Add needed dependencies to have color picking support";
};
enableDynamicTheming = lib.mkOption { enableDynamicTheming = lib.mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
+1 -1
View File
@@ -3,7 +3,7 @@
%global debug_package %{nil} %global debug_package %{nil}
Name: dms Name: dms
Version: 1.0.0 Version: 0.6.2
Release: 1%{?dist} Release: 1%{?dist}
Summary: DankMaterialShell - Material 3 inspired shell for Wayland compositors Summary: DankMaterialShell - Material 3 inspired shell for Wayland compositors
-228
View File
@@ -1,228 +0,0 @@
#!/bin/bash
set -euo pipefail
# Build SRPM locally with correct tarball and upload to Copr
# Usage: ./create-upload-copr.sh VERSION [RELEASE]
# Example: ./create-upload-copr.sh 1.0.0 4
VERSION="${1:-1.0.0}"
RELEASE="${2:-1}"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
echo "Building DMS v${VERSION}-${RELEASE} SRPM for Copr..."
# Setup build directories
mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
cd ~/rpmbuild/SOURCES
# Create the corrected QML tarball locally
echo "Creating QML tarball with assets..."
TEMP_DIR=$(mktemp -d)
cd "$REPO_ROOT"
# Copy quickshell contents to temp
cp -r quickshell/* "$TEMP_DIR/"
# Copy root LICENSE and CONTRIBUTING.md
cp LICENSE CONTRIBUTING.md "$TEMP_DIR/"
# Copy root assets directory (this is what was missing!)
cp -r assets "$TEMP_DIR/"
# Create tarball
cd "$TEMP_DIR"
tar --exclude='.git' \
--exclude='.github' \
--exclude='*.tar.gz' \
-czf ~/rpmbuild/SOURCES/dms-qml.tar.gz .
cd ~/rpmbuild/SOURCES
echo "Created dms-qml.tar.gz with md5sum: $(md5sum dms-qml.tar.gz | awk '{print $1}')"
rm -rf "$TEMP_DIR"
# Generate spec file
echo "Generating spec file..."
CHANGELOG_DATE="$(date '+%a %b %d %Y')"
cat > ~/rpmbuild/SPECS/dms.spec <<'SPECEOF'
# Spec for DMS stable releases - Built locally
%global debug_package %{nil}
%global version VERSION_PLACEHOLDER
%global pkg_summary DankMaterialShell - Material 3 inspired shell for Wayland compositors
Name: dms
Version: %{version}
Release: RELEASE_PLACEHOLDER%{?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 = %{version}-%{release}
Requires: dgop
Recommends: cava
Recommends: cliphist
Recommends: danksearch
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.
%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/download/v%{version}/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
%build
%install
install -Dm755 %{_builddir}/dms-cli %{buildroot}%{_bindir}/dms
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 assets/systemd/dms.service %{buildroot}%{_userunitdir}/dms.service
install -Dm644 assets/dms-open.desktop %{buildroot}%{_datadir}/applications/dms-open.desktop
install -Dm644 assets/danklogo.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/danklogo.svg
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
echo "%{version}" > %{buildroot}%{_datadir}/quickshell/dms/VERSION
%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
# Signal running DMS instances to reload
pkill -USR1 -x dms >/dev/null 2>&1 || :
%files
%license LICENSE
%doc README.md CONTRIBUTING.md
%{_datadir}/quickshell/dms/
%{_userunitdir}/dms.service
%{_datadir}/applications/dms-open.desktop
%{_datadir}/icons/hicolor/scalable/apps/danklogo.svg
%files -n dms-cli
%{_bindir}/dms
%{_datadir}/bash-completion/completions/dms
%{_datadir}/zsh/site-functions/_dms
%{_datadir}/fish/vendor_completions.d/dms.fish
%changelog
* CHANGELOG_DATE_PLACEHOLDER AvengeMedia <contact@avengemedia.com> - VERSION_PLACEHOLDER-1
- Stable release VERSION_PLACEHOLDER
- Built locally with corrected tarball
SPECEOF
sed -i "s/VERSION_PLACEHOLDER/${VERSION}/g" ~/rpmbuild/SPECS/dms.spec
sed -i "s/RELEASE_PLACEHOLDER/${RELEASE}/g" ~/rpmbuild/SPECS/dms.spec
sed -i "s/CHANGELOG_DATE_PLACEHOLDER/${CHANGELOG_DATE}/g" ~/rpmbuild/SPECS/dms.spec
# Build SRPM
echo "Building SRPM..."
cd ~/rpmbuild/SPECS
rpmbuild -bs dms.spec
SRPM=$(ls ~/rpmbuild/SRPMS/dms-${VERSION}-*.src.rpm | tail -n 1)
if [ ! -f "$SRPM" ]; then
echo "Error: SRPM not found!"
exit 1
fi
echo "SRPM built successfully: $SRPM"
# Check if copr-cli is installed
if ! command -v copr-cli &> /dev/null; then
echo ""
echo "copr-cli is not installed. Install it with:"
echo " pip install copr-cli"
echo ""
echo "Then configure it with your Copr API token in ~/.config/copr"
echo ""
echo "SRPM is ready at: $SRPM"
echo "Upload manually with: copr-cli build avengemedia/dms $SRPM"
exit 0
fi
# Upload to Copr
echo ""
echo "Uploading to Copr..."
if copr-cli build avengemedia/dms "$SRPM" --nowait; then
echo ""
echo "Build submitted successfully! Check status at:"
echo "https://copr.fedorainfracloud.org/coprs/avengemedia/dms/builds/"
else
echo ""
echo "Copr upload failed. You can manually upload the SRPM:"
echo " copr-cli build avengemedia/dms $SRPM"
echo ""
echo "Or upload via web interface:"
echo " https://copr.fedorainfracloud.org/coprs/avengemedia/dms/builds/"
echo ""
echo "SRPM location: $SRPM"
exit 1
fi
+12 -70
View File
@@ -672,20 +672,7 @@ if [[ "$UPLOAD_DEBIAN" == true ]] && [[ "$SOURCE_FORMAT" == *"native"* ]] && [[
if [[ "$IS_MANUAL" == true ]]; then if [[ "$IS_MANUAL" == true ]]; then
echo "==> Detected rebuild of same base version $CHANGELOG_BASE, incrementing version" echo "==> Detected rebuild of same base version $CHANGELOG_BASE, incrementing version"
# If REBUILD_RELEASE is set, use that number directly if [[ "$CHANGELOG_VERSION" =~ ^([0-9.]+)\+git$ ]]; then
if [[ -n "${REBUILD_RELEASE:-}" ]]; then
if [[ "$CHANGELOG_VERSION" =~ ^([0-9.]+)\+git([0-9]+)(\.[a-f0-9]+)?$ ]]; then
BASE_VERSION="${BASH_REMATCH[1]}"
GIT_NUM="${BASH_REMATCH[2]}"
GIT_HASH="${BASH_REMATCH[3]}"
NEW_VERSION="${BASE_VERSION}+git${GIT_NUM}${GIT_HASH}ppa${REBUILD_RELEASE}"
echo " Using REBUILD_RELEASE=$REBUILD_RELEASE: $CHANGELOG_VERSION -> $NEW_VERSION"
else
BASE_VERSION=$(echo "$CHANGELOG_VERSION" | sed 's/ppa[0-9]*$//')
NEW_VERSION="${BASE_VERSION}ppa${REBUILD_RELEASE}"
echo " Using REBUILD_RELEASE=$REBUILD_RELEASE: $CHANGELOG_VERSION -> $NEW_VERSION"
fi
elif [[ "$CHANGELOG_VERSION" =~ ^([0-9.]+)\+git$ ]]; then
BASE_VERSION="${BASH_REMATCH[1]}" BASE_VERSION="${BASH_REMATCH[1]}"
NEW_VERSION="${BASE_VERSION}+gitppa1" NEW_VERSION="${BASE_VERSION}+gitppa1"
echo " Adding PPA number: $CHANGELOG_VERSION -> $NEW_VERSION" echo " Adding PPA number: $CHANGELOG_VERSION -> $NEW_VERSION"
@@ -717,27 +704,11 @@ if [[ "$UPLOAD_DEBIAN" == true ]] && [[ "$SOURCE_FORMAT" == *"native"* ]] && [[
fi fi
elif [[ "$CHANGELOG_VERSION" =~ ^([0-9.]+)(-([0-9]+))?$ ]]; then elif [[ "$CHANGELOG_VERSION" =~ ^([0-9.]+)(-([0-9]+))?$ ]]; then
BASE_VERSION="${BASH_REMATCH[1]}" BASE_VERSION="${BASH_REMATCH[1]}"
# Check if old DSC has ppa suffix even if changelog doesn't NEW_VERSION="${BASE_VERSION}ppa1"
if [[ "$OLD_DSC_VERSION" =~ ppa([0-9]+)$ ]]; then echo " Warning: Native format cannot have Debian revision, converting to PPA format: $CHANGELOG_VERSION -> $NEW_VERSION"
OLD_PPA_NUM="${BASH_REMATCH[1]}"
NEW_PPA_NUM=$((OLD_PPA_NUM + 1))
NEW_VERSION="${BASE_VERSION}ppa${NEW_PPA_NUM}"
echo " Incrementing PPA number from old DSC: $OLD_DSC_VERSION -> $NEW_VERSION"
else
NEW_VERSION="${BASE_VERSION}ppa1"
echo " Adding PPA number: $CHANGELOG_VERSION -> $NEW_VERSION"
fi
else else
# Check if old DSC has ppa suffix for unknown formats NEW_VERSION="${CHANGELOG_VERSION}ppa1"
if [[ "$OLD_DSC_VERSION" =~ ppa([0-9]+)$ ]]; then echo " Warning: Could not parse version format, appending ppa1: $CHANGELOG_VERSION -> $NEW_VERSION"
OLD_PPA_NUM="${BASH_REMATCH[1]}"
NEW_PPA_NUM=$((OLD_PPA_NUM + 1))
NEW_VERSION="${CHANGELOG_VERSION}ppa${NEW_PPA_NUM}"
echo " Incrementing PPA number from old DSC: $OLD_DSC_VERSION -> $NEW_VERSION"
else
NEW_VERSION="${CHANGELOG_VERSION}ppa1"
echo " Warning: Could not parse version format, appending ppa1: $CHANGELOG_VERSION -> $NEW_VERSION"
fi
fi fi
if [[ -z "$SOURCE_DIR" ]] || [[ ! -d "$SOURCE_DIR" ]] || [[ ! -d "$SOURCE_DIR/debian" ]]; then if [[ -z "$SOURCE_DIR" ]] || [[ ! -d "$SOURCE_DIR" ]] || [[ ! -d "$SOURCE_DIR/debian" ]]; then
@@ -792,15 +763,7 @@ if [[ "$UPLOAD_DEBIAN" == true ]] && [[ "$SOURCE_FORMAT" == *"native"* ]] && [[
echo " Renaming $EXTRACTED to $EXPECTED_SOURCE_DIR" echo " Renaming $EXTRACTED to $EXPECTED_SOURCE_DIR"
mv "$EXTRACTED" "$EXPECTED_SOURCE_DIR" mv "$EXTRACTED" "$EXPECTED_SOURCE_DIR"
rm -f "$WORK_DIR/dms-source.tar.gz" rm -f "$WORK_DIR/dms-source.tar.gz"
if ! tar --sort=name --mtime='2000-01-01 00:00:00' --owner=0 --group=0 -czf "$WORK_DIR/dms-source.tar.gz" "$EXPECTED_SOURCE_DIR"; then tar --sort=name --mtime='2000-01-01 00:00:00' --owner=0 --group=0 -czf "$WORK_DIR/dms-source.tar.gz" "$EXPECTED_SOURCE_DIR"
echo " Error: Failed to create dms-source.tar.gz"
ls -lah "$EXPECTED_SOURCE_DIR" | head -20
exit 1
fi
if [[ ! -f "$WORK_DIR/dms-source.tar.gz" ]]; then
echo " Error: dms-source.tar.gz was not created"
exit 1
fi
ROOT_DIR=$(tar -tf "$WORK_DIR/dms-source.tar.gz" | head -1 | cut -d/ -f1) ROOT_DIR=$(tar -tf "$WORK_DIR/dms-source.tar.gz" | head -1 | cut -d/ -f1)
if [[ "$ROOT_DIR" != "$EXPECTED_SOURCE_DIR" ]]; then if [[ "$ROOT_DIR" != "$EXPECTED_SOURCE_DIR" ]]; then
echo " Error: Recreated tarball has wrong root directory: $ROOT_DIR (expected $EXPECTED_SOURCE_DIR)" echo " Error: Recreated tarball has wrong root directory: $ROOT_DIR (expected $EXPECTED_SOURCE_DIR)"
@@ -876,7 +839,11 @@ if [[ "$UPLOAD_DEBIAN" == true ]] && [[ "$SOURCE_FORMAT" == *"native"* ]] && [[
tar --sort=name --mtime='2000-01-01 00:00:00' --owner=0 --group=0 -czf "$WORK_DIR/$COMBINED_TARBALL" "$TARBALL_BASE" tar --sort=name --mtime='2000-01-01 00:00:00' --owner=0 --group=0 -czf "$WORK_DIR/$COMBINED_TARBALL" "$TARBALL_BASE"
cd "$REPO_ROOT" cd "$REPO_ROOT"
fi fi
else
echo "==> Detected same version. Not a manual run, skipping Debian version increment."
echo "✅ No changes needed for Debian. Exiting."
exit 0
fi
TARBALL_SIZE=$(stat -c%s "$WORK_DIR/$COMBINED_TARBALL" 2>/dev/null || stat -f%z "$WORK_DIR/$COMBINED_TARBALL" 2>/dev/null) TARBALL_SIZE=$(stat -c%s "$WORK_DIR/$COMBINED_TARBALL" 2>/dev/null || stat -f%z "$WORK_DIR/$COMBINED_TARBALL" 2>/dev/null)
TARBALL_MD5=$(md5sum "$WORK_DIR/$COMBINED_TARBALL" | cut -d' ' -f1) TARBALL_MD5=$(md5sum "$WORK_DIR/$COMBINED_TARBALL" | cut -d' ' -f1)
@@ -917,40 +884,15 @@ Files:
$TARBALL_MD5 $TARBALL_SIZE $COMBINED_TARBALL $TARBALL_MD5 $TARBALL_SIZE $COMBINED_TARBALL
EOF EOF
echo " - Updated changelog and recreated tarball with version $NEW_VERSION" echo " - Updated changelog and recreated tarball with version $NEW_VERSION"
else
echo "==> Detected same version. Not a manual run, skipping Debian version increment."
echo "✅ No changes needed for Debian. Exiting."
exit 0
fi
fi fi
fi fi
# Ensure we're in WORK_DIR and it exists
if [[ ! -d "$WORK_DIR" ]]; then
echo "ERROR: WORK_DIR does not exist: $WORK_DIR"
exit 1
fi
cd "$WORK_DIR" || {
echo "ERROR: Cannot cd to WORK_DIR: $WORK_DIR"
exit 1
}
find . -maxdepth 1 -type f \( -name "*.dsc" -o -name "*.spec" \) -exec grep -l "^<<<<<<< " {} \; 2>/dev/null | while read -r conflicted_file; do find . -maxdepth 1 -type f \( -name "*.dsc" -o -name "*.spec" \) -exec grep -l "^<<<<<<< " {} \; 2>/dev/null | while read -r conflicted_file; do
echo " Removing conflicted text file: $conflicted_file" echo " Removing conflicted text file: $conflicted_file"
rm -f "$conflicted_file" rm -f "$conflicted_file"
done done
# Ensure we're STILL in WORK_DIR before running osc commands
cd "$WORK_DIR" || {
echo "ERROR: Cannot cd to WORK_DIR: $WORK_DIR"
exit 1
}
echo "DEBUG: Current directory: $(pwd)"
echo "DEBUG: WORK_DIR=$WORK_DIR"
echo "DEBUG: Files in directory:"
ls -la 2>&1 | head -20
echo "==> Staging changes" echo "==> Staging changes"
echo "Files to upload:" echo "Files to upload:"
if [[ "$UPLOAD_DEBIAN" == true ]] && [[ "$UPLOAD_OPENSUSE" == true ]]; then if [[ "$UPLOAD_DEBIAN" == true ]] && [[ "$UPLOAD_OPENSUSE" == true ]]; then
+26 -57
View File
@@ -50,15 +50,9 @@ fi
# Get absolute path # Get absolute path
PACKAGE_DIR=$(cd "$PACKAGE_DIR" && pwd) PACKAGE_DIR=$(cd "$PACKAGE_DIR" && pwd)
PACKAGE_NAME=$(basename "$PACKAGE_DIR") PACKAGE_NAME=$(basename "$PACKAGE_DIR")
PACKAGE_PARENT=$(dirname "$PACKAGE_DIR")
# Create temporary working directory (like OBS)
TEMP_WORK_DIR=$(mktemp -d -t ppa_build_work_XXXXXX)
trap "rm -rf '$TEMP_WORK_DIR'" EXIT
info "Building source package for: $PACKAGE_NAME" info "Building source package for: $PACKAGE_NAME"
info "Package directory: $PACKAGE_DIR" info "Package directory: $PACKAGE_DIR"
info "Working directory: $TEMP_WORK_DIR"
info "Target Ubuntu series: $UBUNTU_SERIES" info "Target Ubuntu series: $UBUNTU_SERIES"
# Check for required files # Check for required files
@@ -125,13 +119,8 @@ elif [[ -z "${GITHUB_ACTIONS:-}" ]] && [[ -z "${CI:-}" ]]; then
echo "==> Local/manual run detected (not in CI)" echo "==> Local/manual run detected (not in CI)"
fi fi
# Copy package to temp working directory
info "Copying package to working directory..."
cp -r "$PACKAGE_DIR" "$TEMP_WORK_DIR/"
WORK_PACKAGE_DIR="$TEMP_WORK_DIR/$PACKAGE_NAME"
# Detect package type and update version automatically # Detect package type and update version automatically
cd "$WORK_PACKAGE_DIR" cd "$PACKAGE_DIR"
# Function to get latest tag from GitHub # Function to get latest tag from GitHub
get_latest_tag() { get_latest_tag() {
@@ -294,29 +283,22 @@ if [ "$IS_GIT_PACKAGE" = true ] && [ -n "$GIT_REPO" ]; then
# Check if we're rebuilding the same commit (increment PPA number if so) # Check if we're rebuilding the same commit (increment PPA number if so)
BASE_VERSION="${UPSTREAM_VERSION}+git${GIT_COMMIT_COUNT}.${GIT_COMMIT_HASH}" BASE_VERSION="${UPSTREAM_VERSION}+git${GIT_COMMIT_COUNT}.${GIT_COMMIT_HASH}"
CURRENT_VERSION=$(dpkg-parsechangelog -S Version 2>/dev/null || echo "") CURRENT_VERSION=$(dpkg-parsechangelog -S Version 2>/dev/null || echo "")
PPA_NUM=1
# Use REBUILD_RELEASE if provided, otherwise auto-increment # If current version matches the base version, increment PPA number
if [[ -n "${REBUILD_RELEASE:-}" ]]; then # Escape special regex characters in BASE_VERSION for pattern matching
PPA_NUM=$REBUILD_RELEASE ESCAPED_BASE=$(echo "$BASE_VERSION" | sed 's/\./\\./g' | sed 's/+/\\+/g')
info "Using REBUILD_RELEASE=$REBUILD_RELEASE for PPA number" if [[ "$CURRENT_VERSION" =~ ^${ESCAPED_BASE}ppa([0-9]+)$ ]]; then
else PPA_NUM=$((BASH_REMATCH[1] + 1))
PPA_NUM=1 if [[ "$IS_MANUAL" == true ]]; then
info "Detected rebuild of same commit (current: $CURRENT_VERSION), incrementing PPA number to $PPA_NUM"
# If current version matches the base version, increment PPA number
# Escape special regex characters in BASE_VERSION for pattern matching
ESCAPED_BASE=$(echo "$BASE_VERSION" | sed 's/\./\\./g' | sed 's/+/\\+/g')
if [[ "$CURRENT_VERSION" =~ ^${ESCAPED_BASE}ppa([0-9]+)$ ]]; then
PPA_NUM=$((BASH_REMATCH[1] + 1))
if [[ "$IS_MANUAL" == true ]]; then
info "Detected rebuild of same commit (current: $CURRENT_VERSION), incrementing PPA number to $PPA_NUM"
else
info "Detected rebuild of same commit (current: $CURRENT_VERSION). Not a manual run, skipping."
success "No changes needed (commit matches)."
exit 0
fi
else else
info "New commit or first build, using PPA number $PPA_NUM" info "Detected rebuild of same commit (current: $CURRENT_VERSION). Not a manual run, skipping."
success "No changes needed (commit matches)."
exit 0
fi fi
else
info "New commit or first build, using PPA number $PPA_NUM"
fi fi
NEW_VERSION="${BASE_VERSION}ppa${PPA_NUM}" NEW_VERSION="${BASE_VERSION}ppa${PPA_NUM}"
@@ -447,23 +429,16 @@ elif [ -n "$GIT_REPO" ]; then
# Get current version to check if we need to increment PPA number # Get current version to check if we need to increment PPA number
CURRENT_VERSION=$(dpkg-parsechangelog -S Version 2>/dev/null || echo "") CURRENT_VERSION=$(dpkg-parsechangelog -S Version 2>/dev/null || echo "")
PPA_NUM=1
# Use REBUILD_RELEASE if provided, otherwise auto-increment
if [[ -n "${REBUILD_RELEASE:-}" ]]; then
PPA_NUM=$REBUILD_RELEASE
info "Using REBUILD_RELEASE=$REBUILD_RELEASE for PPA number"
else
PPA_NUM=1
fi
if [[ "$SOURCE_FORMAT" == *"native"* ]]; then if [[ "$SOURCE_FORMAT" == *"native"* ]]; then
# Native format: 0.2.1ppa1 (no dash, no revision) # Native format: 0.2.1ppa1 (no dash, no revision)
BASE_VERSION="${LATEST_TAG}" BASE_VERSION="${LATEST_TAG}"
# Check if we're rebuilding the same version (increment PPA number if so) # Check if we're rebuilding the same version (increment PPA number if so)
if [[ -z "${REBUILD_RELEASE:-}" ]] && [[ "$CURRENT_VERSION" =~ ^${LATEST_TAG}ppa([0-9]+)$ ]]; then if [[ "$CURRENT_VERSION" =~ ^${LATEST_TAG}ppa([0-9]+)$ ]]; then
PPA_NUM=$((BASH_REMATCH[1] + 1)) PPA_NUM=$((BASH_REMATCH[1] + 1))
info "Detected rebuild of same version (current: $CURRENT_VERSION), incrementing PPA number to $PPA_NUM" info "Detected rebuild of same version (current: $CURRENT_VERSION), incrementing PPA number to $PPA_NUM"
elif [[ -z "${REBUILD_RELEASE:-}" ]]; then else
info "New version or first build, using PPA number $PPA_NUM" info "New version or first build, using PPA number $PPA_NUM"
fi fi
NEW_VERSION="${BASE_VERSION}ppa${PPA_NUM}" NEW_VERSION="${BASE_VERSION}ppa${PPA_NUM}"
@@ -472,7 +447,7 @@ elif [ -n "$GIT_REPO" ]; then
BASE_VERSION="${LATEST_TAG}-1" BASE_VERSION="${LATEST_TAG}-1"
# Check if we're rebuilding the same version (increment PPA number if so) # Check if we're rebuilding the same version (increment PPA number if so)
ESCAPED_BASE=$(echo "$BASE_VERSION" | sed 's/\./\\./g' | sed 's/-/\\-/g') ESCAPED_BASE=$(echo "$BASE_VERSION" | sed 's/\./\\./g' | sed 's/-/\\-/g')
if [[ -z "${REBUILD_RELEASE:-}" ]] && [[ "$CURRENT_VERSION" =~ ^${ESCAPED_BASE}ppa([0-9]+)$ ]]; then if [[ "$CURRENT_VERSION" =~ ^${ESCAPED_BASE}ppa([0-9]+)$ ]]; then
PPA_NUM=$((BASH_REMATCH[1] + 1)) PPA_NUM=$((BASH_REMATCH[1] + 1))
if [[ "$IS_MANUAL" == true ]]; then if [[ "$IS_MANUAL" == true ]]; then
info "Detected rebuild of same version (current: $CURRENT_VERSION), incrementing PPA number to $PPA_NUM" info "Detected rebuild of same version (current: $CURRENT_VERSION), incrementing PPA number to $PPA_NUM"
@@ -481,7 +456,7 @@ elif [ -n "$GIT_REPO" ]; then
success "No changes needed (version matches)." success "No changes needed (version matches)."
exit 0 exit 0
fi fi
elif [[ -z "${REBUILD_RELEASE:-}" ]]; then else
info "New version or first build, using PPA number $PPA_NUM" info "New version or first build, using PPA number $PPA_NUM"
fi fi
NEW_VERSION="${BASE_VERSION}ppa${PPA_NUM}" NEW_VERSION="${BASE_VERSION}ppa${PPA_NUM}"
@@ -600,12 +575,10 @@ info "Building source package..."
echo echo
# Determine if we need to include orig tarball (-sa) or just debian changes (-sd) # Determine if we need to include orig tarball (-sa) or just debian changes (-sd)
# Check if .orig.tar.xz already exists in real parent directory (previous build) # Check if .orig.tar.xz already exists in parent directory (previous build)
ORIG_TARBALL="${PACKAGE_NAME}_${VERSION%.ppa*}.orig.tar.xz" ORIG_TARBALL="${PACKAGE_NAME}_${VERSION%.ppa*}.orig.tar.xz"
if [ -f "$PACKAGE_PARENT/$ORIG_TARBALL" ]; then if [ -f "../$ORIG_TARBALL" ]; then
info "Found existing orig tarball in $PACKAGE_PARENT, using -sd (debian changes only)" info "Found existing orig tarball, using -sd (debian changes only)"
# Copy it to temp parent so debuild can find it
cp "$PACKAGE_PARENT/$ORIG_TARBALL" "$TEMP_WORK_DIR/"
DEBUILD_SOURCE_FLAG="-sd" DEBUILD_SOURCE_FLAG="-sd"
else else
info "No existing orig tarball found, using -sa (include original source)" info "No existing orig tarball found, using -sa (include original source)"
@@ -619,19 +592,15 @@ if yes | DEBIAN_FRONTEND=noninteractive debuild -S $DEBUILD_SOURCE_FLAG -d; then
echo echo
success "Source package built successfully!" success "Source package built successfully!"
# Copy build artifacts back to parent directory
info "Copying build artifacts to $PACKAGE_PARENT..."
cp -v "$TEMP_WORK_DIR"/${SOURCE_NAME}_${CHANGELOG_VERSION}* "$PACKAGE_PARENT/" 2>/dev/null || true
# List generated files # List generated files
info "Generated files in $PACKAGE_PARENT:" info "Generated files in $(dirname "$PACKAGE_DIR"):"
ls -lh "$PACKAGE_PARENT"/${SOURCE_NAME}_${CHANGELOG_VERSION}* 2>/dev/null || true ls -lh "$(dirname "$PACKAGE_DIR")"/${SOURCE_NAME}_${CHANGELOG_VERSION}* 2>/dev/null || true
# Show what to do next # Show what to do next
echo echo
info "Next steps:" info "Next steps:"
echo " 1. Review the source package:" echo " 1. Review the source package:"
echo " cd $PACKAGE_PARENT" echo " cd $(dirname "$PACKAGE_DIR")"
echo " ls -lh ${SOURCE_NAME}_${CHANGELOG_VERSION}*" echo " ls -lh ${SOURCE_NAME}_${CHANGELOG_VERSION}*"
echo echo
echo " 2. Upload to PPA (stable):" echo " 2. Upload to PPA (stable):"
@@ -641,7 +610,7 @@ if yes | DEBIAN_FRONTEND=noninteractive debuild -S $DEBUILD_SOURCE_FLAG -d; then
echo " dput ppa:avengemedia/dms-git ${SOURCE_NAME}_${CHANGELOG_VERSION}_source.changes" echo " dput ppa:avengemedia/dms-git ${SOURCE_NAME}_${CHANGELOG_VERSION}_source.changes"
echo echo
echo " 4. Or use the upload script:" echo " 4. Or use the upload script:"
echo " ./upload-ppa.sh $PACKAGE_PARENT/${SOURCE_NAME}_${CHANGELOG_VERSION}_source.changes dms" echo " ./upload-ppa.sh $(dirname "$PACKAGE_DIR")/${SOURCE_NAME}_${CHANGELOG_VERSION}_source.changes dms"
else else
error "Source package build failed!" error "Source package build failed!"
+2 -32
View File
@@ -150,38 +150,7 @@ fi
info "Uploading to Launchpad..." info "Uploading to Launchpad..."
echo echo
UPLOAD_SUCCESS=false if dput "ppa:avengemedia/$PPA_NAME" "$CHANGES_FILE"; then
if [ "$UPLOAD_METHOD" = "dput" ]; then
if dput "ppa:avengemedia/$PPA_NAME" "$CHANGES_FILE"; then
UPLOAD_SUCCESS=true
fi
elif [ "$UPLOAD_METHOD" = "lftp" ]; then
# Use lftp to upload to Launchpad PPA
CHANGES_DIR=$(dirname "$CHANGES_FILE")
CHANGES_BASENAME=$(basename "$CHANGES_FILE")
# Extract files to upload from .changes file
FILES_TO_UPLOAD=("$CHANGES_BASENAME")
while IFS= read -r line; do
if [[ "$line" =~ ^\ [a-f0-9]+\ [0-9]+\ [^\ ]+\ [^\ ]+\ (.+)$ ]]; then
FILES_TO_UPLOAD+=("${BASH_REMATCH[1]}")
fi
done < "$CHANGES_FILE"
# Build lftp command to upload all files
LFTP_COMMANDS="set ftp:ssl-allow no; open ftp://ppa.launchpad.net; user anonymous ''; cd ~avengemedia/ubuntu/$PPA_NAME/;"
for file in "${FILES_TO_UPLOAD[@]}"; do
LFTP_COMMANDS="$LFTP_COMMANDS put '$CHANGES_DIR/$file';"
done
LFTP_COMMANDS="$LFTP_COMMANDS bye"
if echo "$LFTP_COMMANDS" | lftp; then
UPLOAD_SUCCESS=true
fi
fi
if [ "$UPLOAD_SUCCESS" = true ]; then
echo echo
success "Upload successful!" success "Upload successful!"
echo echo
@@ -197,6 +166,7 @@ if [ "$UPLOAD_SUCCESS" = true ]; then
echo " sudo add-apt-repository ppa:avengemedia/$PPA_NAME" echo " sudo add-apt-repository ppa:avengemedia/$PPA_NAME"
echo " sudo apt update" echo " sudo apt update"
echo " sudo apt install $PACKAGE_NAME" echo " sudo apt install $PACKAGE_NAME"
else else
error "Upload failed!" error "Upload failed!"
echo echo
+3 -3
View File
@@ -1,5 +1,5 @@
dms (1.0.0ppa4) questing; urgency=medium dms (0.6.2ppa3) questing; urgency=medium
* Rebuild for packaging fixes (ppa4) * Rebuild for packaging fixes (ppa3)
-- Avenge Media <AvengeMedia.US@gmail.com> Wed, 10 Dec 2025 12:56:23 -0500 -- Avenge Media <AvengeMedia.US@gmail.com> Sun, 23 Nov 2025 00:40:41 -0500
+1 -1
View File
@@ -1 +1 @@
dms_1.0.0ppa4_source.buildinfo x11 optional dms_0.6.2ppa3_source.buildinfo x11 optional
+14 -20
View File
@@ -29,31 +29,16 @@ override_dh_auto_build:
# Extract source tarball for QML files # Extract source tarball for QML files
tar -xzf dms-source.tar.gz tar -xzf dms-source.tar.gz
# Find the extracted directory (it might have various names) # Find the extracted directory (it might have various names)
# and rename it to the expected BASE_VERSION name for consistent install # and create a symlink to expected name for consistent install
SOURCE_DIR=$$(find . -maxdepth 1 -type d -name "DankMaterialShell-*" ! -name "DankMaterialShell-$(BASE_VERSION)" | head -n1); \ SOURCE_DIR=$$(find . -maxdepth 1 -type d -name "DankMaterialShell*" | head -n1); \
if [ -n "$$SOURCE_DIR" ] && [ "$$SOURCE_DIR" != "./DankMaterialShell-$(BASE_VERSION)" ]; then \ if [ -n "$$SOURCE_DIR" ]; then \
echo "Renaming $$SOURCE_DIR to DankMaterialShell-$(BASE_VERSION)"; \ ln -sf $$SOURCE_DIR DankMaterialShell-$(BASE_VERSION); \
mv "$$SOURCE_DIR" DankMaterialShell-$(BASE_VERSION); \
elif [ ! -d "DankMaterialShell-$(BASE_VERSION)" ]; then \
echo "ERROR: No DankMaterialShell directory found after extraction!"; \
ls -la; \
exit 1; \
fi fi
override_dh_auto_install: override_dh_auto_install:
# Install binary # Install binary
install -Dm755 dms debian/dms/usr/bin/dms install -Dm755 dms debian/dms/usr/bin/dms
# Install systemd user service (before copying everything else)
install -Dm644 DankMaterialShell-$(BASE_VERSION)/assets/systemd/dms.service \
debian/dms/usr/lib/systemd/user/dms.service
# Install desktop file and icon
install -Dm644 DankMaterialShell-$(BASE_VERSION)/assets/dms-open.desktop \
debian/dms/usr/share/applications/dms-open.desktop
install -Dm644 DankMaterialShell-$(BASE_VERSION)/assets/danklogo.svg \
debian/dms/usr/share/icons/hicolor/scalable/apps/danklogo.svg
# Install QML files from source tarball # Install QML files from source tarball
mkdir -p debian/dms/usr/share/quickshell/dms mkdir -p debian/dms/usr/share/quickshell/dms
cp -r DankMaterialShell-$(BASE_VERSION)/* debian/dms/usr/share/quickshell/dms/ cp -r DankMaterialShell-$(BASE_VERSION)/* debian/dms/usr/share/quickshell/dms/
@@ -61,7 +46,16 @@ override_dh_auto_install:
# Remove unnecessary directories # Remove unnecessary directories
rm -rf debian/dms/usr/share/quickshell/dms/core rm -rf debian/dms/usr/share/quickshell/dms/core
rm -rf debian/dms/usr/share/quickshell/dms/distro rm -rf debian/dms/usr/share/quickshell/dms/distro
rm -rf debian/dms/usr/share/quickshell/dms/assets
# Install systemd user service
install -Dm644 DankMaterialShell-$(BASE_VERSION)/assets/systemd/dms.service \
debian/dms/usr/lib/systemd/user/dms.service
# Install desktop file and icon
install -Dm644 DankMaterialShell-$(BASE_VERSION)/assets/dms-open.desktop \
debian/dms/usr/share/applications/dms-open.desktop
install -Dm644 DankMaterialShell-$(BASE_VERSION)/assets/danklogo.svg \
debian/dms/usr/share/icons/hicolor/scalable/apps/danklogo.svg
# Create VERSION file for Quickshell (stable release format) # Create VERSION file for Quickshell (stable release format)
echo "$(BASE_VERSION)" > debian/dms/usr/share/quickshell/dms/VERSION echo "$(BASE_VERSION)" > debian/dms/usr/share/quickshell/dms/VERSION
+1 -1
View File
@@ -1 +1 @@
Spicy Miso The Dark Knight
+11 -5
View File
@@ -1088,6 +1088,7 @@ Item {
id: layoutComponent id: layoutComponent
DWLLayout { DWLLayout {
id: layoutWidget
layoutPopupVisible: layoutPopoutLoader.item ? layoutPopoutLoader.item.shouldBeVisible : false layoutPopupVisible: layoutPopoutLoader.item ? layoutPopoutLoader.item.shouldBeVisible : false
widgetThickness: barWindow.widgetThickness widgetThickness: barWindow.widgetThickness
barThickness: barWindow.effectiveBarThickness barThickness: barWindow.effectiveBarThickness
@@ -1100,14 +1101,19 @@ Item {
parentScreen: barWindow.screen parentScreen: barWindow.screen
onToggleLayoutPopup: { onToggleLayoutPopup: {
layoutPopoutLoader.active = true; layoutPopoutLoader.active = true;
if (!layoutPopoutLoader.item)
return;
const effectiveBarConfig = topBarContent.barConfig; const effectiveBarConfig = topBarContent.barConfig;
const barPosition = barWindow.axis?.edge === "left" ? 2 : (barWindow.axis?.edge === "right" ? 3 : (barWindow.axis?.edge === "top" ? 0 : 1)); const barPosition = barWindow.axis?.edge === "left" ? 2 : (barWindow.axis?.edge === "right" ? 3 : (barWindow.axis?.edge === "top" ? 0 : 1));
if (layoutPopoutLoader.item && layoutPopoutLoader.item.setBarContext) {
layoutPopoutLoader.item.setBarContext(barPosition, effectiveBarConfig?.bottomGap ?? 0); if (layoutPopoutLoader.item.setTriggerPosition) {
} const globalPos = layoutWidget.mapToGlobal(0, 0);
if (layoutPopoutLoader.item) { const pos = SettingsData.getPopupTriggerPosition(globalPos, barWindow.screen, barWindow.effectiveBarThickness, layoutWidget.width, effectiveBarConfig?.spacing ?? 4, barPosition, effectiveBarConfig);
PopoutManager.requestPopout(layoutPopoutLoader.item, undefined, "layout"); const widgetSection = topBarContent.getWidgetSection(parent) || "center";
layoutPopoutLoader.item.setTriggerPosition(pos.x, pos.y, pos.width, widgetSection, barWindow.screen, barPosition, barWindow.effectiveBarThickness, effectiveBarConfig?.spacing ?? 4, effectiveBarConfig);
} }
PopoutManager.requestPopout(layoutPopoutLoader.item, undefined, "layout");
} }
} }
} }
@@ -1,4 +1,5 @@
import QtQuick import QtQuick
import QtQuick.Effects
import Quickshell import Quickshell
import Quickshell.Widgets import Quickshell.Widgets
import Quickshell.Hyprland import Quickshell.Hyprland
@@ -245,11 +246,14 @@ Item {
if (!byApp[key]) { if (!byApp[key]) {
const moddedId = Paths.moddedAppId(keyBase); const moddedId = Paths.moddedAppId(keyBase);
const isSteamApp = moddedId.toLowerCase().includes("steam_app"); const isSteamApp = moddedId.toLowerCase().includes("steam_app");
const icon = isSteamApp ? "" : DesktopService.resolveIconPath(moddedId); const isQuickshell = keyBase === "org.quickshell";
const desktopEntry = DesktopEntries.heuristicLookup(keyBase);
const icon = isSteamApp ? "" : Paths.getAppIcon(keyBase, desktopEntry);
byApp[key] = { byApp[key] = {
"type": "icon", "type": "icon",
"icon": icon, "icon": icon,
"isSteamApp": isSteamApp, "isSteamApp": isSteamApp,
"isQuickshell": isQuickshell,
"active": !!((w.activated || w.is_focused) || (CompositorService.isNiri && w.is_focused)), "active": !!((w.activated || w.is_focused) || (CompositorService.isNiri && w.is_focused)),
"count": 1, "count": 1,
"windowId": w.address || w.id, "windowId": w.address || w.id,
@@ -446,6 +450,7 @@ Item {
readonly property real padding: Math.max(Theme.spacingXS, Theme.spacingS * (widgetHeight / 30)) readonly property real padding: Math.max(Theme.spacingXS, Theme.spacingS * (widgetHeight / 30))
readonly property real visualWidth: isVertical ? widgetHeight : (workspaceRow.implicitWidth + padding * 2) readonly property real visualWidth: isVertical ? widgetHeight : (workspaceRow.implicitWidth + padding * 2)
readonly property real visualHeight: isVertical ? (workspaceRow.implicitHeight + padding * 2) : widgetHeight readonly property real visualHeight: isVertical ? (workspaceRow.implicitHeight + padding * 2) : widgetHeight
readonly property real appIconSize: Theme.barIconSize(barThickness, -6)
function getRealWorkspaces() { function getRealWorkspaces() {
return root.workspaceList.filter(ws => { return root.workspaceList.filter(ws => {
@@ -719,14 +724,14 @@ Item {
readonly property real iconsExtraWidth: { readonly property real iconsExtraWidth: {
if (!root.isVertical && SettingsData.showWorkspaceApps && loadedIcons.length > 0) { if (!root.isVertical && SettingsData.showWorkspaceApps && loadedIcons.length > 0) {
const numIcons = Math.min(loadedIcons.length, SettingsData.maxWorkspaceIcons); const numIcons = Math.min(loadedIcons.length, SettingsData.maxWorkspaceIcons);
return numIcons * 18 + (numIcons > 0 ? (numIcons - 1) * Theme.spacingXS : 0) + (isActive ? Theme.spacingXS : 0); return numIcons * root.appIconSize + (numIcons > 0 ? (numIcons - 1) * Theme.spacingXS : 0) + (isActive ? Theme.spacingXS : 0);
} }
return 0; return 0;
} }
readonly property real iconsExtraHeight: { readonly property real iconsExtraHeight: {
if (root.isVertical && SettingsData.showWorkspaceApps && loadedIcons.length > 0) { if (root.isVertical && SettingsData.showWorkspaceApps && loadedIcons.length > 0) {
const numIcons = Math.min(loadedIcons.length, SettingsData.maxWorkspaceIcons); const numIcons = Math.min(loadedIcons.length, SettingsData.maxWorkspaceIcons);
return numIcons * 18 + (numIcons > 0 ? (numIcons - 1) * Theme.spacingXS : 0) + (isActive ? Theme.spacingXS : 0); return numIcons * root.appIconSize + (numIcons > 0 ? (numIcons - 1) * Theme.spacingXS : 0) + (isActive ? Theme.spacingXS : 0);
} }
return 0; return 0;
} }
@@ -897,7 +902,7 @@ Item {
Item { Item {
visible: loadedHasIcon && loadedIconData?.type === "icon" visible: loadedHasIcon && loadedIconData?.type === "icon"
width: wsIcon.width + (isActive && loadedIcons.length > 0 ? 4 : 0) width: wsIcon.width + (isActive && loadedIcons.length > 0 ? 4 : 0)
height: 18 height: root.appIconSize
DankIcon { DankIcon {
id: wsIcon id: wsIcon
@@ -912,7 +917,7 @@ Item {
Item { Item {
visible: loadedHasIcon && loadedIconData?.type === "text" visible: loadedHasIcon && loadedIconData?.type === "text"
width: wsText.implicitWidth + (isActive && loadedIcons.length > 0 ? 4 : 0) width: wsText.implicitWidth + (isActive && loadedIcons.length > 0 ? 4 : 0)
height: 18 height: root.appIconSize
StyledText { StyledText {
id: wsText id: wsText
@@ -927,7 +932,7 @@ Item {
Item { Item {
visible: SettingsData.showWorkspaceIndex && !loadedHasIcon visible: SettingsData.showWorkspaceIndex && !loadedHasIcon
width: wsIndexText.implicitWidth + (isActive && loadedIcons.length > 0 ? 4 : 0) width: wsIndexText.implicitWidth + (isActive && loadedIcons.length > 0 ? 4 : 0)
height: 18 height: root.appIconSize
StyledText { StyledText {
id: wsIndexText id: wsIndexText
@@ -944,48 +949,61 @@ Item {
values: loadedIcons.slice(0, SettingsData.maxWorkspaceIcons) values: loadedIcons.slice(0, SettingsData.maxWorkspaceIcons)
} }
delegate: Item { delegate: Item {
width: 18 width: root.appIconSize
height: 18 height: root.appIconSize
IconImage { IconImage {
id: appIcon id: rowAppIcon
property var windowId: modelData.windowId
anchors.fill: parent anchors.fill: parent
source: modelData.icon source: modelData.icon
opacity: modelData.active ? 1.0 : appMouseArea.containsMouse ? 0.8 : 0.6 opacity: modelData.active ? 1.0 : rowAppMouseArea.containsMouse ? 0.8 : 0.6
visible: !modelData.isSteamApp visible: !modelData.isSteamApp && !modelData.isQuickshell
}
IconImage {
anchors.fill: parent
source: modelData.icon
opacity: modelData.active ? 1.0 : rowAppMouseArea.containsMouse ? 0.8 : 0.6
visible: modelData.isQuickshell
layer.enabled: true
layer.effect: MultiEffect {
saturation: 0
colorization: 1
colorizationColor: isActive ? Theme.primaryContainer : Theme.primary
}
} }
DankIcon { DankIcon {
anchors.centerIn: parent anchors.centerIn: parent
size: 18 size: root.appIconSize
name: "sports_esports" name: "sports_esports"
color: Theme.widgetTextColor color: Theme.widgetTextColor
opacity: modelData.active ? 1.0 : appMouseArea.containsMouse ? 0.8 : 0.6 opacity: modelData.active ? 1.0 : rowAppMouseArea.containsMouse ? 0.8 : 0.6
visible: modelData.isSteamApp visible: modelData.isSteamApp
} }
MouseArea { MouseArea {
id: appMouseArea id: rowAppMouseArea
anchors.fill: parent anchors.fill: parent
enabled: isActive enabled: isActive
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor
onClicked: { onClicked: {
if (!appIcon.windowId) const winId = modelData.windowId;
if (!winId)
return; return;
if (CompositorService.isHyprland) { if (CompositorService.isHyprland) {
Hyprland.dispatch(`focuswindow address:${appIcon.windowId}`); Hyprland.dispatch(`focuswindow address:${winId}`);
} else if (CompositorService.isNiri) { } else if (CompositorService.isNiri) {
NiriService.focusWindow(appIcon.windowId); NiriService.focusWindow(winId);
} }
} }
} }
Rectangle { Rectangle {
visible: modelData.count > 1 && !isActive visible: modelData.count > 1 && !isActive
width: 12 width: root.appIconSize * 0.67
height: 12 height: root.appIconSize * 0.67
radius: 6 radius: root.appIconSize * 0.33
color: "black" color: "black"
border.color: "white" border.color: "white"
border.width: 1 border.width: 1
@@ -996,7 +1014,7 @@ Item {
Text { Text {
anchors.centerIn: parent anchors.centerIn: parent
text: modelData.count text: modelData.count
font.pixelSize: 8 font.pixelSize: root.appIconSize * 0.44
color: "white" color: "white"
} }
} }
@@ -1034,48 +1052,61 @@ Item {
values: loadedIcons.slice(0, SettingsData.maxWorkspaceIcons) values: loadedIcons.slice(0, SettingsData.maxWorkspaceIcons)
} }
delegate: Item { delegate: Item {
width: 18 width: root.appIconSize
height: 18 height: root.appIconSize
IconImage { IconImage {
id: appIcon id: colAppIcon
property var windowId: modelData.windowId
anchors.fill: parent anchors.fill: parent
source: modelData.icon source: modelData.icon
opacity: modelData.active ? 1.0 : appMouseArea.containsMouse ? 0.8 : 0.6 opacity: modelData.active ? 1.0 : colAppMouseArea.containsMouse ? 0.8 : 0.6
visible: !modelData.isSteamApp visible: !modelData.isSteamApp && !modelData.isQuickshell
}
IconImage {
anchors.fill: parent
source: modelData.icon
opacity: modelData.active ? 1.0 : colAppMouseArea.containsMouse ? 0.8 : 0.6
visible: modelData.isQuickshell
layer.enabled: true
layer.effect: MultiEffect {
saturation: 0
colorization: 1
colorizationColor: isActive ? Theme.primaryContainer : Theme.primary
}
} }
DankIcon { DankIcon {
anchors.centerIn: parent anchors.centerIn: parent
size: 18 size: root.appIconSize
name: "sports_esports" name: "sports_esports"
color: Theme.widgetTextColor color: Theme.widgetTextColor
opacity: modelData.active ? 1.0 : appMouseArea.containsMouse ? 0.8 : 0.6 opacity: modelData.active ? 1.0 : colAppMouseArea.containsMouse ? 0.8 : 0.6
visible: modelData.isSteamApp visible: modelData.isSteamApp
} }
MouseArea { MouseArea {
id: appMouseArea id: colAppMouseArea
anchors.fill: parent anchors.fill: parent
enabled: isActive enabled: isActive
cursorShape: Qt.PointingHandCursor cursorShape: Qt.PointingHandCursor
onClicked: { onClicked: {
if (!appIcon.windowId) const winId = modelData.windowId;
if (!winId)
return; return;
if (CompositorService.isHyprland) { if (CompositorService.isHyprland) {
Hyprland.dispatch(`focuswindow address:${appIcon.windowId}`); Hyprland.dispatch(`focuswindow address:${winId}`);
} else if (CompositorService.isNiri) { } else if (CompositorService.isNiri) {
NiriService.focusWindow(appIcon.windowId); NiriService.focusWindow(winId);
} }
} }
} }
Rectangle { Rectangle {
visible: modelData.count > 1 && !isActive visible: modelData.count > 1 && !isActive
width: 12 width: root.appIconSize * 0.67
height: 12 height: root.appIconSize * 0.67
radius: 6 radius: root.appIconSize * 0.33
color: "black" color: "black"
border.color: "white" border.color: "white"
border.width: 1 border.width: 1
@@ -1086,7 +1117,7 @@ Item {
Text { Text {
anchors.centerIn: parent anchors.centerIn: parent
text: modelData.count text: modelData.count
font.pixelSize: 8 font.pixelSize: root.appIconSize * 0.44
color: "white" color: "white"
} }
} }
+4 -1
View File
@@ -314,7 +314,8 @@ Singleton {
const keyData = { const keyData = {
key: bind.key || "", key: bind.key || "",
source: bind.source || "config", source: bind.source || "config",
isOverride: bind.source === "dms" isOverride: bind.source === "dms",
cooldownMs: bind.cooldownMs || 0
}; };
if (actionMap[action]) { if (actionMap[action]) {
actionMap[action].keys.push(keyData); actionMap[action].keys.push(keyData);
@@ -378,6 +379,8 @@ Singleton {
const cmd = ["dms", "keybinds", "set", currentProvider, bindData.key, bindData.action, "--desc", bindData.desc || ""]; const cmd = ["dms", "keybinds", "set", currentProvider, bindData.key, bindData.action, "--desc", bindData.desc || ""];
if (originalKey && originalKey !== bindData.key) if (originalKey && originalKey !== bindData.key)
cmd.push("--replace-key", originalKey); cmd.push("--replace-key", originalKey);
if (bindData.cooldownMs > 0)
cmd.push("--cooldown-ms", String(bindData.cooldownMs));
saveProcess.command = cmd; saveProcess.command = cmd;
saveProcess.running = true; saveProcess.running = true;
bindSaved(bindData.key); bindSaved(bindData.key);
+1 -1
View File
@@ -1 +1 @@
v1.2-unstable v1.0.1
+68 -2
View File
@@ -23,6 +23,8 @@ Item {
property string editKey: "" property string editKey: ""
property string editAction: "" property string editAction: ""
property string editDesc: "" property string editDesc: ""
property int editCooldownMs: 0
property int _savedCooldownMs: -1
property bool hasChanges: false property bool hasChanges: false
property string _actionType: "" property string _actionType: ""
property bool addingNewKey: false property bool addingNewKey: false
@@ -90,6 +92,12 @@ Item {
editKey = keyToFind; editKey = keyToFind;
editAction = bindData.action || ""; editAction = bindData.action || "";
editDesc = bindData.desc || ""; editDesc = bindData.desc || "";
if (_savedCooldownMs >= 0) {
editCooldownMs = _savedCooldownMs;
_savedCooldownMs = -1;
} else {
editCooldownMs = keys[i].cooldownMs || 0;
}
hasChanges = false; hasChanges = false;
_actionType = Actions.getActionType(editAction); _actionType = Actions.getActionType(editAction);
useCustomCompositor = _actionType === "compositor" && editAction && !Actions.isKnownCompositorAction(editAction); useCustomCompositor = _actionType === "compositor" && editAction && !Actions.isKnownCompositorAction(editAction);
@@ -109,6 +117,7 @@ Item {
editKey = editingKeyIndex >= 0 ? keys[editingKeyIndex].key : ""; editKey = editingKeyIndex >= 0 ? keys[editingKeyIndex].key : "";
editAction = bindData.action || ""; editAction = bindData.action || "";
editDesc = bindData.desc || ""; editDesc = bindData.desc || "";
editCooldownMs = editingKeyIndex >= 0 ? (keys[editingKeyIndex].cooldownMs || 0) : 0;
hasChanges = false; hasChanges = false;
_actionType = Actions.getActionType(editAction); _actionType = Actions.getActionType(editAction);
useCustomCompositor = _actionType === "compositor" && editAction && !Actions.isKnownCompositorAction(editAction); useCustomCompositor = _actionType === "compositor" && editAction && !Actions.isKnownCompositorAction(editAction);
@@ -127,6 +136,7 @@ Item {
addingNewKey = false; addingNewKey = false;
editingKeyIndex = index; editingKeyIndex = index;
editKey = keys[index].key; editKey = keys[index].key;
editCooldownMs = keys[index].cooldownMs || 0;
hasChanges = false; hasChanges = false;
} }
@@ -137,8 +147,11 @@ Item {
editAction = changes.action; editAction = changes.action;
if (changes.desc !== undefined) if (changes.desc !== undefined)
editDesc = changes.desc; editDesc = changes.desc;
if (changes.cooldownMs !== undefined)
editCooldownMs = changes.cooldownMs;
const origKey = editingKeyIndex >= 0 && editingKeyIndex < keys.length ? keys[editingKeyIndex].key : ""; const origKey = editingKeyIndex >= 0 && editingKeyIndex < keys.length ? keys[editingKeyIndex].key : "";
hasChanges = editKey !== origKey || editAction !== (bindData.action || "") || editDesc !== (bindData.desc || ""); const origCooldown = editingKeyIndex >= 0 && editingKeyIndex < keys.length ? (keys[editingKeyIndex].cooldownMs || 0) : 0;
hasChanges = editKey !== origKey || editAction !== (bindData.action || "") || editDesc !== (bindData.desc || "") || editCooldownMs !== origCooldown;
} }
function canSave() { function canSave() {
@@ -156,10 +169,12 @@ Item {
let desc = editDesc; let desc = editDesc;
if (expandedLoader.item?.currentTitle !== undefined) if (expandedLoader.item?.currentTitle !== undefined)
desc = expandedLoader.item.currentTitle; desc = expandedLoader.item.currentTitle;
_savedCooldownMs = editCooldownMs;
saveBind(origKey, { saveBind(origKey, {
key: editKey, key: editKey,
action: editAction, action: editAction,
desc: desc desc: desc,
cooldownMs: editCooldownMs
}); });
hasChanges = false; hasChanges = false;
addingNewKey = false; addingNewKey = false;
@@ -1431,6 +1446,57 @@ Item {
} }
} }
RowLayout {
Layout.fillWidth: true
spacing: Theme.spacingM
StyledText {
text: I18n.tr("Cooldown")
font.pixelSize: Theme.fontSizeSmall
font.weight: Font.Medium
color: Theme.surfaceVariantText
Layout.preferredWidth: 60
}
DankTextField {
id: cooldownField
Layout.preferredWidth: 100
Layout.preferredHeight: 40
placeholderText: "0"
Connections {
target: root
function onEditCooldownMsChanged() {
const newText = root.editCooldownMs > 0 ? String(root.editCooldownMs) : "";
if (cooldownField.text !== newText)
cooldownField.text = newText;
}
}
Component.onCompleted: {
text = root.editCooldownMs > 0 ? String(root.editCooldownMs) : "";
}
onTextChanged: {
const val = parseInt(text) || 0;
if (val !== root.editCooldownMs)
root.updateEdit({
cooldownMs: val
});
}
}
StyledText {
text: I18n.tr("ms")
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
}
Item {
Layout.fillWidth: true
}
}
Rectangle { Rectangle {
Layout.fillWidth: true Layout.fillWidth: true
Layout.preferredHeight: 1 Layout.preferredHeight: 1