feat: support showing only non-visible spaces (closes #1274)

This commit is contained in:
lwouis committed 2026-02-16 13:33:18 +01:00
1 parent 3961f2a888
commit 51db0cb8e4
3 files changed
+6

No files matched your search

+3
View File
@@ -289,6 +289,9 @@
/* No comment provided by engineer. */
"Non-active apps" = "Non-active apps";
/* No comment provided by engineer. */
"Non-visible Spaces" = "Non-visible Spaces";
/* No comment provided by engineer. */
"Not allowed" = "Not allowed";
+2
View File
@@ -276,11 +276,13 @@ enum AppsToShowPreference: CaseIterable, MacroPreference {
enum SpacesToShowPreference: CaseIterable, MacroPreference {
case all
case visible
case nonVisible
var localizedString: LocalizedString {
switch self {
case .all: return NSLocalizedString("All Spaces", comment: "")
case .visible: return NSLocalizedString("Visible Spaces", comment: "")
case .nonVisible: return NSLocalizedString("Non-visible Spaces", comment: "")
}
}
}
+1
View File
@@ -144,6 +144,7 @@ class Windows {
!(!(Preferences.showFullscreenWindows[App.app.shortcutIndex] != .hide) && window.isFullscreen) &&
!(!(Preferences.showMinimizedWindows[App.app.shortcutIndex] != .hide) && window.isMinimized) &&
!(Preferences.spacesToShow[App.app.shortcutIndex] == .visible && !Spaces.visibleSpaces.contains { visibleSpace in window.spaceIds.contains { $0 == visibleSpace } }) &&
!(Preferences.spacesToShow[App.app.shortcutIndex] == .nonVisible && Spaces.visibleSpaces.contains { visibleSpace in window.spaceIds.contains { $0 == visibleSpace } }) &&
!(Preferences.screensToShow[App.app.shortcutIndex] == .showingAltTab && !window.isOnScreen(NSScreen.preferred)) &&
(Preferences.showTabsAsWindows || !window.isTabbed))
}