mirror of
https://github.com/Toxblh/MTMR.git
synced 2026-01-10 17:08:39 +00:00
parent
6badc37dc3
commit
a606767ddc
@ -348,7 +348,7 @@
|
|||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
B082B24E205C7D8000BC04DC = {
|
B082B24E205C7D8000BC04DC = {
|
||||||
CreatedOnToolsVersion = 9.2;
|
CreatedOnToolsVersion = 9.2;
|
||||||
LastSwiftMigration = 1020;
|
LastSwiftMigration = 1000;
|
||||||
ProvisioningStyle = Manual;
|
ProvisioningStyle = Manual;
|
||||||
SystemCapabilities = {
|
SystemCapabilities = {
|
||||||
com.apple.Sandbox = {
|
com.apple.Sandbox = {
|
||||||
@ -358,7 +358,7 @@
|
|||||||
};
|
};
|
||||||
B082B260205C7D8000BC04DC = {
|
B082B260205C7D8000BC04DC = {
|
||||||
CreatedOnToolsVersion = 9.2;
|
CreatedOnToolsVersion = 9.2;
|
||||||
LastSwiftMigration = 1020;
|
LastSwiftMigration = 1000;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -622,7 +622,7 @@
|
|||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "MTMR/CBridge/TouchBarPrivateApi-Bridging.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "MTMR/CBridge/TouchBarPrivateApi-Bridging.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 4.2;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@ -645,7 +645,7 @@
|
|||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "MTMR/CBridge/TouchBarPrivateApi-Bridging.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "MTMR/CBridge/TouchBarPrivateApi-Bridging.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 4.2;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
@ -658,7 +658,7 @@
|
|||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = Toxblh.MTMRTests;
|
PRODUCT_BUNDLE_IDENTIFIER = Toxblh.MTMRTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 4.2;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@ -673,7 +673,7 @@
|
|||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = Toxblh.MTMRTests;
|
PRODUCT_BUNDLE_IDENTIFIER = Toxblh.MTMRTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 4.2;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -51,7 +51,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if frontmostApplicationIdentifier != nil {
|
if frontmostApplicationIdentifier != nil {
|
||||||
isBlockedApp = blacklistAppIdentifiers.firstIndex(of: frontmostApplicationIdentifier!) != nil
|
isBlockedApp = blacklistAppIdentifiers.index(of: frontmostApplicationIdentifier!) != nil
|
||||||
} else {
|
} else {
|
||||||
isBlockedApp = false
|
isBlockedApp = false
|
||||||
}
|
}
|
||||||
@ -76,7 +76,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
|
|||||||
@objc func toggleBlackListedApp(_: Any?) {
|
@objc func toggleBlackListedApp(_: Any?) {
|
||||||
let appIdentifier = TouchBarController.shared.frontmostApplicationIdentifier
|
let appIdentifier = TouchBarController.shared.frontmostApplicationIdentifier
|
||||||
if appIdentifier != nil {
|
if appIdentifier != nil {
|
||||||
if let index = TouchBarController.shared.blacklistAppIdentifiers.firstIndex(of: appIdentifier!) {
|
if let index = TouchBarController.shared.blacklistAppIdentifiers.index(of: appIdentifier!) {
|
||||||
TouchBarController.shared.blacklistAppIdentifiers.remove(at: index)
|
TouchBarController.shared.blacklistAppIdentifiers.remove(at: index)
|
||||||
} else {
|
} else {
|
||||||
TouchBarController.shared.blacklistAppIdentifiers.append(appIdentifier!)
|
TouchBarController.shared.blacklistAppIdentifiers.append(appIdentifier!)
|
||||||
|
|||||||
@ -146,7 +146,7 @@ class TouchBarController: NSObject, NSTouchBarDelegate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func updateActiveApp() {
|
func updateActiveApp() {
|
||||||
if frontmostApplicationIdentifier != nil && blacklistAppIdentifiers.firstIndex(of: frontmostApplicationIdentifier!) != nil {
|
if frontmostApplicationIdentifier != nil && blacklistAppIdentifiers.index(of: frontmostApplicationIdentifier!) != nil {
|
||||||
dismissTouchBar()
|
dismissTouchBar()
|
||||||
} else {
|
} else {
|
||||||
presentTouchBar()
|
presentTouchBar()
|
||||||
|
|||||||
@ -72,7 +72,7 @@ class AppScrubberTouchBarItem: NSCustomTouchBarItem, NSScrubberDelegate, NSScrub
|
|||||||
func updateRunningApplication() {
|
func updateRunningApplication() {
|
||||||
let newApplications = launchedApplications()
|
let newApplications = launchedApplications()
|
||||||
|
|
||||||
let index = newApplications.firstIndex {
|
let index = newApplications.index {
|
||||||
$0.bundleIdentifier == frontmostApplicationIdentifier
|
$0.bundleIdentifier == frontmostApplicationIdentifier
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,7 +181,7 @@ class AppScrubberTouchBarItem: NSCustomTouchBarItem, NSScrubberDelegate, NSScrub
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
hf.tap(strong: 6)
|
hf.tap(strong: 6)
|
||||||
if let index = self.persistentAppIdentifiers.firstIndex(of: bundleIdentifier!) {
|
if let index = self.persistentAppIdentifiers.index(of: bundleIdentifier!) {
|
||||||
persistentAppIdentifiers.remove(at: index)
|
persistentAppIdentifiers.remove(at: index)
|
||||||
} else {
|
} else {
|
||||||
persistentAppIdentifiers.append(bundleIdentifier!)
|
persistentAppIdentifiers.append(bundleIdentifier!)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user