1
0
Fork 0
mirror of https://git.sr.ht/~neverness/ultima synced 2025-01-10 09:53:52 +00:00
ultima/modules/home/programs/gui/qutebrowser/default.nix

78 lines
1.9 KiB
Nix

{
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 {
programs.qutebrowser = True // {
keyBindings = {
normal = {
xb = "config-cycle statusbar.show always never";
xt = "config-cycle tabs.show always never";
xx = "config-cycle statusbar.show always never;; config-cycle tabs.show always never";
};
};
settings = {
confirm_quit = [ "downloads" ];
scrolling = {
bar = "overlay";
smooth = true;
};
statusbar = {
show = "in-mode";
widgets = [
"keypress"
"search_match"
"url"
"tabs"
"progress"
"scroll"
];
};
tabs = {
show = "switching";
tooltips = false;
title = {
format = "{audio}{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}";
};
};
content.blocking.enabled = true;
};
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=";
})
];
};
};
}