From b7c6aad764f27187c9f03562fe5001f5a7ad51cb Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Wed, 6 Nov 2024 16:13:45 -0800 Subject: [PATCH] Add emacs-server-set-wayland-display.zsh --- emacs-server-set-wayland-display.zsh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 emacs-server-set-wayland-display.zsh 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)))'