From b2f6600aa8b280fd2d1ec411306ac445009558d9 Mon Sep 17 00:00:00 2001
From: Dante Catalfamo
Date: Fri, 17 Dec 2021 23:34:11 -0500
Subject: Add Automator steps to emacsclient on macos

---
 .../emacsclient automator.png                      | Bin 0 -> 641723 bytes
 content/posts/using-emacsclient-on-macos/index.org |  30 +++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 content/posts/using-emacsclient-on-macos/emacsclient automator.png

diff --git a/content/posts/using-emacsclient-on-macos/emacsclient automator.png b/content/posts/using-emacsclient-on-macos/emacsclient automator.png
new file mode 100644
index 0000000..80441b9
Binary files /dev/null and b/content/posts/using-emacsclient-on-macos/emacsclient automator.png differ
diff --git a/content/posts/using-emacsclient-on-macos/index.org b/content/posts/using-emacsclient-on-macos/index.org
index c98e4b9..c0513ab 100644
--- a/content/posts/using-emacsclient-on-macos/index.org
+++ b/content/posts/using-emacsclient-on-macos/index.org
@@ -67,3 +67,33 @@ daemon if it isn't already running.
 
 Now all I have to do is press @@html:<kbd>⌃</kbd> + <kbd>⇧</kbd> + <kbd>⌘</kbd> + <kbd>E</kbd>@@
 and a new Emacs window pops up with no startup delay!
+
+It's also possible to create an "application" shortcut for
+=emacsclient= using [[https://support.apple.com/en-ca/guide/automator/welcome/mac][Automator]].
+
+Create a new automation as an Application with the Run Shell Script
+step. Then add the following as the contents of the script.
+
+#+begin_src shell
+/opt/homebrew/bin/emacsclient \
+    --no-wait \
+    --quiet \
+    --suppress-output \
+    --create-frame \
+    "$@"
+#+end_src
+
+Replacing =/opt/homebrew/bin/emacsclient= with the path to your
+=emacsclient= if it's located elsewhere.
+
+Then set =Pass input= to =as arguments=.
+
+#+ATTR_HTML: :title Automator emacsclient script
+#+ATTR_HTML: :alt Automator emacsclient script
+[[file:emacsclient automator.png]]
+
+Finally place the Automator application in your =/Applications=
+directory.
+
+You should now be able to open Emacsclient through spotlight and
+associate it with filetypes.
-- 
cgit v1.2.3