2024-12-17 12:10:05 +00:00
|
|
|
{
|
|
|
|
x,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}:
|
2024-12-09 01:15:55 +00:00
|
|
|
with lib;
|
|
|
|
with x;
|
|
|
|
let
|
|
|
|
cfg = config.module.programs.gui.qutebrowser;
|
|
|
|
frc = lib.mkForce;
|
2024-12-17 12:10:05 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
module.programs.gui.qutebrowser = {
|
|
|
|
enable = mkBool;
|
|
|
|
};
|
|
|
|
};
|
2024-12-09 01:15:55 +00:00
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2024-12-20 13:10:11 +00:00
|
|
|
home.packages = with pkgs; [ python312Packages.adblock ];
|
2024-12-09 01:15:55 +00:00
|
|
|
programs.qutebrowser = True // {
|
|
|
|
settings = {
|
2024-12-20 13:10:11 +00:00
|
|
|
editor.command = [
|
|
|
|
"hx"
|
|
|
|
"{file}"
|
|
|
|
];
|
2024-12-09 01:15:55 +00:00
|
|
|
confirm_quit = [ "downloads" ];
|
|
|
|
scrolling = {
|
|
|
|
bar = "overlay";
|
|
|
|
smooth = true;
|
|
|
|
};
|
|
|
|
statusbar = {
|
|
|
|
show = "in-mode";
|
2024-12-17 12:10:05 +00:00
|
|
|
widgets = [
|
|
|
|
"keypress"
|
|
|
|
"search_match"
|
|
|
|
"url"
|
|
|
|
"tabs"
|
|
|
|
"progress"
|
|
|
|
"scroll"
|
|
|
|
];
|
2024-12-09 01:15:55 +00:00
|
|
|
};
|
|
|
|
tabs = {
|
2024-12-20 13:10:11 +00:00
|
|
|
position = "top";
|
2024-12-09 01:15:55 +00:00
|
|
|
show = "switching";
|
|
|
|
tooltips = false;
|
2024-12-20 13:10:11 +00:00
|
|
|
max_width = 300;
|
|
|
|
min_width = 300;
|
2024-12-09 01:15:55 +00:00
|
|
|
title = {
|
2024-12-20 13:10:11 +00:00
|
|
|
format = "{index}: {current_title}";
|
2024-12-09 01:15:55 +00:00
|
|
|
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}";
|
|
|
|
};
|
|
|
|
};
|
2024-12-20 13:10:11 +00:00
|
|
|
fonts = with config.stylix.fonts; {
|
|
|
|
default_family = mkForce "${monospace.name}";
|
|
|
|
};
|
2024-12-09 01:15:55 +00:00
|
|
|
content.blocking.enabled = true;
|
2024-12-20 13:10:11 +00:00
|
|
|
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={}";
|
2024-12-09 01:15:55 +00:00
|
|
|
};
|
|
|
|
greasemonkey = with pkgs; [
|
|
|
|
(fetchurl {
|
2024-12-17 12:10:05 +00:00
|
|
|
url = "https://raw.githubusercontent.com/afreakk/greasemonkeyscripts/refs/heads/master/youtube_sponsorblock.js";
|
2024-12-09 01:15:55 +00:00
|
|
|
sha256 = "sha256-nwNade1oHP+w5LGUPJSgAX1+nQZli4Rhe8FFUoF5mLE=";
|
|
|
|
})
|
|
|
|
(fetchurl {
|
2024-12-17 12:10:05 +00:00
|
|
|
url = "https://raw.githubusercontent.com/afreakk/greasemonkeyscripts/refs/heads/master/youtube_adblock.js";
|
2024-12-09 01:15:55 +00:00
|
|
|
sha256 = "sha256-AyD9VoLJbKPfqmDEwFIEBMl//EIV/FYnZ1+ona+VU9c=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|