jazqa / kwin-quarter-tiling Goto Github PK
View Code? Open in Web Editor NEWAn easy tiling script for KWin
License: GNU General Public License v2.0
An easy tiling script for KWin
License: GNU General Public License v2.0
The script is really awesome, and it has I feel even more potential ! Do you think it might be possible to tile to infinity on one screen ?
Every time i start the arduino IDE the tiling script crashes. Tried it also with mqtt-spy (cause both are java programs) the tiling script didn't work on it but luckily it didn't crash.
Is there an debug flag or something like that to provide more information?
Sometimes tiling stops working and keyboard shortcuts fail to be activated. I don't know what triggers this behavior, so it's going to be difficult to fix, I guess.
When this happens I replace kwin, reconfigure it, etc. Same with plasmashell and latte dock. Nothings seems to work. Only restarting the session does, which is painful.
I'll try to figure out what triggers this, to see if it can be reproduced.
For the time being I attach my settings:
Maybe the wrong behavior of the system comes after resuming from sleep. I'll check it out...
For reference: https://stackoverflow.com/questions/359494/which-equals-operator-vs-should-be-used-in-javascript-comparisons
==
does automatic type conversion before comparison which can lead to confusing results.
Always use ===
if you can.
EDIT: Even better, just don't use it at all if you don't need to.
For example
if (object.some_value === true) {
// some code
}
can be replaced with
if (object.some_value) {
// some code
}
There are times when gaps are desired and sometimes when they aren',t and I believe the current approach for adjusting gaps is a little clunky.
Currently, if one wants to disable/enable gaps, they have to use the Meta + O/L shortcut which increases/decreases the gaps' size by 1 pixel. This is a little clunky as you have to press the shortcuts multiple times until you get rid of the gaps completely/restore them to their desired width.
I believe it would be preferable if there was a single shortcut to disable/enable gaps. This wouldn't give the user as much fine control over the gaps' size. However, in my experience, I tend to only use the gaps' size I set in the settings pane at all times anyway.
I noticed that there is a conflict between this script and plasma-applet-active-window-control when using the option "hide titlebar for maximized windows".
To reproduce it:
expected behavior is that the window would come back to be maximized without the titlebar
however, when using the tiling script, the window is restored to a tile
this would not be a problem (I actually like the tiling better than to restore to the maximized window) if the window would recover the titlebar, which is not the case
is there a way to retore maximized windows from minimization to a tile, while getting back the titlebar at the same time?
Currently, to get back the titlebar, I have to go to buttons of plasma-applet-active-window-control and restore from maximization, even if the window is not maximized anymore.
When having four windows tiled on one screen and maximizing one of them, the other windows get re-tiled in the background. When unmaximizing the first window, the previous order does not get preserved. It would be nice if either the tiling left a gap, or the previous order was restored when unmaximizing the temporarily maximized window.
Given an initial configuration of four windows:
┌─┬─┐
│1│2│
├─┼─┤
│3│4│
└─┴─┘
I found the following behaviour to occur when maximizing / unmaximizing a given one of these windows, where the first configuration is after maximizing, and the second after unmaximizing.
┌─┬─┐ ┌─┬─┐
│ │4│ │1│2│
1: │2├─┤ ├─┼─┤
│ │3│ │3│4│
└─┴─┘ └─┴─┘
┌─┬─┐ ┌─┬─┐
│ │4│ │2│1│
2: │1├─┤ ├─┼─┤
│ │3│ │3│4│
└─┴─┘ └─┴─┘
┌─┬─┐ ┌─┬─┐
│ │2│ │3│1│
3: │1├─┤ ├─┼─┤
│ │4│ │4│2│
└─┴─┘ └─┴─┘
┌─┬─┐ ┌─┬─┐
│ │2│ │4│1│
4: │1├─┤ ├─┼─┤
│ │3│ │3│2│
└─┴─┘ └─┴─┘
This, while reproducable behaviour, feels quite random as a user. The only clear consistent behaviour is the previously maximized window moving to the top-left corner. I keep having to look around for where my other windows have moved to now.
Hi,
Thanks for your script, addicted to it :)
I have having this problem where the script stops working alot of times.
I cannot be sure, but it happens when I move windows between monitors ( I have a 2650x1440 monitor and a 1920x1080 monitor ).
debugging the script, this error appears:
START: throwClient(KWin::Client(name = ""), 1, 2, 1, 0)
END: throwClient(KWin::Client(name = ""), 1, 2, 1, 0)
START: unreserveClient(KWin::Client(name = ""))
START: tileClients(1)
END: tileClients(1)
END: unreserveClient(KWin::Client(name = ""))
TypeError: Result of expression 'client.oldGeo' [undefined] is not an object.
Does it help?
Thanks !
I installed the script from the AUR on Arch Linux (kwin 5.10.4), enabled it in system settings and rebooted, but it does nothing - windows appear just like they did before, keyboard shortcuts do nothing. I know it's impossible to tell what's happening from this - what other information can I provide you with?
Hey,
I only tried it with IntelliJ, but I am pretty sure that the following problem is going to appear on many IDEs.
When you start IntelliJ you first have a small window, where you can pick, which project you want to start. The tiling script cant change the size of this window, but it positions it in the correct tile. Now when you choose a project, the small window closes and the actual IDE starts. So there are a couple of split seconds, in which you dont have any window open. When you want to have IntelliJ open on its workspace in full size, this will result in the following:
you pick a project -> the small window closes -> the tiling script notices that you are on an empty workspace, so it moves you back on another workspace -> IntelliJ opens on the new workspace instead of the one, where it was actually started
So my question is, is there any way to disable the function, which automatically moves back to a non empty workspace?
Spectacle is the new screenshot application in kde. I noticed that it does not follow tiling.
Situation: I have a fullscreen window on one (say, left) screen that is exempt from tiling (i.e. KDevelop, it behaves weirdly when it gets resized). My second (right) screen has four windows tiled, so it's full. When I open another window, it now uses the full left screen for one tile, hiding the floating window.
I would like the new window to open on another desktop instead (as if both screens were full). The best way that I can think of now is to have another category for windows, "full-size windows", that get tiled but always to a full screen (four tiles) and block any further tiles on its pane.
In the settings of the KWin script, Wine is added by default, but applications run through Wine are still tiled. It's the same with Steam.
An example is the game Thief 2, run either with wine Thief2.exe
or through Q4Wine. In this case, I tried making it float with Meta+F as a workaround (so that it runs fullscreen, as it should, rather than tiled), but then I still have to press Alt+Tab a few times to really make it fullscreen. Also, after that, the script stops working altogether and I need to disable and enable it again in the KWin Scripts dialogue.
It would imply moving small windows around, like for instance putting them in quarters instead of half screen, so other non-small windows can benefit of the extra space
Perhaps even adding small windows together within a quarter if they would fit the available space.
Using Manjaro Linux (64 bit) with Plasma 5.10.4, the latest git version installed through the AUR package no longer works for me. I've tried going to the system settings, KWin scripts and then disable and re-enable the script, also using the default settings, but I get the same results.
However, I don't have this issue after downgrading to an earlier version of the AUR package (which is shown up as kwin-scripts-quarter-tiling-git-1:r141.4b70a9e-1-any.pkg.tar.xz
when using downgrade
).
I think it is very interesting a new feat to save the layouts and the window name reference. Then you load the layout and all the apps are executed. Like terminator or such.
Thank you.
First Konsole window to be opened opens with border. If it is closed, then reopened, it is opened without a border. If you then go ahead and close it and open it a third time, it will have a border, then next time it will not. In other words, it systematically opens without a border on every even launch, and with a border on every odd launch.
When there is a Konsole window open, all new Windows will have the same setting as the first one. E.g. if there is a Konsole window open that does not have a border, all new Konsole windows follow suit and have no border.
This persists even when Konsole is set to have no border by right-clicking Titlebar -> More actions -> No border.
KDE Neon Use Edition, Plasma 5.10
Each time I boot my computer or log out and back in, none of the windows are tiled and the keyboard shortcut for toggling tiling doesn't seem to do anything. It only starts working if I restart the script.
I have also tried using the default settings, but I get the same results.
Using Plasma 5.10.4 with Manjaro Linux x64.
Here's a 23 second video demonstrating the issue.
https://www.youtube.com/watch?v=yMG1SXnkwlQ
The script is currently not very practical on screens with a vertical orientation as 2 windows will be tiled into long thin strips. To fix this it would be great to be able to rotate a layout so that the vertical split becomes horizontal.
Additionally, for cases with 3 windows on a horizontal screen, it would be nice to have the full height window on the right hand side instead of the left. Being able to flip or do a 180 rotation of the template would also enable this.
I wonder whether you would consider an additional ignored programs category in settings for applications that would obey tiling in terms of location but without being resized.
I am thinking about applications that appear better if they are narrower than even a quarter of the screen (and much better than in fullscreen) as for instance: choqok, telegram, whatsie, kopete... You get the idea...
This way they would appear nicely while they would still keep the logic of tiling applications in quarters, etc.
In terms of location I guess these applications would looked better if centered with respect to the available space.
I hope I was clear enough, and thanks for considering!
By the way, I started using tiling thanks to your kwin script!! I tried others before but they didn't convince me to stay more than for testing.
I've added screen & virtual desktop exclusion to the script settings as suggested by @vegarab. As there was no issue filed for said feature, I decided to create one for discussion, bug reports yadda yadda.
Ignore screens and desktops from the configuration interface with a string of numbers split with a ,
(comma + space) (f.ex._ 1, 3
).
I installed the package from GIT, but then thought to check out the AUR package for easier updating (The current update process can be a little iffy). This has now broken the script, and when clicking the configure button under Kwin Scripts dialog, it shows 2 identical tabs.
There is an install.sh script included with this, but perhaps a way to completely purge the script would help too? By doing this we can then more easily diagnose issues as well (update vs fresh install)
In the interim, how would I purge this script?
Hello, thanks for great plugin.
Really strange behavior of opening a new window. For example if I open 2, and make one wider, new terminal will split one of those in half:
step 1:
step 2:
Thats ok. But if i do the same with telegram an chromium any new window shat should split chomium in half would shirnk chromium and use 1/3 of screen like so:
step 1:
step 2:
Or if chromium on the left it causes different behavior:
step 1:
step 2:
I think it is related to small app setting. Because if telegram is not open it works normally
I just realized that keyboard shortcuts to move windows within a virtual desktop (single screen) stopped working. Could you please check it out?
Time ago when I used Esc + Meta shotcut the tiling was toggle for current desktop and the tiled windows went back in their positions and sizes. Now it doesn't happen anymore, the windows remain in the position and size they were when tiled but they are not tiled anymore.
You can see the previous behavior here:
This is on a fresh installation of ArchLinux with KDE (Latest). When opening an app, it will open on Desktop 2 and swap to that by default. Upon closing all the windows, there are 3 - 4 open desktops setup which then need to be removed.
I've attempted purging and re-installing but it continues. Unsure if the latest versions of KDE are causing conflicts? I'm new to this Kwin stuff so please let me know any logs that you require.
Love your work, thanks.
thanks for this nice script.
Is there a way to tile only 3 windows and float the rest?
Regarding Matlab, java application, I'd prefer to have the main window following tiling, but to keep the figures that it generates not following it, to keep their sizes and desktop location, etc.
Their class name (of Matlab and figure windows) is identical so the only solution I found is to use the Ignored Window Captions setting, which is actually a great feature!
The only thing is that I need to specify each possible one independently, which is not so optimal: Figure 1, Figure 2, etc. That's why I thought of a better way to do this could be for instance using regular expressions, so I could say, apply that rule to all Window titles composed of "Figure" + white space + integer, relatively easily.
Not sure how hard this might be to implement, though.
Im having problems when moving windows betweeen desktops. When I have some layout and move one of the windows to a different desktop the space for it is maintained on the original desktop and the window "accumulates movement" or something and is not placed correctly on the 2nd desktop either, as shown in the gif. Also if i were to open windows on the desktop to which i moved the window previously, the space for it is also there. So its like the window in not being deleted from both layouts on both desktops correctly...
Also could you add a hotkey to quickly move windows from one screen to another? I have a dual monitor setup and if I use the default Kwin keybinding "Window to next screen" it doesn't respect tilling, however dragging with the mouse does...
I'm currently using commit 3ed8215 (6 commits behind master) since for me the script doesn't work after you added support for activities.
Thanks in advance, you are doing a great job, i which i could help but im not great on javascript.
I have a three monitor setup. Every time I re-login to kde, the move to previous/next screen functions gets inverted.
For example, if Meta+Right
would move the window to the screen on the right in one session, it would do the opposite in the next session and move it to the left.
I looked at the shortcut assignments and they have not changed on login.
I may be one of the not many KDE users that still have Konqueror as default web browser. There is "an easy way" to get external links to be opened in a single Konqueror window, which is to set "kfmclient newTab" as default web browser in KDE settings.
However, using this impairs tiling: it works fine when opening the first link, but Konqueror moves, breaking tiling rules when opening a 2nd, and successive external links.
Could you please try to reproduce the issue? I wouldn't ask if it wasn't because the browser is one of the most used applications, and I wouldn't like to change Konqueror as my default web app, neither to stop using tiling, if possible.
Thanks!
Edit: Oops, my first attempt for the title was "tiling and konqueror", and then I tried to be a bit more informative, but I got it the other way around, my bad :)
When you have a window that wants fullscreen, it still gets tiled and forced into a tile when this script is running. I noticed this with mpv (switching to fullscreen didn't work until I manually disabled tiling) as well as with games, specifically CS:GO (which would start up tiled). It would be nice if fullscreen windows would be automatically exempt from the tiling.
Instead of opening a new tab in the browser window that already exists in a different desktop, the link is opened in a new browser window in the same desktop of the calling application. This was a bit difficult to explain, I hope I was clear enough.
This happened irrespective of the browser (Chromium and Konqueror tested).
Hello,
I have a 3 monitor setup, and one of them always runs a fullscreen application. I use move to next/previous screen shortcuts a lot, but sometimes i accidentally try to move a window to the screen with the fullscreen application. This removes the client from tiling, until i restart the application again. I fixed my setup with commenting out the removeClient call here.
I was wondering if there is a reason to remove the client there, and if there is maybe we can find another solution for this.
Great script by the way, many thanks.
Cheers
Unsure exactly what caused this, but it seems that opening a Chrome window on the main monitor, toggling float off to move to and maximize it on the secondary screen broke parts of the script.
All Konsole and Chrome windows now open on the secondary monitor - with script off and on. Chrome cannot be moved back when float is off. It always snaps back to the secondary monitor. Floating it, moving it over to the main monitor and unfloating it is the only way I can now move Chrome over to the main monitor.
I have disabled borders, so I cannot move or manipulate the Konsole window. I am therefore unable to move it away from the secondary monitor.
This persists through script restart, session restart and system reboots. It practically broke the script for me, since Chrome and Konsole can no longer be used on the main monitor.
The script creates desktops as needed, which is great. However, when not needed, it could erase the extra ones that have been created.
Saying so because I, in general, prefer to have 2 desktops, with specific names for them, etc. I like that the script creates further ones when there is no room for the number of windows that are present, but I'd like to come back to my default, if possible, once the extra windows have been cleared.
Would that be possible?
(Not only height behavior can confuse me)
(I love images)
So if i open 2 apps like so
And will open third one it will split in half our righ one like intented:
But if our right app width is less then left app width, like so:
A new split will expand right window width:
or on a screencast (i can't create gif with ssr, and don't have any software to create gif from mkv):
width.zip
If a window is maximized, and then pulled down with mouse, its tile isn't set properly. Screencasts:
(warning: unexpected behavior intensifies)
what_the.zip
what_the2.zip - in this one script stops, but when i reenable it, well you should see it with your own eyes.
---edit---
damn, my mouse pointer isn't recorded. Well most of actions are done with mouse
For example I know, that I don't want to open gimp or inkscape in a small tile, I need to switch to empty desktop (or create one), open gimp and wait till it loads, cause if I switch desktop it will open on current one. Instead of doing this I may predefine that gimp open on six desktop only, and mpv on another one and so on. So when I open any app that should use as much of screen space as possible, I would definitely know where this app opened and that it will not break my current desktop setup.
After opening the desktop grid and changing to a different desktop, the present windows keep their designated places, however, new windows stay afloat and don't respond to keyboard shortcuts.
Tested on three different computers and configurations, the responses were slightly different -
Arch (AUR): The script stops working altogether, previously opened windows float. The problem is generally fixed by closing all but three or less windows and restarting the script. If three or less windows stayed open while restarting, opening a new window tiles them all on Desktop 1, assigning them to new desktops allows the script to continue working. If four or more windows were open upon restarting, opening a new window will tile four of them on Desktop 1, the newly opened window doesn't tile and every open window will float - the script seemingly ceases operation.
Manjaro (AUR): All previously opened windows keep their positions and snap back into place when moved, however, newly opened windows float and don't respond to keyboard shortcuts. The problem is fixed by closing all windows and restarting the script.
openSUSE Tumbleweed (GIT): All previously open windows float, GTK windows start flickering when moved as if their contents weren't being updated properly - maximising fixes the latter, could be unrelated. Restarting the script does nothing, the issue is only fixed by restarting the entire session.
Hey,
recently I experience a weird issue with this tool.
Whenever I use "Quarter: Move " on the desktop the background gets tiled somehow as can be seen on the next picture.
I would expect that nothing would happen if I had an empty screen as plasmashell
is disabled from beeing tempered with by source...
Has anybody an idea why this might happen and how to fix this.
cheers
I want konsole to occupy 1 quarter horizontally and 1 or 2 quarters vertically. I tried to use kwin geometry for this forcing a maximum size that was exactly 1 quarter horizontally and 2 quarters vertically, but the script doesn't seem to respect it, so when konsole is the only window it utilizes the whole available space.
Do you think this could be fix somehow? Thank you!
If you make a window full screen by accident (or purposefully) and then right click + left mouse to resize the window, it will come out of full screen mode but then not tile correctly. This is most probably related to how Plasma shows Maximised and Un-maximised windows.
I decided to install this via the interface in System Settings
under Window Management
and Get New Scripts
, since I'm having trouble doing it via the command line, and ended up installing it successfully (apparently). The problem is, now that I've installed it, Quarter Tiling
doesn't show up on the Manage KWin scripts section
like in the screenshots in this repo. All I see are the default options.
Not urgent, as Plasma in wayland is still far from working flawlessly, but anyways. I just checked the current state of plasma wayland and realized that the kwin-quarter-tiling script does not work properly.
It worked for my first window and stopped being applied to windows opened afterwards.
I use a notebook with an external monitor. The script works perfectly fine if i use them, unless I for example use xrandr to deactivate the notebook-monitor. Then the script stops working and I have to go to "kwin-scripts", deactivate quarter-tiling, and then activate it again.
Or is there an easy cli command to restart your script?
Hello,
The Global shortcuts for Quarter: Move to Next Screen and Quarter: Move to Previous Screen are not working in Manjaro KDE Plasma 5.9.
Tried different Global and Global Alternate keybindings including Meta+Shift+L and Meta+;
Issue encountered since installation, other shortcuts have worked fine.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.