Browse Source

Add roam-capture script

Samuel W. Flint 1 year ago
parent
commit
3b68daf716
1 changed files with 9 additions and 0 deletions
  1. 9 0
      roam-capture

+ 9 - 0
roam-capture

@@ -0,0 +1,9 @@
+#!/bin/sh
+
+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-roam-capture-inbox)"
+else
+    emacsclient -c --eval '(org-roam-capture-inbox-in-own-frame)'
+fi