all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: dakling <dario.klingenberg@web.de>
To: 39804@debbugs.gnu.org
Subject: [bug#39804] [PATCH] gnu: add emacs-exwm-next package (i.e. exwm for emacs-next)
Date: Wed, 26 Feb 2020 22:07:44 +0100	[thread overview]
Message-ID: <87blplqcdd.fsf@web.de> (raw)


---
 gnu/packages/emacs-xyz.scm | 71 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 71 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 6b9027df8a..c6df469895 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -8601,6 +8601,77 @@ It should enable you to implement low-level X11 applications.")
 built on top of XELB.")
     (license license:gpl3+)))

+(define-public emacs-exwm-next
+  (package
+    (name "emacs-exwm-next")
+    (version "0.23")
+    (synopsis "Emacs X window manager")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://elpa.gnu.org/packages/exwm-"
+                                  version ".tar"))
+              (sha256
+               (base32
+                "05w1v3wrp1lzz20zd9lcvr5nhk809kgy6svvkbs15xhnr6x55ad5"))))
+    (build-system emacs-build-system)
+    (propagated-inputs
+     `(("emacs-xelb" ,emacs-xelb)))
+    (inputs
+     `(("xhost" ,xhost)
+       ("emacs-next" ,emacs-next)
+       ("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=~a~@
+                     Comment=~a~@
+                     Exec=~a~@
+                     TryExec=~:*~a~@
+                     Type=Application~%" ,name ,synopsis exwm-executable)))
+               ;; Add a shell wrapper to bin
+               (with-output-to-file exwm-executable
+                 (lambda _
+                   (format #t "#!~a ~@
+                     ~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-next") "/bin/emacs")
+                           '(cond
+                             ((file-exists-p "~/.exwm")
+                              (load-file "~/.exwm"))
+                             ((not (featurep 'exwm))
+                              (require 'exwm)
+                              (require 'exwm-config)
+                              (exwm-config-default)
+                              (message (concat "exwm configuration not found. "
+                                               "Falling back to default configuration...")))))))
+               (chmod exwm-executable #o555)
+               #t))))))
+    (home-page "https://github.com/ch11ng/exwm")
+    (description "EXWM is a full-featured tiling X window manager for Emacs
+built on top of XELB.")
+    (license license:gpl3+)))
+
 (define-public emacs-switch-window
   (package
     (name "emacs-switch-window")
--
2.25.1

             reply	other threads:[~2020-02-26 21:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-26 21:07 dakling [this message]
2020-02-27  9:53 ` [bug#39804] [PATCH] gnu: add emacs-exwm-next package (i.e. exwm for emacs-next) Pierre Neidhardt
2020-02-27 22:04   ` dario
2020-02-28  8:32     ` Pierre Neidhardt
2020-02-28  9:53       ` Leo Prikler
2020-02-28 14:45         ` Maxim Cournoyer
2020-03-03  2:19         ` Maxim Cournoyer
2020-03-11  3:54           ` Maxim Cournoyer
2020-03-15 13:48             ` Leo Prikler
2020-03-17  1:59               ` Maxim Cournoyer
2020-03-23  1:52               ` Maxim Cournoyer
2020-03-23  8:57                 ` Pierre Neidhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87blplqcdd.fsf@web.de \
    --to=dario.klingenberg@web.de \
    --cc=39804@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.