Skip to content

Add optional per-desktop layouts with live desktop switching - #61

Open
dartcafe wants to merge 3 commits into
BasGeertsema:mainfrom
dartcafe:feature/desktop-preset-binding
Open

dartcafe wants to merge 3 commits into
BasGeertsema:mainfrom
dartcafe:feature/desktop-preset-binding

Conversation

@dartcafe

@dartcafe dartcafe commented Sep 12, 2026

Copy link
Copy Markdown

What do you think? Valuable?

This feature allows optional per desktop layouts, so you can have different layouts per desktop and display.
If not set, it falls back to the default layout of the particular display or the built in default.

Summary

  • New enablePerDesktopLayouts setting (default off, backward-compatible):
    once enabled, each virtual desktop gets its own independent layout,
    cloned from the display's shared layout the first time that desktop is
    edited — it diverges from then on instead of aliasing the same shared
    object as other not-yet-customised desktops.
  • The layout editor now stays open across a desktop switch: hover the
    mouse at the left/right screen edge to reveal an arrow that switches to
    the adjacent desktop, or use your own workspace hotkey — either way the
    editor immediately reflects the newly active desktop's layout. Closing
    the editor restores whichever desktop was active when it was opened.

Fixes found while building this

  • extension.js: uuid was hardcoded instead of read from the meta
    argument Cinnamon passes to init(). Now reads it correctly, which also
    makes running a differently-named fork side by side with the original a
    non-issue (separate config directories).
  • grid-editor.js: the load/save preset dialogs are separate top-level
    actors drawn on top of the main canvas, but motion/button/key events
    still reached the editor operations underneath while a dialog was open
    (e.g. silently starting a split preview behind the dialog). Now guarded.
  • grid-editor.js: preset preview tiles applied their inset margin twice
    (once in calculateRects, again in the drawLayout call), which
    cancelled out and left the grid preview flush against the tile edge
    instead of centered. Fixed.

@dartcafe

dartcafe commented Sep 12, 2026

Copy link
Copy Markdown
Author

Addressing some Copilot findings:

  • ce2f2ee fixes too late dialog guard
  • ada8f84 changes the log level for missing layout files to reduce error logging noise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant