Add my ffile shortcut
- ID
edaa6da- date
2024-08-20 21:51:58+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
918ca64- message
Add my `ffile` shortcut- changed files
2 files, 18 additions, 1 deletion
Changed files
macos/README.md (6059) → macos/README.md (6378)
diff --git a/macos/README.md b/macos/README.md
index 6327862..bc415c9 100644
--- a/macos/README.md
+++ b/macos/README.md
@@ -33,6 +33,10 @@ scripts = [
"description": "count the number of tabs I have open in Safari."
},
{
+ "name": "ffile",
+ "description": "print the path to the frontmost selected item in Finder"
+ },
+ {
"name": "find_processes_using_secure_input",
"description": "lists any processes using Secure Input, which can block apps like TextExpander"
},
@@ -116,6 +120,15 @@ cog_helpers.create_description_table(folder_name=folder_name, scripts=scripts)
</dd>
<dt>
+ <a href="https://github.com/alexwlchan/scripts/blob/main/macos/ffile">
+ <code>ffile</code>
+ </a>
+ </dt>
+ <dd>
+ print the path to the frontmost selected item in Finder
+ </dd>
+
+ <dt>
<a href="https://github.com/alexwlchan/scripts/blob/main/macos/find_processes_using_secure_input">
<code>find_processes_using_secure_input</code>
</a>
@@ -199,4 +212,4 @@ cog_helpers.create_description_table(folder_name=folder_name, scripts=scripts)
</p>
</dd>
</dl>
-<!-- [[[end]]] (checksum: 548c914e7cb2a6c9d296697e3b067b5c) -->
+<!-- [[[end]]] (checksum: c1f5a62504ef1ef8f73a1f81751b9997) -->
macos/ffile (0) → macos/ffile (178)
diff --git a/macos/ffile b/macos/ffile
new file mode 100755
index 0000000..6ed569e
--- /dev/null
+++ b/macos/ffile
@@ -0,0 +1,4 @@
+#!/usr/bin/env osascript
+# See https://alexwlchan.net/til/2024/get-selected-finder-items/
+
+tell application "Finder" to get POSIX path of first item of (selection as alias list)