Skip to content

fix: prevent empty desktop when maximizing single window#31

Open
NandiyaLive wants to merge 1 commit intoUbiquitine:masterfrom
NandiyaLive:fix/prevent-empty-desktop
Open

fix: prevent empty desktop when maximizing single window#31
NandiyaLive wants to merge 1 commit intoUbiquitine:masterfrom
NandiyaLive:fix/prevent-empty-desktop

Conversation

@NandiyaLive
Copy link
Copy Markdown

Summary

This PR adds a new configuration option preventEmptyDesktop that prevents creating empty desktops when
maximizing windows.

Changes

  • Added preventEmptyDesktop config option (default: enabled)
  • When enabled, maximizing the only window on a desktop keeps it in place instead of creating a new
    desktop
  • When there are multiple windows, the maximized window moves to a new desktop as before
  • Updated README with new behavior documentation and configuration details
  • Added UI checkbox for the new option

Behavior

  • Before: Always create a new desktop when maximizing → leaves empty desktop
  • After (with option enabled): Only create new desktop if there are other windows → no empty desktop

Testing

Tested on KDE Plasma 6 with Wayland.

@Ubiquitine
Copy link
Copy Markdown
Owner

Hello and thank you for you contribution.
This script is made to imitate MacOS behavior., which is maximize the window to a new desktop, regardless if the main desktop doe not have any more windows.
Moreover, the option "Exclusive Desktops" ensures that any new windows opened on the desktop with the maximized window and the new window is not related to the maximized one, then the script moves the new window to the "main" first desktop. With your option enables there would be no desktops to move the new window to.
You also made the option enabled by default, so if someone has the exclusive desktops enabled before the update, it may introduce unwanted/buggy behavior to the script.

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.

2 participants