mirror of
https://github.com/lil-org/tokenary.git
synced 2024-12-14 14:40:20 +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)
|
|
}
|
|
}
|
|
|
|
}
|