aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-09-18 18:54:38 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-09-18 18:54:38 -0300
commit3a61ee3426496b9fadf4bb2355b02bbffb98e80e (patch)
tree18b9b4007d65212b7ca0ef6865142ed48a1a37e3
parent3dfff56290157939510ff8e40398838a312c225b (diff)
downloadluakit-3a61ee3426496b9fadf4bb2355b02bbffb98e80e.tar.gz
luakit-3a61ee3426496b9fadf4bb2355b02bbffb98e80e.tar.bz2
Config upgrade
-rw-r--r--config.dot/luakit.link/rc.lua212
-rw-r--r--config.dot/luakit.link/theme.lua2
2 files changed, 109 insertions, 105 deletions
diff --git a/config.dot/luakit.link/rc.lua b/config.dot/luakit.link/rc.lua
index d0a7e3b..16f9031 100644
--- a/config.dot/luakit.link/rc.lua
+++ b/config.dot/luakit.link/rc.lua
@@ -1,178 +1,182 @@
------------------------------------------------------------------------
--- luakit configuration file, more information at http://luakit.org/ --
------------------------------------------------------------------------
+------------------------------------------------------------------------------
+-- luakit configuration file, more information at https://luakit.github.io/ --
+------------------------------------------------------------------------------
require "lfs"
-if unique then
- unique.new("org.luakit")
- -- Check for a running luakit instance
- if unique.is_running() then
- if uris[1] then
- for _, uri in ipairs(uris) do
- if lfs.attributes(uri) then uri = os.abspath(uri) end
- unique.send_message("tabopen " .. uri)
- end
- else
- unique.send_message("winopen")
- end
- luakit.quit()
- end
-end
-
--- Load library of useful functions for luakit
-require "lousy"
+require "unique_instance"
--- Small util functions to print output (info prints only when luakit.verbose is true)
-function warn(...) io.stderr:write(string.format(...) .. "\n") end
-function info(...) if luakit.verbose then io.stdout:write(string.format(...) .. "\n") end end
+-- Set the number of web processes to use. A value of 0 means 'no limit'.
+luakit.process_limit = 4
+-- Set the cookie storage location
+soup.cookies_storage = luakit.data_dir .. "/cookies.db"
--- Load users global config
--- ("$XDG_CONFIG_HOME/luakit/globals.lua" or "/etc/xdg/luakit/globals.lua")
-require "globals"
+-- Load library of useful functions for luakit
+local lousy = require "lousy"
-- Load users theme
-- ("$XDG_CONFIG_HOME/luakit/theme.lua" or "/etc/xdg/luakit/theme.lua")
lousy.theme.init(lousy.util.find_config("theme.lua"))
-theme = assert(lousy.theme.get(), "failed to load theme")
+assert(lousy.theme.get(), "failed to load theme")
-- Load users window class
-- ("$XDG_CONFIG_HOME/luakit/window.lua" or "/etc/xdg/luakit/window.lua")
-require "window"
+local window = require "window"
-- Load users webview class
-- ("$XDG_CONFIG_HOME/luakit/webview.lua" or "/etc/xdg/luakit/webview.lua")
-require "webview"
+local webview = require "webview"
--- Load users mode configuration
--- ("$XDG_CONFIG_HOME/luakit/modes.lua" or "/etc/xdg/luakit/modes.lua")
-require "modes"
+-- Add luakit;//log/ chrome page
+local log_chrome = require "log_chrome"
--- Load users keybindings
--- ("$XDG_CONFIG_HOME/luakit/binds.lua" or "/etc/xdg/luakit/binds.lua")
-require "binds"
+window.add_signal("build", function (w)
+ local widgets, l, r = require "lousy.widget", w.sbar.l, w.sbar.r
-----------------------------------
--- Optional user script loading --
-----------------------------------
+ -- Left-aligned status bar widgets
+ l.layout:pack(widgets.uri())
+ l.layout:pack(widgets.hist())
+ l.layout:pack(widgets.progress())
--- Luakit Plugins
---require "plugins"
+ -- Right-aligned status bar widgets
+ r.layout:pack(widgets.buf())
+ r.layout:pack(log_chrome.widget())
+ r.layout:pack(widgets.ssl())
+ r.layout:pack(widgets.tabi())
+ r.layout:pack(widgets.scroll())
+end)
--- Web inspector
-require "webinspector"
+-- Load luakit binds and modes
+local modes = require "modes"
+local binds = require "binds"
--- Add sqlite3 cookiejar
-require "cookies"
+local settings = require "settings"
+require "settings_chrome"
--- Cookie blocking by domain (extends cookies module)
--- Add domains to the whitelist at "$XDG_CONFIG_HOME/luakit/cookie.whitelist"
--- and blacklist at "$XDG_CONFIG_HOME/luakit/cookie.blacklist".
--- Each domain must be on it's own line and you may use "*" as a
--- wildcard character (I.e. "*google.com")
---require "cookie_blocking"
+----------------------------------
+-- Optional user script loading --
+----------------------------------
--- Block all cookies by default (unless whitelisted)
---cookies.default_allow = false
+-- Add adblock
+local adblock = require "adblock"
+local adblock_chrome = require "adblock_chrome"
+
+local webinspector = require "webinspector"
-- Add uzbl-like form filling
-require "formfiller"
+local formfiller = require "formfiller"
-- Add proxy support & manager
-require "proxy"
+local proxy = require "proxy"
-- Add quickmarks support & manager
-require "quickmarks"
+local quickmarks = require "quickmarks"
-- Add session saving/loading support
-require "session"
+local session = require "session"
-- Add command to list closed tabs & bind to open closed tabs
-require "undoclose"
+local undoclose = require "undoclose"
-- Add command to list tab history items
-require "tabhistory"
+local tabhistory = require "tabhistory"
-- Add greasemonkey-like javascript userscript support
-require "userscripts"
+local userscripts = require "userscripts"
-- Add bookmarks support
-require "bookmarks"
+local bookmarks = require "bookmarks"
+local bookmarks_chrome = require "bookmarks_chrome"
-- Add download support
-require "downloads"
-require "downloads_chrome"
+local downloads = require "downloads"
+local downloads_chrome = require "downloads_chrome"
--- Add vimperator-like link hinting & following
--- (depends on downloads)
-require "follow"
+-- Add automatic PDF downloading and opening
+local viewpdf = require "viewpdf"
--- To use a custom character set for the follow hint labels un-comment and
--- modify the following:
---local s = follow.styles
---follow.style = s.sort(s.reverse(s.charset("asdfqwerzxcv"))) -- I'm a lefty
+-- Example using xdg-open for opening downloads / showing download folders
+downloads.add_signal("open-file", function (file)
+ luakit.spawn(string.format("xdg-open %q", file))
+ return true
+end)
+
+-- Add vimperator-like link hinting & following
+local follow = require "follow"
-- Add command history
-require "cmdhist"
+local cmdhist = require "cmdhist"
-- Add search mode & binds
-require "search"
+local search = require "search"
-- Add ordering of new tabs
-require "taborder"
+local taborder = require "taborder"
-- Save web history
-require "history"
-require "history_chrome"
+local history = require "history"
+local history_chrome = require "history_chrome"
+
+local help_chrome = require "help_chrome"
+local binds_chrome = require "binds_chrome"
-- Add command completion
-require "completion"
+local completion = require "completion"
--- Session manager
-require "sessman"
+-- Press Control-E while in insert mode to edit the contents of the currently
+-- focused <textarea> or <input> element, using `xdg-open`
+local open_editor = require "open_editor"
-- NoScript plugin, toggle scripts and or plugins on a per-domain basis.
-- `,ts` to toggle scripts, `,tp` to toggle plugins, `,tr` to reset.
--- Remove all "enable_scripts" & "enable_plugins" lines from your
--- domain_props table (in config/globals.lua) as this module will conflict.
+-- If you use this module, don't use any site-specific `enable_scripts` or
+-- `enable_plugins` settings, as these will conflict.
--require "noscript"
-require "follow_selected"
-require "go_input"
-require "go_next_prev"
-require "go_up"
+local follow_selected = require "follow_selected"
+local go_input = require "go_input"
+local go_next_prev = require "go_next_prev"
+local go_up = require "go_up"
+
+-- Filter Referer HTTP header if page domain does not match Referer domain
+require_web_module("referer_control_wm")
+
+local error_page = require "error_page"
+
+-- Add userstyles loader
+local styles = require "styles"
+
+-- Hide scrollbars on all pages
+local hide_scrollbars = require "hide_scrollbars"
+
+-- Add a stylesheet when showing images
+local image_css = require "image_css"
+
+-- Add a new tab page
+local newtab_chrome = require "newtab_chrome"
+
+-- Add tab favicons mod
+local tab_favicons = require "tab_favicons"
+
+-- Add :view-source command
+local view_source = require "view_source"
+
+-- Load sessman
+local sessman = require "sessman"
-----------------------------
-- End user script loading --
-----------------------------
-- Restore last saved session
-local w = (session and session.restore())
+local w = (not luakit.nounique) and (session and session.restore())
if w then
for i, uri in ipairs(uris) do
- w:new_tab(uri, i == 1)
+ w:new_tab(uri, { switch = i == 1 })
end
else
-- Or open new window
window.new(uris)
end
--------------------------------------------
--- Open URIs from other luakit instances --
--------------------------------------------
-
-if unique then
- unique.add_signal("message", function (msg, screen)
- local cmd, arg = string.match(msg, "^(%S+)%s*(.*)")
- local w = lousy.util.table.values(window.bywidget)[1]
- if cmd == "tabopen" then
- w:new_tab(arg)
- elseif cmd == "winopen" then
- w = window.new((arg ~= "") and { arg } or {})
- end
- w.win.screen = screen
- w.win.urgency_hint = true
- end)
-end
-
-- vim: et:sw=4:ts=8:sts=4:tw=80
diff --git a/config.dot/luakit.link/theme.lua b/config.dot/luakit.link/theme.lua
index 71ea036..263e1a5 100644
--- a/config.dot/luakit.link/theme.lua
+++ b/config.dot/luakit.link/theme.lua
@@ -6,7 +6,7 @@ local theme = {}
-- Default settings
--theme.font = "monospace normal 9"
-theme.font = "Inconsolata for Powerline 9"
+theme.font = "Inconsolata for Powerline 12"
theme.fg = "#fff"
theme.bg = "#1C1C1C"