Luakit default keybindings, commands, and config additions taken from experience and the 35 page luakit thread here: https://bbs.archlinux.org/viewtopic.php?id=97375 (The thread is chock full of fantastic information but it's tedius weeding through 35 pages. As I have more needs, I'll add to this page as I hunt down more information.) There is also an official site here: http://mason-larobina.github.com/luakit/ but I had horrible luck finding things and understanding half of what I was reading. Hence this page of some basic information to at least get the ball rolling. ********************************************** * Input bar is at the bottom of the webpage! * ********************************************** Keybindings: gd=view downloads page in same tab gD=same but in new tab B[Enter]=create bookmark of current url gb=view bookmarks (gB for new tab, you get the idea) [num]gt=go to tab[num] d or ctrl w=close tab D or ZQ=close window f=follow mode (maps urls in page to keys to be activated by pressing relevant keys)(use F to load urls in new tab) F=follow mode into new tab i=insert mode :=command mode (used at input bar at bottom of page) Esc=clear all modes, undoes last keypress command j or down-arrow=scroll down k or up-arrow=scroll up Page down=scroll page down Page up=scroll page up Left arrow=scroll horizontally Right arrow=scroll horizontally Home=back to top of page End=takes you to bottom of page + (plus sign)=zoom in - (minus sign)=zoom out = (equals sign)=set zoom F11=full screen (hit F11 again to exit full screen) o=open url in same tab O=open the "open" dialog with the current url for editing t=open url in new tab w=open url in new window r=reload current url s=stop page loading u=opens the last closed tabs H,b,ctrl o, or ctrl i=back L=forward Ctrl page-up=previous tab Ctrl page-down or ctrl tab=next tab Ctrl t=new tab s=download S=multiple downloads y=yank element uri or description into primary selection (onto clipboard) Y=Yank element description (copy onto clipboard) ;;=focus element ;i= for opening image sources ;I= for opening image sources in new tab [num]b=load back page [num] in history ctrl z=passthrough mode (NO idea what this is yet) ctrl-ZZ=quit and save session for next time ZQ=quits without saving M[letter or number]=quickmark url to that letter or number (activate by go[quickmark] or gn[quickmark] (for new tab) Ctrl w=delete word Ctrl u=delete line Ctrl h=delete backward one character Ctrl d=delete forward one character Ctrl a=go to beginning of line Ctrl e=go to end of line Ctrl f=go forward one character Ctrl b=go backward one character Mod1 f=go forward one word Mod1 b=go backward one word Browser Commands: :quit :restart :open :lua :viewsource (views the source) :viewsource! (goes back to webpage) ************************************************** Config files are found in: /etc/xdg/luakit/ /usr/share/luakit/ ~/.local/share/luakit/ ************************************************** All keybinds are found here (I found it hard reading hence my list): /usr/share/luakit/lib/follow/binds.lua and /etc/xdg/luakit/binds.lua ************************************************** (Extra bonus: when typing o, t, or w, follow with search engine of choice then keyword. Example: typing a t gives me this result at the bottom of the page: :tabopen and a blinking cursor. At the cursor, type "duckduckgo arch linux forums" (without the quotes) and there's your list.) *************************************************** Default window size can be set here: globals.lua: default_window_size *************************************************** Change start page: *************************************************** Change default search engine: *************************************************** How to set all new urls/windows to open as a new tab in current running luakit (compared to a new window) in rc.lua: ********** -- always open new window as a new tab webview.init_funcs.window_decision = function (view, w) view:add_signal("new-window-decision", function (v, uri, reason) w:new_tab(uri) return true end) end *********** **************************************************** Set default download directory in rc.lua: downloads.default_dir = /path/of/choice Example: -- Add download support require "downloads" downloads.default_dir = /path/of/choice require "downloads_chrome" *************************************************** Quickmarks: Let's you assign a webpage to a specified key. Type M followed by key you wish to assign the page to. To open that page at a later time, type go[assigned-key] to open in current tab, or gn[assigned-key] to open in a new tab. *************************************************** Pressing f highlights all the links on the page and assigns them a number. At bottom of page, type the corresponding number after Follow: to go to it. *************************************************** Adblock for luakit: Use https://gist.github.com/1073680 and put it in your ~/.config/luakit. Name it adblock.lua Edit your rc.lua and include: ****** require "adblock" ****** Then create a file ~/.config/luakit/adblock.blacklist according to the comment in the adblock.lua. Here's what works for facebook for example: facebook%.com Here's a script which translates hosts files for adblocking into an adblock.blacklist file. Use it as an example only! http://pae.st/4aiQ/ (courtesy Army in Arch Linux Forums) *************************************************** Add scrollbar: Add the following before the session restore code (last 10 lines) in your rc.lua: ********* webview.init_funcs.show_scrollbars = function(view) view.show_scrollbars = true end ********* *************************************************** How to change useragent: globals.useragent = "Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.1 (KHTML, like Gecko) Chromium/14.0.825.0" If you append ?nobrowsercheck=true to the end of the gmail.com url (or any other url that rejects unknown browsers?) it will let you access it with the normal luakit user agent. *************************************************** How to group bookmarks: Type "B" and then after the link add a word, e.g. :bookmark https://bbs.archlinux.org/viewtopic.php?pid=983863 Archlinux :bookmark https://bbs.archlinux.org/viewtopic.php?id=125310 Archlinux ************************************************** ctrl-click url=open in new tab ************************************************** To use ctrl-c to copy to clipboard, go to insert mode first (press i) You can then use ctrl-v to paste. ************************************************** How to set luakit to save the current session every time instead of only by ZZ, even if it's closed by the window manager: In your rc.lua, place a session.save() at the top of the window.methods.close_win function: ******** local close_win = window.methods.close_win window.methods.close_win = function (w, ...) session.save{w} close_win(w, ...) end ******** Another option offered: Edit window.lua (should be in ~/.config/luakit, or you should copy it to there from the xdg folder). On line 658 you'll find a function called "navigate". Add a line just before the closing "end" which is on line 671. The line should save the current session by calling w:save_session(). ******** navigate = function (w, uri, view) view = view or w.view if view then local js = string.match(uri, "^javascript:(.+)$") if js then --return view:eval_js(luakit.uri_decode(js), "(javascript-uri)") return view:eval_js(luakit.uri_decode(js), "(luakit::navigate)", true) end view.uri = uri else return w:new_tab(uri) end w:save_session() -- THIS LINE WAS ADDED end, ********** ************************************************* To use userconf.lua to remap binds, paste the binding aliases there: -- Binding aliases local key, buf, but = lousy.bind.key, lousy.bind.buf, lousy.bind.but then add binds within the brackets: ------------------ binds.lua add_binds("normal", { --for example -- History key({}, "b", function (w, m) w:back(m.count) end), key({}, "n", function (w, m) w:forward(m.count) end), }, true) ************************************************** To disable/enable javascript, scripts, and plugins: Add this to your rc.lua somewhere between the 'require "webview"' line (make sure it is after "binds" as well) and the "end user script loading" ***** require "noscript" noscript.enable_scripts = false noscript.enable_plugins = false ***** Then use: ,ts to toggle scripts such as javascript and others for the current domain. ,tp to toggle plugins such as Flash for the current domain. ,tr to remove NoScript rules for a given domain. Note the , must be typed as well. **************************************************