{ x, pkgs, lib, config, ... }: with lib; with x; let cfg = config.module.programs.gui.qutebrowser; frc = lib.mkForce; in { options = { module.programs.gui.qutebrowser = { enable = mkBool; }; }; config = mkIf cfg.enable { home.packages = with pkgs; [ python312Packages.adblock ]; programs.qutebrowser = True // { settings = { editor.command = [ "hx" "{file}" ]; confirm_quit = [ "downloads" ]; scrolling = { bar = "overlay"; smooth = true; }; statusbar = { show = "in-mode"; widgets = [ "keypress" "search_match" "url" "tabs" "progress" "scroll" ]; }; tabs = { position = "top"; show = "switching"; tooltips = false; max_width = 300; min_width = 300; title = { format = "{index}: {current_title}"; format_pinned = "{index}"; }; }; window.hide_decoration = true; colors = with config.lib.stylix.colors.withHashtag; { webpage.darkmode.enabled = false; hints = { bg = frc "${base04}"; fg = frc "${base00}"; }; }; fonts = with config.stylix.fonts; { default_family = mkForce "${monospace.name}"; }; content.blocking.enabled = true; hints = { scatter = false; chars = "asdfghjkl"; }; }; searchEngines = { DEFAULT = "https://www.google.com/search?hl=en&q={}"; nx = "https://wiki.nixos.org/index.php?search={}"; g = "https://www.google.com/search?hl=en&q={}"; d = "https://duckduckgo.com/?q={}"; }; greasemonkey = with pkgs; [ (fetchurl { url = "https://raw.githubusercontent.com/afreakk/greasemonkeyscripts/refs/heads/master/youtube_sponsorblock.js"; sha256 = "sha256-nwNade1oHP+w5LGUPJSgAX1+nQZli4Rhe8FFUoF5mLE="; }) (fetchurl { url = "https://raw.githubusercontent.com/afreakk/greasemonkeyscripts/refs/heads/master/youtube_adblock.js"; sha256 = "sha256-AyD9VoLJbKPfqmDEwFIEBMl//EIV/FYnZ1+ona+VU9c="; }) ]; }; }; }