From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d06jH-0000DY-G3 for guix-patches@gnu.org; Mon, 17 Apr 2017 09:30:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d06jD-0008A7-Cd for guix-patches@gnu.org; Mon, 17 Apr 2017 09:30:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:53504) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d06jD-00089j-9Z for guix-patches@gnu.org; Mon, 17 Apr 2017 09:30:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d06jD-0004yi-3x for guix-patches@gnu.org; Mon, 17 Apr 2017 09:30:03 -0400 Subject: bug#26454: [PATCH 2/2] gnu: Add emacs-exwm. Resent-Message-ID: Message-Id: <1192050e.AEMAJSAD6iQAAAAAAAAAAAO0QTIAAAACwQwAAAAAAAW9WABY9MMd@mailjet.com> From: Arun Isaac Date: Mon, 17 Apr 2017 18:57:43 +0530 In-Reply-To: <20170417132743.5683-1-arunisaac@systemreboot.net> References: <20170417132743.5683-1-arunisaac@systemreboot.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 26454@debbugs.gnu.org From: Feng Shu * gnu/packages/emacs.scm (emacs-exwm): New variable. Signed-off-by: Arun Isaac --- gnu/packages/emacs.scm | 69 ++++++++++++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 69 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 306fb5eb7..1f8eac3df 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -4422,3 +4422,72 @@ X11 protocol based on the XML description files from= the XCB project. It features an object-oriented API and permits a certain degree of concurrenc= y. It should enable you to implement low-level X11 applications.") (license license:gpl3+))) + +(define-public emacs-exwm + (package + (name "emacs-exwm") + (version "0.13") + (synopsis "Emacs X window manager") + (source (origin + (method url-fetch) + (uri (string-append "https://elpa.gnu.org/packages/exwm-" + version ".tar")) + (sha256 + (base32 + "0n1wzy6chh024r0yaywjbf7mdsrxs6hrfycv5v0ps0drf6q3zldc")))) + (build-system emacs-build-system) + (propagated-inputs + `(("emacs-xelb" ,emacs-xelb))) + (inputs + `(("xhost" ,xhost) + ("dbus" ,dbus))) + ;; The following functions and variables needed by emacs-exwm are + ;; not included in emacs-minimal: + ;; scroll-bar-mode, fringe-mode + ;; x-display-pixel-width, x-display-pixel-height + (arguments + `(#:emacs ,emacs + #:phases + (modify-phases %standard-phases + (add-after 'build 'install-xsession + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (xsessions (string-append out "/share/xsessions")) + (bin (string-append out "/bin")) + (exwm-executable (string-append bin "/exwm"))) + ;; Add a .desktop file to xsessions + (mkdir-p xsessions) + (mkdir-p bin) + (with-output-to-file + (string-append xsessions "/exwm.desktop") + (lambda _ + (format #t "[Desktop Entry]~@ + Name=3D~a~@ + Comment=3D~a~@ + Exec=3D~a~@ + TryExec=3D~@*~a~@ + Type=3DApplication~%" ,name ,synopsis exwm-executable= ))) + ;; Add a shell wrap file to bin directory + ;; Set DISPLAY variable to work around + ;; https://github.com/ch11ng/exwm/issues/213 + (with-output-to-file exwm-executable + (lambda _ + (format #t "#!~a ~@ + export DISPLAY=3D:0 ~@ + ~a +SI:localuser:$USER ~@ + exec ~a --exit-with-session ~a --eval '~s' ~%" + (string-append (assoc-ref inputs "bash") "/bin/= sh") + (string-append (assoc-ref inputs "xhost") "/bin= /xhost") + (string-append (assoc-ref inputs "dbus") "/bin/= dbus-launch") + (string-append (assoc-ref inputs "emacs") "/bin= /emacs") + '(unless (featurep 'exwm) + (require 'exwm) + (require 'exwm-config) + (exwm-config-default) + (message "exwm configuration not found. Fall= ing back to default configuration."))))) + (chmod exwm-executable #o555) + #t)))))) + (home-page "https://github.com/ch11ng/exwm") + (description "EXWM (Emacs X Window Manager) is a full-featured tiling = X +window manager for Emacs built on top of XELB.") + (license license:gpl3+))) --=20 2.12.2 =