| | |
| | | if focusAppShelfItemForKeyboard(indexSymbol: symbol, commandLabel: recordedCommand), |
| | | let ordinal = Self.appShelfIndexSymbols.firstIndex(of: symbol), |
| | | ordinal < appShelfItems.count { |
| | | let appGroupIndex = appShelfItems[ordinal].item.appGroupIndex |
| | | if let card = singleVisibleWaterfallCard(appGroupIndex: appGroupIndex) { |
| | | recordKeyboardCommand("windowSingle:\(symbol)") |
| | | lastWindowIndexKeyCommand = "windowSingle:\(symbol)" |
| | | lastWindowIndexKeyCommitCode = symbol |
| | | lastWindowShortcutPreCommitFilterSnapshot = nil |
| | | clearWindowIndexKeyPending() |
| | | commitKeyboardWindowCard(card, trigger: "windowIndexSingleApp") |
| | | } else { |
| | | setWindowIndexKeyPending( |
| | | appSymbol: symbol, |
| | | appGroupIndex: appShelfItems[ordinal].item.appGroupIndex, |
| | | appGroupIndex: appGroupIndex, |
| | | startedAt: now |
| | | ) |
| | | } |
| | | } else { |
| | | selectionChangedByLastCommand = false |
| | | clearWindowIndexKeyPending() |
| | |
| | | waterfallColumns.flatMap(\.cards) |
| | | } |
| | | |
| | | private func singleVisibleWaterfallCard(appGroupIndex: Int) -> WaterfallCardLayers? { |
| | | let cards = visibleWaterfallCards.filter { $0.item.appGroupIndex == appGroupIndex } |
| | | return cards.count == 1 ? cards[0] : nil |
| | | } |
| | | |
| | | private var windowShortcutFilterDimOpacity: Float { |
| | | resolvedTheme == .dark ? 0.44 : 0.38 |
| | | } |