org-capture 493 B

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