Skip to content

Latest commit

 

History

History
253 lines (190 loc) · 10.8 KB

README.md

File metadata and controls

253 lines (190 loc) · 10.8 KB

Platform Browser Discord IRC Plugins

Krabby is a browser extension (for Chrome and Firefox) for keyboard-based navigation, inspired by Kakoune.

The main differences with existing extensions are: multiple selections, keyboard layout agnostic, SOV (subject–object–verb) constructs and simple interaction with external programs. It is also quite usable with the mouse.

Thumbnail Button

See YouTube · Krabby and krabby-resources for all available demos.

TL;DR

WebExtensionKeyboard interfaceSubject–object–verb orderMultiple selectionsKakoune-inspired

Run the following in your terminal, then follow the onscreen instructions.

git clone https://github.com/alexherbo2/krabby
cd krabby
make install [static=no] [interactive=yes]

After installing, try to accomplish the following examples:

Opening links in a paragraph

Navigate to https://tuppervim.org and type:

f{hint}s[alt+a][alt+I][ctrl+enter][alt+x]

Explanation

  • f enters hint mode,
  • {hint} is a placeholder for you to select a link,
  • s creates a selection out of the active element,
  • Alt + a expands the region,
  • Alt + I selects all links,
  • Control + Enter opens selected links in the background.
  • Optionally, Alt + x will undo the operation (closing right tabs).
Play videos with mpv

Navigate to https://youtube.com/results?search_query=Berserk+AMV and type:

F{hint}{hint}<page-down>{hint}<escape>m

Explanation

  • F enters hint mode (lock),
  • {hint} is a placeholder for you to select 2 links,
  • Page Down scrolls one page down,
  • {hint} is a placeholder for you to select another link,
  • Escape leaves hint mode.
  • Finally, m opens the selection with mpv.

If you want to play around without installing, a live demo is available here.

Features

  • Subject–object–verb order. Learn more at Differences with Vi(m).
  • Keyboard layout agnostic. Maps to physical keys, but displays with the US layout.
  • Multiple selections as a central way of interacting
  • Powerful selection manipulation primitives
  • Link hints
  • External editor support. Open your favorite editor on text inputs.
  • Tab search
  • Contextual commands
  • Contextual help
  • Simple interaction with external programs
  • Usable with the mouse. You can for example create a selection by grabbing a link with the mouse and s to create the selection. Or create multiple selections by clicking on hints with F. If you hold Control or Command, you can even make selections with the mouse selection area.
  • Limited scope. Krabby is not Vim, nor Kakoune. Krabby is trying to be a navigation tool and some concepts from code editors don’t translate well. For example, there is no concept of mode in Krabby, but a system of contexts.
  • Composability. Composability is better than extensibility. Krabby tries hard to provide features that interact well with each other. For example, f and y are two building blocks to focus a link and yank its URL. Depending on the context, y will yank the page or a link URL.
  • Modular (think Emacs). Krabby is divided into multiple small projects. At its core Krabby just holds the configuration and grabs its functionalities from other projects.
  • Chrome and Firefox support. It has also been tested on Opera, Vivaldi and Brave.

Dependencies

Extensions

Installation

Run the following in your terminal, then follow the onscreen instructions.

make install [static=no] [extensions=yes] [interactive=yes]

Supported platforms

Browser compatibility

Web browser Support Engine Notes
Chrome Blink
Chromium Blink
Firefox Gecko Only developer or unbranded version
Edge ? Blink
Opera Blink
Safari WebKit
Vivaldi Blink
Brave Blink

Credits

References