parent
9dad26961a
commit
2f39d3fced
2 changed files with 9 additions and 14 deletions
|
@ -14,10 +14,10 @@ cleanup() {
|
|||
}
|
||||
|
||||
# If emacs isn't running, we start a temporary daemon, solely for this window.
|
||||
if ! emacsclient --suppress-output --eval nil; then
|
||||
if ! emacsclient --suppress-output --eval nil 2>/dev/null; then
|
||||
echo "No Emacs daemon/server is available! Starting one..."
|
||||
emacs --daemon
|
||||
trap cleanup EXIT INT TERM
|
||||
daemon=1
|
||||
fi
|
||||
|
||||
# org-capture key mapped to argument flags
|
||||
|
@ -37,13 +37,7 @@ esac
|
|||
# Fix incompatible terminals that cause odd 'not a valid terminal' errors
|
||||
[ "$TERM" = "alacritty" ] && export TERM=xterm-256color
|
||||
|
||||
if [ $daemon ]; then
|
||||
emacsclient -a "" \
|
||||
-c -F '((name . "doom-capture") (width . 70) (height . 25) (transient . t))' \
|
||||
-e "(+org-capture/open-frame \"$str\" ${key:-nil})"
|
||||
else
|
||||
# Non-daemon servers flicker a lot if frames are created from terminal, so we
|
||||
# do it internally instead.
|
||||
emacsclient -a "" \
|
||||
-e "(+org-capture/open-frame \"$str\" ${key:-nil})"
|
||||
fi
|
||||
# Non-daemon servers flicker a lot if frames are created from terminal, so we do
|
||||
# it internally instead.
|
||||
emacsclient -a "" \
|
||||
-e "(+org-capture/open-frame \"$str\" ${key:-nil})"
|
||||
|
|
|
@ -15,8 +15,9 @@
|
|||
(width . 70)
|
||||
(height . 25)
|
||||
(transient . t)
|
||||
,(when (and IS-LINUX (not (getenv "DISPLAY")))
|
||||
`(display . ":0"))
|
||||
,@(when IS-LINUX
|
||||
`((window-system . ,(if (boundp 'pgtk-initialized) 'pgtk 'x))
|
||||
(display . ,(or (getenv "DISPLAY") ":0"))))
|
||||
,(if IS-MAC '(menu-bar-lines . 1)))
|
||||
"TODO")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue