Git Product home page Git Product logo

anycomplete's Introduction

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 whereever you keep other Hammerspoon modules and load it appropriately.

Reload the Hammerspoon config.

Install Hammerspoon

Hammerspoon can be installed using homebrew/caskroom.

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

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.

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')

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)

anycomplete's People

Contributors

nathancahill avatar oleander avatar padi avatar selectnull avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.