(docs): update roam-ref qutebrowser configuration (#780)

This commit is contained in:
Jethro Kuan 2020-06-09 16:49:11 +08:00 committed by GitHub
parent 898c6c8178
commit f4376f39a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 13 deletions

View file

@ -770,14 +770,11 @@ javascript:location.href =
+ encodeURIComponent(document.title)
#+END_SRC
or as a keybinding in ~qutebrowser~, adding the following to the ~autoconfig.yml~ file:
or as a keybinding in ~qutebrowser~ in , using the ~config.py~ file (see
[[https://github.com/qutebrowser/qutebrowser/blob/master/doc/help/configuring.asciidoc][Configuring qutebrowser]]):
#+BEGIN_SRC yaml
settings:
bindings.commands:
global:
normal:
gc: open javascript:void(location.href='org-protocol://roam-ref?template=r&ref='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title))
#+BEGIN_SRC python
config.bind("<Ctrl-r>", "spawn bash -c 'emacsclient \"org-protocol://roam-ref?template=r&ref={url:pretty}&title={title}\" '")
#+END_SRC
where ~template~ is the template key for a template in

View file

@ -1060,14 +1060,11 @@ javascript:location.href =
+ encodeURIComponent(document.title)
@end example
or as a keybinding in @code{qutebrowser}, adding the following to the @code{autoconfig.yml} file:
or as a keybinding in @code{qutebrowser} in , using the @code{config.py} file (see
@uref{https://github.com/qutebrowser/qutebrowser/blob/master/doc/help/configuring.asciidoc, Configuring qutebrowser}):
@example
settings:
bindings.commands:
global:
normal:
gc: open javascript:void(location.href='org-protocol://roam-ref?template=r&ref='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title))
config.bind("<Ctrl-r>", "spawn bash -c 'emacsclient \"org-protocol://roam-ref?template=r&ref=@{url:pretty@}&title=@{title@}\" '")
@end example
where @code{template} is the template key for a template in