Fix: update eaf layer

The layer got broken due to some minor changes in the eaf package by the eaf
developers. This commit fixes the layer to a working state.
This commit is contained in:
Daniel Nicolai 2021-04-19 18:06:56 +02:00 committed by Maximilian Wolff
parent 3bbc7a7d40
commit 623c75d7d9
2 changed files with 11 additions and 13 deletions

View file

@ -57,11 +57,11 @@ implemented in this layer can be found [[https://github.com/manateelazycat/emacs
** Global
*** All EAF-applications
| Key binding | Description |
|-------------+-------------------------------------------------------------------------|
| ~SPC a a f~ | EAF open file ([[https://github.com/manateelazycat/emacs-application-framework#launch-eaf-applications][see EAF doc for supported file types]]) |
| ~SPC t k m~ | Show available key commands in which-key (read [[https://develop.spacemacs.org/doc/DOCUMENTATION.html#which-key][here]] for more details) |
| ~SPC m d~ | toggle dark-mode (in browser press ~M-d~, in pdf-viewer just press ~d~) |
| Key binding | Description |
|-------------+----------------------------------------------------------------------------|
| ~SPC a a f~ | EAF open file ([[https://github.com/manateelazycat/emacs-application-framework#launch-eaf-applications][see EAF doc for supported file types]]) |
| ~SPC t k m~ | Show available key commands in which-key (read [[https://develop.spacemacs.org/doc/DOCUMENTATION.html#which-key][here]] for more details) |
| ~SPC m d~ | toggle dark-mode (or in browser press ~M-d~, in pdf-viewer just press ~d~) |
*** Browser

View file

@ -131,7 +131,6 @@
("-" . "insert_or_zoom_out")
("=" . "insert_or_zoom_in")
("0" . "insert_or_zoom_reset")
("d" . "insert_or_dark_mode")
("m" . "insert_or_save_as_bookmark")
("o" . "insert_or_open_browser")
;; ("y" . "insert_or_download_youtube_video")
@ -236,12 +235,11 @@
(lambda (prompt)
(if (derived-mode-p 'eaf-mode)
(pcase eaf--buffer-app-name
((or
(and "browser"
(guard (string= (eaf-call-sync "call_function" eaf--buffer-id "is_focus") "True")))
"image-viewer"
"pdf-viewer")
(kbd eaf-evil-leader-key))
("browser" (if (string= (eaf-call-sync "call_function" eaf--buffer-id "is_focus") "True")
(kbd "SPC")
(kbd eaf-evil-leader-key)))
("pdf-viewer" (kbd eaf-evil-leader-key))
("image-viewer" (kbd eaf-evil-leader-key))
(_ (kbd "SPC")))
(kbd "SPC"))))
@ -249,7 +247,7 @@
;; in a similar way as how it was done in the evil-integration example
(setq eaf-evil-leader-for-major-keymap (make-sparse-keymap))
(define-key eaf-evil-leader-for-major-keymap (kbd "h") 'eaf-open-browser-with-history)
(define-key eaf-evil-leader-for-major-keymap (kbd "d") 'eaf-toggle-dark-mode)
(define-key eaf-evil-leader-for-major-keymap (kbd "d") 'eaf-proxy-toggle_dark_mode)
(define-key eaf-evil-leader-for-major-keymap (kbd "s") 'eaf-search-it)
(add-hook 'evil-normal-state-entry-hook
(lambda ()