Преглед на файлове

Added org-capture script

Samuel W. Flint преди 7 години
родител
ревизия
3624fadd43
променени са 1 файла, в които са добавени 10 реда и са изтрити 0 реда
  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]]