Merge pull request #1350 from glacambre/reverse_img_search_hint

config.ts: Add reverse-search bindings
This commit is contained in:
Oliver Blanthorn 2019-02-12 09:14:58 +00:00 committed by GitHub
commit ec43f7bb1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -58,7 +58,7 @@ async function addSetting(settingName: string) {
for (let setting in settings) { for (let setting in settings) {
let excmd = settings[setting].split(" ") let excmd = settings[setting].split(" ")
// How can we automatically detect what commands can be skipped? // How can we automatically detect what commands can be skipped?
excmd = ["fillcmdline", "current_url"].includes(excmd[0]) excmd = ["composite", "fillcmdline", "current_url"].includes(excmd[0])
? excmd[1] ? excmd[1]
: excmd[0] : excmd[0]
// Find the corresponding setting // Find the corresponding setting

View file

@ -252,6 +252,10 @@ class default_config {
";O": "hint -W fillcmdline_notrail open ", ";O": "hint -W fillcmdline_notrail open ",
";W": "hint -W fillcmdline_notrail winopen ", ";W": "hint -W fillcmdline_notrail winopen ",
";T": "hint -W fillcmdline_notrail tabopen ", ";T": "hint -W fillcmdline_notrail tabopen ",
";m":
"composite hint -pipe img src | js -p tri.excmds.open('images.google.com/searchbyimage?image_url=' + JS_ARG)",
";M":
"composite hint -pipe img src | jsb -p tri.excmds.tabopen('images.google.com/searchbyimage?image_url=' + JS_ARG)",
";gi": "hint -qi", ";gi": "hint -qi",
";gI": "hint -qI", ";gI": "hint -qI",
";gk": "hint -qk", ";gk": "hint -qk",