diff --git a/resources/l10n/Localizable.strings b/resources/l10n/Localizable.strings index 6ffac337..087da7f7 100644 --- a/resources/l10n/Localizable.strings +++ b/resources/l10n/Localizable.strings @@ -289,6 +289,9 @@ /* No comment provided by engineer. */ "Never send crash reports" = "Never send crash reports"; +/* No comment provided by engineer. */ +"Non-active apps" = "Non-active apps"; + /* No comment provided by engineer. */ "Normal" = "Normal"; diff --git a/src/logic/MacroPreferences.swift b/src/logic/MacroPreferences.swift index cea4dcef..a93a0d7d 100644 --- a/src/logic/MacroPreferences.swift +++ b/src/logic/MacroPreferences.swift @@ -362,11 +362,13 @@ enum WindowOrderPreference: CaseIterable, MacroPreference { enum AppsToShowPreference: CaseIterable, MacroPreference { case all case active + case nonActive var localizedString: LocalizedString { switch self { case .all: return NSLocalizedString("All apps", comment: "") case .active: return NSLocalizedString("Active app", comment: "") + case .nonActive: return NSLocalizedString("Non-active apps", comment: "") } } } diff --git a/src/logic/Preferences.swift b/src/logic/Preferences.swift index f0470fc5..3ceb4094 100644 --- a/src/logic/Preferences.swift +++ b/src/logic/Preferences.swift @@ -59,7 +59,7 @@ class Preferences { "showTitles": ShowTitlesPreference.windowTitle.indexAsString, "appsToShow": AppsToShowPreference.all.indexAsString, "appsToShow2": AppsToShowPreference.active.indexAsString, - "appsToShow3": AppsToShowPreference.all.indexAsString, + "appsToShow3": AppsToShowPreference.nonActive.indexAsString, "appsToShow4": AppsToShowPreference.all.indexAsString, "spacesToShow": SpacesToShowPreference.all.indexAsString, "spacesToShow2": SpacesToShowPreference.all.indexAsString, diff --git a/src/logic/Windows.swift b/src/logic/Windows.swift index 3badacbf..73c121fc 100644 --- a/src/logic/Windows.swift +++ b/src/logic/Windows.swift @@ -365,6 +365,7 @@ class Windows { } } ?? false) && !(Preferences.appsToShow[App.app.shortcutIndex] == .active && window.application.pid != NSWorkspace.shared.frontmostApplication?.processIdentifier) && + !(Preferences.appsToShow[App.app.shortcutIndex] == .nonActive && window.application.pid == NSWorkspace.shared.frontmostApplication?.processIdentifier) && !(!(Preferences.showHiddenWindows[App.app.shortcutIndex] != .hide) && window.isHidden) && ((Preferences.showWindowlessApps[App.app.shortcutIndex] != .hide && window.isWindowlessApp) || !window.isWindowlessApp &&