nixos-config/user/qutebrowser/colors.nix

262 lines
5.6 KiB
Nix
Raw Normal View History

{
config,
pkgs,
lib,
font,
...
}:
2023-01-26 10:20:56 -03:00
let
inherit (pkgs.uservars)
key
theme
accent
font
browser
;
2023-01-26 10:20:56 -03:00
inherit (theme) color;
in
{
programs.qutebrowser.settings = {
hints.border = "2px solid ${accent.color}";
content.user_stylesheets = "style.css";
colors = {
########################################################
# Tabs
########################################################
tabs =
let
tabs_defaults = {
odd = {
fg = color.txt;
bg = color.bg;
};
even = {
fg = color.txt;
bg = color.bg_dark;
};
selected = {
odd = {
fg = accent.fg;
bg = accent.color;
};
even = {
fg = accent.fg;
bg = accent.color;
};
};
};
in
{
bar = {
bg = color.bg;
};
2023-01-26 10:20:56 -03:00
pinned = tabs_defaults;
}
// tabs_defaults;
2023-01-26 10:20:56 -03:00
########################################################
# Completion for urls and commands
########################################################
completion = {
fg = color.txt;
even = {
bg = color.bg;
};
odd = {
bg = color.bg;
};
scrollbar = {
bg = color.bg_dark;
};
match = {
fg = accent.color;
};
2023-01-26 10:20:56 -03:00
category = {
fg = color.txt;
bg = color.bg_dark;
border = {
top = color.bg_dark;
bottom = color.bg_dark;
};
};
item = {
selected = {
fg = accent.fg;
bg = accent.color;
border = {
top = color.bg_dark;
bottom = color.bg_dark;
};
match = {
fg = color.txt;
};
2023-01-26 10:20:56 -03:00
};
};
};
########################################################
# Statusbar
########################################################
statusbar = {
normal = {
fg = color.txt;
bg = color.bg;
};
insert = {
fg = color.normal.green;
bg = color.bg;
};
passthrough = {
fg = color.normal.blue;
bg = color.bg;
};
command = {
fg = color.txt;
bg = color.bg;
};
caret = {
selection = {
fg = accent.fg;
bg = accent.color;
};
};
url = {
success = {
https = {
fg = color.txt;
};
http = {
fg = color.normal.red;
};
};
hover = {
fg = color.normal.cyan;
2023-01-26 10:20:56 -03:00
};
};
};
########################################################
# Downloads
########################################################
downloads = {
start = {
bg = color.normal.blue;
};
stop = {
bg = color.normal.green;
};
bar = {
bg = color.bg;
};
2023-01-26 10:20:56 -03:00
};
########################################################
# Choice of what element should be clicked
########################################################
hints = {
fg = color.txt;
bg = color.bg;
match = {
fg = accent.color;
};
2023-01-26 10:20:56 -03:00
};
########################################################
# List of what each keybinding does
########################################################
keyhint = {
fg = color.txt;
bg = color.bg;
suffix = {
fg = accent.color;
};
2023-01-26 10:20:56 -03:00
};
########################################################
# Right click menu
########################################################
contextmenu = {
menu = {
fg = color.txt;
bg = color.bg;
};
selected = {
fg = accent.fg;
bg = accent.color;
};
disabled = {
fg = color.bg_light;
};
2023-01-26 10:20:56 -03:00
};
########################################################
# Dark theme
########################################################
# webpage = lib.mkIf (color.type == "dark") {
# bg = color.bg;
# preferred_color_scheme = "dark";
# darkmode = {
# enabled = false;
# threshold = {
# text = 150;
# background = 205;
# };
# };
# };
2023-01-26 10:20:56 -03:00
};
};
home.file = {
".config/qutebrowser/style.css".text = ''
${lib.optionalString (color.type == "dark") ''
button,
input[type="button"] {
color: unset;
background-color: unset;
}
.bg-gradient-to-b,
body {
background-image: none !important;
}
/***************************
* Remove borked ellements *
***************************/
.search-filters-wrap:before, .search-filters-wrap:after {
display: none;
}
''}
/*****************
* Hide some ads *
*****************/
/*Reddit*/
#sr-header-area .redesign-beta-optin,
.link.promotedlink.promoted,
.spacer:empty,
.spacer .premium-banner-outer,
.ad-container,
/*Youtube*/
div#masthead-ad ,
.video-ads,
#player-ads,
ytd-popup-container {
display: none !important;
}
'';
};
}