Luakit

Luakit is an extremely fast, lightweight and flexible web browser using the webkit engine.
It is customizable through lua scripts and fully usable with keyboard shortcuts.
It uses GTK+ 3 and WebKit2GTK+.

Note: It is inadvisable to copy the full set of configuration files, as was previously encouraged. This makes it harder for you to upgrade luakit, as you have more files to merge upstream changes into, and you are more likely to experience errors caused by such upstream changes (until those changes are merged with your personal configuration).

The majority of this configuration file is a set of require statements that import other desired modules. This makes it easy to remove any unwanted features. You can also add code snippets to this file or set module options to customize browser behavior. Even if you do not know much about Lua, the configuration is simple and well commented enough to make it straightforward.

Basic usage

Note: Most of the shortcuts are viewable and customizable from ~/.config/luakit/binds.lua.

Press : to access the command prompt. You can do nearly everything from there.
Use Tab to autocomplete commands.

Use the :help command to get information on the available keyboard shortcuts and what they do. (To see how the action for a particular keyboard shortcut is implemented in Lua, click anywhere in its help text.)

To quit, use the :quit command, or press Shift+z followed by Shift+q.
You can also close the browser while remembering the session (i.e. restoring the tabs) by using the :writequit command instead, or pressing Shift+z twice.

Browsing

Press o to open a prompt with the :open command and enter the URI you want. Press Shift+o to edit the current URI.

If it is not a recognized URI, Luakit will use the default search engine specified in ~/.config/luakit/globals.lua.

Specify which search engine to use by prefixing the entry with the appropriate keywork (e.g. :open google foobar will search foobar on Google).

Use common shortcuts to navigate. For emacs and vimaficionados, some of their regular shortcuts are provided. You can use the mouse as well.

Use f to display the index of all visible links. Enter the appropriate number or a part of the string to open the link.

Use Shift+f instead to open link in a new tab.

Press Ctrl+t to open a new tab, Ctrl+w to close it. Press t to prompt for an URI to be opened in a new tab, and Shift+t to edit the current URI in a new tab.

Press w to prompt for an URI to be opened in a new window, and Shift+w to edit the current URI in a new window.

Switch from one tab to another by pressing g followed by t or Shift+t, or use Ctrl+PageUp and Ctrl+PageDown.

You can switch to a specific tab with Alt+number.

Use Shift+h to go back in the browser history.

Use Shift+l to go forward in the browser history.

Reorder the tabs with < and >.

Reload the page with r, stop the loading with Ctrl+c.

Re-open last closed tab with u.

Open downloads page by pressing g followed by d (or Shift+d for a new tab).

View image source by pressing ; followed by i (or Shift+i for new tab).

Inspect elements with :inspect. Repeat to open in a new window. Disable inspector with :inspect!.

Input fields

Many webpages have editable elements like dropdown lists, checkboxes, text fields and so on. While they work perfectly with the mouse, you may encounter some troubles using the follow commands.
In such a case, pressing the arrow keys may help.
Alternatively, the gi shortcut can be used to focus input.

Bookmarks

If enabled (default configuration), bookmarks can be used from within Luakit.

The :bookmarks command opens the bookmarks page. (Shortcut: g followed by b, or Shift+b for a new tab).

The :bookmark [URI [tags]] command adds the URI specified (or the current tab's URI, if omitted) to the bookmarks by specified tags. Starting from version 2012-09-13-r1, bookmarks page will be opened (new tab) in new bookmark editing mode before saving. (Shortcut: Shift+b).

Configuration

Homepage

Set your homepage as follows:

~/.config/luakit/globals.lua

globals = {
homepage = "www.example.com",
...
}

Custom search engines

To search with the default search engine, press o and type the phrases. To search with a different engine, type it's name after o and then the phrases.

You can virtually add any search engine you want. Make a search on the website you want and copy paste the URI to the Luakit configuration by replacing the searched terms with an %s. Example:

Fetch an adblock-compatible list, like Easylist, and save it to ~/.local/share/luakit.

Restart Luakit to load the extension.

Use :adblock-list-enable number command within Luakit to turn Adblock's list(s) you downloaded on Adblock itself becomes enabled on startup.

Full info on enabled lists and AdBlock state can be found using :adblock or gShift+a at luakit://adblock/ internal page, if the adblock_chrome module is enabled, which is not a mandatory part.

Note: For Adblock to run in normal mode, easylist.txt and any others must be placed in ~/.local/share/luakit/adblock

AdBlock for Luakit plugin is also available as a part of Luakit Plugins project.

Bookmarks management

Sync

Starting from version 2012.09.13, Luakit bookmarks are stored in an SQLite database: ~/.local/share/luakit/bookmarks.db.

You can put a symbolic link in place of the default file to store your bookmarks anywhere on your machine.
This way if your are using a cloud sync application like Dropbox, you can keep your bookmarks synchronized between your different computers.

Converting plain text bookmarks to SQLite format

Bookmarks were stored in a simple plain text file: ~/.local/share/luakit/bookmarks. Each line is a bookmark. It is composed of 2 fields, the link and the group which are separated by a tab character.

Warning: If spaces are inserted instead of tabulation character, the link will not be properly bookmarked.

Note: Groups and links are alphabetically sorted, so there is no need to do it manually.

To use bookmarks with the latest Luakit release, the file must be converted.
A sample Lua script will do that:

The old plaintext bookmarks will be left unchanged. If the DB bookmarks do not exist, the file will be created. If it exists, do not worry, none of the previous bookmarks will be touched. However, this behaviour implies that you might get some doubles.

Import from Firefox

Note: This works only for Luakit versions before 2012.03.25! For newer version, you can first run this script, then convert the generted plain text bookmarks to the SQLite format as described at #Converting plain text bookmarks to SQLite format.

To import bookmarks from Firefox, first they must be exported to an HTML file using its bookmarks manager. After that the XML file can be converted to a Luakit format.