quicksilver, add apple script hotkey for quicksivler to hide/show emacs
authorPeng Li <seudut@gmail.com>
Wed, 26 Aug 2015 02:01:07 +0000 (10:01 +0800)
committerPeng Li <seudut@gmail.com>
Wed, 26 Aug 2015 02:01:07 +0000 (10:01 +0800)
scripts/emacs_toggle.applescript [new file with mode: 0644]

diff --git a/scripts/emacs_toggle.applescript b/scripts/emacs_toggle.applescript
new file mode 100644 (file)
index 0000000..d3bbe3b
--- /dev/null
@@ -0,0 +1,10 @@
+tell application "System Events"
+    tell application process "Emacs"
+        if visible then
+            set visible to false
+        else
+            set visible to true
+            tell application "Emacs" to activate
+        end if
+    end tell
+end tell