From 93ba4d692ab8301c97018eb1c0eb70c40d3a1b7f Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Wed, 16 Jun 2021 14:30:38 +0200 Subject: [PATCH] [Emacs] EXWM loads only with argument `--with-exwm` passed to Emacs --- org/config/emacs.org | 55 +++++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/org/config/emacs.org b/org/config/emacs.org index ec16e38..9a921aa 100644 --- a/org/config/emacs.org +++ b/org/config/emacs.org @@ -2351,43 +2351,46 @@ I’ll also create a fuction for connecting to this new Tramp protocol: :CUSTOM_ID: Packages-Configuration-EXWM6vx4fl6184j0 :END: #+begin_src emacs-lisp - (defvar phundrak/exwm-enabled (and (seq-contains command-line-args "--use-exwm"))) + (defvar phundrak/exwm-enabled (and (seq-contains command-line-args "--with-exwm"))) (use-package xelb + :if phundrak/exwm-enabled :straight (:build t)) (use-package exwm :straight (:build t) - :after (xelb) + :if phundrak/exwm-enabled + :after xelb :init (setq mouse-autoselect-window nil focus-follows-mouse t exwm-workspace-warp-cursor t) :config - (setq exwm-input-global-keys - `(([?\s-r] . exwm-reset) - ([?\s-w] . exwm-workspace-switch) - ,@(mapcar (lambda (i) - `(,(kbd (format "s-%s" (car i))) . - (lambda () - (interactive) - (exwm-workspace-switch-create ,(cdr i))))) - '(("\"" . 1) - ("«" . 2) - ("»" . 3) - ("(" . 4) - (")" . 5) - ("@" . 6) - ("+" . 7) - ("-" . 8) - ("/" . 9) - ("*" . 0))))) - (add-hook 'exwm-update-class-hook - (lambda () - (exwm-workspace-rename-buffer exwm-class-name))) - (require 'exwm-config) - (exwm-config-default) - (exwm-enable)) + (when phundrak/exwm-enabled + (setq exwm-input-global-keys + `(([?\s-r] . exwm-reset) + ([?\s-w] . exwm-workspace-switch) + ,@(mapcar (lambda (i) + `(,(kbd (format "s-%s" (car i))) . + (lambda () + (interactive) + (exwm-workspace-switch-create ,(cdr i))))) + '(("\"" . 1) + ("«" . 2) + ("»" . 3) + ("(" . 4) + (")" . 5) + ("@" . 6) + ("+" . 7) + ("-" . 8) + ("/" . 9) + ("*" . 0))))) + (add-hook 'exwm-update-class-hook + (lambda () + (exwm-workspace-rename-buffer exwm-class-name))) + (require 'exwm-config) + (exwm-config-default) + (exwm-enable)))