Skip to content

Commit c5bbe44

Browse files
committed
fix: emacs/open default to wayland (no display=:0)
this was causing emacs clients to run in X-mode (and eventually crash).
1 parent d89128c commit c5bbe44

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/ralphie/emacs.clj

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@
102102
([wsp]
103103
(try
104104
(let [wsp (or wsp {})
105-
ignore-dead-server? (:emacs.open/ignore-dead-server? wsp false)
106105
wsp-name
107106
(or (some wsp [:emacs.open/workspace
108107
:workspace/title :org/name :clawe.defs/name])
@@ -121,7 +120,10 @@
121120
;; TODO consider a 'daily file' pattern here, even searching to find one
122121
(str " (find-file \"" initial-file "\") " " "))
123122
(when elisp-hook elisp-hook)
124-
" )")]
123+
" )")
124+
ignore-dead-server? (:emacs.open/ignore-dead-server? wsp false)
125+
wayland? (:emacs.open/wayland? wsp true) ;; defaulting to wayland!
126+
display-str (when-not wayland? "--display=:0")]
125127

126128
(when (and (not (emacs-server-running?)) (not ignore-dead-server?))
127129
(notify {:notify/subject "Initializing Emacs Server, initializing."
@@ -132,7 +134,7 @@
132134

133135
(-> ($ emacsclient --no-wait --create-frame
134136
-F ~(str "((name . \"" wsp-name "\"))")
135-
--display=:0
137+
~display-str
136138
--eval ~eval-str)
137139
check))
138140
;; TODO proper clawe error log

0 commit comments

Comments
 (0)