From c6c0fdc2fc7742e2ecc2ad735efe80c99018dfa8 Mon Sep 17 00:00:00 2001 From: sefidel Date: Sat, 1 Jan 2022 15:48:26 +0900 Subject: home/browser: add qutebrowser --- home/modules/profiles/browsing/default.nix | 19 +- .../profiles/browsing/qutebrowser-settings.nix | 303 +++++++++++++++++++++ 2 files changed, 321 insertions(+), 1 deletion(-) create mode 100644 home/modules/profiles/browsing/qutebrowser-settings.nix (limited to 'home/modules/profiles/browsing') diff --git a/home/modules/profiles/browsing/default.nix b/home/modules/profiles/browsing/default.nix index 45f0ed5..fedad6f 100644 --- a/home/modules/profiles/browsing/default.nix +++ b/home/modules/profiles/browsing/default.nix @@ -8,6 +8,23 @@ in }; config = lib.mkIf cfg.enable { - home.packages = with pkgs; [ firefox lynx ]; + home.packages = with pkgs; [ firefox-wayland lynx ]; + + programs.qutebrowser = { + enable = true; + + searchEngines = { + g = "https://www.google.com/search?hl=en&q={}"; + nw = "https://nixos.wiki/index.php?search={}"; + no = "https://search.nixos.org/options?channel=unstable&from=0size=50&sort=relevance&type=packages&query={}"; + }; + + quickmarks = { + github = "https://github.com"; + sourcehut = "https://sr.ht"; + }; + + settings = import ./qutebrowser-settings.nix; + }; }; } diff --git a/home/modules/profiles/browsing/qutebrowser-settings.nix b/home/modules/profiles/browsing/qutebrowser-settings.nix new file mode 100644 index 0000000..4e7fcae --- /dev/null +++ b/home/modules/profiles/browsing/qutebrowser-settings.nix @@ -0,0 +1,303 @@ +let + base00 = "#18191f"; + base01 = "#222329"; + base02 = "#2c2d33"; + base03 = "#3c3d43"; + base04 = "#b5ac9b"; + base05 = "#cbc0ab"; + base06 = "#e0d6bd"; + base07 = "#f1ebd1"; + base08 = "#b8aad9"; + base09 = "#b17f81"; + base0A = "#d4ae80"; + base0B = "#8aa387"; + base0C = "#9ba292"; + base0D = "#c495a2"; + base0E = "#8896ae"; + base0F = "#d0d0c7"; +in +{ + # Base16 qutebrowser template by theova + + # Value to use for `prefers-color-scheme:` for websites. + # Valid values: light, dark, auto. + colors.webpage.preferred_color_scheme = "dark"; + + # Text color of the completion widget. May be a single color to use for + # all columns or a list of three colors, one for each column. + colors.completion.fg = base05; + + # Background color of the completion widget for odd rows. + colors.completion.odd.bg = base01; + + # Background color of the completion widget for even rows. + colors.completion.even.bg = base00; + + # Foreground color of completion widget category headers. + colors.completion.category.fg = base0A; + + # Background color of the completion widget category headers. + colors.completion.category.bg = base00; + + # Top border color of the completion widget category headers. + colors.completion.category.border.top = base00; + + # Bottom border color of the completion widget category headers. + colors.completion.category.border.bottom = base00; + + # Foreground color of the selected completion item. + colors.completion.item.selected.fg = base05; + + # Background color of the selected completion item. + colors.completion.item.selected.bg = base02; + + # Top border color of the selected completion item. + colors.completion.item.selected.border.top = base02; + + # Bottom border color of the selected completion item. + colors.completion.item.selected.border.bottom = base02; + + # Foreground color of the matched text in the selected completion item. + colors.completion.item.selected.match.fg = base0B; + + # Foreground color of the matched text in the completion. + colors.completion.match.fg = base0B; + + # Color of the scrollbar handle in the completion view. + colors.completion.scrollbar.fg = base05; + + # Color of the scrollbar in the completion view. + colors.completion.scrollbar.bg = base00; + + # Background color of disabled items in the context menu. + colors.contextmenu.disabled.bg = base01; + + # Foreground color of disabled items in the context menu. + colors.contextmenu.disabled.fg = base04; + + # Background color of the context menu. If set to null, the Qt default is used. + colors.contextmenu.menu.bg = base00; + + # Foreground color of the context menu. If set to null, the Qt default is used. + colors.contextmenu.menu.fg = base05; + + # Background color of the context menu’s selected item. If set to null, the Qt default is used. + colors.contextmenu.selected.bg = base02; + + #Foreground color of the context menu’s selected item. If set to null, the Qt default is used. + colors.contextmenu.selected.fg = base05; + + # Background color for the download bar. + colors.downloads.bar.bg = base00; + + # Color gradient start for download text. + colors.downloads.start.fg = base00; + + # Color gradient start for download backgrounds. + colors.downloads.start.bg = base0D; + + # Color gradient end for download text. + colors.downloads.stop.fg = base00; + + # Color gradient stop for download backgrounds. + colors.downloads.stop.bg = base0C; + + # Foreground color for downloads with errors. + colors.downloads.error.fg = base08; + + # Font color for hints. + colors.hints.fg = base00; + + # Background color for hints. Note that you can use a `rgba(...)` value + # for transparency. + colors.hints.bg = base0A; + + # Font color for the matched part of hints. + colors.hints.match.fg = base05; + + # Text color for the keyhint widget. + colors.keyhint.fg = base05; + + # Highlight color for keys to complete the current keychain. + colors.keyhint.suffix.fg = base05; + + # Background color of the keyhint widget. + colors.keyhint.bg = base00; + + # Foreground color of an error message. + colors.messages.error.fg = base00; + + # Background color of an error message. + colors.messages.error.bg = base08; + + # Border color of an error message. + colors.messages.error.border = base08; + + # Foreground color of a warning message. + colors.messages.warning.fg = base00; + + # Background color of a warning message. + colors.messages.warning.bg = base0E; + + # Border color of a warning message. + colors.messages.warning.border = base0E; + + # Foreground color of an info message. + colors.messages.info.fg = base05; + + # Background color of an info message. + colors.messages.info.bg = base00; + + # Border color of an info message. + colors.messages.info.border = base00; + + # Foreground color for prompts. + colors.prompts.fg = base05; + + # Border used around UI elements in prompts. + colors.prompts.border = base00; + + # Background color for prompts. + colors.prompts.bg = base00; + + # Background color for the selected item in filename prompts. + colors.prompts.selected.bg = base02; + + # Foreground color for the selected item in filename prompts. + colors.prompts.selected.fg = base05; + + # Foreground color of the statusbar. + colors.statusbar.normal.fg = base0B; + + # Background color of the statusbar. + colors.statusbar.normal.bg = base00; + + # Foreground color of the statusbar in insert mode. + colors.statusbar.insert.fg = base00; + + # Background color of the statusbar in insert mode. + colors.statusbar.insert.bg = base0D; + + # Foreground color of the statusbar in passthrough mode. + colors.statusbar.passthrough.fg = base00; + + # Background color of the statusbar in passthrough mode. + colors.statusbar.passthrough.bg = base0C; + + # Foreground color of the statusbar in private browsing mode. + colors.statusbar.private.fg = base00; + + # Background color of the statusbar in private browsing mode. + colors.statusbar.private.bg = base01; + + # Foreground color of the statusbar in command mode. + colors.statusbar.command.fg = base05; + + # Background color of the statusbar in command mode. + colors.statusbar.command.bg = base00; + + # Foreground color of the statusbar in private browsing + command mode. + colors.statusbar.command.private.fg = base05; + + # Background color of the statusbar in private browsing + command mode. + colors.statusbar.command.private.bg = base00; + + # Foreground color of the statusbar in caret mode. + colors.statusbar.caret.fg = base00; + + # Background color of the statusbar in caret mode. + colors.statusbar.caret.bg = base0E; + + # Foreground color of the statusbar in caret mode with a selection. + colors.statusbar.caret.selection.fg = base00; + + # Background color of the statusbar in caret mode with a selection. + colors.statusbar.caret.selection.bg = base0D; + + # Background color of the progress bar. + colors.statusbar.progress.bg = base0D; + + # Default foreground color of the URL in the statusbar. + colors.statusbar.url.fg = base05; + + # Foreground color of the URL in the statusbar on error. + colors.statusbar.url.error.fg = base08; + + # Foreground color of the URL in the statusbar for hovered links. + colors.statusbar.url.hover.fg = base05; + + # Foreground color of the URL in the statusbar on successful load + # (http). + colors.statusbar.url.success.http.fg = base0C; + + # Foreground color of the URL in the statusbar on successful load + # (https). + colors.statusbar.url.success.https.fg = base0B; + + # Foreground color of the URL in the statusbar when there's a warning. + colors.statusbar.url.warn.fg = base0E; + + # Background color of the tab bar. + colors.tabs.bar.bg = base00; + + # Color gradient start for the tab indicator. + colors.tabs.indicator.start = base0D; + + # Color gradient end for the tab indicator. + colors.tabs.indicator.stop = base0C; + + # Color for the tab indicator on errors. + colors.tabs.indicator.error = base08; + + # Foreground color of unselected odd tabs. + colors.tabs.odd.fg = base05; + + # Background color of unselected odd tabs. + colors.tabs.odd.bg = base01; + + # Foreground color of unselected even tabs. + colors.tabs.even.fg = base05; + + # Background color of unselected even tabs. + colors.tabs.even.bg = base00; + + # Background color of pinned unselected even tabs. + colors.tabs.pinned.even.bg = base0C; + + # Foreground color of pinned unselected even tabs. + colors.tabs.pinned.even.fg = base07; + + # Background color of pinned unselected odd tabs. + colors.tabs.pinned.odd.bg = base0B; + + # Foreground color of pinned unselected odd tabs. + colors.tabs.pinned.odd.fg = base07; + + # Background color of pinned selected even tabs. + colors.tabs.pinned.selected.even.bg = base02; + + # Foreground color of pinned selected even tabs. + colors.tabs.pinned.selected.even.fg = base05; + + # Background color of pinned selected odd tabs. + colors.tabs.pinned.selected.odd.bg = base02; + + # Foreground color of pinned selected odd tabs. + colors.tabs.pinned.selected.odd.fg = base05; + + # Foreground color of selected odd tabs. + colors.tabs.selected.odd.fg = base05; + + # Background color of selected odd tabs. + colors.tabs.selected.odd.bg = base02; + + # Foreground color of selected even tabs. + colors.tabs.selected.even.fg = base05; + + # Background color of selected even tabs. + colors.tabs.selected.even.bg = base02; + + # Background color for webpages if unset (or empty to use the theme's + # color). + # colors.webpage.bg = base00; +} -- cgit 1.4.1