nclarius / tile-gaps

KWin script to add space around windows touching a screen edge or other window
https://store.kde.org/p/1619642
GNU General Public License v3.0
104 stars 16 forks source link

Plasma 6 Port (#23) #24

Closed audreylandgrave closed 2 weeks ago

audreylandgrave commented 5 months ago

Plasma 6 Port (#23)

x11: works perfectly

wayland: works for the most part. Status:

nclarius commented 5 months ago

Very cool, thanks a lot! I hope I'll get around to taking a look at it soon.

v3ss0n commented 4 months ago

working and looks good to me , please merge?

mashrit commented 4 months ago

Works on X11, does not work on wayland

materemias commented 4 months ago

The port doesn't handle windows moved from one monitor to the other properly: when nearing the edge of the monitor it constantly shrinks the size of the window

cquasar commented 4 months ago

Did not work on Wayland and after ./install.sh it does not show under Kwin Scripts on System Settings Arch Linux Plasma: 6.0.3

audreylandgrave commented 4 months ago

I am running it on Wayland. What are you experiencing? No effect at all? Or just buggy?

mashrit commented 4 months ago

Does it work for you? For me, when I maximize a window it just stays the same size and becomes maximized within the same space.

cquasar commented 4 months ago

I am running it on Wayland. What are you experiencing? No effect at all? Or just buggy?

There is no effect at all

When I install I get:

./install.sh kf.package: Invalid metadata for package structure "KWin/Script" Package type "KWin/Script" not found Successfully installed /home/clint/CODE/tile-gaps-plasma-6-port

I look for it on Kwin Scripts and it is not in there

cquasar commented 4 months ago

Does it work for you? For me, when I maximize a window it just stays the same size and becomes maximized within the same space.

Does not work at all.

materemias commented 4 months ago

I am running it on Wayland. What are you experiencing? No effect at all? Or just buggy?

There is no effect at all

When I install I get:

./install.sh kf.package: Invalid metadata for package structure "KWin/Script" Package type "KWin/Script" not found Successfully installed /home/clint/CODE/tile-gaps-plasma-6-port

I look for it on Kwin Scripts and it is not in there

you can use the package.sh script to generate tile-gaps_v8.1.kwinscript. That can be installed from file.

mashrit commented 4 months ago

I am running it on Wayland. What are you experiencing? No effect at all? Or just buggy?

There is no effect at all

When I install I get:

./install.sh kf.package: Invalid metadata for package structure "KWin/Script" Package type "KWin/Script" not found Successfully installed /home/clint/CODE/tile-gaps-plasma-6-port

I look for it on Kwin Scripts and it is not in there

In the install.sh the code is

#!/bin/bash
name=$(grep -oP '"Id":\s*"[^"]*' ./metadata.json | grep -oP '[^"]*$')
kpackagetool5 --type=KWin/Script --install . || kpackagetool5 --type=KWin/Script --upgrade .
kwriteconfig5 --file kwinrc --group Plugins --key "$name"Enabled true
qdbus org.kde.KWin /KWin reconfigure

change it to

#!/bin/bash
name=$(grep -oP '"Id":\s*"[^"]*' ./metadata.json | grep -oP '[^"]*$')
kpackagetool6 --type=KWin/Script --install . || kpackagetool6 --type=KWin/Script --upgrade .
kwriteconfig6 --file kwinrc --group Plugins --key "$name"Enabled true
qdbus org.kde.KWin /KWin reconfigure
materemias commented 4 months ago

The port doesn't handle windows moved from one monitor to the other properly: when nearing the edge of the monitor it constantly shrinks the size of the window

I could resolve this by commenting out the subscription to frameGeometryChanged signal in onRegeometrized function

audreylandgrave commented 4 months ago

Hey if anyone wants to contribute, feel free to commit to the PR, I don't mind.

*updated the packaging tools version

cquasar commented 4 months ago

After the fix in the packaging tools versions I installed it and could see it under Kwin Scripts.

It does not work though. I cannot maximize nor "tile" my windows anymore. When I try to maximize the window it does not change its dimensions and position at all even though its "status" become maximized. When tilling it does not work and nothing happens.

With applications started with GDK_BACKEND=x11 the script works fine.

audreylandgrave commented 4 months ago

After the fix in the packaging tools versions I installed it and could see it under Kwin Scripts.

It does not work though. I cannot maximize nor "tile" my windows anymore. When I try to maximize the window it does not change its dimensions and position at all even though its "status" become maximized. When tilling it does not work and nothing happens.

With applications started with GDK_BACKEND=x11 the script works fine.

thanks, I have experienced the "maximize" problem too, so it's now confirmed. I am keeping the list of issues updated in the description.

probabilis commented 3 months ago

gracias my friend - working perfectly here on x11

michohl commented 1 month ago

This almost works for me on Wayland / KDE 6. I configured the scripts section to look like so:

image

And right out of the gate I was able to get a window snapped to the left side of my left most monitor exactly as I would expect. Then I focused a second window and attempted to get it on the right side of the left monitor and it didn't have any gaps.

However, it would sometimes get the gaps if I spam cycled between it being snapped on the right of my left monitor and the left of my right monitor.

Then I tried unsnapping my window which was working correctly from the left and snapped it back to the left a couple of times and then it entered the same broken state with no gaps.

Also I ran into a completely separate bug where if I have two windows open and I drag one in circles near the edge of the other they will both get progressively smaller and smaller until one doesn't exist anymore. I first noticed this when trying to drag a window across the screen to get it out of the way and suddenly all the windows changed size.

michohl commented 1 month ago

Also the uninstall script seems to not be functioning for me:

❯ ./uninstall.sh 
kf.package: Could not find required file "mainscript" for package "/home/michohl/.local/share/kwin/scripts/" should be QList("code/main.js")
kf.package: Could not find required file "mainscript" for package "/usr/share/kwin/scripts/" should be QList("code/main.js")
Error: Plugin  is not installed.
audreylandgrave commented 1 month ago

Hey! If anyone wants to take over, please do so. I'm no longer actively working on this PR.