Skip to content

Commit

Permalink
[eaf] Revise the new layer
Browse files Browse the repository at this point in the history
Added default header to funcs.el
Replaced references to `,` with `SPC m`
Reformat and add conventional progn statements

Last but not least it seems that not all
functions are working properly, I think
this is a good basis but needs to worked
upon a bit more to reach its full potential.
  • Loading branch information
smile13241324 committed Feb 7, 2021
1 parent 10a8803 commit 884dc44
Show file tree
Hide file tree
Showing 3 changed files with 238 additions and 219 deletions.
43 changes: 27 additions & 16 deletions layers/+tools/eaf/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

#+TAGS: layer|web service

# The maximum height of the logo should be 200 pixels.
# [[img/eaf.png]]

* Table of Contents :TOC_4_gh:noexport:
- [[#description][Description]]
- [[#features][Features:]]
Expand Down Expand Up @@ -63,30 +60,44 @@
*** 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 suppoted file types]]) |
| ~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) |
| ~, d~ | toggle dark-mode (in pdf-viewer just press ~d~) |
| ~SPC m d~ | toggle dark-mode (in pdf-viewer just press ~d~) |

*** Browser
| Key Binding | Description |
|---------------+-----------------------------------------------------------------------|
| ~SPC a a b o~ | Open url in new buffer |
| ~SPC a a b s~ | Search with [[https://github.com/manateelazycat/emacs-application-framework/wiki/Customization#default-search-engine][your favorite search engine]]. Defaults to symbol at point or region string |
| ~SPC a a b b~ | Open bookmark in new buffer |
| ~SPC a a b h~ | Search and open buffer from history |

** Local
*** All EAF-applications
| ~j/k~ | Scroll up/down |
| Key Binding | Description |
|-------------+----------------|
| ~j/k~ | Scroll up/down |

*** Browser
|-------+----------------------------------------------------------------|
| ~J/K~ | Scroll (half) page up/down |
| ~e~ | Edit url |
| ~m~ | Bookmark page |
| ~C-s~ | Search/search find next (to enter new search prefix with ~C-g~ |
| ~C-r~ | Search find previous |
| ~, h~ | Open new buffer from history |
| ~, s~ | Search web with [[https://github.com/manateelazycat/emacs-application-framework/wiki/Customization#default-search-engine][favorite search engine]] |
| Key Binding | Description |
|-------------+----------------------------------------------------------------|
| ~J/K~ | Scroll (half) page up/down |
| ~e~ | Edit url |
| ~m~ | Bookmark page |
| ~C-s~ | Search/search find next (to enter new search prefix with ~C-g~ |
| ~C-r~ | Search find previous |
| ~SPC m h~ | Open new buffer from history |
| ~SPC m s~ | Search web with [[https://github.com/manateelazycat/emacs-application-framework/wiki/Customization#default-search-engine][favorite search engine]] |

*** PDF-viewer
| ~d~ | toggle dark-mode |
| Key Binding | Description |
|-------------+------------------|
| ~d~ | toggle dark-mode |

*** pdf-view-mode (pdf-tools)
| ~, e~ | open in eaf pdf-viewer |
| Key Binding | Description |
|-------------+------------------------|
| ~SPC m e~ | open in eaf pdf-viewer |

There are many more keybindings. Use ~SPC t k m~ to [[https://develop.spacemacs.org/doc/DOCUMENTATION.html#which-key-persistent][show them persistently in
which-key]], or use ~SPC h d k~ to show the `eaf-mode-map` in a separate buffer.
11 changes: 11 additions & 0 deletions layers/+tools/eaf/funcs.el
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
;;; funcs.el --- eaf Layer functions File for Spacemacs
;;
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
;;
;; Author: Daniel Nicolai <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3

(defun duckduckgo ()
(interactive)
(eaf-open-browser "www.duckduckgo.com"))
Expand Down
Loading

0 comments on commit 884dc44

Please sign in to comment.