Jazqa / kwin-quarter-tiling

An easy tiling script for KWin
GNU General Public License v2.0
366 stars 20 forks source link

A couple bugs and improvements #103

Open ReloadedK-git opened 3 years ago

ReloadedK-git commented 3 years ago

Before I start, I just want to say that this was exactly what I was looking for in kde. It's my kwin tiling script of choise, and I won't be changing it any time soon.

I've used 2 versions of it so far, in 2 distributions (mx linux and void linux). The script is consistent even on older versions of plasma. The main issue that I have with the latest update of the script is that when I move windows to another desktop, even when they are focused, they don't get resized. This means that if a window occupies half the screen and I move it to an empty desktop, the window will maintain it's half-size state, even when it has the entire desktop to itself, unless I move it around (in which point I assume it realizes it has all that room). The same thing happens if I move a window to a desktop that already has another window in it, so it puts the moved window on top of all the other windows untill I move it again, in which point it detects the other windows and gets resized properly.

The oddest thing to me is that previous versions of the script didn't have that issue, but they have different issues on their own. One older version resizes windows perfectly, but overrides the amount of virtual desktops to 2, and I somehow managed to bug a couple shortcuts (focus down, up, left, right) by uninstalling and reinstalling the script via kwin scripts/install scripts. They no longer worked for some reason.

Also not sure if this is intended, but in the newest version if I kill all windows on a desktop, it automatically moves me to another desktop. This also didn't happen in older versions. I would prefer if I don't get moved automatically to another desktop once I close all windows on the one I'm using.

I believe there is another kwin script called "move windows and focus to desktop", which does exactly what it says and, oddly enough, seems to resize windows perfectly when moving them between desktops, which tells me the bugs on your script might have something to do with the way kde plasma handles focus. I've seen someone have a similar issue before, so it seems I'm not the only one experiencing this.

-System information- Operating System: void KDE Plasma Version: 5.21.3 KDE Frameworks Version: 5.80.0 Qt Version: 5.15.2 Kernel Version: 5.11.9_1 OS Type: 64-bit Graphics Platform: X11 Processors: 8 × AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx Memory: 14.6 GiB of RAM Graphics Processor: AMD Radeon™ Vega 8 Graphics

Jazqa commented 3 years ago

First of all, thanks for reporting the issues! Even though it doesn’t seem like the most active project at the moment (last commit in October, whoops), I do appreciate every issue opened here.

Anyways, I’m just about to hit the bed, so I’ll quickly skim through the issue, and delve deeper into it later...

The oddest thing to me is that previous versions of the script didn't have that issue, but they have different issues on their own.

The version 2.0 was a complete rewrite fron scratch – the old script was completely scrapped and everything was done from the ground up. Basically 1.x and 2.x are like different projects with nothing in common, except the basic idea.

...in the newest version if I kill all windows on a desktop, it automatically moves me to another desktop.

There should be a preference for this. If I remember correctly, it’s called ”follow clients”. If the problem still persists after disabling it, it’s a bug which I’ll fix.

The main issue that I have with the latest update of the script is that when I move windows to another desktop, even when they are focused, they don't get resized.

This is definitely a bug, I’ll look into it.

ReloadedK-git commented 3 years ago

First of all, thanks for reporting the issues! Even though it doesn’t seem like the most active project at the moment (last commit in October, whoops), I do appreciate every issue opened here.

Thanks to you for making the script in the first place. I made a git account just for this (not a programmer).

The version 2.0 was a complete rewrite fron scratch – the old script was completely scrapped and everything was done from the ground up. Basically 1.x and 2.x are like different projects with nothing in common, except the basic idea.

I was mainly talking about the 2 versions you can download from kde's kwin script installer. One of them is the updated one and the other I assume is the older one.

There should be a preference for this. If I remember correctly, it’s called ”follow clients”. If the problem still persists after disabling it, it’s a bug which I’ll fix.

I've looked this up and couldn't find it. Is it on kde's system settings?

This is definitely a bug, I’ll look into it.

Thanks!

Jazqa commented 3 years ago

I've looked this up and couldn't find it. Is it on kde's system settings?

It’s under ”KWin Scripts” where you’d enable the script. There should be a gear icon next to the script.

However, it’s a known KWin issue that the gear icon doesn’t become visible unless a file is placed under kservices folder. The commands below link the needed quarter tiling file under kservices folder, in case the preferences are not visible.

mkdir -p ~/.local/share/kservices5 ln -sf ~/.local/share/kwin/scripts/quarter-tiling/metadata.desktop ~/.local/share/kservices5/kwin-script-quarter-tiling.desktop

ReloadedK-git commented 3 years ago

Ah yes, I've tried it before. It did work, but not in the way I was expecting, perhaps. When enabled, it moves you from an empty desktop and it moves you to a new desktop if the current one has 4 opened windows. When disabled, it won't move you in either case (more than 4 windows on the same desktop?, then it creates a new one in a different desktop but you won't get moved there).

It makes sense, really, but personally I would like it if there was second option which doesn't move you to a different desktop when there are no windows, but does when you create a new one in a different desktop (say, desktop 1 has 4 windows and to put a new window on screen it puts it on desktop 2, and so it takes you there). If I'm not mistaken, this was how it worked for the old version of the script.

So I guess it can't be considered a bug, but rather a feature request.