agzam / exwm-edit

Edit mode for EXWM
GNU General Public License v3.0
122 stars 11 forks source link
emacs exwm linux melpa window-manager

[[file:howitworks.gif]]

Now that opens interesting possibilities, for example:

In your ~init.el~ file, put the following ~use-package~ declaration before the call to ~exwm-enable~, since adjustments to ~exwm-input-global-keys~ only take effect before EXWM is enabled.

+begin_src emacs-lisp

(use-package exwm-edit :config ;; Edit text in an exwm-edit buffer (add-to-list 'exwm-input-global-keys '([?\C-c ?\'] . exwm-edit--compose)) (add-to-list 'exwm-input-global-keys '([?\C-c ?\'] . exwm-edit--compose))

;; You can use hooks to, e.g., set desired mode:
(defun ag-exwm/on-exwm-edit-compose ()
  (spacemacs/toggle-visual-line-navigation-on)
  (funcall 'markdown-mode))

(add-hook 'exwm-edit-compose-hook 'ag-exwm/on-exwm-edit-compose))

+end_src

In the ~exwm-edit~ buffer, you can use ~C-c '~, ~C-c C-'~, ~C-c C-c~, or whatever key you have bound to ~save-buffer~ to insert the buffer contents into the X program. To discard the contents of the ~exwm-edit~ buffer and go back to the X program, press ~C-c C-k~.

** v0.0.4-pre

Nothing new yet...

** v0.0.3