diff --git a/emacs-server-set-wayland-display.zsh b/emacs-server-set-wayland-display.zsh new file mode 100755 index 0000000..4bbb749 --- /dev/null +++ b/emacs-server-set-wayland-display.zsh @@ -0,0 +1,12 @@ +#!/usr/bin/env zsh + +setopt rcquotes + +printf '%s' "${WAYLAND_DISPLAY}" | + /usr/bin/emacs --batch --insert=/dev/fd/0 \ + --eval \ + '(let ((wayland-display (buffer-string))) + (require ''server) + (server-eval-at + "server" + `(setenv "WAYLAND_DISPLAY" ,wayland-display)))'