Anycomplete

The magic of Google Autocomplete while you're typing. Anywhere.

  • 所有者: nathancahill/Anycomplete
  • 平台:
  • 許可證:
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

Anycomplete

The magic of Google Autocomplete while you're typing. Anywhere.

Installation

Anycomplete is an extension for Hammerspoon. Once Hammerspoon is installed (see install Hammerspoon below) you can run the following script to install Autocomplete.

$ curl -sSL https://raw.githubusercontent.com/nathancahill/Anycomplete/master/install.sh, bash

install.sh just clones this repository into ~/.hammerspoon, loads it into Hammerspoon and sets ⌃⌥⌘G as the default keybinding.

Manual installation

$ git clone https://github.com/nathancahill/anycomplete.git ~/.hammerspoon/anycomplete

To initialize, add to ~/.hammerspoon/init.lua (creating it if it does not exist):

local anycomplete = require "anycomplete/anycomplete"
anycomplete.registerDefaultBindings()

Alternatively, copy anycomplete.lua from this repository to wherever
you keep other Hammerspoon modules and load it appropriately.

Reload the Hammerspoon config.

Install Hammerspoon

Hammerspoon can be installed using homebrew/caskroom.

$ brew cask install hammerspoon
$ open -a /Applications/Hammerspoon.app

Accessibility must be enabled for Anycomplete to work.

Usage

Trigger with the hotkey ⌃⌥⌘G. Once you start typing, suggestions will populate.
They can be choosen with ⌘1-9 or by pressing the arrow keys and Enter.
Pressing ⌘C copies the selected item to the clipboard.

The hotkey can be changed by passing in arguments to
registerDefaultBindings call (in your ~/.hammerspoon/init.lua file)
such as:

anycomplete.registerDefaultBindings({"cmd", "ctrl"}, 'L')

Warning

Google might block your IP address if you use this. See #26.

Privacy

No keystrokes are sent to Google until you trigger the hotkey and start typing. If you prefer DuckDuckGo, replace GOOGLE_ENDPOINT with:
'https://duckduckgo.com/ac/?q=%s' and the imap function with this:

choices = hs.fnutils.imap(results, function(result)
    return {
        ["text"] = result["phrase"],
    }
end)

主要指標

概覽
名稱與所有者nathancahill/Anycomplete
主編程語言Lua
編程語言Lua (語言數: 1)
平台
許可證
所有者活动
創建於2016-11-29 18:13:00
推送於2023-05-07 14:40:06
最后一次提交2023-05-07 08:40:06
發布數0
用户参与
星數1.5k
關注者數24
派生數47
提交數41
已啟用問題?
問題數20
打開的問題數4
拉請求數9
打開的拉請求數1
關閉的拉請求數3
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?