mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-30 23:17:51 -04:00
submodule: dank-qml-common is now dux-qml-common
This commit is contained in:
1 parent
5ec42c91dc
commit
d04eae4210
16 files changed
+34
-34
No files matched your search
@@ -105,7 +105,7 @@ jobs:
|
||||
- QML: undefined refs, missing imports, binding loops, bindings that never update, handlers on the wrong object, raw Flickable/ListView/ScrollView instead of the D* wrappers (DFlickable, DListView, DGridView).
|
||||
- Deprecated shims: added code that uses a deprecated type or imports a deprecated module. Every shim calls `Deprecation.type(` or `Deprecation.module(`; list them with `git grep -h -e "Deprecation.type(" -e "Deprecation.module(" origin/${{ steps.pr.outputs.base }} -- quickshell`, which gives the old and new name. Grep the base, not HEAD, since a PR branched before the rename has no shims. Flag it even when the rest of the file still uses old names on the PR's base; suggest the new name and a rebase if the base predates it.
|
||||
- Security: command injection, path traversal, unsafe file permissions, secrets in code.
|
||||
- CONTRIBUTING.md rules: user-facing strings in `I18n.tr()` with translator context, reuse existing terms from quickshell/translations/en.json; en.json and template.json must not be touched in a PR; mocks under core/internal/mocks/ are regenerated not hand-edited; new dank-qml-common contract properties need the matching library change.
|
||||
- CONTRIBUTING.md rules: user-facing strings in `I18n.tr()` with translator context, reuse existing terms from quickshell/translations/en.json; en.json and template.json must not be touched in a PR; mocks under core/internal/mocks/ are regenerated not hand-edited; new dux-qml-common contract properties need the matching library change.
|
||||
|
||||
Don't flag style or naming (deprecated shims are not naming), pre-existing issues, anything a linter or compiler catches, speculative input-dependent problems, missing tests or docs, or refactor ideas. Not sure it's real: don't post it.
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
name: Sync flake.lock to dank-qml-common
|
||||
name: Sync flake.lock to dux-qml-common
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- "dank-qml-common"
|
||||
- "dux-qml-common"
|
||||
branches:
|
||||
- master
|
||||
- "stable-*"
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
- name: Point flake input at the submodule commit
|
||||
run: |
|
||||
set -euo pipefail
|
||||
submodule_rev=$(git ls-tree HEAD dank-qml-common --object-only)
|
||||
submodule_rev=$(git ls-tree HEAD dux-qml-common --object-only)
|
||||
flake_rev=$(python3 -c "import json; print(json.load(open('flake.lock'))['nodes']['dank-qml-common']['locked']['rev'])")
|
||||
[ "$submodule_rev" = "$flake_rev" ] && { echo "flake.lock already matches $submodule_rev"; exit 0; }
|
||||
nix flake lock --override-input dank-qml-common "github:duxlabs-dev/dux-qml-common/$submodule_rev"
|
||||
@@ -52,6 +52,6 @@ jobs:
|
||||
git config user.name "dux-ci[bot]"
|
||||
git config user.email "344434142+dux-ci[bot]@users.noreply.github.com"
|
||||
git add flake.lock
|
||||
git commit -m "nix: sync flake.lock to dank-qml-common submodule"
|
||||
git commit -m "nix: sync flake.lock to dux-qml-common submodule"
|
||||
git pull --rebase origin ${{ github.ref_name }}
|
||||
git push https://x-access-token:${GH_TOKEN}@github.com/${{ github.repository }}.git HEAD:${{ github.ref_name }}
|
||||
@@ -4,7 +4,7 @@ on:
|
||||
push:
|
||||
paths:
|
||||
- "quickshell/**"
|
||||
- "dank-qml-common"
|
||||
- "dux-qml-common"
|
||||
- "Makefile"
|
||||
- "core/Makefile"
|
||||
- "scripts/shell-test-excludes.txt"
|
||||
@@ -16,7 +16,7 @@ on:
|
||||
branches: [master, main, "stable-*"]
|
||||
paths:
|
||||
- "quickshell/**"
|
||||
- "dank-qml-common"
|
||||
- "dux-qml-common"
|
||||
- "Makefile"
|
||||
- "core/Makefile"
|
||||
- "scripts/shell-test-excludes.txt"
|
||||
|
||||
@@ -354,13 +354,13 @@ jobs:
|
||||
|
||||
# Replace the DCommon symlink with real submodule content for packaging
|
||||
rm quickshell/DCommon
|
||||
cp -r dank-qml-common/DCommon quickshell/DCommon
|
||||
cp -r dux-qml-common/DCommon quickshell/DCommon
|
||||
|
||||
# Create full source tarball (GitHub tag archives never contain submodule content)
|
||||
VERSION_NUM=${TAG#v}
|
||||
tar --exclude='.git' \
|
||||
--exclude='.github' \
|
||||
--exclude='dank-qml-common' \
|
||||
--exclude='dux-qml-common' \
|
||||
--exclude='_release_assets' \
|
||||
--exclude='_core_assets' \
|
||||
--exclude='RELEASE_BODY.md' \
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
[submodule "dank-qml-common"]
|
||||
path = dank-qml-common
|
||||
path = dux-qml-common
|
||||
url = https://github.com/duxlabs-dev/dux-qml-common.git
|
||||
branch = master
|
||||
@@ -12,7 +12,7 @@ repos:
|
||||
entry: python3 quickshell/tests/run-qml.py
|
||||
language: system
|
||||
types: []
|
||||
files: ^(quickshell/|dank-qml-common$|Makefile$|core/Makefile$|scripts/shell-test-excludes\.txt$|flake\.nix$|\.pre-commit-config\.yaml$|\.github/workflows/(qml-tests|prek)\.yml$)
|
||||
files: ^(quickshell/|dux-qml-common$|Makefile$|core/Makefile$|scripts/shell-test-excludes\.txt$|flake\.nix$|\.pre-commit-config\.yaml$|\.github/workflows/(qml-tests|prek)\.yml$)
|
||||
pass_filenames: false
|
||||
require_serial: true
|
||||
- repo: local
|
||||
|
||||
@@ -6,7 +6,7 @@ DMS is an open-source desktop shell for Wayland compositors on linux, built to w
|
||||
|
||||
- core/ - Go. `cmd/dms` runs quickshell, CLI utilities, and the unix socket server the UI depends on. `cmd/dankinstall` is a separate installer TUI.
|
||||
- quickshell/ - the entire UI: Common/ (singletons, Theme, settings), Services/ (system and core access), Modules/ (bar, dock, lock, ...), Modals/, Widgets/ (shell-specific widgets and deprecated Dank* shims), PLUGINS/, translations/
|
||||
- dank-qml-common/ - submodule of shared QML widgets
|
||||
- dux-qml-common/ - submodule of shared QML widgets
|
||||
- docs/, distro/ - IPC and theme docs, packaging
|
||||
|
||||
## Rules
|
||||
|
||||
+6
-6
@@ -6,7 +6,7 @@ To contribute fork this repository, make your changes, and open a pull request.
|
||||
|
||||
## Setup
|
||||
|
||||
Clone with submodules — the shared widget library ([dank-qml-common](https://github.com/duxlabs-dev/dux-qml-common)) is vendored at `dank-qml-common/` and symlinked into `quickshell/DCommon`:
|
||||
Clone with submodules — the shared widget library ([dux-qml-common](https://github.com/duxlabs-dev/dux-qml-common)) is vendored at `dux-qml-common/` and symlinked into `quickshell/DCommon`:
|
||||
|
||||
```bash
|
||||
git clone --recurse-submodules https://github.com/duxlabs-dev/dux-shell.git
|
||||
@@ -60,12 +60,12 @@ The Go core depends on [dankgo](https://github.com/duxlabs-dev/dux-go) for loggi
|
||||
go work init ./core ../dankgo
|
||||
```
|
||||
|
||||
## Shared widgets (dank-qml-common)
|
||||
## Shared widgets (dux-qml-common)
|
||||
|
||||
Everything under `quickshell/DCommon/` (core widgets, the file browser, scroll physics, bundled fonts) is shared across the DMS suite and lives in the `dank-qml-common` submodule. It is a normal git worktree:
|
||||
Everything under `quickshell/DCommon/` (core widgets, the file browser, scroll physics, bundled fonts) is shared across the DMS suite and lives in the `dux-qml-common` submodule. It is a normal git worktree:
|
||||
|
||||
1. Edit files under `dank-qml-common/` (or through the `quickshell/DCommon` symlink — same files) and test in the running shell; hot reload works as usual. For isolated widget work, the library is its own runnable config with a gallery: `qs -c dank-qml-common`.
|
||||
2. Commit and PR those changes in the `dank-qml-common` repo: `cd dank-qml-common && git switch -c my-change`, push, open the PR there.
|
||||
1. Edit files under `dux-qml-common/` (or through the `quickshell/DCommon` symlink — same files) and test in the running shell; hot reload works as usual. For isolated widget work, the library is its own runnable config with a gallery: `qs -c dux-qml-common`.
|
||||
2. Commit and PR those changes in the `dux-qml-common` repo: `cd dux-qml-common && git switch -c my-change`, push, open the PR there.
|
||||
3. Once merged, bump the pointer here: `make update-common` (updates the submodule and the nix flake input together), then commit alongside any DMS-side changes. If you only bump the submodule, CI syncs `flake.lock` to it automatically on master.
|
||||
|
||||
The submodule URL in `.gitmodules` is HTTPS so CI and anonymous clones keep working. To push over SSH instead of being prompted for credentials, add a push rewrite to your git config — fetches stay HTTPS, pushes use SSH:
|
||||
@@ -158,7 +158,7 @@ Preferably, try to keep new terms to a minimum and re-use existing terms where p
|
||||
|
||||
Don't re-extract the translations. `en.json` and `template.json` are synced with POEditor by a maintainer script, so running `extract_translations.py` in your PR just makes a diff that fights the next sync. Add your `I18n.tr()` calls and leave the catalogs alone. (`settings_search_index.json` is the exception, the pre-commit hook regenerates that one when you touch settings QML.)
|
||||
|
||||
Strings inside `quickshell/DCommon/` are owned by the dux-qml-common repo but stay in the DMS POEditor project — extraction here deliberately skips them, and `scripts/i18nsync.py sync` uploads the union of app terms and the submodule's terms instead (common terms carry the `dank-qml-common` tag). On download the sync splits the exports: app translations go to `quickshell/translations/poexports/`, common translations go to `dank-qml-common/DCommon/translations/poexports/` for you to commit in that repo and bump. At runtime `I18n` merges both catalogs (app terms win). Other apps (dankcalendar) keep their own POEditor projects and merge the `dank-qml-common`-tagged terms from the DMS project.
|
||||
Strings inside `quickshell/DCommon/` are owned by the dux-qml-common repo but stay in the DMS POEditor project — extraction here deliberately skips them, and `scripts/i18nsync.py sync` uploads the union of app terms and the submodule's terms instead (common terms carry the `dux-qml-common` tag). On download the sync splits the exports: app translations go to `quickshell/translations/poexports/`, common translations go to `dux-qml-common/DCommon/translations/poexports/` for you to commit in that repo and bump. At runtime `I18n` merges both catalogs (app terms win). Other apps (dankcalendar) keep their own POEditor projects and merge the `dux-qml-common`-tagged terms from the DMS project.
|
||||
|
||||
### GO (`core` directory)
|
||||
|
||||
|
||||
@@ -46,10 +46,10 @@ lint-qml:
|
||||
test-qml:
|
||||
QMLTESTRUNNER="$(QMLTESTRUNNER)" python3 quickshell/tests/run-qml.py
|
||||
|
||||
# Pull the latest dank-qml-common and pin it everywhere it is consumed
|
||||
# Pull the latest dux-qml-common and pin it everywhere it is consumed
|
||||
# (submodule pointer + nix flake input). Commit both in one change.
|
||||
update-common:
|
||||
git submodule update --remote --merge dank-qml-common
|
||||
git submodule update --remote --merge dux-qml-common
|
||||
nix --extra-experimental-features 'nix-command flakes' flake update dank-qml-common
|
||||
|
||||
# Installation targets
|
||||
|
||||
@@ -146,7 +146,7 @@ DMS is one piece of the suite. The rest lives in its own repos:
|
||||
- [dankcalendar](https://github.com/duxlabs-dev/dux-calendar) - Local, Google, Microsoft, and CalDAV calendars for the Dux desktop.
|
||||
- [dgop](https://github.com/duxlabs-dev/dux-gop) - System monitoring TUI and Go library; its library powers the process list and dashboard widgets inside the dms daemon.
|
||||
- [dsearch](https://github.com/duxlabs-dev/dux-search) - Fast file search that powers file results in the launcher.
|
||||
- [dank-qml-common](https://github.com/duxlabs-dev/dux-qml-common) - Shared QML widgets and components used by DMS, dank-greeter, and dankcalendar.
|
||||
- [dux-qml-common](https://github.com/duxlabs-dev/dux-qml-common) - Shared QML widgets and components used by DMS, dank-greeter, and dankcalendar.
|
||||
- [dankgo](https://github.com/duxlabs-dev/dux-go) - Common Go modules behind the single binary apps.
|
||||
|
||||
## Development
|
||||
|
||||
@@ -29,8 +29,8 @@ VCS: {{{ git_repo_vcs }}}
|
||||
Source0: {{{ git_repo_pack }}}
|
||||
Source1: https://go.dev/dl/go%{go_toolchain_version}.linux-amd64.tar.gz
|
||||
Source2: https://go.dev/dl/go%{go_toolchain_version}.linux-arm64.tar.gz
|
||||
# git_repo_pack archives skip submodule content, so pack dank-qml-common separately
|
||||
Source3: {{{ git_pack path=$GIT_ROOT/dank-qml-common dir_name=dank-qml-common source_name=dank-qml-common.tar.gz }}}
|
||||
# git_repo_pack archives skip submodule content, so pack dux-qml-common separately
|
||||
Source3: {{{ git_pack path=$GIT_ROOT/dux-qml-common dir_name=dux-qml-common source_name=dux-qml-common.tar.gz }}}
|
||||
|
||||
BuildRequires: git-core
|
||||
BuildRequires: gzip
|
||||
@@ -74,7 +74,7 @@ Provides native DBus bindings, NetworkManager integration, and system utilities.
|
||||
|
||||
%prep
|
||||
{{{ git_repo_setup_macro }}}
|
||||
rm -rf dank-qml-common
|
||||
rm -rf dux-qml-common
|
||||
tar -xzf %{SOURCE3}
|
||||
test -e quickshell/DCommon/Widgets/DIcon.qml || { echo "DCommon missing after submodule unpack"; exit 1; }
|
||||
|
||||
|
||||
File renamed without changes.
+1
-1
@@ -1 +1 @@
|
||||
../dank-qml-common/DCommon
|
||||
../dux-qml-common/DCommon
|
||||
@@ -35,7 +35,7 @@ Plugins are discovered from `~/.config/dms/plugins/` and managed by PluginServic
|
||||
- Lists built-in and plugin tabs and overview cards
|
||||
- Hosts plugin tabs in `DashTabHost.qml` and cards in `Overview/DashCardSlot.qml`
|
||||
|
||||
Many widgets are implemented in the shared [dank-qml-common](https://github.com/duxlabs-dev/dux-qml-common) library and re-exported by DMS. Plugins should keep importing `qs.Common`, `qs.Services`, `qs.Widgets`, and `qs.Modules.Plugins` — these remain the supported plugin API and are unaffected by where a widget is implemented.
|
||||
Many widgets are implemented in the shared [dux-qml-common](https://github.com/duxlabs-dev/dux-qml-common) library and re-exported by DMS. Plugins should keep importing `qs.Common`, `qs.Services`, `qs.Widgets`, and `qs.Modules.Plugins` — these remain the supported plugin API and are unaffected by where a widget is implemented.
|
||||
|
||||
## Plugin Structure
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ Theme.fullRadius(width, height)
|
||||
Theme.buttonRadius(width, height, buttonHeight, pressed, true)
|
||||
```
|
||||
|
||||
Use `fullRadius()` for pills and round controls so lower strength values reduce their rounding. `cornerRadiusFull` remains available for compatibility. See the shared [shape reference](../../dank-qml-common/SHAPES.md) for component baselines.
|
||||
Use `fullRadius()` for pills and round controls so lower strength values reduce their rounding. `cornerRadiusFull` remains available for compatibility. See the shared [shape reference](../../dux-qml-common/SHAPES.md) for component baselines.
|
||||
|
||||
## Colors
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@ POEXPORTS_DIR = REPO_ROOT / "translations" / "poexports"
|
||||
SYNC_STATE = REPO_ROOT / ".git" / "i18n_sync_state.json"
|
||||
TERM_RENAMES_JSON = REPO_ROOT / "translations" / "term_renames.json"
|
||||
|
||||
# dank-qml-common terms live in the same DMS POEditor project (tagged
|
||||
# dux-qml-common terms live in the same DMS POEditor project (tagged
|
||||
# dank-qml-common); their translations ship inside the submodule so every
|
||||
# consumer gets them with the pointer. dankcalendar merges from this project.
|
||||
COMMON_ROOT = REPO_ROOT.parent / "dank-qml-common"
|
||||
COMMON_ROOT = REPO_ROOT.parent / "dux-qml-common"
|
||||
COMMON_EN_JSON = COMMON_ROOT / "translations" / "en.json"
|
||||
COMMON_POEXPORTS_DIR = COMMON_ROOT / "DCommon" / "translations" / "poexports"
|
||||
|
||||
@@ -149,7 +149,7 @@ def json_changed(file_path, new_data):
|
||||
|
||||
def load_common_entries():
|
||||
if not COMMON_EN_JSON.exists():
|
||||
error("dank-qml-common submodule not initialized (git submodule update --init)")
|
||||
error("dux-qml-common submodule not initialized (git submodule update --init)")
|
||||
with open(COMMON_EN_JSON) as f:
|
||||
entries = json.load(f)
|
||||
return [{**e, "tags": sorted(set(e.get("tags", [])) | {"dank-qml-common"})} for e in entries]
|
||||
@@ -398,7 +398,7 @@ def download_translations(api_token, project_id, common_keys, greeter_keys):
|
||||
info(f"No changes for {filename}")
|
||||
|
||||
if write_if_changed(common_file, common_part):
|
||||
success(f"Updated dank-qml-common {filename}")
|
||||
success(f"Updated dux-qml-common {filename}")
|
||||
common_changed.append(filename)
|
||||
|
||||
return any_changed, common_changed
|
||||
@@ -521,7 +521,7 @@ def main():
|
||||
if prune:
|
||||
warn("--prune deletes every POEditor term missing from the local en.json, including its translations.")
|
||||
warn("The official plugin checkout is refreshed first, so pruning keeps official plugin terms.")
|
||||
warn("dank-qml-common terms are included from the submodule, so pruning keeps them as long as the submodule is current.")
|
||||
warn("dux-qml-common terms are included from the submodule, so pruning keeps them as long as the submodule is current.")
|
||||
warn("dms-greeter terms are fetched from POEditor and re-included, so pruning keeps them.")
|
||||
|
||||
common_entries = load_common_entries()
|
||||
@@ -565,8 +565,8 @@ def main():
|
||||
info("Already in sync")
|
||||
|
||||
if common_files_changed:
|
||||
info(f"dank-qml-common poexports updated: {', '.join(common_files_changed)}")
|
||||
info("Commit those in dank-qml-common and bump the pointer here (make update-common).")
|
||||
info(f"dux-qml-common poexports updated: {', '.join(common_files_changed)}")
|
||||
info("Commit those in dux-qml-common and bump the pointer here (make update-common).")
|
||||
|
||||
elif command == "local":
|
||||
info("Updating en.json locally (no POEditor sync)")
|
||||
|
||||
Reference in new issue
Block a user