Skip to content

Commit

Permalink
feat: add preference: show standard tabs as windows
Browse files Browse the repository at this point in the history
  • Loading branch information
lwouis committed May 6, 2020
1 parent 8419ad9 commit 3a11cc6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/logic/Preferences.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class Preferences {
"mouseHoverEnabled": "true",
"showMinimizedWindows": "true",
"showHiddenWindows": "true",
"showTabsAsWindows": "false",
"windowDisplayDelay": "0",
"theme": "0",
"showOnScreen": "0",
Expand Down Expand Up @@ -63,6 +64,7 @@ class Preferences {
static var mouseHoverEnabled: Bool { defaults.bool("mouseHoverEnabled") }
static var showMinimizedWindows: Bool { defaults.bool("showMinimizedWindows") }
static var showHiddenWindows: Bool { defaults.bool("showHiddenWindows") }
static var showTabsAsWindows: Bool { defaults.bool("showTabsAsWindows") }
static var windowDisplayDelay: DispatchTimeInterval { DispatchTimeInterval.milliseconds(defaults.int("windowDisplayDelay")) }
static var hideSpaceNumberLabels: Bool { defaults.bool("hideSpaceNumberLabels") }
static var startAtLogin: Bool { defaults.bool("startAtLogin") }
Expand Down
2 changes: 1 addition & 1 deletion src/logic/Windows.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class Windows {
!(Preferences.appsToShow == .active && window.application.runningApplication != NSWorkspace.shared.frontmostApplication) &&
!(Preferences.spacesToShow == .active && window.spaceId != Spaces.currentSpaceId) &&
!(Preferences.screensToShow == .showingAltTab && !isOnScreen(window, screen)) &&
!isTabbed(window)
(Preferences.showTabsAsWindows || !isTabbed(window))
}

static func isTabbed(_ window: Window) -> Bool {
Expand Down
1 change: 1 addition & 0 deletions src/ui/preferences-window/tabs/AppearanceTab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class AppearanceTab: NSViewController, PreferencePane {
LabelAndControl.makeLabelWithDropdown(NSLocalizedString("Show on:", comment: ""), "showOnScreen", ShowOnScreenPreference.allCases),
LabelAndControl.makeLabelWithSlider(NSLocalizedString("Apparition delay:", comment: ""), "windowDisplayDelay", 0, 2000, 11, false, "ms"),
LabelAndControl.makeLabelWithCheckbox(NSLocalizedString("Hide space number labels:", comment: ""), "hideSpaceNumberLabels"),
LabelAndControl.makeLabelWithCheckbox(NSLocalizedString("Show standard tabs as windows:", comment: ""), "showTabsAsWindows"),
])
grid.column(at: 0).xPlacement = .trailing
grid.rowAlignment = .lastBaseline
Expand Down

0 comments on commit 3a11cc6

Please sign in to comment.