Bug 505688

Summary: No Virtual Desktop grid height setter available in scripts
Product: [Plasma] kwin Reporter: suwako
Component: scriptingAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: kdedev
Priority: NOR    
Version First Reported In: 6.3.5   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

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