Browse Source

Added org-capture script

Samuel W. Flint 7 years ago
parent
commit
3624fadd43
1 changed files with 10 additions and 0 deletions
  1. 10 0
      org-capture

+ 10 - 0
org-capture

@@ -0,0 +1,10 @@
+#!/bin/sh
+# my-init.org [[id:fc0749df-a6ad-4885-afb8-bbab36846558][open-a-window-for-org-capture]]
+currentWindow=$(xprop -id $(xprop -root | awk '/_NET_ACTIVE_WINDOW\(WINDOW\)/{print $NF}') | awk '/WM_CLASS\(STRING\)/{print $NF}')
+
+if [[ $currentWindow == '"Emacs"' ]] ; then
+    emacsclient --eval "(call-interactively #'org-capture)"
+else
+    emacsclient -c --eval '(my/call-org-capture-in-new-window)'
+fi
+# End my-init.org [[id:fc0749df-a6ad-4885-afb8-bbab36846558][open-a-window-for-org-capture]]