Add option to ignore certain apps in dock (#1303)

This commit is contained in:
end-4
2025-05-19 23:29:28 +02:00
committed by GitHub
2 changed files with 16 additions and 0 deletions
@@ -199,6 +199,7 @@
"firefox",
"org.gnome.Nautilus"
],
"ignoredAppsRegex": [],
"layer": "top",
"monitorExclusivity": true, // Dock will move to other monitor along with focus if enabled
"searchPinnedAppIcons": false, // Try to search for the correct icon if the app class isn't an icon name
+15
View File
@@ -119,6 +119,21 @@ const Taskbar = (monitor) => Widget.Box({
const client = Hyprland.clients[i];
if (client["pid"] == -1) return;
const appClass = substitute(client.class);
const ignoredAppsRegex = userOptions.dock.ignoredAppsRegex || [];
let isIgnored = false;
for (const regex of ignoredAppsRegex) {
try {
const pattern = new RegExp(regex);
if (pattern.test(appClass)) {
isIgnored = true;
break;
}
} catch (e) {}
}
if (isIgnored) continue;
// for (const appName of userOptions.dock.pinnedApps) {
// if (appClass.includes(appName.toLowerCase()))
// return null;