Cross-platform, cross-browser, cross-search-engine duckduckgo-like bangs

Overview

localbang

Cross-platform, cross-browser, cross-search-engine duckduckgo-like bangs

What are "bangs"??

Bangs are a way to define where to search inside the query itself. For example you could have a bang with the keyword "!gh" and the url "https://github.com/search?q=%s". Now, whenever your search query contains "!gh" the rest of the query will replace the "%s" in the url.

Example:

"!gh localbang" will result in "https://github.com/search?q=localbang"

Installation

Package Manger

AUR

yay -S localbang

Binary release

Download the latest binary release from here and place it in a folder thats in $PATH e.g. /usr/local/bin.

Cargo intall

This is easier, but you have to build the binary yourself.

cargo install localbang

DIY

git clone https://github.com/jakob-kruse/localbang
cd localbang
cargo build --release

The localbang binary will be place inside target/release;

Usage

localbang -s <shortcuts_file> -e "https://google.com/search?q=%s" -h "127.0.0.1" -p 8000

This will start a local webserver on port 8000. Every path (e.g. http://localhost:8000/search?q=foo) will be redirected to the search engine (with the query "foo") provided as a second argument (defaults to google search).

Sysyemd

You can find a unit file in localbang.service that can be used to start localbang in systemd. Place this in /etc/systemd/user or ~/.config/systemd/user/ and then systemctl --user enable --now localbang.service to enable it.

Shortcuts file

The shortcuts file defined the bangs, which are available. It is a CSV file with two columns: the keyword and the url. Example Shortcuts File

keyword

This is the word or letter (could be anything really) that will be used to trigger the search engine specified in the url column.

url

The search engine to use for the bang/keyword. This must include a %s as the placeholder for the query.

Browser integration

Note: Opensearch Integration is planned for the future.

Chrome

In Chrome you can directly add a custom search engine.

  • Open the settings
  • Select "Search engine" on the left
  • Click "Manage search engines"
  • Click "Add"
  • Enter the name (e.g. "localbang")
  • Enter any keyword. This only matters, if you are not going to use localbang as the default engine.
  • Enter the url http://localhost:8000/search?q=%s
  • Localbang should appear in the list under "Other search engines"
  • (optional) Click the three dot menu and click "Make default", otherwise use the provided keyword.

Firefox

The easiest way is to use the Add custom search engine extension.

  • Click the extension icon
  • Enter any name (e.g. localbang)
  • Enter the URL http://localhost:8000/search?q=%s
  • Click "Add custom search engine"
  • Follow the on screen steps (right-clicking the search bar and selecting it in the settings)
You might also like...
⚡ Insanely fast, 🌟 Feature-rich searching. lnx is the adaptable deployment of the tantivy search engine you never knew you wanted.  Standing on the shoulders of giants.
⚡ Insanely fast, 🌟 Feature-rich searching. lnx is the adaptable deployment of the tantivy search engine you never knew you wanted. Standing on the shoulders of giants.

✨ Feature Rich | ⚡ Insanely Fast An ultra-fast, adaptable deployment of the tantivy search engine via REST. 🌟 Standing On The Shoulders of Giants lnx

A Rust API search engine

Roogle Roogle is a Rust API search engine, which allows you to search functions by names and type signatures. Progress Available Queries Function quer

Tantivy is a full text search engine library written in Rust.
Tantivy is a full text search engine library written in Rust.

Tantivy is a full text search engine library written in Rust. It is closer to Apache Lucene than to Elasticsearch or Apache Solr in the sense it is no

Tantivy is a full-text search engine library inspired by Apache Lucene and written in Rust
Tantivy is a full-text search engine library inspired by Apache Lucene and written in Rust

Tantivy is a full-text search engine library written in Rust. It is closer to Apache Lucene than to Elasticsearch or Apache Solr in the sense it is no

Python bindings for Milli, the embeddable Rust-based search engine powering Meilisearch

milli-py Python bindings for Milli, the embeddable Rust-based search engine powering Meilisearch. Due to limitations around Rust lifecycles, methods a

A full-text search and indexing server written in Rust.

Bayard Bayard is a full-text search and indexing server written in Rust built on top of Tantivy that implements Raft Consensus Algorithm and gRPC. Ach

🔎 Impossibly fast web search, made for static sites.
🔎 Impossibly fast web search, made for static sites.

Stork Impossibly fast web search, made for static sites. Stork is two things. First, it's an indexer: it indexes your loosely-structured content and c

🦔 Fast, lightweight & schema-less search backend. An alternative to Elasticsearch that runs on a few MBs of RAM.
🦔 Fast, lightweight & schema-less search backend. An alternative to Elasticsearch that runs on a few MBs of RAM.

🦔 Fast, lightweight & schema-less search backend. An alternative to Elasticsearch that runs on a few MBs of RAM.

 Rapidly Search and Hunt through Windows Event Logs
Rapidly Search and Hunt through Windows Event Logs

Rapidly Search and Hunt through Windows Event Logs Chainsaw provides a powerful ‘first-response’ capability to quickly identify threats within Windows

Releases(0.4.0)
Owner
Jakob Kruse
JS all the way
Jakob Kruse
Shogun search - Learning the principle of search engine. This is the first time I've written Rust.

shogun_search Learning the principle of search engine. This is the first time I've written Rust. A search engine written in Rust. Current Features: Bu

Yuxiang Liu 5 Mar 9, 2022
A simple and lightweight fuzzy search engine that works in memory, searching for similar strings (a pun here).

simsearch A simple and lightweight fuzzy search engine that works in memory, searching for similar strings (a pun here). Documentation Usage Add the f

Andy Lok 116 Dec 10, 2022
Lightning Fast, Ultra Relevant, and Typo-Tolerant Search Engine

MeiliSearch Website | Roadmap | Blog | LinkedIn | Twitter | Documentation | FAQ ⚡ Lightning Fast, Ultra Relevant, and Typo-Tolerant Search Engine ?? M

MeiliSearch 31.6k Dec 31, 2022
High-performance log search engine.

NOTE: This project is under development, please do not depend on it yet as things may break. MinSQL MinSQL is a log search engine designed with simpli

High Performance, Kubernetes Native Object Storage 359 Nov 27, 2022
Perlin: An Efficient and Ergonomic Document Search-Engine

Table of Contents 1. Perlin Perlin Perlin is a free and open-source document search engine library build on top of perlin-core. Since the first releas

CurrySoftware GmbH 70 Dec 9, 2022
Tantivy is a full-text search engine library inspired by Apache Lucene and written in Rust

Tantivy is a full text search engine library written in Rust. It is closer to Apache Lucene than to Elasticsearch or Apache Solr in the sense it is no

tantivy 7.4k Dec 28, 2022
AI-powered search engine for Rust

txtai: AI-powered search engine for Rust txtai executes machine-learning workflows to transform data and build AI-powered text indices to perform simi

NeuML 69 Jan 2, 2023
A full-text search engine in rust

Toshi A Full-Text Search Engine in Rust Please note that this is far from production ready, also Toshi is still under active development, I'm just slo

Toshi Search 3.8k Jan 7, 2023
🔍TinySearch is a lightweight, fast, full-text search engine. It is designed for static websites.

tinysearch TinySearch is a lightweight, fast, full-text search engine. It is designed for static websites. TinySearch is written in Rust, and then com

null 2.2k Dec 31, 2022
⚡ Insanely fast, 🌟 Feature-rich searching. lnx is the adaptable deployment of the tantivy search engine you never knew you wanted. Standing on the shoulders of giants.

✨ Feature Rich | ⚡ Insanely Fast An ultra-fast, adaptable deployment of the tantivy search engine via REST. ?? Standing On The Shoulders of Giants lnx

lnx 679 Jan 1, 2023