Description:

Mac OS like maximize to new desktop.

Feature:

* Move window to a newly created virtual desktop when fullscreen/maximize.
* Move window back to original desktop when restored to normal size or closed.
* Configurable trigger: `fullscreen` or `maximize` or `both`.
* Configurable new desktop position: `right most` or `next to current desktop` or `next to app`.
* Window blacklist: windows that match the class name will not trigger the script.

Note:

The default behavior is triggered by window **FULLSCREEN**, not the normal maximize. Window fullscreen can be enabled by right clicking on the window decoration -> `More Actions` -> `Fullscreen`.

Web browsers also enters fullscreen mode when the web page requests so, like clicking on fullscreen button in videos. In Firefox or Chrome, pressing `F11` also triggeres this.

Installation:

1. Install via Get New Scripts (Recommended): Go to `System Settings` -> `Window Management` -> `KWin Scripts` -> `Get New Scripts...`, and then search for `kwin-maximize-to-new-desktop`.

2. Install directly: download the latest release here, and run `plasmapkg2 --install kwin-maxmize-to-new-desktop-0.2.0.tar.gz`

Tips:

1. Get window's class for the blacklist

Right click on the window decoration of the window of interest, then select
`More actions` -> `Special Window Settings` in the menu. In the "Window matching"
tab, there's a little utility called "Detect Window Properties" that can be used to reveal information of clicked window.

Trouble Shooting:

1. No configuration button available in the KWin Scripts entry

Due to a technical limitation of installation, the desktop file is installed into correct place. More details [here](https://github.com/faho/kwin-tiling/issues/79#issuecomment-311465357).

```bash
mkdir -p ~/.local/share/kservices5
ln -s ~/.local/share/kwin/scripts/max2NewVirtualDesktop/metadata.desktop ~/.local/share/kservices5/max2NewVirtualDesktop.desktop
```

2. Configuration not picked up by the script after changing

Log out and log in again.

Or you could try something like the following to restart kwin (the executable name may be different depending on your Linux distribution.)

```bash
kwin_x11 --replace >/dev/null 2>/dev/null &; disown
```
Last changelog:

Change Log 21 days ago

## 0.2.0

- Fixed: Window loses focus after being moved to new desktop.
- Feature: Trigger by window maximize
- Feature: Customizable new desktop position
- Feature: Keep non-empty desktop
- Feature: Skip blacklisted windows
- Feature: Configuration UI
- Improved: Complete rewrite.

## 0.1.0

- Fixed: No more extra VD after closing fullscreened window directly.
- Improved: Code refactorings.

## 0.0.1

- Initial release. Mostly functional.

mockroot

20 days ago

+

Report

mishacorvus

1 month ago

How do I install it? I put it to /usr/share/kwin/effects and nothing happened. There is no shortcut in the Effects settings

Report

C

Aetf

27 days ago

Hi, this is not a KWin effect but a KWin script. You can go to System Settings -> Window Management -> KWin Scripts and enable the script from there. The easiest way to install the script I think is to use the "Get New Scripts..." button on the right and search for "Maximize to New Virtual Desktop".

Report

mishacorvus

27 days ago

Hi, thank you for your help, but I still can't get it running. I put it into /usr/share/kwin/scripts and it appears in the settings. Then I make a window fullscreen and it remains on current desktop.
By the way, in Russia the "Get New Scripts" doesn't work without VPN, so it's easier to just cp it into the proper directory

Report

C

Aetf

25 days ago

Hmm, try logout and login again, and make sure you are using fullscreen and not maximize. You can also right click on window decorations and see if Extensions -> Maximize To New Desktop -> Enabled is present and checked.

Report

lionelbino

2 months ago

+

Report

L0sted

4 months ago

+

Report

Warmuser

6 months ago

I don't exactly what's the cause, but everytime I enable these script, kwin starts crash. I'm on Fedora 28 with latest updates.

Report

nick87720z

9 months ago

Aetf: I just retried, with same version. And yes, context menu has "Extensions" submenu. And now it works. I don't know, why it did not.

Can't reply to your message, so wrote in new thread.

Report

nick87720z

9 months ago

Hm, in all this thread i can reply to only own messages :/

Report

C

Aetf

9 months ago

I'm glad it works!

Report

nick87720z

9 months ago

Hello. Would be great addon, but by some reason it doesn't work. After it is installed, i ensured, that proper kwin script is enabled. Though i doubt, that script is only reason, because all kde-store dialogs on my pc with kde began to show correct installed state and installation progress, since some version.

Report

nick87720z

9 months ago

kde 5.11.1, calculate linux (still have to upgrade)

Report

C

Aetf

9 months ago

When you right-click on the window title bar -> Extension, is there an menu item called "Maximize to New Desktop"? If not, then for some reason the script is not correctly loaded. Then could you open the Desktop Console[1] to load the script and send me the log by creating a new issue[2] on Github?

[1] https://techbase.kde.org/Development/Tutorials/KWin/Scripting#Quick_Start:_Desktop_Console
[2] https://github.com/Aetf/kwin-maxmize-to-new-desktop/issues/new

Report

Change Log 21 days ago

## 0.2.0

- Fixed: Window loses focus after being moved to new desktop.
- Feature: Trigger by window maximize
- Feature: Customizable new desktop position
- Feature: Keep non-empty desktop
- Feature: Skip blacklisted windows
- Feature: Configuration UI
- Improved: Complete rewrite.

## 0.1.0

- Fixed: No more extra VD after closing fullscreened window directly.
- Improved: Code refactorings.

## 0.0.1

- Initial release. Mostly functional.

File (click to download) Version Description Packagetype Architecture Downloads Date Filesize DL OCS-Install
Pling
Details
license
BSD License
version
0.2.0
updated Oct 29 2018
added Feb 19 2017
downloads today
0
page views today 10