Bug 505688 - No Virtual Desktop grid height setter available in scripts
Summary: No Virtual Desktop grid height setter available in scripts
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: scripting (other bugs)
Version First Reported In: 6.3.5
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-17 09:25 UTC by suwako
Modified: 2025-06-18 07:12 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description suwako 2025-06-17 09:25:11 UTC
SUMMARY

There is no setter defined for `workspace.desktopGridHeight` in the KWin scripting API.

Scripts that manage Virtual Desktops to make them dynamic would need to be able to change the number of rows for users who would like a 2D space of dynamic virtual desktops or users who prefer a vertical disposition.

STEPS TO REPRODUCE
1. Create more than or 3 virtual desktops, organized in a single row.
2. Open `plasma-interactiveconsole`.
3. Create a script containing the following (without the markdown block syntax):

    workspace.desktopGridHeight = 3

4. Make sure the script is set to run in KWin.
5. Run the script.

OBSERVED RESULT
Nothing happens.

EXPECTED RESULT
The virtual desktops get reorganized in 3 rows.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:
KDE Plasma Version: 6.3.5 
KDE Frameworks Version: 6.13.0
Qt Version: 6.8.3
Comment 1 TraceyC 2025-06-17 17:33:05 UTC
This would have to be added to the API, as it doesn't currently exist. desktopGridHeight is currently a read-only property
https://develop.kde.org/docs/plasma/kwin/api/

I'll pass this along to the kwin developers for consideration