You should add a shortcut that points to the file location
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File C:\Users\USER\Desktop\notion-inbox.ps1
| @propertyWrapper | |
| public struct AnyProxy<EnclosingSelf, Value> { | |
| private let keyPath: ReferenceWritableKeyPath<EnclosingSelf, Value> | |
| public init(_ keyPath: ReferenceWritableKeyPath<EnclosingSelf, Value>) { | |
| self.keyPath = keyPath | |
| } | |
| @available(*, unavailable, message: "The wrapped value must be accessed from the enclosing instance property.") | |
| public var wrappedValue: Value { |
| // I got inspiration in this repository https://github.com/kishikawakatsumi/KeychainAccess | |
| // This is a great library that is backward compatible with very old versions of iOS and macOS and gives you a very complete wrapper of the Keychain | |
| // But it was too much for me, since I didn't need neither that backward compatibility nor so many features, I just wanted to keep Codable secrets in the Keychain. | |
| // So I have made my own version, also implementing a Property Wrapper to make it agnostic to use. | |
| // I have thus reduced the 3000 lines of KeychainAccess to less than 200 and I have made its use for the functions I was interested in much more agile and integrated with SwiftUI, | |
| // KeychainWrapper.swift | |
| // SyncTion (macOS) | |
| // | |
| // Created by Rubén on 20/2/23. | |
| // |
| extension View { | |
| @ViewBuilder func `if`<Content: View>(_ condition: Bool, transform: (Self) -> Content) -> some View { | |
| if condition { | |
| transform(self) | |
| } else { | |
| self | |
| } | |
| } | |
| @ViewBuilder func `if`<Content: View, ContentElse: View>( |
| import SwiftUI | |
| struct DatePickerNullable: View { | |
| let title: String | |
| @Binding var selected: Date? | |
| let defaultDate: Date | |
| var body: some View { | |
| HStack { | |
| if let date = Binding($selected) { |
| import Combine | |
| import ComposableArchitecture | |
| import KeyboardShortcuts | |
| public struct KeyboardShortcutManager { | |
| public enum Action: Equatable { | |
| case onKeyDown(UUID) | |
| case onKeyUp(UUID) | |
| } |