"use strict";
// SimpleDwindle
-const VERSION = "0.3.2";
+const VERSION = "0.3.3";
// KWin 6.8 - Minimal chronological Dwindle
// ------------------------------------------------------------
// Configuration
// ------------------------------------------------------------
+// info: nomenclature in kwin is
+// class/appid => resourceClass
+// title => caption
+
const GAP = 8;
-// Always floating, never tiled
+// Floating by default, manually tileable via Meta+S
const FLOATING_CLASSES = [
// "org.kde.dolphin",
"org.kde.kcalc",
"systemsettings",
+ "okular",
+ "dolphin",
+ "qtpass",
+ "alsa-scarlett-gui",
+ "lstopo",
+ "LACT",
+ "ncmpcpp",
+ "MissionCenter",
+ "gradia",
];
// Completely ignored by SimpleDwindle
const IGNORED_CLASSES = [
"wl-copy",
+ "steam",
+ "heroic",
+ /^steam_app.*$/,
+ /^.*\.exe$/i,
+ /^xdg-desktop-portal/,
+ /clipboard/i,
+ /^org\.kde\.spectacle$/,
];
// ------------------------------------------------------------
}
function matchesClass(w, classes) {
- return classes.some(c =>
- c.toLowerCase() === windowClass(w)
- );
+ const name = windowClass(w);
+
+ return classes.some(entry => {
+ if (entry instanceof RegExp)
+ return entry.test(name);
+
+ return String(entry).toLowerCase() === name;
+ });
}
function isCandidate(w) {
// ------------------------------------------------------------
function tileWindow(w) {
- log("TILED: " + w.caption + " [" + w.resourceClass + "]");
-
if (!isCandidate(w) ||
isIgnored(w) ||
contains(managed, w) ||
arrange(layout);
- log("TILED: " + w.caption);
+ log("TILED: " + w.caption + " [" + w.resourceClass + "]");
}
function detachWindow(w) {
function handleWindowAdded(w) {
log(
- "WINDOW ADDED: " +
- "caption=" + w.caption +
- " class=" + w.resourceClass +
- " normal=" + w.normalWindow +
- " transient=" + Boolean(w.transient) +
- " id=" + w.internalId
+ "WINDOW ADDED: " +
+ "caption=" + w.caption +
+ " class=" + w.resourceClass +
+ " normal=" + w.normalWindow +
+ " transient=" + Boolean(w.transient) +
+ " id=" + w.internalId
);
if (!isCandidate(w) || isIgnored(w))
return;