diff options
author | Nguyễn Gia Phong <vn.mcsinyx@gmail.com> | 2017-12-11 22:23:33 +0700 |
---|---|---|
committer | Nguyễn Gia Phong <vn.mcsinyx@gmail.com> | 2017-12-11 22:23:33 +0700 |
commit | f4212853912470fc10302b6725d088edc4ed1656 (patch) | |
tree | ee70a5f7f55130c0b6ca02e3f50888cbdcf8af18 | |
parent | 5b37deb0913cd8c4385e6b64dd6240eeeb371ef6 (diff) | |
download | dotfiles-f4212853912470fc10302b6725d088edc4ed1656.tar.gz |
Update 2017-12-11
-rw-r--r-- | README.md | 7 | ||||
-rw-r--r-- | luakit/.config/luakit/rc.lua | 186 | ||||
-rw-r--r-- | luakit/.config/luakit/theme.lua | 86 | ||||
-rw-r--r-- | screenshot.png | bin | 469071 -> 310067 bytes |
4 files changed, 275 insertions, 4 deletions
diff --git a/README.md b/README.md index 4c25433..609aec3 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ Dotfiles of my Debian testing system, managed by GNU Stow. ![](screenshot.png) -This repository contains my configurations for awesome, bash, Git, GTK+, -ranger, Vim, Vimperator (a Firefox add-on) and xterm. Most of those -applications are themed with the [gruvbox](https://github.com/morhetz/gruvbox) -colorscheme's light version. +This repository contains my configurations for awesome, bash, Git, Luakit, +ranger, Vim, XTerm and Zathura. Most of these applications are themed with the +[gruvbox](https://github.com/morhetz/gruvbox) colorscheme's light version. diff --git a/luakit/.config/luakit/rc.lua b/luakit/.config/luakit/rc.lua new file mode 100644 index 0000000..9aceccf --- /dev/null +++ b/luakit/.config/luakit/rc.lua @@ -0,0 +1,186 @@ +------------------------------------------------------------------------------ +-- luakit configuration file, more information at https://luakit.github.io/ -- +------------------------------------------------------------------------------ + +require "lfs" + +require "unique_instance" + +-- 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 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")) +assert(lousy.theme.get(), "failed to load theme") + +-- Load users window class +-- ("$XDG_CONFIG_HOME/luakit/window.lua" or "/etc/xdg/luakit/window.lua") +local window = require "window" + +-- Load users webview class +-- ("$XDG_CONFIG_HOME/luakit/webview.lua" or "/etc/xdg/luakit/webview.lua") +local webview = require "webview" + +-- Add luakit;//log/ chrome page +local log_chrome = require "log_chrome" + +window.add_signal("build", function (w) + local widgets, l, r = require "lousy.widget", w.sbar.l, w.sbar.r + + -- Left-aligned status bar widgets + l.layout:pack(widgets.uri()) + l.layout:pack(widgets.hist()) + l.layout:pack(widgets.progress()) + + -- 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) + +-- Load luakit binds and modes +local modes = require "modes" +local binds = require "binds" + +-- Play embedded video 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 %s", uri)) end +end } }) + +local settings = require "settings" +require "settings_chrome" + +---------------------------------- +-- Optional user script loading -- +---------------------------------- + +-- Add adblock +local adblock = require "adblock" +local adblock_chrome = require "adblock_chrome" + +local webinspector = require "webinspector" + +-- Add uzbl-like form filling +local formfiller = require "formfiller" + +-- Add proxy support & manager +local proxy = require "proxy" + +-- Add quickmarks support & manager +local quickmarks = require "quickmarks" + +-- Add session saving/loading support +local session = require "session" + +-- Add command to list closed tabs & bind to open closed tabs +local undoclose = require "undoclose" + +-- Add command to list tab history items +local tabhistory = require "tabhistory" + +-- Add greasemonkey-like javascript userscript support +local userscripts = require "userscripts" + +-- Add bookmarks support +local bookmarks = require "bookmarks" +local bookmarks_chrome = require "bookmarks_chrome" + +-- Add download support +local downloads = require "downloads" +local downloads_chrome = require "downloads_chrome" + +-- Add automatic PDF downloading and opening +local viewpdf = require "viewpdf" + +-- 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 +local cmdhist = require "cmdhist" + +-- Add search mode & binds +local search = require "search" + +-- Add ordering of new tabs +local taborder = require "taborder" + +-- Save web history +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 +local completion = require "completion" + +-- 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. +-- If you use this module, don't use any site-specific `enable_scripts` or +-- `enable_plugins` settings, as these will conflict. +--require "noscript" + +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" + +----------------------------- +-- End user script loading -- +----------------------------- + +-- Restore last saved session +local w = (not luakit.nounique) and (session and session.restore()) +if w then + for i, uri in ipairs(uris) do + w:new_tab(uri, { switch = i == 1 }) + end +else + -- Or open new window + window.new(uris) +end + +-- vim: et:sw=4:ts=8:sts=4:tw=80 diff --git a/luakit/.config/luakit/theme.lua b/luakit/.config/luakit/theme.lua new file mode 100644 index 0000000..51ba8ac --- /dev/null +++ b/luakit/.config/luakit/theme.lua @@ -0,0 +1,86 @@ +-------------------------- +-- Default luakit theme -- +-------------------------- + +local theme = {} + +-- Default settings +theme.font = "10pt Space Mono" +theme.fg = "#3c3836" +theme.bg = "#fbf1c7" + +-- General colours +theme.success_fg = "#79740e" +theme.loaded_fg = "#076678" +theme.error_fg = theme.fg +theme.error_bg = "#cc241d" + +-- Warning colours +theme.warning_fg = "9d0006" +theme.warning_bg = theme.bg + +-- Notification colours +theme.notif_fg = "#7c6f64" +theme.notif_bg = theme.bg + +-- Menu colours +theme.menu_fg = theme.fg +theme.menu_bg = "#d5c4a1" +theme.menu_selected_fg = theme.menu_bg +theme.menu_selected_bg = "#076678" +theme.menu_title_bg = "#ebdbb2" +theme.menu_primary_title_fg = theme.fg +theme.menu_secondary_title_fg = theme.fg + +theme.menu_disabled_fg = "#928374" +theme.menu_disabled_bg = theme.menu_bg +theme.menu_enabled_fg = theme.menu_fg +theme.menu_enabled_bg = theme.menu_bg +theme.menu_active_fg = "#79740e" +theme.menu_active_bg = theme.menu_bg + +-- Proxy manager +theme.proxy_active_menu_fg = theme.fg +theme.proxy_active_menu_bg = theme.bg +theme.proxy_inactive_menu_fg = '#928374' +theme.proxy_inactive_menu_bg = theme.bg + +-- Statusbar specific +theme.sbar_fg = theme.fg +theme.sbar_bg = theme.bg + +-- Downloadbar specific +theme.dbar_fg = theme.fg +theme.dbar_bg = theme.bg +theme.dbar_error_fg = "#9d0006" + +-- Input bar specific +theme.ibar_fg = theme.fg +theme.ibar_bg = theme.bg + +-- Tab label +theme.tab_fg = theme.fg +theme.tab_bg = "#d5c4a1" +theme.tab_hover_bg = "#ebdbb2" +theme.tab_ntheme = "#7c6f64" +theme.selected_fg = theme.fg +theme.selected_bg = theme.bg +theme.selected_ntheme = "#7c6f64" +theme.loading_fg = theme.loaded_fg +theme.loading_bg = theme.loaded_bg + +theme.selected_private_tab_bg = "#b16296" +theme.private_tab_bg = "#d3869b" + +-- Trusted/untrusted ssl colours +theme.trust_fg = "#79740e" +theme.notrust_fg = "#9d0006" + +-- General colour pairings +theme.ok = { fg = theme.fg, bg = theme.bg } +theme.warn = { fg = "#9d0006", bg = theme.bg } +theme.error = { fg = theme.fg, bg = "#cc241d" } + +return theme + +-- vim: et:sw=4:ts=8:sts=4:tw=80 diff --git a/screenshot.png b/screenshot.png index 96e5d4f..bf3f332 100644 --- a/screenshot.png +++ b/screenshot.png Binary files differ |