macOSのスクリーンショットの保存場所を変更するメニュバーエクストラ
Revision | 65ef6092b49609bcb83705f62f6d55cfb2536c05 (tree) |
---|---|
Time | 2017-11-04 23:50:16 |
Author | masakih <masakih@user...> |
Commiter | masakih |
シングルトンにした
@@ -17,6 +17,8 @@ class Screenshot { | ||
17 | 17 | |
18 | 18 | static let shared = Screenshot() |
19 | 19 | |
20 | + private init() {} | |
21 | + | |
20 | 22 | var location: URL { |
21 | 23 | get { return screencaptureAttribute(.location).map { URL(fileURLWithPath: $0) } ?? desktopURL() } |
22 | 24 | set { setScreencaptureAttribute(newValue.path, for: .location) } |