[Emacs] EXWM loads only with argument --with-exwm
passed to Emacs
This commit is contained in:
parent
bf615d4e81
commit
93ba4d692a
@ -2351,43 +2351,46 @@ I’ll also create a fuction for connecting to this new Tramp protocol:
|
|||||||
:CUSTOM_ID: Packages-Configuration-EXWM6vx4fl6184j0
|
:CUSTOM_ID: Packages-Configuration-EXWM6vx4fl6184j0
|
||||||
:END:
|
:END:
|
||||||
#+begin_src emacs-lisp
|
#+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
|
(use-package xelb
|
||||||
|
:if phundrak/exwm-enabled
|
||||||
:straight (:build t))
|
:straight (:build t))
|
||||||
|
|
||||||
(use-package exwm
|
(use-package exwm
|
||||||
:straight (:build t)
|
:straight (:build t)
|
||||||
:after (xelb)
|
:if phundrak/exwm-enabled
|
||||||
|
:after xelb
|
||||||
:init
|
:init
|
||||||
(setq mouse-autoselect-window nil
|
(setq mouse-autoselect-window nil
|
||||||
focus-follows-mouse t
|
focus-follows-mouse t
|
||||||
exwm-workspace-warp-cursor t)
|
exwm-workspace-warp-cursor t)
|
||||||
:config
|
:config
|
||||||
(setq exwm-input-global-keys
|
(when phundrak/exwm-enabled
|
||||||
`(([?\s-r] . exwm-reset)
|
(setq exwm-input-global-keys
|
||||||
([?\s-w] . exwm-workspace-switch)
|
`(([?\s-r] . exwm-reset)
|
||||||
,@(mapcar (lambda (i)
|
([?\s-w] . exwm-workspace-switch)
|
||||||
`(,(kbd (format "s-%s" (car i))) .
|
,@(mapcar (lambda (i)
|
||||||
(lambda ()
|
`(,(kbd (format "s-%s" (car i))) .
|
||||||
(interactive)
|
(lambda ()
|
||||||
(exwm-workspace-switch-create ,(cdr i)))))
|
(interactive)
|
||||||
'(("\"" . 1)
|
(exwm-workspace-switch-create ,(cdr i)))))
|
||||||
("«" . 2)
|
'(("\"" . 1)
|
||||||
("»" . 3)
|
("«" . 2)
|
||||||
("(" . 4)
|
("»" . 3)
|
||||||
(")" . 5)
|
("(" . 4)
|
||||||
("@" . 6)
|
(")" . 5)
|
||||||
("+" . 7)
|
("@" . 6)
|
||||||
("-" . 8)
|
("+" . 7)
|
||||||
("/" . 9)
|
("-" . 8)
|
||||||
("*" . 0)))))
|
("/" . 9)
|
||||||
(add-hook 'exwm-update-class-hook
|
("*" . 0)))))
|
||||||
(lambda ()
|
(add-hook 'exwm-update-class-hook
|
||||||
(exwm-workspace-rename-buffer exwm-class-name)))
|
(lambda ()
|
||||||
(require 'exwm-config)
|
(exwm-workspace-rename-buffer exwm-class-name)))
|
||||||
(exwm-config-default)
|
(require 'exwm-config)
|
||||||
(exwm-enable))
|
(exwm-config-default)
|
||||||
|
(exwm-enable)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user