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

Hiding the window decoration for maximized windows

Tags: None
(comma "," separated)
User avatar
sredna
Registered Member
Posts
225
Karma
1
OS
Hi,

For years, I used QtCurve window decos because they allow to hide the window title for maximized windows, which is very convenient on small screens. QtCurve is not yet available for kf5, so I set out to try and make this work.

It is possible to write a kwin script, given it is stored in the system filesystem - /usr/share/kwin/ and a desktop file in /usr/share/kservices5.

I worked out this script, based on the documentation found at https://techbase.kde.org/Development/Tu ... ng/API_4.9 and looking at some samples:

Code: Select all
// h and v are maximized states, horizontal and vertical
workspace.clientMaximizeSet.connect(fixBorder(client, h, v));
workspace.clientMaximizeSet.connect(function(client, h, v) {
    client.noBorder = h && v;
});


But it does not work.
Any help improving would be very wellcome :)
User avatar
google01103
Manager
Posts
6668
Karma
25
you could use window rules and remove the title bar but you also loose the border


OpenSuse Leap 42.1 x64, Plasma 5.x

User avatar
google01103
Manager
Posts
6668
Karma
25
if you keep the title bar you can save space with "menu bar style" by using "title bar button" assuming you do display the menu bar - note: though the options/settings were there in K5 it didn't work for me but ymmv


OpenSuse Leap 42.1 x64, Plasma 5.x

luebking
Karma
0
This is actually a "hidden" KWin feature, I assume QtCurve simply exposed it.

Code: Select all
kwriteconfig --file kwinrc --group Windows --key BorderlessMaximizedWindows true
User avatar
sredna
Registered Member
Posts
225
Karma
1
OS
Hi, Thanks for answers.
1. Using window rules - not possible, a match for window state is missing.
2. Using titlebar menu - I actually hide the menu entirely in my most used apps, as I rarely use them (webbrowser, mail client, and more), so this is not relevant, however nice it is :)
3. I executed the command. It have not affected ~/.config/kwinrc at this point - but it is visible in ~/.kde4/share/config/kwinrc - so I assume kwriteconfig was not updated (or the line in the kde4 kwinrc was already present). Manually editing ~/.config/kwinrc had no effect so far. I'll restart and see what happens :)
User avatar
sredna
Registered Member
Posts
225
Karma
1
OS
Setting kwinrc key: After restart this was working, but it makes the graphics stack crash repeatedly and rendering my session useless. After disabling the key, I can now partially use my session, but I suspect the remaining problems has nothing to do with kwinrc. Right now, my taskbar is looking very odd.

After restarting, my activities was messed up, windows are now appearing in wrong activities. Probably unrelated.
User avatar
sredna
Registered Member
Posts
225
Karma
1
OS
After downgrading the archlinux plasma-workspace package, things now works like a charm.
Thanks a lot for the tip luebking :)


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell