-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
66 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,82 @@ | ||
# kwin-maxmize-to-new-desktop | ||
KWin script that moves fullscreened window to a new virtual desktop, emulating macOS like maximize to new desktop. [Link to KDE Store page](https://store.kde.org/p/1171196/). | ||
|
||
KWin script that moves fullscreened window to a new virtual desktop, emulating macOS like maximize to new desktop. | ||
|
||
[Link to KDE Store page][store]. | ||
|
||
## Screenshot | ||
|
||
![Screenshot](doc/screenshot.gif) | ||
|
||
The config panel | ||
|
||
<img src="doc/config.png" width="356"> | ||
|
||
## Feature | ||
|
||
* Move window to a newly created virtual desktop when fullscreen. | ||
* 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 right to current. | ||
* Window blacklist. Skip some windows that should not trigger the script. | ||
|
||
__Note__: | ||
This is triggered by window **FULLSCREEN**, not the normal maximize. Window fullscreen can be enabled by right clicking on the window decoration -> `More Actions` -> `Fullscreen`. | ||
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 | ||
|
||
### 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`. | ||
|
||
### Install directly | ||
|
||
Download the latest release from KDE [store][store], and run | ||
|
||
```bash | ||
plasmapkg2 --install kwin-maxmize-to-new-desktop-0.2.0.tar.gz | ||
``` | ||
|
||
## 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 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 | ||
``` | ||
|
||
### 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 | ||
``` | ||
|
||
## Change Log | ||
|
||
See [CHANGELOG.md](CHANGELOG.md). | ||
|
||
## Thanks | ||
|
||
* I got the idea of triggering by maximize and other things from one of the [fork](https://github.com/lrasche/kwin-maximize-to-new-desktop) by @lrasche. | ||
* I also learned a lot about adding configuration UI from [faho/kwin-tiling](https://github.com/faho/kwin-tiling). | ||
|
||
[store]: https://store.kde.org/p/1171196/ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.