local settings = require "settings" settings.window.home_page = "about:blank" settings.window.scroll_step = 40 settings.window.zoom_step = 0.1 settings.webview.zoom_level = 100 settings.window.new_window_size = "1916x1051" settings.window.close_with_last_tab = true -- settings.window.vertical_tab_width = 200 settings.window.load_etc_hosts = false settings.webview.enable_webgl = true settings.webview.enable_plugins = false settings.on["vimeo.com"].webview.enable_javascript = true settings.on["vimeo.com"].webview.enable_plugins = true settings.on["youtube.com"].webview.enable_javascript = true settings.on["youtube.com"].webview.enable_plugins = true settings.window.search_engines.duckduckgo = "https://duckduckgo.com/?q=%s" settings.window.search_engines.github = "https://github.com/search?q=%s" settings.window.search_engines.google = "https://google.com/search?q=%s" settings.window.search_engines.imdb = "http://www.imdb.com/find?s=all&q=%s" settings.window.search_engines.wikipedia = "https://en.wikipedia.org/wiki/Special:Search?search=%s" settings.window.search_engines.default = settings.window.search_engines.duckduckgo -- Add uzbl-like form filling local formfiller = require "formfiller" formfiller.extend({ pass = function(s) return io.popen("pass " .. s):read() end }) -- Example using xdg-open for opening downloads / showing download folders local downloads = require "downloads" downloads.add_signal("open-file", function (file) luakit.spawn(string.format("rifle %q", file)) return true end) -- Add userstyles loader local styles = require "styles" local follow = require "follow" follow.stylesheet = follow.stylesheet .. [===[ #luakit_select_overlay .hint_label { background-color: #f8f8f8; border: 1px solid #f00; color: #181818; font-size: 14px; opacity: 1; } ]===] -- Use "asdfqwerzxcv" for generating labels local select = require "select" select.label_maker = function (s) return s.trim(s.sort(s.reverse(s.charset("qwertzuiopasfghjklyxcvbnm")))) end follow.pattern_maker = follow.pattern_styles.match_label -- Delete cookies for current domain local modes = require "modes" modes.add_binds("normal", { { "", "Clear Cookies", function (w, state) local uri = lousy.uri.parse(w.view.uri).host if uri == nil then w:warning("No cookies here") else coroutine.wrap(function() luakit.website_data.remove({"cookies"}, uri) w:notify("Cookies cleared for: " .. uri) end)() end end } })