mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
feat: add option to ignore certain apps in dock (#1681)
* feat: add option to ignore certain apps in dock Co-authored-by: end-4 <97237370+end-4@users.noreply.github.com>
This commit is contained in:
@@ -160,6 +160,7 @@ Singleton {
|
||||
property bool hoverToReveal: true // When false, only reveals on empty workspace
|
||||
property list<string> pinnedApps: [ // IDs of pinned entries
|
||||
"org.kde.dolphin", "kitty",]
|
||||
property list<string> ignoredAppRegexes: []
|
||||
}
|
||||
|
||||
property JsonObject language: JsonObject {
|
||||
|
||||
@@ -57,9 +57,13 @@ Item {
|
||||
if (pinnedApps.length > 0) {
|
||||
map.set("SEPARATOR", { pinned: false, toplevels: [] });
|
||||
}
|
||||
|
||||
|
||||
// Ignored apps
|
||||
const ignoredRegexStrings = Config.options?.dock.ignoredAppRegexes ?? [];
|
||||
const ignoredRegexes = ignoredRegexStrings.map(pattern => new RegExp(pattern, "i"));
|
||||
// Open windows
|
||||
for (const toplevel of ToplevelManager.toplevels.values) {
|
||||
if (ignoredRegexes.some(re => re.test(toplevel.appId))) continue;
|
||||
if (!map.has(toplevel.appId.toLowerCase())) map.set(toplevel.appId.toLowerCase(), ({
|
||||
pinned: false,
|
||||
toplevels: []
|
||||
|
||||
Reference in New Issue
Block a user