-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] Add support for matching windowTypes #20
Comments
Looking at the script (https://github.com/esjeon/kwin-forceblur/blob/master/contents/ui/main.qml) i found out that you use 'client.resourceClass' property provided by Kwin API (https://develop.kde.org/docs/plasma/kwin/api/) I also found that Kwin API provides 'int windowType' which could be used to match window by windowType (defined by wm-specs https://specifications.freedesktop.org/wm-spec/wm-spec-latest.html). That way context menu/popup menu of gtk apps like firefox could be blurred when transparent. Even other types of windows could be blurred. |
Tried editing onClientAdded function. Modified version below.
function: function onClientAdded(client) {
if (!shell) return;
var type = client.windowType.toString();
var role = client.windowRole.toString().tiLowerCase();
var cls = client.resourceClass.toString().toLowerCase();
var name = client.resourceName.toString().toLowerCase();
var clsMatches = root.patterns.indexOf(cls) >= 0 || root.patterns.indexOf(name) >= 0 || root.patterns.indexOf(type) >= 0 || root.patterns.indexOf(role);
if (clsMatches == root.blurMatching) {
if (root.blurContent) {
registerHintUpdater(client);
} else {
var wid = "0x" + client.windowId.toString(16);
shell.run("xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id " + wid);
}
}
} but did not manage to get desired effect. I may be doing something wrong as I have 0 experience with QML and KWin scripting |
+1 for matching windowTypes. I have a custom firefox theme with transparent right-click menus and a bit of blur would make them look super nice. |
Please add support for matching by windowType property. That way we could blur popup_menu and context_menu type windows which would be useful and helpful. As i can see from the main file, mach is being done only against className (WM_CLASSNAME propery).
The text was updated successfully, but these errors were encountered: