diff options
-rw-r--r-- | manual/README.org | 20 | ||||
-rw-r--r-- | manual/vim-vixen.json | 99 | ||||
-rwxr-xr-x | misc/bin/merge-json.sh | 16 |
3 files changed, 135 insertions, 0 deletions
diff --git a/manual/README.org b/manual/README.org new file mode 100644 index 0000000..85b93bd --- /dev/null +++ b/manual/README.org @@ -0,0 +1,20 @@ +* Manual + :PROPERTIES: + :UPDATED: [2023-06-20 Tue 22:57] + :END: + +Things under this directory cannot be stowed, because they need to be +manually imported. + +** vim-vixen.json + :PROPERTIES: + :UPDATED: [2023-06-20 Tue 23:02] + :END: + +The json settings for the firefox vim-vixen extension. It features an +emacs keybinding. To combine it with local/personal settings, use the +=misc/bin/merge-json.sh= script: + +#+begin_src sh +merge-json.sh vim-vixen.json vim-vixen-local.json > vim-vixen-final.json +#+end_src diff --git a/manual/vim-vixen.json b/manual/vim-vixen.json new file mode 100644 index 0000000..6f475bd --- /dev/null +++ b/manual/vim-vixen.json @@ -0,0 +1,99 @@ +{ + "keymaps": { + "a": { "type": "scroll.home" }, + "x": { "type": "command.show" }, + "o": { "type": "command.show.open", "alter": false }, + "O": { "type": "command.show.open", "alter": true }, + "t": { "type": "command.show.tabopen", "alter": false }, + "T": { "type": "command.show.tabopen", "alter": true }, + "`": { "type": "command.show.winopen", "alter": false }, + "`": { "type": "command.show.winopen", "alter": true }, + "b": { "type": "command.show.buffer" }, + "`": { "type": "command.show.addbookmark", "alter": true }, + "p": { "type": "scroll.vertically", "count": -1 }, + "n": { "type": "scroll.vertically", "count": 1 }, + "b": { "type": "scroll.horizonally", "count": -1 }, + "f": { "type": "scroll.horizonally", "count": 1 }, + "<C-U>": { "type": "scroll.pages", "count": -0.5 }, + "<C-D>": { "type": "scroll.pages", "count": 0.5 }, + "<A-V>": { "type": "scroll.pages", "count": -1 }, + "<C-V>": { "type": "scroll.pages", "count": 1 }, + "<": { "type": "scroll.top" }, + ">": { "type": "scroll.bottom" }, + "e": { "type": "scroll.end" }, + "k": { "type": "tabs.close" }, + "K": { "type": "tabs.close", "select": "left" }, + "`": { "type": "tabs.close.right" }, + "`": { "type": "tabs.close.force" }, + "/": { "type": "tabs.reopen" }, + "P": { "type": "tabs.prev" }, + "N": { "type": "tabs.next" }, + "A": { "type": "tabs.first" }, + "E": { "type": "tabs.last" }, + "<C-6>": { "type": "tabs.prevsel" }, + "g": { "type": "tabs.reload", "cache": false }, + "G": { "type": "tabs.reload", "cache": true }, + "`": { "type": "tabs.pin.toggle" }, + "`": { "type": "tabs.duplicate" }, + "`": { "type": "zoom.in" }, + "`": { "type": "zoom.out" }, + "`": { "type": "zoom.neutral" }, + "j": { "type": "follow.start", "newTab": false }, + "J": { "type": "follow.start", "newTab": true, "background": false }, + "m": { "type": "mark.set.prefix" }, + "'": { "type": "mark.jump.prefix" }, + "l": { "type": "navigate.history.prev" }, + "r": { "type": "navigate.history.next" }, + "[[": { "type": "navigate.link.prev" }, + "]]": { "type": "navigate.link.next" }, + "u": { "type": "navigate.parent" }, + "U": { "type": "navigate.root" }, + "`": { "type": "focus.input" }, + ".": { "type": "page.source" }, + "`": { "type": "page.home" }, + "`": { "type": "page.home", "newTab": true }, + "R": { "type": "tabs.reader.toggle" }, + "w": { "type": "urls.yank" }, + "y": { "type": "urls.paste", "newTab": false }, + "Y": { "type": "urls.paste", "newTab": true }, + "<C-S>": { "type": "find.start" }, + "s": { "type": "find.next" }, + "<C-R>": { "type": "find.prev" }, + "z": { "type": "repeat.last" }, + "<S-Esc>": { "type": "addon.toggle.enabled" } + }, + "search": { + "default": "ddg", + "engines": { + "ddg": "https://html.duckduckgo.com/html?q={}", + "t": "https://twitter.com/search?q={}", + "wp": "https://en.wikipedia.org/w/index.php?search={}", + "a": "https://wiki.archlinux.org/index.php?search={}", + "aa": "https://aur.archlinux.org/packages?K={}", + "ap": "https://archlinux.org/packages/?q={}", + "db": "https://packages.debian.org/search?keywords={}", + "f": "https://search.f-droid.org/?q={}", + "fs": "https://directory.fsf.org/w/index.php?search={}", + "g": "https://github.com/search?q={}", + "hoog": "https://hoogle.haskell.org/?hoogle={}", + "i": "https://imdb.com/find?q={}", + "o": "https://openlibrary.org/search?q={}", + "ptv": "https://ptv.libreau.org/?q={}", + "r": "https://reddit.com/r/all/search?q={}", + "t": "https://twitter.com/search?q={}", + "wp": "https://en.wikipedia.org/w/index.php?search={}", + "wt": "https://wiktionary.org/w/index.php?search={}", + "wy": "https://wikivoyage.org/w/index.php?search={}", + "wz": "https://zh.wikipedia.org/w/index.php?search={}", + "y": "https://youtube.com/search?q={}" + } + }, + "properties": { + "hintchars": "abcdefghijklmnopqrstuvwxyz", + "smoothscroll": false, + "complete": "sbh", + "colorscheme": "system" + }, + "blacklist": [ + ] +} diff --git a/misc/bin/merge-json.sh b/misc/bin/merge-json.sh new file mode 100755 index 0000000..871176a --- /dev/null +++ b/misc/bin/merge-json.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Merge two json objects +# https://e.printstacktrace.blog/merging-json-files-recursively-in-the-command-line/ + +jq -s 'def deepmerge(a;b): + reduce b[] as $item (a; + reduce ($item | keys_unsorted[]) as $key (.; + $item[$key] as $val | ($val | type) as $type | .[$key] = if ($type == "object") then + deepmerge({}; [if .[$key] == null then {} else .[$key] end, $val]) + elif ($type == "array") then + (.[$key] + $val | unique) + else + $val + end) + ); + deepmerge({}; .)' "$1" "$2" |