all repos — dotfiles @ 61fed1b49b25bdaee135fa1488ea5435edd10b72

my *nix dotfiles

luakit: default zoom, mpv binds
Anirudh Oppiliappan x@icyphox.sh
Tue, 01 Feb 2022 16:15:38 +0530
commit

61fed1b49b25bdaee135fa1488ea5435edd10b72

parent

3b57c91509fe20c1d119c2e22a16cb3113f86727

1 files changed, 26 insertions(+), 1 deletions(-)

jump to
M config/luakit/userconf.luaconfig/luakit/userconf.lua

@@ -1,14 +1,39 @@

local vertical_tabs = require "vertical_tabs" local editor = require "editor" +local modes = require "modes" +local settings = require "settings" + +-- edit in nvim editor.editor_cmd = "st -e nvim {file} +{line}" -local modes = require "modes" +-- ctrl+c to copy modes.add_binds("normal", { { "<Control-c>", "Copy selected text.", function () luakit.selection.clipboard = luakit.selection.primary end}, }) +-- b to go back modes.remap_binds("normal", { { "b", "<shift-h>", true }, }) + +-- v to play in mpv +modes.add_binds("normal", { + { "v", "Play video in page", + function (w) + local view = w.view + local uri = view.hovered_uri or view.uri + if uri then + luakit.spawn(string.format("mpv --geometry=640x360 %s", uri )) + end + end }, +}) + +-- default zoom for sites +local sites = { + "news.ycombinator.com", "lobste.rs", +} +for _, s in ipairs(sites) do + settings.on[s].webview.zoom_level = 120 +end