roam-capture 333 B

123456789
  1. #!/bin/sh
  2. currentWindow=$(xprop -id $(xprop -root | awk '/_NET_ACTIVE_WINDOW\(WINDOW\)/{print $NF}') | awk '/WM_CLASS\(STRING\)/{print $NF}')
  3. if [[ $currentWindow == '"Emacs"' ]] ; then
  4. emacsclient --eval "(call-interactively #'org-roam-capture-inbox)"
  5. else
  6. emacsclient -c --eval '(org-roam-capture-inbox-in-own-frame)'
  7. fi