mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-12 08:42:13 -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:
@@ -1452,6 +1452,19 @@ Singleton {
|
||||
});
|
||||
}
|
||||
|
||||
function moveWorkspaceToIndex(workspaceIdx, targetIndex) {
|
||||
return send({
|
||||
"Action": {
|
||||
"MoveWorkspaceToIndex": {
|
||||
"index": targetIndex,
|
||||
"reference": {
|
||||
"Index": workspaceIdx
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
function screenshot(): string {
|
||||
if (!CompositorService.isNiri) {
|
||||
|
||||
Reference in New Issue
Block a user