Skip to content

Remember the size and position of the settings window between sessions #1462

Description

@skanpaul

Description

The settings window always opens with the same hardcoded geometry, no matter how the
user resized or moved it during the previous session.

In src/main/settings-window.ts, the BrowserWindow options are fixed:

fullscreenable: false,
width: 1350,
height: 900,
minWidth: 1000,
minHeight: 700,

Nothing is persisted when the window is closed, and config.json exposes no property
for the window geometry (it has settingsWindowColorScheme, settingsWindowFlavor,
zoomFactor, ... but nothing about size or position).

The practical result: every time you press the settings hotkey, the window comes back at
1350x900 in the default position, and you have to resize and move it again. On a large
or multi-monitor setup this gets annoying quickly, and on small screens the default is
close to the minimum size, so the layout is cramped every single time.

Suggestion: save the window bounds (and ideally the maximized state) when the
settings window is closed, and restore them on the next open. Something like:

  • store getNormalBounds() plus isMaximized() on close (or debounced on
    resize/move),
  • pass the stored bounds back into the BrowserWindow constructor at startup,
  • clamp the restored bounds to the currently available displays, so a window saved on a
    monitor that is no longer connected doesn't open off-screen,
  • keep the current 1350x900 as the fallback when nothing is stored yet.

This could live in the existing settings store, or in a small separate state file if you
prefer to keep config.json free of machine-specific state (which would probably be the
better choice, since window geometry is not something a user wants to sync between
machines).

If you're open to the idea, I'm happy to see it implemented — and a --revert-able
local patch already works, so the approach is viable.

Affected Desktop Environments

All

Additional Information

  • Kando version: 2.3.1 (macOS, Apple Silicon)
  • Reproducible on a plain install: open the settings, resize the window, close it,
    reopen it — the previous size is gone.
  • Related prior art in the project: the icon-picker dialog already remembers the last
    selected icon theme (changelog entry), so persisting small pieces of UI state is
    already an accepted pattern here.

Disclosure: this feature request was written by Claude (Anthropic's AI assistant),
based on the current main branch source. I'm Sorakann, and I'm posting it as-is — I
can confirm the annoyance is real on my machine, but I can't personally vouch for the
implementation details or the code analysis above, so please take that part with a grain
of salt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions