Add emacs-server-set-wayland-display.zsh

This commit is contained in:
Alexander Rosenberg 2024-11-06 16:13:45 -08:00
parent 35ee6bd659
commit b7c6aad764
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

View File

@ -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)))'