Skip to content

Commit

Permalink
Output path templates
Browse files Browse the repository at this point in the history
  • Loading branch information
alin23 committed Jul 29, 2024
1 parent df2c5e7 commit bfaf303
Show file tree
Hide file tree
Showing 15 changed files with 966 additions and 397 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
version = "1.0">
<ContextStates>
<ContextState
contextName = "LowtechWindow.screenCorner.didset:OSDWindow.swift">
contextName = "generateFilePath(template:for:autoIncrementingNumber:mkdir:):Shared.swift">
<PersistentStrings>
<PersistentString
value = "screenCorner!">
value = "newpath.string">
</PersistentString>
<PersistentString
value = "path.string">
</PersistentString>
</PersistentStrings>
</ContextState>
Expand All @@ -18,5 +21,32 @@
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "FileOptimisationWatcher.process(event:):ClopApp.swift">
<PersistentStrings>
<PersistentString
value = "path.string">
</PersistentString>
<PersistentString
value = "fileType">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "Clop.Convert.convert(path:):main.swift">
<PersistentStrings>
<PersistentString
value = "path.string">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "LowtechWindow.screenCorner.didset:OSDWindow.swift">
<PersistentStrings>
<PersistentString
value = "screenCorner!">
</PersistentString>
</PersistentStrings>
</ContextState>
</ContextStates>
</VariablesViewState>
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<key>ClopCLI.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>4</integer>
<integer>5</integer>
</dict>
<key>Example (Playground) 1.xcscheme</key>
<dict>
Expand Down Expand Up @@ -95,7 +95,7 @@
<key>FinderOptimiser-setapp.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>5</integer>
<integer>4</integer>
</dict>
<key>FinderOptimiser.xcscheme_^#shared#^_</key>
<dict>
Expand Down
5 changes: 2 additions & 3 deletions Clop/Automation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -176,18 +176,17 @@ var shortcutCacheResetTask: DispatchWorkItem? {
oldValue?.cancel()
}
}
import EonilFSEvents

func startShortcutWatcher() {
guard fm.fileExists(atPath: "\(HOME)/Library/Shortcuts") else {
return
}

do {
try EonilFSEvents.startWatching(paths: ["\(HOME)/Library/Shortcuts"], for: ObjectIdentifier(AppDelegate.instance)) { event in
try LowtechFSEvents.startWatching(paths: ["\(HOME)/Library/Shortcuts"], for: ObjectIdentifier(AppDelegate.instance), latency: 0.9) { event in
guard !SWIFTUI_PREVIEW else { return }

shortcutCacheResetTask = mainAsyncAfter(ms: 1000) {
shortcutCacheResetTask = mainAsyncAfter(ms: 100) {
SHM.invalidateCache()
}
}
Expand Down
Loading

0 comments on commit bfaf303

Please sign in to comment.