The {{Pkg|luakit}} package can be found in the [[Official Repositories|official repositories]] and can be installed with [[pacman]].

+

The {{Pkg|luakit}} package can be found in the [[official repositories]] and can be installed with [[pacman]].

You can also use the git version with {{AUR|luakit-git}}, available from the [[AUR]].

You can also use the git version with {{AUR|luakit-git}}, available from the [[AUR]].

Line 22:

Line 22:

Press {{ic|:}} to access the command prompt. You can do nearly everything from there.

Press {{ic|:}} to access the command prompt. You can do nearly everything from there.

Use {{ic|Tab}} to autocomplete commands.

Use {{ic|Tab}} to autocomplete commands.

+

+

Use the {{ic|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 {{ic|quit}} command, or the {{ic|Z}}{{ic|Q}} shortcut.

To quit, use the {{ic|quit}} command, or the {{ic|Z}}{{ic|Q}} shortcut.

Full info on enabled lists and AdBlock state you can find using {{ic|:adblock}} or {{ic|gA}} at luakit://adblock/ internal page, if you enabled {{ic|adblock_chrome}} module which is not a mandatory part.

Full info on enabled lists and AdBlock state you can find using {{ic|:adblock}} or {{ic|gA}} at luakit://adblock/ internal page, if you enabled {{ic|adblock_chrome}} module which is not a mandatory part.

−

+

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

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

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

https://github.com/mason-larobina/luakit-plugins/

https://github.com/mason-larobina/luakit-plugins/

Line 360:

Line 364:

Once [[Tor]] has been setup, simply run:

Once [[Tor]] has been setup, simply run:

$ torify luakit

$ torify luakit

+

{{warning|To be sure of anonymity, you also need to change settings within Luakit, such as disabling Flash and changing the useragent string.}}

== External links ==

== External links ==

Revision as of 11:29, 21 March 2014

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.

Installation

You can also use the git version with luakit-gitAUR, available from the AUR.

With the Unix philosophy in mind, Luakit is entirely customizable through its configuration files.
Those files are written in the Lua scripting language, thus allowing virtually unlimited features.
First, copy the configuration files to your $XDG_CONFIG_HOME folder:

cp -r $XDG_CONFIG_DIRS/luakit $XDG_CONFIG_HOME

Now you can edit any of these files to make your browser fits your needs. 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 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 the ZQ shortcut.
You can also close the browser while remembering the session (i.e. restoring the tabs) by using the writequit command instead, or the ZZ shortcut.

Browsing

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

If it is not a recognized URI, Luakit will use the default search engine specified in 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 vim aficionados, 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 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 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 W to edit the current URI in a new window.

Switch from one tab to another with gt and gT, or Ctrl+Page Up and Ctrl+Page Down.

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, you can use the focus inputgi shortcut.

Bookmarks

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

The :bookmarks command opens the bookmarks page. (Shortcut: gb or gB for 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: B).

Configuration

Homepage

Set your homepage as follows:

globals.lua

globals = {
homepage = "about:blank",
-- ...
}

Custom search engines

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:

Bookmarks management

Sync

Starting from version 2012.09.13, Luakit bookmarks are stored in an SQLite database: $XDG_DATA_HOME/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

Luakit 2012.03.25 featured bookmarks stored in a simple plain text file: $XDG_DATA_HOME/luakit/bookmarks.
Each line is a bookmark. It is composed of 2 fields:

$XDG_DATA_HOME/luakit/bookmarks

link group

Warning: Each field is followed by a tabulation. If you insert spaces instead, the link will not be properly bookmarked.

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

If you want to use your bookmarks with the latest Luakit release, you will have to convert the file.
Here follow a sample Lua script to do that:

Your old plaintext bookmarks will be left unchanged. If the DB bookmarks do not exist, the file will be created. If it exist, 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 is for Luakit 2012.03.25 only! For newer version, you can first run this script, then convert the generted plain text bookmarks to the SQLite format as stated above.

To import your bookmarks from Firefox, first you must export them to an HTML file using its bookmarks manager.
Now we must convert the XML file to a Luakit format.
You can use the following one-line awk command: