quicksilver, add apple script hotkey for quicksivler to hide/show emacs
[dotfiles.git] / scripts / emacs_toggle.applescript
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