KWin script that moves fullscreened window to a new virtual desktop, emulating macOS like maximize to new desktop.
The config panel
- 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:
- Configurable new desktop position:
next to current desktopor
next to app.
- Window blacklist: windows that match the class name will not trigger the script.
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 ->
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.
Install via Get New Scripts (Recommended)
System Settings ->
Window Management ->
KWin Scripts ->
Get New Scripts...
And then search for
Download the latest release from KDE store, and run
plasmapkg2 --install kwin-maxmize-to-new-desktop-0.2.0.tar.gz
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.
No configuration button available in the KWin Scripts entry
Due to a technical limitation of installation, the desktop file is not installed into 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
which makes it possible to use KEditListWidget.
- For ArchLinux:
pacman -Syu kdesignerplugin.
- For Ubuntu and alike:
apt install kdesignerplugin.
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.)
kwin_x11 --replace >/dev/null 2>/dev/null &; disown
KWin hangs or crashes after a fullscreened/maximized window is directly closed
Fixed in efc212cbc38b8f5d10a30d28a034e21288519ea4.
The root cause is the clientRemoved signal I connected to is too late and only emits after cleanGrouping called on the client. Moving the client around and changing focus requires a not null group of the client in kwin. Therefore, changing to per window windowClosed signal works.