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 enter fullscreen mode when the web page requests so, like clicking on the fullscreen button in videos. In Firefox or Chrome, pressing `F11` also triggers this.
Installation:
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`.
Note: To get the configuration panel fully working, see troubleshooting below.
Install directly
Download the latest release here, and run
plasmapkg2 --install kwin-maxmize-to-new-desktop-0.2.0.tar.gz
Note: To get the configuration panel fully working, see troubleshooting below.
Tips:
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:
No configuration button available in the KWin Scripts entry
Due to a technical limitation of installation, the desktop file is not installed into the correct place. More details here
mkdir -p ~/.local/share/kservices5
ln -s ~/.local/share/kwin/scripts/max2NewVirtualDesktop/metadata.desktop ~/.local/share/kservices5/max2NewVirtualDesktop.desktop
Blank window class blacklist in configuration
You need to install an additional package called `kdesignerplugin` (link),
which makes it possible to use KEditListWidget.
* For ArchLinux:
pacman -Syu kdesignerplugin
.* For Ubuntu and alike:
apt install kdesignerplugin
.Configuration is 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.)
kwin_x11 --replace >/dev/null 2>/dev/null &; disown
Ratings & Comments
28 Comments
7 This is a nice script! I never liked MacOS because of the keyboard shortcuts, but unlimited configurability in KDE plus something like this is great! Now just need the ability to have them go side by side if adding more windows :)
Oh, and I only gave you a 7 because of all the hassle. It seems other scripts have their configuration windows installed just fine and don't require mucking about in the console. It was still easy enough to do, it's just by comparison a rather cumbersome install from the KDE interface, which is the recommended method of install.
10 10 the best
9 9 excellent
I'm missing the tiling effect you have when you maximize on Mac. You can't open floating windows on the new desktop on mac, rather only add another window in tile, as if the new desktop became a tiling window manager. But other than that, great job
10 10 the best
10 Замена elementary OS
10 10 the best
9 9 excellent I have a tiny feature request: possibility to fullscreenize to other display (not workspace but monitor/device). Would be great to send to TV screen on fullscreen action.
there's a bug with KDE 5.18.2, crash when fullscreen/maximized window is closed directly. can you fix it please ? thank you in advance.
agreed, this is happening to me too. otherwise, great script!
9 9 excellent would be perfect if not for the "opening a maximized window" issue
9 +
9 +Thank you so much! This is excellent. I was aware of workspaces in Linux for some time, but never used them until this feature started in OS X. Porting it to K is the lord's work. Thank you.
9 +
How do I install it? I put it to /usr/share/kwin/effects and nothing happened. There is no shortcut in the Effects settings
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".
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
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.
9 +
9 +
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.
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.
Hm, in all this thread i can reply to only own messages :/
I'm glad it works!