all repos — dotfiles @ c7a9e48bdfad3a636f1b166829cfea60aec08bdd

my *nix dotfiles

config/luakit/userconf.lua (view raw)

 1local vertical_tabs = require "vertical_tabs"
 2local editor = require "editor"
 3local modes = require "modes"
 4local settings = require "settings"
 5
 6-- edit in nvim
 7editor.editor_cmd = "st -e nvim {file} +{line}"
 8
 9-- ctrl+c to copy
10modes.add_binds("normal", {
11    { "<Control-c>", "Copy selected text.", function ()
12        luakit.selection.clipboard = luakit.selection.primary
13    end},
14})
15
16-- b to go back
17modes.remap_binds("normal", {
18  { "b", "<shift-h>", true },
19})
20
21-- v to play in mpv
22modes.add_binds("normal", {
23  { "v", "Play video in page",
24  function (w)
25    local view = w.view
26    local uri = view.hovered_uri or view.uri
27    if uri then
28      luakit.spawn(string.format("mpv --geometry=640x360 %s", uri ))
29    end
30  end },
31})
32
33-- default zoom for sites
34local sites = {
35  "news.ycombinator.com", "lobste.rs",
36}
37for _, s in ipairs(sites) do
38  settings.on[s].webview.zoom_level = 120
39end