Luakit - Fast, small, WebKit based browser framework extensible by Lua.
Luakit is a highly configurable, browser framework based on the WebKit web content engine and the GTK+ toolkit. It is very fast, extensible by Lua and licensed under the GNU GPLv3 license. It is primarily targeted at power users, developers and any people with too much time on their hands who want to have fine-grained control over their web browsers behaviour and interface.
Luakit can run in various modes, which specify how the user interacts with the browser.
- Normal mode
- This is the default mode when Luakit is started. You can load URIs, open tabs and windows, access to other modes, etc.
- All mode
- Special meta-mode in which the bindings are present in all modes.
- Insert mode
- When selecting form fields Luakit will enter the insert mode which allows you to enter text in form fields without accidentally triggering normal mode bindings.
- Passthrough mode
- Luakit will pass every key event to the WebView until the user presses Escape. This is useful for using webpage shortcuts.
- Command mode
- Enter commands. Every action in Luakit is a command, so basically you can do anything from there.
- Lua mode
- Execute arbitrary Lua commands within the Luakit environment.
Luakit is highly extensible with userscripts written in Lua. These scripts may provide additional modes. Some are embedded by default. You will need to load the userscript to use its features. See the CONFIGURATION section for more details.
- -k, --check
- Check configuration file and exit.
- -c, --config=FILE
- Configuration file to use.
- -n, --nonblock
- Fork Luakit into the background.
- -U, --nounique
- Ignore libunique bindings.
- -u, --uri=URI
- URI(s) to load at startup.
- -v, --verbose
- Print debugging output.
- -V, --version
- Print version and exit.
- X display to use.
Luakit is fully usable with keyboard. Default bindings should be familiar to users of Emacs and Vim; nonetheless a lot of keyboards and mouse shortcuts are shared with popular web browsers.
Pressing : will open the command prompt. You can enter commands from there. You can view the current list of bindings in Luakit's help page with the
Some bindings have an uppercase version which will behave somewhat differently. Some come with userscripts, so you will need to have the appropriate userscript loaded to use it. Here follows a list of some noteworthy default bindings.
- Quit and save the session.
- Quit without saving the session.
- o, O
- Open specified URIs. If uppercase, edit current URI.
- t, T
- Open specified URIs in new tab. If uppercase, edit current URI.
- w, W
- Open specified URIs in new window. If uppercase, edit current URI.
<Left>, <Down>, <Up>,
h, j, k, l
- Go to [count] percent of the page.
- f, F
- Enter follow mode. Use numbers or text to open corresponding links. Use arrow to navigate between links. If uppercase, open in new tab. Requires follow userscript.
- Enter insert mode. In some case form fields may not receive characters; press an arrow key to insert characters correctly.
- Enter insert mode in the first form field. Requires go_input userscript.
- Toggle fullscreen.
- +, -
- Change the zoom level.
- Restore zoom level.
- p, P
- Open URI from clipboard. If uppercase, open in new tab.
- Yank current URI to clipboard.
- <Ctrl>x, <Ctrl>a
- Decrement / increment last number in URI. This is useful for forum threads or any ordered website.
- H, L
- Go back / forward in the browser history.
- Go to tab #, where # is between 0 and 9.
- <, >
- Reorder tabs. Requires taborder userscript.
- Close [count] tabs.
- Restore last closed tab.
- Duplicate current tab.
- gh, gH
- Open homepage. If uppercase, open in new tab.
- r, R
- Reload current page. If uppercase, skip cache.
- Stop loading the current page.
- Enter passthrough mode. Use ESC to return to normal mode.
- Associate current URI to quickmark #, where # is an ASCII letter or a digit. Requires quickmarks userscript.
- go[a-zA-Z0-9], gn[a-zA-Z0-9], gw[a-zA-Z0-9]
- Open specified quickmark in current tab / new tab / new window. Requires quickmarks userscript.
- Add current URI to bookmarks.
- gb, gB
- Open bookmarks manager. If uppercase, open in new tab.
- /, ?
- Search / reverse search for a string on current page.
- n, N
- Find next / previous result from search.
All bindings actually refer to commands. However, some commands do not have bindings associated by default. If completion userscript is used, you can autocomplete commands by pressing <TAB> by default. Once again, you should consult the configuration files to get an exhaustive list. The currently available functions may be displayed from the help view, which you can open with the :help command.
Here follows some noteworthy commands:
- Display and search bookmarks.
- Open Download page, which displays all downloads along with their status.
- Download current page.
- Save the complete page as a single mhtml file.
- Display all commands and bindings, along with their description. The help page also features some details about modes.
- Display and search history.
- Launch WebKit inspector. Use :inspect! to toggle off.
- Disable search highlighting.
- Display the quickmarks list.
- Display the tab history.
- Display page source code. Use :view-source! to toggle off.
Luakit will load configuration files from the following folders in priority order:
Default configuration files:
- The keyboard and mouse bindings.
- General configuration, like home page, search engines, user agent, per-domain properties, cookies policy.
- All default modes are set in this file.
- Main configuration files. All other files are loaded from there.
- Colors definition.
- WebKit related.
- Status bar, windows and tabs behaviour.
Embedded userscript will be loaded from $XDG_DATA_DIRS/luakit/lib.
All browsing-related files are stored in $XDG_DATA_HOME/luakit. All of are created if needed and if they do not exist. Depending on the userscripts you are using, you may find:
- An SQLite3 database containing your complete bookmark list. If you want to synchronise your bookmarks between your different systems, just share this file. You can use a symbolic link if the file is not stored in the required folder.
- This file contains all details needed for websites keeping track of your status, like login information. Delete this file once you are finished with browsing if you are not on your personal system.
- Your browsing history. Delete this file once you are finished with browsing if you are not on your personal system.
- A plain text file saving your quickmarks. The structure is extremely simple: each line is a single quickmark; first character is the quickmark shortcut and may be one of [a-zA-Z0-9]; second character is a space; the remaining part is the URI.
If you do not want to stick to the default configuration and want to benefit from the flexibility and extensibility of Luakit, you can fully configure it from the Lua configuration files.
If you do not want to start from scratch, you may use default configuration files and tweak them to fit your needs. Use the following command to copy configuration file to your home folder:
cp -r $XDG_CONFIG_DIRS/luakit $XDG_CONFIG_HOME
You can now edit the new files. Configuration should be quite straightforward, even if you do not know much about Lua.
Luakit was mainly developed by Mason Larobina <firstname.lastname@example.org>. Other contributors are listed in the AUTHORS file.
This man page was written by Pierre Neidhardt <email@example.com>.