Skip to content
Plaque-fcc edited this page Jul 17, 2012 · 2 revisions

[Русскоязычная версия](Beginner Guide (ru)) Beginner Guide

We'll cover the following in this guide:

  1. Basic interface usage
  2. Where are the configuration files and how to define your own
  3. Luakit modes
  4. How to change or define new keybindings
  5. How to change global settings
  6. Special webpages

Basic usage

If you've used browsers like vimperator, or vimium, you'll find yourself right at home; most if not all luakit actions are available via keyboard commands.

Go to a URL

Type :open followed by a space and the URL to navigate to, e.g: :open www.luakit.org. Hit Enter.
Shortcut: press o.

Search

Type a slash, followed by your search keyword, e.g: /luakit. Hit Enter. Use n to find the next occurrance, N to find the previous one.

Open tab, close tab, undo close tab

Try the following:
:tabopen www.luakit.org
d
u
Shortcut: press t.

Scrolling in a web page

All the usual arrow, page up/down, home and end keys work. Additionally, the following vim-like bindings are available:
Ctrl+u, Ctrl+d, Space

Bookmarks

B - add bookmark
gB - show bookmarks

Quickmarks

Mx - add quickmark x
gox - go to quickmark x in current tab
gnx - go to quickmark x in new tab
:qmarks - show quickmarks

Configuration files

Luakit loads only one configuration file: rc.lua; that's the entry point for loading all the other configuration files we might need.

When looking for a .lua file (rc.lua, or any other lua file), luakit checks the following locations, in the order specified here:

  • /home/$USER/.config/luakit
  • /etc/xdg/luakit

When we launch luakit after a fresh install, it will look for rc.lua in our personal config location, won't find it there, and load the global /etc/xdg/luakit/rc.lua file.

Now, knowing this, we can define our own configuration creating a rc.lua file in the /home/$USER/.config/luakit directory. The easiest way of creating a proper functional configuration is copying the global config file to our home directory

cp /etc/xdg/luakit/rc.lua /home/$USER/.config/luakit

now we can modify the config file, and see our changes taking effect when reloading luakit. However, the official rc.lua file might suffer modifications in future releases, and, if we modify our copy extensively, it will be difficult to merge the new changes to the config file into our setup. One way of minimizing the impact of future upgrades is to add only a line like the following to our personal copy of rc.lua

require "userconf" 

right before the end of the "User script loading" section. Now we can create a new file, /home/$USER/.config/luakit/userconf.lua, where we can introduce all the changes we want, and keep them safe from upgrades and future changes in the rc.lua file.

Modes

Changing keybindings

Currently keybindings can only be changed by editing the binds.lua file.
For more info check: Configuration

Global settings

globals table

search_engines

domain_props table

luakit:// pages

A few of the builtin commands are available through luakit:// url's,
similar to Chrome's 'internal' pages, eg: chrome://bookmarks .

command      uri
-------------------------------
:bookmarks   luakit://bookmarks
:history     luakit://history
:downloads   luakit://downloads

currently these are also available as chrome:// url's,
though I believe that's deprecated.

Clone this wiki locally