Maximize To New Virtual Desktop

Kwin Scripts kwin

Source i (link to git-repo or to original if based on someone elses unmodified work):

https://github.com/Aetf/kwin-maxmize-to-new-desktop

Original Featured
9
Become a Fan
8.1

Description:
Mac OS like maximize to a 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 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
Last changelog:

Release 0.2.4

Work around a bug in recent KWin versions


Ratings & Comments

28 Comments

watham

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 :)

watham

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.

mikhaill

10 10 the best

ben2talk

9 9 excellent

Ryuke

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

geier

10 10 the best

linux-oid

10 Замена elementary OS

iceler

10 10 the best

polisson

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.

zwambro

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.

jackchealdang

agreed, this is happening to me too. otherwise, great script!

d86leader

9 9 excellent would be perfect if not for the "opening a maximized window" issue

no1cares

9 +

robcreel

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.

mockroot

9 +

mishacorvus

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

Aetf

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".

mishacorvus

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

Aetf

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.

lionelbino

9 +

L0sted

9 +

Warmuser

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.

nick87720z

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.

nick87720z

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

Aetf

I'm glad it works!

Pling
0 Affiliates
Details
license BSD License
version 0.2.4
updated
added
downloads 24h 1
mediaviews 24h 0
pageviews 24h 12

Other Kwin Scripts:

Snap To Deco
thomas12777
last update date: 11 years ago

Score 5.0

Unminimize windows w/o taskbar entry
thomas12777
last update date: 11 years ago

Score 5.0

MiniStack
faho
last update date: 11 years ago

Score 5.0

Debug Clients
thomas12777
last update date: 11 years ago

Score 5.0

TIL3R
causa-prima
last update date: 11 years ago

Score 5.7

Spam Transients
thomas12777
last update date: 10 years ago

Score 5.0