window-management: toggle for macOS-style window controls position

Adds a new toggler "Place buttons on the left (macOS style)" in
*Desktop → Window Management → Window controls*, next to the existing
show_maximize / show_minimize controls. When enabled, writes
`WindowControlsPosition::Start` into the `CosmicTk` config
(com.system76.CosmicTk); when disabled, writes `End` (default).

All libcosmic-based applications rebuilt against a libcosmic that
exposes `WindowControlsPosition` pick up the change live through the
existing cosmic-config subscription.

Includes:
- new Message variant WindowControlsPositionStart(bool) + handler
- `window-controls.position-start` fluent key added in en + fr locales
- Cargo.toml: activate local [patch] override to libcosmic (dev only,
  not suitable for upstream merge)

Requires: libcosmic >= 5c331935 (header_bar WindowControlsPosition).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Votre Nom 2026-04-22 15:09:01 +02:00
parent 48eae39858
commit 52ce463a59
4 changed files with 30 additions and 6 deletions

View file

@ -70,12 +70,12 @@ cosmic-client-toolkit = { git = "https://github.com/pop-os/cosmic-protocols//",
# cosmic-settings-config = { git = "https://github.com/pop-os/cosmic-settings-daemon//", branch = "input_nobuild" }
# For development and testing purposes
# [patch.'https://github.com/pop-os/libcosmic']
# libcosmic = { path = "../libcosmic" }
# cosmic-config = { path = "../libcosmic/cosmic-config" }
# cosmic-theme = { path = "../libcosmic/cosmic-theme" }
# iced_futures = { path = "../libcosmic/iced/futures" }
# iced_winit = { path = "../libcosmic/iced/winit" }
[patch.'https://github.com/pop-os/libcosmic']
libcosmic = { path = "../libcosmic" }
cosmic-config = { path = "../libcosmic/cosmic-config" }
cosmic-theme = { path = "../libcosmic/cosmic-theme" }
iced_futures = { path = "../libcosmic/iced/futures" }
iced_winit = { path = "../libcosmic/iced/winit" }
# libcosmic = { git = "https://github.com/pop-os/libcosmic//" }
# cosmic-config = { git = "https://github.com/pop-os/libcosmic//" }