kwin-scripts / kwin-tiling

Tiling script for kwin
GNU General Public License v2.0
1.1k stars 68 forks source link

General Customization and permanent placement options #245

Closed szulmack closed 3 years ago

szulmack commented 3 years ago

Hi there, I know that for most people familiar with tiling managers these questions are probably really stupid, but your script is the only one that works decently for me and I'm stuck, so I'll ask.

How do I configure default place or size of a window? Doing this in system Settings -> Window Rules per application or per Window Class doesn't work, Kwin places them wherever it wants next time I open them. I have tried using the method from other issues in ignored.js with

if (client.resourceClass.toString() == "slack" && client.resourceName == "Slack | mini panel") { print("Ignoring client because of a workaround", client.resourceName); return true; }

Is this correct? It doesn't work for me, the minipanel is still being tiled.

It's all quite new to me so sorry for inconvenience if the questions and info provided aren't up to par.

See my system configuration and script options attached. image (1) image

Operating System: Pop!_OS 21.04 KDE Plasma Version: 5.21.4 KDE Frameworks Version: 5.80.0 Qt Version: 5.15.2 Kernel Version: 5.11.0-7620-generic OS Type: 64-bit Graphics Platform: X11

faho commented 3 years ago

How do I configure default place or size of a window?

Honestly, the only thing that really mostly works is KWin's placement options in Window Behavior -> Advanced -> Window Placement.

Screenshot_20210804_170854

In my experience, anything else the script tries to do doesn't work all that well because KWin's signal handling isn't defined enough (and the API anemic so we can't inhibit any of KWin's default behavior).

Is this correct? It doesn't work for me, the minipanel is still being tiled.

It's not. You're using the title, which isn't reliable enough for our use (e.g. browser windows constantly change the title).

What you want is to start xprop in a konsole, click on the window, and look at the "WM_CLASS" line.

That'll give you something like WM_CLASS(STRING) = "systemsettings5", "systemsettings", the "systemsettings5" here is the "resourceClass", the "systemsettings" is the "resourceName" (awful naming, I know). Either should work as the client to ignore.