mirror of
https://github.com/lil-org/tokenary.git
synced 2024-12-15 06:56:34 +03:00
18 lines
438 B
Swift
18 lines
438 B
Swift
// Copyright © 2021 Encrypted Ink. All rights reserved.
|
|
|
|
import Cocoa
|
|
|
|
struct Window {
|
|
|
|
static func closeAll() {
|
|
NSApplication.shared.windows.forEach { $0.close() }
|
|
}
|
|
|
|
static func activateSafari() {
|
|
if let browser = NSWorkspace().runningApplications.first(where: { $0.bundleIdentifier == "com.apple.Safari" }) {
|
|
browser.activate(options: .activateIgnoringOtherApps)
|
|
}
|
|
}
|
|
|
|
}
|