mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-31 08:52:49 -05:00
Compare commits
7 Commits
fbf79e62e9
...
32f218d58c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
32f218d58c | ||
|
|
6fdaab2ccd | ||
|
|
d336866f44 | ||
|
|
b40df5f1c4 | ||
|
|
3c9886ad1b | ||
|
|
ea205ebd12 | ||
|
|
30dad46c94 |
22
.github/workflows/run-obs.yml
vendored
22
.github/workflows/run-obs.yml
vendored
@@ -7,6 +7,14 @@ on:
|
|||||||
description: "Package to update (dms, dms-git, or all)"
|
description: "Package to update (dms, dms-git, or all)"
|
||||||
required: false
|
required: false
|
||||||
default: "all"
|
default: "all"
|
||||||
|
force_upload:
|
||||||
|
description: "Force upload without version check"
|
||||||
|
required: false
|
||||||
|
default: "false"
|
||||||
|
type: choice
|
||||||
|
options:
|
||||||
|
- "false"
|
||||||
|
- "true"
|
||||||
rebuild_release:
|
rebuild_release:
|
||||||
description: "Release number for rebuilds (e.g., 2, 3, 4 to increment spec Release)"
|
description: "Release number for rebuilds (e.g., 2, 3, 4 to increment spec Release)"
|
||||||
required: false
|
required: false
|
||||||
@@ -100,6 +108,17 @@ jobs:
|
|||||||
echo "has_updates=true" >> $GITHUB_OUTPUT
|
echo "has_updates=true" >> $GITHUB_OUTPUT
|
||||||
echo "📋 First upload to OBS, update needed"
|
echo "📋 First upload to OBS, update needed"
|
||||||
fi
|
fi
|
||||||
|
elif [[ "${{ github.event.inputs.force_upload }}" == "true" ]]; then
|
||||||
|
PKG="${{ github.event.inputs.package }}"
|
||||||
|
if [[ -z "$PKG" || "$PKG" == "all" ]]; then
|
||||||
|
echo "packages=all" >> $GITHUB_OUTPUT
|
||||||
|
echo "has_updates=true" >> $GITHUB_OUTPUT
|
||||||
|
echo "🚀 Force upload: all packages"
|
||||||
|
else
|
||||||
|
echo "packages=$PKG" >> $GITHUB_OUTPUT
|
||||||
|
echo "has_updates=true" >> $GITHUB_OUTPUT
|
||||||
|
echo "🚀 Force upload: $PKG"
|
||||||
|
fi
|
||||||
elif [[ -n "${{ github.event.inputs.package }}" ]]; then
|
elif [[ -n "${{ github.event.inputs.package }}" ]]; then
|
||||||
echo "packages=${{ github.event.inputs.package }}" >> $GITHUB_OUTPUT
|
echo "packages=${{ github.event.inputs.package }}" >> $GITHUB_OUTPUT
|
||||||
echo "has_updates=true" >> $GITHUB_OUTPUT
|
echo "has_updates=true" >> $GITHUB_OUTPUT
|
||||||
@@ -117,6 +136,7 @@ jobs:
|
|||||||
contents: write
|
contents: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
if: |
|
if: |
|
||||||
|
github.event.inputs.force_upload == 'true' ||
|
||||||
github.event_name == 'workflow_dispatch' ||
|
github.event_name == 'workflow_dispatch' ||
|
||||||
needs.check-updates.outputs.has_updates == 'true'
|
needs.check-updates.outputs.has_updates == 'true'
|
||||||
|
|
||||||
@@ -303,7 +323,7 @@ jobs:
|
|||||||
- name: Upload to OBS
|
- name: Upload to OBS
|
||||||
if: steps.check-loop.outputs.skip != 'true'
|
if: steps.check-loop.outputs.skip != 'true'
|
||||||
env:
|
env:
|
||||||
FORCE_REBUILD: ${{ github.event_name == 'workflow_dispatch' && 'true' || '' }}
|
FORCE_UPLOAD: ${{ github.event.inputs.force_upload }}
|
||||||
REBUILD_RELEASE: ${{ github.event.inputs.rebuild_release }}
|
REBUILD_RELEASE: ${{ github.event.inputs.rebuild_release }}
|
||||||
run: |
|
run: |
|
||||||
PACKAGES="${{ steps.packages.outputs.packages }}"
|
PACKAGES="${{ steps.packages.outputs.packages }}"
|
||||||
|
|||||||
39
.github/workflows/run-ppa.yml
vendored
39
.github/workflows/run-ppa.yml
vendored
@@ -7,6 +7,14 @@ on:
|
|||||||
description: "Package to upload (dms, dms-git, dms-greeter, or all)"
|
description: "Package to upload (dms, dms-git, dms-greeter, or all)"
|
||||||
required: false
|
required: false
|
||||||
default: "dms-git"
|
default: "dms-git"
|
||||||
|
force_upload:
|
||||||
|
description: "Force upload without version check"
|
||||||
|
required: false
|
||||||
|
default: "false"
|
||||||
|
type: choice
|
||||||
|
options:
|
||||||
|
- "false"
|
||||||
|
- "true"
|
||||||
rebuild_release:
|
rebuild_release:
|
||||||
description: "Release number for rebuilds (e.g., 2, 3, 4 for ppa2, ppa3, ppa4)"
|
description: "Release number for rebuilds (e.g., 2, 3, 4 for ppa2, ppa3, ppa4)"
|
||||||
required: false
|
required: false
|
||||||
@@ -79,6 +87,7 @@ jobs:
|
|||||||
contents: write
|
contents: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
if: |
|
if: |
|
||||||
|
github.event.inputs.force_upload == 'true' ||
|
||||||
github.event_name == 'workflow_dispatch' ||
|
github.event_name == 'workflow_dispatch' ||
|
||||||
needs.check-updates.outputs.has_updates == 'true'
|
needs.check-updates.outputs.has_updates == 'true'
|
||||||
|
|
||||||
@@ -141,12 +150,31 @@ jobs:
|
|||||||
if: steps.check-loop.outputs.skip != 'true'
|
if: steps.check-loop.outputs.skip != 'true'
|
||||||
id: packages
|
id: packages
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ github.event_name }}" == "schedule" ]]; then
|
if [[ "${{ github.event.inputs.force_upload }}" == "true" ]]; then
|
||||||
|
PKG="${{ github.event.inputs.package }}"
|
||||||
|
if [[ -z "$PKG" || "$PKG" == "all" ]]; then
|
||||||
|
echo "packages=all" >> $GITHUB_OUTPUT
|
||||||
|
echo "🚀 Force upload: all packages"
|
||||||
|
else
|
||||||
|
echo "packages=$PKG" >> $GITHUB_OUTPUT
|
||||||
|
echo "🚀 Force upload: $PKG"
|
||||||
|
fi
|
||||||
|
elif [[ "${{ github.event_name }}" == "schedule" ]]; then
|
||||||
echo "packages=${{ needs.check-updates.outputs.packages }}" >> $GITHUB_OUTPUT
|
echo "packages=${{ needs.check-updates.outputs.packages }}" >> $GITHUB_OUTPUT
|
||||||
echo "Triggered by schedule: uploading git package"
|
echo "Triggered by schedule: uploading git package"
|
||||||
elif [[ -n "${{ github.event.inputs.package }}" ]]; then
|
elif [[ -n "${{ github.event.inputs.package }}" ]]; then
|
||||||
echo "packages=${{ github.event.inputs.package }}" >> $GITHUB_OUTPUT
|
# Manual package selection should respect change detection
|
||||||
echo "Manual trigger: ${{ github.event.inputs.package }}"
|
SELECTED_PKG="${{ github.event.inputs.package }}"
|
||||||
|
UPDATED_PKG="${{ needs.check-updates.outputs.packages }}"
|
||||||
|
|
||||||
|
# Check if manually selected package is in the updated list
|
||||||
|
if [[ "$UPDATED_PKG" == *"$SELECTED_PKG"* ]] || [[ "$SELECTED_PKG" == "all" ]]; then
|
||||||
|
echo "packages=$SELECTED_PKG" >> $GITHUB_OUTPUT
|
||||||
|
echo "📦 Manual selection (has updates): $SELECTED_PKG"
|
||||||
|
else
|
||||||
|
echo "packages=" >> $GITHUB_OUTPUT
|
||||||
|
echo "⚠️ Manual selection '$SELECTED_PKG' has no updates - skipping (use force_upload to override)"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "packages=${{ needs.check-updates.outputs.packages }}" >> $GITHUB_OUTPUT
|
echo "packages=${{ needs.check-updates.outputs.packages }}" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
@@ -157,6 +185,11 @@ jobs:
|
|||||||
PACKAGES="${{ steps.packages.outputs.packages }}"
|
PACKAGES="${{ steps.packages.outputs.packages }}"
|
||||||
REBUILD_RELEASE="${{ github.event.inputs.rebuild_release }}"
|
REBUILD_RELEASE="${{ github.event.inputs.rebuild_release }}"
|
||||||
|
|
||||||
|
if [[ -z "$PACKAGES" ]]; then
|
||||||
|
echo "No packages selected for upload. Skipping."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# Build command arguments
|
# Build command arguments
|
||||||
BUILD_ARGS=()
|
BUILD_ARGS=()
|
||||||
if [[ -n "$REBUILD_RELEASE" ]]; then
|
if [[ -n "$REBUILD_RELEASE" ]]; then
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
dms-git (1.0.2+git2528.d336866f) nightly; urgency=medium
|
||||||
|
|
||||||
|
* Git snapshot (commit 2528: d336866f)
|
||||||
|
|
||||||
|
-- Avenge Media <AvengeMedia.US@gmail.com> Sun, 14 Dec 2025 03:56:25 +0000
|
||||||
|
|
||||||
dms-git (1.0.2+git2521.3b511e2f) nightly; urgency=medium
|
dms-git (1.0.2+git2521.3b511e2f) nightly; urgency=medium
|
||||||
|
|
||||||
* Git snapshot (commit 2521: 3b511e2f)
|
* Git snapshot (commit 2521: 3b511e2f)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
%global debug_package %{nil}
|
%global debug_package %{nil}
|
||||||
|
|
||||||
Name: dms-git
|
Name: dms-git
|
||||||
Version: 1.0.2+git2521.3b511e2f
|
Version: 1.0.2+git2528.d336866f
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Epoch: 2
|
Epoch: 2
|
||||||
Summary: DankMaterialShell - Material 3 inspired shell (git nightly)
|
Summary: DankMaterialShell - Material 3 inspired shell (git nightly)
|
||||||
@@ -135,6 +135,8 @@ pkill -USR1 -x dms >/dev/null 2>&1 || :
|
|||||||
%{_datadir}/icons/hicolor/scalable/apps/danklogo.svg
|
%{_datadir}/icons/hicolor/scalable/apps/danklogo.svg
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Dec 14 2025 Avenge Media <AvengeMedia.US@gmail.com> - 1.0.2+git2528.d336866f-1
|
||||||
|
- Git snapshot (commit 2528: d336866f)
|
||||||
* Sat Dec 13 2025 Avenge Media <AvengeMedia.US@gmail.com> - 1.0.2+git2521.3b511e2f-1
|
* Sat Dec 13 2025 Avenge Media <AvengeMedia.US@gmail.com> - 1.0.2+git2521.3b511e2f-1
|
||||||
- Git snapshot (commit 2521: 3b511e2f)
|
- Git snapshot (commit 2521: 3b511e2f)
|
||||||
* Sat Dec 13 2025 Avenge Media <AvengeMedia.US@gmail.com> - 1.0.2+git2518.a783d650-1
|
* Sat Dec 13 2025 Avenge Media <AvengeMedia.US@gmail.com> - 1.0.2+git2518.a783d650-1
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Unified OBS upload script for dms packages
|
# Unified OBS upload script for dms packages
|
||||||
# Handles Debian and OpenSUSE builds for both x86_64 and aarch64
|
# Handles Debian and OpenSUSE builds for both x86_64 and aarch64
|
||||||
# Usage: ./distro/scripts/obs-upload.sh [distro] <package-name> [commit-message]
|
# Usage: ./distro/scripts/obs-upload.sh [distro] <package-name> [commit-message|rebuild-number]
|
||||||
#
|
#
|
||||||
# Examples:
|
# Examples:
|
||||||
# ./distro/scripts/obs-upload.sh dms "Update to v0.6.2"
|
# ./distro/scripts/obs-upload.sh dms "Update to v0.6.2"
|
||||||
# ./distro/scripts/obs-upload.sh debian dms
|
# ./distro/scripts/obs-upload.sh debian dms
|
||||||
# ./distro/scripts/obs-upload.sh opensuse dms-git
|
# ./distro/scripts/obs-upload.sh opensuse dms-git
|
||||||
|
# ./distro/scripts/obs-upload.sh debian dms-git 2 # Rebuild with ppa2 suffix
|
||||||
|
# ./distro/scripts/obs-upload.sh dms-git --rebuild=2 # Rebuild with ppa2 suffix (flag syntax)
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@@ -14,6 +16,8 @@ UPLOAD_DEBIAN=true
|
|||||||
UPLOAD_OPENSUSE=true
|
UPLOAD_OPENSUSE=true
|
||||||
PACKAGE=""
|
PACKAGE=""
|
||||||
MESSAGE=""
|
MESSAGE=""
|
||||||
|
REBUILD_RELEASE=""
|
||||||
|
POSITIONAL_ARGS=()
|
||||||
|
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
@@ -25,16 +29,43 @@ for arg in "$@"; do
|
|||||||
UPLOAD_DEBIAN=false
|
UPLOAD_DEBIAN=false
|
||||||
UPLOAD_OPENSUSE=true
|
UPLOAD_OPENSUSE=true
|
||||||
;;
|
;;
|
||||||
|
--rebuild=*)
|
||||||
|
REBUILD_RELEASE="${arg#*=}"
|
||||||
|
;;
|
||||||
|
-r|--rebuild)
|
||||||
|
REBUILD_NEXT=true
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
if [[ -z "$PACKAGE" ]]; then
|
if [[ -n "${REBUILD_NEXT:-}" ]]; then
|
||||||
PACKAGE="$arg"
|
REBUILD_RELEASE="$arg"
|
||||||
elif [[ -z "$MESSAGE" ]]; then
|
REBUILD_NEXT=false
|
||||||
MESSAGE="$arg"
|
else
|
||||||
|
POSITIONAL_ARGS+=("$arg")
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Check if last positional argument is a number (rebuild release)
|
||||||
|
if [[ ${#POSITIONAL_ARGS[@]} -gt 0 ]]; then
|
||||||
|
LAST_INDEX=$((${#POSITIONAL_ARGS[@]} - 1))
|
||||||
|
LAST_ARG="${POSITIONAL_ARGS[$LAST_INDEX]}"
|
||||||
|
if [[ "$LAST_ARG" =~ ^[0-9]+$ ]] && [[ -z "$REBUILD_RELEASE" ]]; then
|
||||||
|
# Last argument is a number and no --rebuild flag was used
|
||||||
|
# Use it as rebuild release and remove from positional args
|
||||||
|
REBUILD_RELEASE="$LAST_ARG"
|
||||||
|
POSITIONAL_ARGS=("${POSITIONAL_ARGS[@]:0:$LAST_INDEX}")
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Assign remaining positional args to PACKAGE and MESSAGE
|
||||||
|
if [[ ${#POSITIONAL_ARGS[@]} -gt 0 ]]; then
|
||||||
|
PACKAGE="${POSITIONAL_ARGS[0]}"
|
||||||
|
if [[ ${#POSITIONAL_ARGS[@]} -gt 1 ]]; then
|
||||||
|
MESSAGE="${POSITIONAL_ARGS[1]}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
OBS_BASE_PROJECT="home:AvengeMedia"
|
OBS_BASE_PROJECT="home:AvengeMedia"
|
||||||
OBS_BASE="$HOME/.cache/osc-checkouts"
|
OBS_BASE="$HOME/.cache/osc-checkouts"
|
||||||
AVAILABLE_PACKAGES=(dms dms-git)
|
AVAILABLE_PACKAGES=(dms dms-git)
|
||||||
@@ -145,9 +176,9 @@ IS_MANUAL=false
|
|||||||
if [[ -n "${REBUILD_RELEASE:-}" ]]; then
|
if [[ -n "${REBUILD_RELEASE:-}" ]]; then
|
||||||
IS_MANUAL=true
|
IS_MANUAL=true
|
||||||
echo "==> Manual rebuild detected (REBUILD_RELEASE=$REBUILD_RELEASE)"
|
echo "==> Manual rebuild detected (REBUILD_RELEASE=$REBUILD_RELEASE)"
|
||||||
elif [[ -n "${FORCE_REBUILD:-}" ]] && [[ "${FORCE_REBUILD}" == "true" ]]; then
|
elif [[ -n "${FORCE_UPLOAD:-}" ]] && [[ "${FORCE_UPLOAD}" == "true" ]]; then
|
||||||
IS_MANUAL=true
|
IS_MANUAL=true
|
||||||
echo "==> Manual workflow trigger detected (FORCE_REBUILD=true)"
|
echo "==> Force upload detected (FORCE_UPLOAD=true)"
|
||||||
elif [[ -z "${GITHUB_ACTIONS:-}" ]] && [[ -z "${CI:-}" ]]; then
|
elif [[ -z "${GITHUB_ACTIONS:-}" ]] && [[ -z "${CI:-}" ]]; then
|
||||||
IS_MANUAL=true
|
IS_MANUAL=true
|
||||||
echo "==> Local/manual run detected (not in CI)"
|
echo "==> Local/manual run detected (not in CI)"
|
||||||
@@ -204,24 +235,28 @@ if [[ "$UPLOAD_OPENSUSE" == true ]] && [[ -f "distro/opensuse/$PACKAGE.spec" ]];
|
|||||||
OLD_RELEASE=$(grep "^Release:" "$WORK_DIR/.osc/$PACKAGE.spec" | sed 's/^Release:[[:space:]]*//' | sed 's/%{?dist}//' | head -1)
|
OLD_RELEASE=$(grep "^Release:" "$WORK_DIR/.osc/$PACKAGE.spec" | sed 's/^Release:[[:space:]]*//' | sed 's/%{?dist}//' | head -1)
|
||||||
|
|
||||||
if [[ "$NEW_VERSION" == "$OLD_VERSION" ]]; then
|
if [[ "$NEW_VERSION" == "$OLD_VERSION" ]]; then
|
||||||
if [[ "$OLD_RELEASE" =~ ^([0-9]+) ]]; then
|
if [[ "$IS_MANUAL" == true ]] && [[ -z "${GITHUB_ACTIONS:-}" ]] && [[ -z "${CI:-}" ]]; then
|
||||||
BASE_RELEASE="${BASH_REMATCH[1]}"
|
# Only error for true local manual runs, not CI/workflow runs
|
||||||
if [[ "$IS_MANUAL" == true ]]; then
|
if [[ -n "${REBUILD_RELEASE:-}" ]]; then
|
||||||
NEXT_RELEASE=$((BASE_RELEASE + 1))
|
echo " 🔄 Using manual rebuild release number: $REBUILD_RELEASE"
|
||||||
echo " - Detected rebuild of same version $NEW_VERSION (release $OLD_RELEASE -> $NEXT_RELEASE)"
|
sed -i "s/^Release:[[:space:]]*${NEW_RELEASE}%{?dist}/Release: ${REBUILD_RELEASE}%{?dist}/" "$WORK_DIR/$PACKAGE.spec"
|
||||||
sed -i "s/^Release:[[:space:]]*${NEW_RELEASE}%{?dist}/Release: ${NEXT_RELEASE}%{?dist}/" "$WORK_DIR/$PACKAGE.spec"
|
|
||||||
cp "$WORK_DIR/$PACKAGE.spec" "$REPO_ROOT/distro/opensuse/$PACKAGE.spec"
|
cp "$WORK_DIR/$PACKAGE.spec" "$REPO_ROOT/distro/opensuse/$PACKAGE.spec"
|
||||||
else
|
else
|
||||||
echo " - Detected same version $NEW_VERSION (release $OLD_RELEASE). Not a manual run, skipping update."
|
echo " - Error: Same version detected ($NEW_VERSION) but no rebuild number specified"
|
||||||
# For automated runs with no version change, we should stop here to avoid unnecessary rebuilds
|
echo " To rebuild, explicitly specify a rebuild number:"
|
||||||
# However, we need to check if we are also updating Debian, or if this script is expected to continue.
|
echo " ./distro/scripts/obs-upload.sh opensuse $PACKAGE 2"
|
||||||
|
echo " or use flag syntax:"
|
||||||
|
echo " ./distro/scripts/obs-upload.sh opensuse $PACKAGE --rebuild=2"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo " - Detected same version $NEW_VERSION (release $OLD_RELEASE). No changes needed, skipping update."
|
||||||
# If this is OpenSUSE only run, we can exit.
|
# If this is OpenSUSE only run, we can exit.
|
||||||
if [[ "$UPLOAD_DEBIAN" == false ]]; then
|
if [[ "$UPLOAD_DEBIAN" == false ]]; then
|
||||||
echo "✅ No changes needed for OpenSUSE (not manual). Exiting."
|
echo "✅ No changes needed for OpenSUSE. Exiting."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
echo " - New version detected: $OLD_VERSION -> $NEW_VERSION (keeping release $NEW_RELEASE)"
|
echo " - New version detected: $OLD_VERSION -> $NEW_VERSION (keeping release $NEW_RELEASE)"
|
||||||
cp "$WORK_DIR/$PACKAGE.spec" "$REPO_ROOT/distro/opensuse/$PACKAGE.spec"
|
cp "$WORK_DIR/$PACKAGE.spec" "$REPO_ROOT/distro/opensuse/$PACKAGE.spec"
|
||||||
@@ -659,9 +694,9 @@ if [[ "$UPLOAD_DEBIAN" == true ]] && [[ "$SOURCE_FORMAT" == *"native"* ]] && [[
|
|||||||
if [[ -n "${REBUILD_RELEASE:-}" ]]; then
|
if [[ -n "${REBUILD_RELEASE:-}" ]]; then
|
||||||
IS_MANUAL=true
|
IS_MANUAL=true
|
||||||
echo "==> Manual rebuild detected (REBUILD_RELEASE=$REBUILD_RELEASE)"
|
echo "==> Manual rebuild detected (REBUILD_RELEASE=$REBUILD_RELEASE)"
|
||||||
elif [[ -n "${FORCE_REBUILD:-}" ]] && [[ "${FORCE_REBUILD}" == "true" ]]; then
|
elif [[ -n "${FORCE_UPLOAD:-}" ]] && [[ "${FORCE_UPLOAD}" == "true" ]]; then
|
||||||
IS_MANUAL=true
|
IS_MANUAL=true
|
||||||
echo "==> Manual workflow trigger detected (FORCE_REBUILD=true)"
|
echo "==> Force upload detected (FORCE_UPLOAD=true)"
|
||||||
elif [[ -z "${GITHUB_ACTIONS:-}" ]] && [[ -z "${CI:-}" ]]; then
|
elif [[ -z "${GITHUB_ACTIONS:-}" ]] && [[ -z "${CI:-}" ]]; then
|
||||||
IS_MANUAL=true
|
IS_MANUAL=true
|
||||||
echo "==> Local/manual run detected (not in CI)"
|
echo "==> Local/manual run detected (not in CI)"
|
||||||
@@ -671,75 +706,65 @@ if [[ "$UPLOAD_DEBIAN" == true ]] && [[ "$SOURCE_FORMAT" == *"native"* ]] && [[
|
|||||||
OLD_DSC_BASE=$(echo "$OLD_DSC_VERSION" | sed 's/ppa[0-9]*$//')
|
OLD_DSC_BASE=$(echo "$OLD_DSC_VERSION" | sed 's/ppa[0-9]*$//')
|
||||||
|
|
||||||
if [[ -n "$OLD_DSC_VERSION" ]] && [[ "$OLD_DSC_BASE" == "$CHANGELOG_BASE" ]]; then
|
if [[ -n "$OLD_DSC_VERSION" ]] && [[ "$OLD_DSC_BASE" == "$CHANGELOG_BASE" ]]; then
|
||||||
if [[ "$IS_MANUAL" == true ]]; then
|
# In CI, skip if version unchanged (matching PPA behavior)
|
||||||
echo "==> Detected rebuild of same base version $CHANGELOG_BASE, incrementing version"
|
if [[ -n "${GITHUB_ACTIONS:-}" ]] || [[ -n "${CI:-}" ]]; then
|
||||||
|
if [[ "${FORCE_UPLOAD:-}" != "true" ]] && [[ -z "${REBUILD_RELEASE:-}" ]]; then
|
||||||
|
echo "==> Same version detected in CI (current: $OLD_DSC_VERSION), skipping upload"
|
||||||
|
echo " Use force_upload=true or set rebuild_release to override"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# If REBUILD_RELEASE is set, use that number directly
|
if [[ "$IS_MANUAL" == true ]] && [[ -z "${GITHUB_ACTIONS:-}" ]] && [[ -z "${CI:-}" ]]; then
|
||||||
if [[ -n "${REBUILD_RELEASE:-}" ]]; then
|
# Only error for true local manual runs, not CI/workflow runs
|
||||||
|
# Only increment version when explicitly specified via REBUILD_RELEASE
|
||||||
|
if [[ -n "$REBUILD_RELEASE" ]]; then
|
||||||
|
echo "==> Using specified rebuild release: ppa$REBUILD_RELEASE"
|
||||||
|
USE_REBUILD_NUM="$REBUILD_RELEASE"
|
||||||
|
else
|
||||||
|
echo "==> Error: Same version detected ($CHANGELOG_VERSION) but no rebuild number specified"
|
||||||
|
echo " To rebuild, explicitly specify a rebuild number:"
|
||||||
|
echo " ./distro/scripts/obs-upload.sh debian $PACKAGE 2"
|
||||||
|
echo " or use flag syntax:"
|
||||||
|
echo " ./distro/scripts/obs-upload.sh debian $PACKAGE --rebuild=2"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
elif [[ -n "$REBUILD_RELEASE" ]]; then
|
||||||
|
echo "==> Using specified rebuild release: ppa$REBUILD_RELEASE"
|
||||||
|
USE_REBUILD_NUM="$REBUILD_RELEASE"
|
||||||
|
else
|
||||||
|
echo "==> Error: Same version detected ($CHANGELOG_VERSION) but no rebuild number specified"
|
||||||
|
echo " To rebuild, explicitly specify a rebuild number:"
|
||||||
|
echo " ./distro/scripts/obs-upload.sh debian $PACKAGE 2"
|
||||||
|
echo " or use flag syntax:"
|
||||||
|
echo " ./distro/scripts/obs-upload.sh debian $PACKAGE --rebuild=2"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n "${USE_REBUILD_NUM:-}" ]]; then
|
||||||
if [[ "$CHANGELOG_VERSION" =~ ^([0-9.]+)\+git([0-9]+)(\.[a-f0-9]+)?$ ]]; then
|
if [[ "$CHANGELOG_VERSION" =~ ^([0-9.]+)\+git([0-9]+)(\.[a-f0-9]+)?$ ]]; then
|
||||||
BASE_VERSION="${BASH_REMATCH[1]}"
|
BASE_VERSION="${BASH_REMATCH[1]}"
|
||||||
GIT_NUM="${BASH_REMATCH[2]}"
|
GIT_NUM="${BASH_REMATCH[2]}"
|
||||||
GIT_HASH="${BASH_REMATCH[3]}"
|
GIT_HASH="${BASH_REMATCH[3]}"
|
||||||
NEW_VERSION="${BASE_VERSION}+git${GIT_NUM}${GIT_HASH}ppa${REBUILD_RELEASE}"
|
NEW_VERSION="${BASE_VERSION}+git${GIT_NUM}${GIT_HASH}ppa${USE_REBUILD_NUM}"
|
||||||
echo " Using REBUILD_RELEASE=$REBUILD_RELEASE: $CHANGELOG_VERSION -> $NEW_VERSION"
|
echo " Setting PPA number to specified value: $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]}"
|
|
||||||
NEW_VERSION="${BASE_VERSION}+gitppa1"
|
|
||||||
echo " Adding PPA number: $CHANGELOG_VERSION -> $NEW_VERSION"
|
|
||||||
elif [[ "$CHANGELOG_VERSION" =~ ^([0-9.]+)ppa([0-9]+)$ ]]; then
|
elif [[ "$CHANGELOG_VERSION" =~ ^([0-9.]+)ppa([0-9]+)$ ]]; then
|
||||||
BASE_VERSION="${BASH_REMATCH[1]}"
|
BASE_VERSION="${BASH_REMATCH[1]}"
|
||||||
PPA_NUM="${BASH_REMATCH[2]}"
|
NEW_VERSION="${BASE_VERSION}ppa${USE_REBUILD_NUM}"
|
||||||
NEW_PPA_NUM=$((PPA_NUM + 1))
|
echo " Setting PPA number to specified value: $CHANGELOG_VERSION -> $NEW_VERSION"
|
||||||
NEW_VERSION="${BASE_VERSION}ppa${NEW_PPA_NUM}"
|
|
||||||
echo " Incrementing PPA number: $CHANGELOG_VERSION -> $NEW_VERSION"
|
|
||||||
elif [[ "$CHANGELOG_VERSION" =~ ^([0-9.]+)\+git([0-9]+)(\.[a-f0-9]+)?(ppa([0-9]+))?$ ]]; then
|
elif [[ "$CHANGELOG_VERSION" =~ ^([0-9.]+)\+git([0-9]+)(\.[a-f0-9]+)?(ppa([0-9]+))?$ ]]; then
|
||||||
BASE_VERSION="${BASH_REMATCH[1]}"
|
BASE_VERSION="${BASH_REMATCH[1]}"
|
||||||
GIT_NUM="${BASH_REMATCH[2]}"
|
GIT_NUM="${BASH_REMATCH[2]}"
|
||||||
GIT_HASH="${BASH_REMATCH[3]}"
|
GIT_HASH="${BASH_REMATCH[3]}"
|
||||||
PPA_NUM="${BASH_REMATCH[5]}"
|
NEW_VERSION="${BASE_VERSION}+git${GIT_NUM}${GIT_HASH}ppa${USE_REBUILD_NUM}"
|
||||||
|
echo " Setting PPA number to specified value: $CHANGELOG_VERSION -> $NEW_VERSION"
|
||||||
# Check if old DSC has ppa suffix even if changelog doesn't
|
|
||||||
if [[ -z "$PPA_NUM" ]] && [[ "$OLD_DSC_VERSION" =~ ppa([0-9]+)$ ]]; then
|
|
||||||
OLD_PPA_NUM="${BASH_REMATCH[1]}"
|
|
||||||
NEW_PPA_NUM=$((OLD_PPA_NUM + 1))
|
|
||||||
NEW_VERSION="${BASE_VERSION}+git${GIT_NUM}${GIT_HASH}ppa${NEW_PPA_NUM}"
|
|
||||||
echo " Incrementing PPA number from old DSC: $OLD_DSC_VERSION -> $NEW_VERSION"
|
|
||||||
elif [[ -n "$PPA_NUM" ]]; then
|
|
||||||
NEW_PPA_NUM=$((PPA_NUM + 1))
|
|
||||||
NEW_VERSION="${BASE_VERSION}+git${GIT_NUM}${GIT_HASH}ppa${NEW_PPA_NUM}"
|
|
||||||
echo " Incrementing PPA number: $CHANGELOG_VERSION -> $NEW_VERSION"
|
|
||||||
else
|
|
||||||
NEW_VERSION="${BASE_VERSION}+git${GIT_NUM}${GIT_HASH}ppa1"
|
|
||||||
echo " Adding PPA number: $CHANGELOG_VERSION -> $NEW_VERSION"
|
|
||||||
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}ppa${USE_REBUILD_NUM}"
|
||||||
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
|
else
|
||||||
NEW_VERSION="${BASE_VERSION}ppa1"
|
NEW_VERSION="${CHANGELOG_VERSION}ppa${USE_REBUILD_NUM}"
|
||||||
echo " Adding PPA number: $CHANGELOG_VERSION -> $NEW_VERSION"
|
echo " Warning: Could not parse version format, appending ppa${USE_REBUILD_NUM}: $CHANGELOG_VERSION -> $NEW_VERSION"
|
||||||
fi
|
|
||||||
else
|
|
||||||
# Check if old DSC has ppa suffix for unknown formats
|
|
||||||
if [[ "$OLD_DSC_VERSION" =~ ppa([0-9]+)$ ]]; then
|
|
||||||
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
|
||||||
|
|||||||
@@ -209,11 +209,16 @@ if [ "$IS_GIT_PACKAGE" = false ] && [ -n "$GIT_REPO" ]; then
|
|||||||
if [[ "$SOURCE_FORMAT" == *"native"* ]]; then
|
if [[ "$SOURCE_FORMAT" == *"native"* ]]; then
|
||||||
BASE_VERSION="${LATEST_TAG}"
|
BASE_VERSION="${LATEST_TAG}"
|
||||||
if [[ -z "${REBUILD_RELEASE:-}" ]] && [[ "$CURRENT_VERSION" =~ ^${LATEST_TAG}ppa([0-9]+)$ ]]; then
|
if [[ -z "${REBUILD_RELEASE:-}" ]] && [[ "$CURRENT_VERSION" =~ ^${LATEST_TAG}ppa([0-9]+)$ ]]; then
|
||||||
PPA_NUM=$((BASH_REMATCH[1] + 1))
|
if [[ "$IS_MANUAL" == true ]] && [[ -z "${GITHUB_ACTIONS:-}" ]] && [[ -z "${CI:-}" ]]; then
|
||||||
if [[ "$IS_MANUAL" == true ]]; then
|
# Only error for true local manual runs, not CI/workflow runs
|
||||||
info "Detected rebuild of same version (current: $CURRENT_VERSION), incrementing PPA number to $PPA_NUM"
|
error "Same version detected ($CURRENT_VERSION) but no rebuild number specified"
|
||||||
|
error "To rebuild, explicitly specify a rebuild number:"
|
||||||
|
error " ./distro/scripts/ppa-upload.sh $PACKAGE_NAME 2"
|
||||||
|
error "or use flag syntax:"
|
||||||
|
error " ./distro/scripts/ppa-upload.sh $PACKAGE_NAME --rebuild=2"
|
||||||
|
exit 1
|
||||||
else
|
else
|
||||||
info "Detected rebuild of same version (current: $CURRENT_VERSION). Not a manual run, skipping."
|
info "Detected rebuild of same version (current: $CURRENT_VERSION). No changes needed, skipping."
|
||||||
success "No changes needed (version matches)."
|
success "No changes needed (version matches)."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
@@ -225,11 +230,16 @@ if [ "$IS_GIT_PACKAGE" = false ] && [ -n "$GIT_REPO" ]; then
|
|||||||
BASE_VERSION="${LATEST_TAG}-1"
|
BASE_VERSION="${LATEST_TAG}-1"
|
||||||
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 [[ -z "${REBUILD_RELEASE:-}" ]] && [[ "$CURRENT_VERSION" =~ ^${ESCAPED_BASE}ppa([0-9]+)$ ]]; then
|
||||||
PPA_NUM=$((BASH_REMATCH[1] + 1))
|
if [[ "$IS_MANUAL" == true ]] && [[ -z "${GITHUB_ACTIONS:-}" ]] && [[ -z "${CI:-}" ]]; then
|
||||||
if [[ "$IS_MANUAL" == true ]]; then
|
# Only error for true local manual runs, not CI/workflow runs
|
||||||
info "Detected rebuild of same version (current: $CURRENT_VERSION), incrementing PPA number to $PPA_NUM"
|
error "Same version detected ($CURRENT_VERSION) but no rebuild number specified"
|
||||||
|
error "To rebuild, explicitly specify a rebuild number:"
|
||||||
|
error " ./distro/scripts/ppa-upload.sh $PACKAGE_NAME 2"
|
||||||
|
error "or use flag syntax:"
|
||||||
|
error " ./distro/scripts/ppa-upload.sh $PACKAGE_NAME --rebuild=2"
|
||||||
|
exit 1
|
||||||
else
|
else
|
||||||
info "Detected rebuild of same version (current: $CURRENT_VERSION). Not a manual run, skipping."
|
info "Detected rebuild of same version (current: $CURRENT_VERSION). No changes needed, skipping."
|
||||||
success "No changes needed (version matches)."
|
success "No changes needed (version matches)."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
@@ -376,11 +386,16 @@ if [ "$IS_GIT_PACKAGE" = true ] && [ -n "$GIT_REPO" ]; then
|
|||||||
PPA_NUM=1
|
PPA_NUM=1
|
||||||
ESCAPED_BASE=$(echo "$BASE_VERSION" | sed 's/\./\\./g' | sed 's/+/\\+/g')
|
ESCAPED_BASE=$(echo "$BASE_VERSION" | sed 's/\./\\./g' | sed 's/+/\\+/g')
|
||||||
if [[ "$CURRENT_VERSION" =~ ^${ESCAPED_BASE}ppa([0-9]+)$ ]]; then
|
if [[ "$CURRENT_VERSION" =~ ^${ESCAPED_BASE}ppa([0-9]+)$ ]]; then
|
||||||
PPA_NUM=$((BASH_REMATCH[1] + 1))
|
if [[ "$IS_MANUAL" == true ]] && [[ -z "${GITHUB_ACTIONS:-}" ]] && [[ -z "${CI:-}" ]]; then
|
||||||
if [[ "$IS_MANUAL" == true ]]; then
|
# Only error for true local manual runs, not CI/workflow runs
|
||||||
info "Detected rebuild of same commit (current: $CURRENT_VERSION), incrementing PPA number to $PPA_NUM"
|
error "Same commit detected ($CURRENT_VERSION) but no rebuild number specified"
|
||||||
|
error "To rebuild, explicitly specify a rebuild number:"
|
||||||
|
error " ./distro/scripts/ppa-upload.sh $PACKAGE_NAME 2"
|
||||||
|
error "or use flag syntax:"
|
||||||
|
error " ./distro/scripts/ppa-upload.sh $PACKAGE_NAME --rebuild=2"
|
||||||
|
exit 1
|
||||||
else
|
else
|
||||||
info "Detected rebuild of same commit (current: $CURRENT_VERSION). Not a manual run, skipping."
|
info "Detected rebuild of same commit (current: $CURRENT_VERSION). No changes needed, skipping."
|
||||||
success "No changes needed (commit matches)."
|
success "No changes needed (commit matches)."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
dms-git (1.0.2+git2521.3b511e2fppa1) questing; urgency=medium
|
dms-git (1.0.2+git2528.d336866fppa1) questing; urgency=medium
|
||||||
|
|
||||||
* Git snapshot (commit 2521: 3b511e2f)
|
* Git snapshot (commit 2528: d336866f)
|
||||||
|
|
||||||
-- Avenge Media <AvengeMedia.US@gmail.com> Sat, 13 Dec 2025 21:18:44 +0000
|
-- Avenge Media <AvengeMedia.US@gmail.com> Sun, 14 Dec 2025 03:57:33 +0000
|
||||||
|
|||||||
@@ -396,7 +396,10 @@ Singleton {
|
|||||||
visible: true,
|
visible: true,
|
||||||
popupGapsAuto: true,
|
popupGapsAuto: true,
|
||||||
popupGapsManual: 4,
|
popupGapsManual: 4,
|
||||||
maximizeDetection: true
|
maximizeDetection: true,
|
||||||
|
scrollEnabled: true,
|
||||||
|
scrollXBehavior: "column",
|
||||||
|
scrollYBehavior: "workspace"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -293,7 +293,10 @@ var SPEC = {
|
|||||||
visible: true,
|
visible: true,
|
||||||
popupGapsAuto: true,
|
popupGapsAuto: true,
|
||||||
popupGapsManual: 4,
|
popupGapsManual: 4,
|
||||||
maximizeDetection: true
|
maximizeDetection: true,
|
||||||
|
scrollEnabled: true,
|
||||||
|
scrollXBehavior: "column",
|
||||||
|
scrollYBehavior: "workspace"
|
||||||
}], onChange: "updateBarConfigs" }
|
}], onChange: "updateBarConfigs" }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -594,7 +594,8 @@ PanelWindow {
|
|||||||
propagateComposedEvents: true
|
propagateComposedEvents: true
|
||||||
z: -1
|
z: -1
|
||||||
|
|
||||||
property real scrollAccumulator: 0
|
property real scrollAccumulatorY: 0
|
||||||
|
property real scrollAccumulatorX: 0
|
||||||
property real touchpadThreshold: 500
|
property real touchpadThreshold: 500
|
||||||
property bool actionInProgress: false
|
property bool actionInProgress: false
|
||||||
|
|
||||||
@@ -604,7 +605,30 @@ PanelWindow {
|
|||||||
onTriggered: parent.actionInProgress = false
|
onTriggered: parent.actionInProgress = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleScrollAction(behavior, direction) {
|
||||||
|
switch (behavior) {
|
||||||
|
case "workspace":
|
||||||
|
topBarContent.switchWorkspace(direction);
|
||||||
|
return true;
|
||||||
|
case "column":
|
||||||
|
if (!CompositorService.isNiri)
|
||||||
|
return false;
|
||||||
|
if (direction > 0)
|
||||||
|
NiriService.moveColumnRight();
|
||||||
|
else
|
||||||
|
NiriService.moveColumnLeft();
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onWheel: wheel => {
|
onWheel: wheel => {
|
||||||
|
if (!(barConfig?.scrollEnabled ?? true)) {
|
||||||
|
wheel.accepted = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (actionInProgress) {
|
if (actionInProgress) {
|
||||||
wheel.accepted = false;
|
wheel.accepted = false;
|
||||||
return;
|
return;
|
||||||
@@ -612,9 +636,34 @@ PanelWindow {
|
|||||||
|
|
||||||
const deltaY = wheel.angleDelta.y;
|
const deltaY = wheel.angleDelta.y;
|
||||||
const deltaX = wheel.angleDelta.x;
|
const deltaX = wheel.angleDelta.x;
|
||||||
|
const xBehavior = barConfig?.scrollXBehavior ?? "column";
|
||||||
|
const yBehavior = barConfig?.scrollYBehavior ?? "workspace";
|
||||||
|
|
||||||
if (CompositorService.isNiri && Math.abs(deltaX) > Math.abs(deltaY)) {
|
if (CompositorService.isNiri && xBehavior !== "none" && Math.abs(deltaX) > Math.abs(deltaY)) {
|
||||||
topBarContent.switchApp(deltaX);
|
const isMouseWheel = Math.abs(deltaX) >= 120 && (Math.abs(deltaX) % 120) === 0;
|
||||||
|
const direction = deltaX < 0 ? 1 : -1;
|
||||||
|
|
||||||
|
if (isMouseWheel) {
|
||||||
|
if (handleScrollAction(xBehavior, direction)) {
|
||||||
|
actionInProgress = true;
|
||||||
|
cooldownTimer.restart();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
scrollAccumulatorX += deltaX;
|
||||||
|
if (Math.abs(scrollAccumulatorX) >= touchpadThreshold) {
|
||||||
|
const touchDirection = scrollAccumulatorX < 0 ? 1 : -1;
|
||||||
|
if (handleScrollAction(xBehavior, touchDirection)) {
|
||||||
|
actionInProgress = true;
|
||||||
|
cooldownTimer.restart();
|
||||||
|
}
|
||||||
|
scrollAccumulatorX = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
wheel.accepted = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (yBehavior === "none") {
|
||||||
wheel.accepted = false;
|
wheel.accepted = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -623,19 +672,20 @@ PanelWindow {
|
|||||||
const direction = deltaY < 0 ? 1 : -1;
|
const direction = deltaY < 0 ? 1 : -1;
|
||||||
|
|
||||||
if (isMouseWheel) {
|
if (isMouseWheel) {
|
||||||
topBarContent.switchWorkspace(direction);
|
if (handleScrollAction(yBehavior, direction)) {
|
||||||
actionInProgress = true;
|
actionInProgress = true;
|
||||||
cooldownTimer.restart();
|
cooldownTimer.restart();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
scrollAccumulator += deltaY;
|
scrollAccumulatorY += deltaY;
|
||||||
|
if (Math.abs(scrollAccumulatorY) >= touchpadThreshold) {
|
||||||
if (Math.abs(scrollAccumulator) >= touchpadThreshold) {
|
const touchDirection = scrollAccumulatorY < 0 ? 1 : -1;
|
||||||
const touchDirection = scrollAccumulator < 0 ? 1 : -1;
|
if (handleScrollAction(yBehavior, touchDirection)) {
|
||||||
topBarContent.switchWorkspace(touchDirection);
|
|
||||||
scrollAccumulator = 0;
|
|
||||||
actionInProgress = true;
|
actionInProgress = true;
|
||||||
cooldownTimer.restart();
|
cooldownTimer.restart();
|
||||||
}
|
}
|
||||||
|
scrollAccumulatorY = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wheel.accepted = false;
|
wheel.accepted = false;
|
||||||
|
|||||||
@@ -237,7 +237,10 @@ Item {
|
|||||||
visible: defaultBar.visible ?? true,
|
visible: defaultBar.visible ?? true,
|
||||||
popupGapsAuto: defaultBar.popupGapsAuto ?? true,
|
popupGapsAuto: defaultBar.popupGapsAuto ?? true,
|
||||||
popupGapsManual: defaultBar.popupGapsManual ?? 4,
|
popupGapsManual: defaultBar.popupGapsManual ?? 4,
|
||||||
maximizeDetection: defaultBar.maximizeDetection ?? true
|
maximizeDetection: defaultBar.maximizeDetection ?? true,
|
||||||
|
scrollEnabled: defaultBar.scrollEnabled ?? true,
|
||||||
|
scrollXBehavior: defaultBar.scrollXBehavior ?? "column",
|
||||||
|
scrollYBehavior: defaultBar.scrollYBehavior ?? "workspace"
|
||||||
};
|
};
|
||||||
SettingsData.addBarConfig(newBar);
|
SettingsData.addBarConfig(newBar);
|
||||||
selectedBarId = newId;
|
selectedBarId = newId;
|
||||||
@@ -751,6 +754,90 @@ Item {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SettingsToggleCard {
|
||||||
|
iconName: "mouse"
|
||||||
|
title: I18n.tr("Scroll Wheel")
|
||||||
|
description: I18n.tr("Control workspaces and columns by scrolling on the bar")
|
||||||
|
visible: selectedBarConfig?.enabled
|
||||||
|
checked: selectedBarConfig?.scrollEnabled ?? true
|
||||||
|
onToggled: checked => SettingsData.updateBarConfig(selectedBarId, {
|
||||||
|
scrollEnabled: checked
|
||||||
|
})
|
||||||
|
|
||||||
|
SettingsButtonGroupRow {
|
||||||
|
text: I18n.tr("Y Axis")
|
||||||
|
model: CompositorService.isNiri ? [I18n.tr("None"), I18n.tr("Workspace"), I18n.tr("Column")] : [I18n.tr("None"), I18n.tr("Workspace")]
|
||||||
|
currentIndex: {
|
||||||
|
switch (selectedBarConfig?.scrollYBehavior || "workspace") {
|
||||||
|
case "none":
|
||||||
|
return 0;
|
||||||
|
case "workspace":
|
||||||
|
return 1;
|
||||||
|
case "column":
|
||||||
|
return 2;
|
||||||
|
default:
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onSelectionChanged: (index, selected) => {
|
||||||
|
if (!selected)
|
||||||
|
return;
|
||||||
|
let behavior = "workspace";
|
||||||
|
switch (index) {
|
||||||
|
case 0:
|
||||||
|
behavior = "none";
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
behavior = "workspace";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
behavior = "column";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
SettingsData.updateBarConfig(selectedBarId, {
|
||||||
|
scrollYBehavior: behavior
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SettingsButtonGroupRow {
|
||||||
|
text: I18n.tr("X Axis")
|
||||||
|
visible: CompositorService.isNiri
|
||||||
|
model: [I18n.tr("None"), I18n.tr("Workspace"), I18n.tr("Column")]
|
||||||
|
currentIndex: {
|
||||||
|
switch (selectedBarConfig?.scrollXBehavior || "column") {
|
||||||
|
case "none":
|
||||||
|
return 0;
|
||||||
|
case "workspace":
|
||||||
|
return 1;
|
||||||
|
case "column":
|
||||||
|
return 2;
|
||||||
|
default:
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onSelectionChanged: (index, selected) => {
|
||||||
|
if (!selected)
|
||||||
|
return;
|
||||||
|
let behavior = "column";
|
||||||
|
switch (index) {
|
||||||
|
case 0:
|
||||||
|
behavior = "none";
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
behavior = "workspace";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
behavior = "column";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
SettingsData.updateBarConfig(selectedBarId, {
|
||||||
|
scrollXBehavior: behavior
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SettingsCard {
|
SettingsCard {
|
||||||
iconName: "space_bar"
|
iconName: "space_bar"
|
||||||
title: I18n.tr("Spacing")
|
title: I18n.tr("Spacing")
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import Quickshell
|
|||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import Quickshell.Wayland
|
import Quickshell.Wayland
|
||||||
import qs.Common
|
import qs.Common
|
||||||
|
import qs.Services
|
||||||
|
|
||||||
Singleton {
|
Singleton {
|
||||||
id: root
|
id: root
|
||||||
@@ -20,6 +21,7 @@ Singleton {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
readonly property bool shouldPauseCycling: anyFullscreen || SessionService.locked
|
||||||
property string cachedCyclingTime: SessionData.wallpaperCyclingTime
|
property string cachedCyclingTime: SessionData.wallpaperCyclingTime
|
||||||
property int cachedCyclingInterval: SessionData.wallpaperCyclingInterval
|
property int cachedCyclingInterval: SessionData.wallpaperCyclingInterval
|
||||||
property string lastTimeCheck: ""
|
property string lastTimeCheck: ""
|
||||||
@@ -34,7 +36,7 @@ Singleton {
|
|||||||
running: false
|
running: false
|
||||||
repeat: true
|
repeat: true
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
if (typeof WallpaperCyclingService !== "undefined" && targetScreen !== "" && !WallpaperCyclingService.anyFullscreen) {
|
if (typeof WallpaperCyclingService !== "undefined" && targetScreen !== "" && !WallpaperCyclingService.shouldPauseCycling) {
|
||||||
WallpaperCyclingService.cycleNextForMonitor(targetScreen);
|
WallpaperCyclingService.cycleNextForMonitor(targetScreen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -113,6 +115,16 @@ Singleton {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: SessionService
|
||||||
|
|
||||||
|
function onSessionUnlocked() {
|
||||||
|
if (SessionData.wallpaperCyclingEnabled || SessionData.perMonitorWallpaper) {
|
||||||
|
updateCyclingState();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function updateCyclingState() {
|
function updateCyclingState() {
|
||||||
if (SessionData.perMonitorWallpaper) {
|
if (SessionData.perMonitorWallpaper) {
|
||||||
stopCycling();
|
stopCycling();
|
||||||
@@ -151,13 +163,18 @@ Singleton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function startCycling() {
|
function startCycling() {
|
||||||
if (SessionData.wallpaperCyclingMode === "interval") {
|
switch (SessionData.wallpaperCyclingMode) {
|
||||||
|
case "interval":
|
||||||
|
lastTimeCheck = "";
|
||||||
intervalTimer.interval = cachedCyclingInterval * 1000;
|
intervalTimer.interval = cachedCyclingInterval * 1000;
|
||||||
intervalTimer.start();
|
intervalTimer.start();
|
||||||
cyclingActive = true;
|
cyclingActive = true;
|
||||||
} else if (SessionData.wallpaperCyclingMode === "time") {
|
break;
|
||||||
|
case "time":
|
||||||
|
intervalTimer.stop();
|
||||||
cyclingActive = true;
|
cyclingActive = true;
|
||||||
checkTimeBasedCycling();
|
checkTimeBasedCycling();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,7 +184,13 @@ Singleton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function startMonitorCycling(screenName, settings) {
|
function startMonitorCycling(screenName, settings) {
|
||||||
if (settings.mode === "interval") {
|
switch (settings.mode) {
|
||||||
|
case "interval":
|
||||||
|
{
|
||||||
|
var newChecks = Object.assign({}, monitorLastTimeChecks);
|
||||||
|
delete newChecks[screenName];
|
||||||
|
monitorLastTimeChecks = newChecks;
|
||||||
|
|
||||||
var timer = monitorTimers[screenName];
|
var timer = monitorTimers[screenName];
|
||||||
if (!timer && monitorTimerComponent && monitorTimerComponent.status === Component.Ready) {
|
if (!timer && monitorTimerComponent && monitorTimerComponent.status === Component.Ready) {
|
||||||
var newTimers = Object.assign({}, monitorTimers);
|
var newTimers = Object.assign({}, monitorTimers);
|
||||||
@@ -180,10 +203,24 @@ Singleton {
|
|||||||
timer.interval = settings.interval * 1000;
|
timer.interval = settings.interval * 1000;
|
||||||
timer.start();
|
timer.start();
|
||||||
}
|
}
|
||||||
} else if (settings.mode === "time") {
|
break;
|
||||||
|
}
|
||||||
|
case "time":
|
||||||
|
{
|
||||||
|
var existingTimer = monitorTimers[screenName];
|
||||||
|
if (existingTimer) {
|
||||||
|
existingTimer.stop();
|
||||||
|
existingTimer.destroy();
|
||||||
|
var newTimers = Object.assign({}, monitorTimers);
|
||||||
|
delete newTimers[screenName];
|
||||||
|
monitorTimers = newTimers;
|
||||||
|
}
|
||||||
|
|
||||||
var newChecks = Object.assign({}, monitorLastTimeChecks);
|
var newChecks = Object.assign({}, monitorLastTimeChecks);
|
||||||
newChecks[screenName] = "";
|
newChecks[screenName] = "";
|
||||||
monitorLastTimeChecks = newChecks;
|
monitorLastTimeChecks = newChecks;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -319,7 +356,7 @@ Singleton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function checkTimeBasedCycling() {
|
function checkTimeBasedCycling() {
|
||||||
if (anyFullscreen)
|
if (shouldPauseCycling)
|
||||||
return;
|
return;
|
||||||
const currentTime = Qt.formatTime(systemClock.date, "hh:mm");
|
const currentTime = Qt.formatTime(systemClock.date, "hh:mm");
|
||||||
|
|
||||||
@@ -367,7 +404,7 @@ Singleton {
|
|||||||
running: false
|
running: false
|
||||||
repeat: true
|
repeat: true
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
if (anyFullscreen)
|
if (shouldPauseCycling)
|
||||||
return;
|
return;
|
||||||
cycleToNextWallpaper();
|
cycleToNextWallpaper();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user