1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-05 05:12:05 -04:00

feat(niri): Add drag-and-drop workspace reordering (#1569)

* feat(niri): Add drag-and-drop workspace reordering

Add interactive drag-and-drop reordering for Niri workspace indicators
with smooth animations matching the system tray behavior.

- Add moveWorkspaceToIndex() to NiriService for workspace reordering
- Implement drag detection with 5px threshold
- Add shift animation for items between source and target
- Clamp drag offset to stay within workspace row bounds
- Reset drag state when workspace list changes during drag
- Visual feedback: opacity change, border highlight on drag/drop target

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(settings): Add workspace drag reorder toggle

Add workspaceDragReorder setting to enable/disable workspace
drag-and-drop reordering. Enabled by default, only visible on Niri.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
grokXcopilot
2026-02-02 19:58:05 +02:00
committed by GitHub
parent d934b3b3b4
commit eaa6a664c8
5 changed files with 200 additions and 30 deletions

View File

@@ -155,6 +155,16 @@ Item {
onToggled: checked => SettingsData.set("reverseScrolling", checked)
}
SettingsToggleRow {
settingKey: "workspaceDragReorder"
tags: ["workspace", "drag", "reorder", "sort", "move"]
text: I18n.tr("Drag to Reorder")
description: I18n.tr("Drag workspace indicators to reorder them")
checked: SettingsData.workspaceDragReorder
visible: CompositorService.isNiri
onToggled: checked => SettingsData.set("workspaceDragReorder", checked)
}
SettingsToggleRow {
settingKey: "dwlShowAllTags"
tags: ["dwl", "tags", "workspace"]