This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Force maximized windows' positions to (0, 0)?

Tags: None
(comma "," separated)
marsroverdriver
Registered Member
Posts
3
Karma
0
This is probably simple, but I can't find how to do it. In KDE 4.13.2, I'd like a maximized window to always have its top-left edge at (0, 0) (at least when first maximized). Most windows do this, but at least some, in particular xterms, don't: their left edge is at 0, but xterms are just a few pixels down from the top. This happens even when the xterm was at (0, 0) before maximizing.

I don't suppose there's a way to force this?

(Edit: Ah, I've just found KWin scripts. That'll probably do it.)
luebking
Karma
0
xterm has a fixed aspect ratio (thus doesn't maximize to random sizes, thus leaves a gap)
you can make kwin ignore this with a "special window setting" (right click the titlebar, "more actions")

to pass a maixmized window a specific position, you'll atm. require a script, yes.
marsroverdriver
Registered Member
Posts
3
Karma
0
Ah, thank you, yes, that worked. And it's a good thing, too, since KWin doesn't seem to let you set a window's position (the "move" attribute on my chosen clients[i] from the workspace.clientList() is false).

Anyway, much better now. Thanks again!

(For posterity: right-click title bar -> "More Actions" -> "Special Window Settings ..." -> "Size & Position." Check "Obey geometry restrictions," then choose "Force" and "No." Seems to be working for me.)
luebking
Karma
0
in kwin scripts, just
var rect = client.geometry;
rect.x = 0;
rect.y = 0;
client.geometry = rect;

in real code, you'd want to align to some client area of "workspace" (eg. the maximize area)
marsroverdriver
Registered Member
Posts
3
Karma
0
You're awesome. Thank you so much!


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], q.ignora, watchstar