Home: Rename home/modules to home/homemodules
This commit is contained in:
193
home/homemodules/qutebrowser/colors.nix
Normal file
193
home/homemodules/qutebrowser/colors.nix
Normal file
@ -0,0 +1,193 @@
|
||||
{color}: {
|
||||
webpage.darkmode.enabled = true;
|
||||
|
||||
completion = {
|
||||
## Background color of the completion widget category headers.
|
||||
category.bg = color.hexS.base;
|
||||
category.fg = color.hexS.accent;
|
||||
|
||||
## Bottom border color of the completion widget category headers.
|
||||
category.border.top = color.hexS.base;
|
||||
category.border.bottom = color.hexS.accent;
|
||||
|
||||
## Background color of the completion widget for even and odd rows.
|
||||
even.bg = color.hexS.base;
|
||||
odd.bg = color.hexS.base;
|
||||
|
||||
## Text color of the completion widget.
|
||||
fg = color.hexS.text;
|
||||
|
||||
# Selected item color + border
|
||||
item.selected.bg = color.hexS.accent;
|
||||
item.selected.fg = color.hexS.accentText;
|
||||
item.selected.border.bottom = color.hexS.surface2;
|
||||
item.selected.border.top = color.hexS.surface2;
|
||||
|
||||
## Foreground color of the selected completion item.
|
||||
item.selected.match.fg = color.hexS.accentText;
|
||||
|
||||
## Foreground color of the matched text in the completion.
|
||||
match.fg = color.hexS.accent;
|
||||
|
||||
## Color of the scrollbar in completion view
|
||||
scrollbar.bg = color.hexS.base;
|
||||
scrollbar.fg = color.hexS.accent;
|
||||
};
|
||||
|
||||
downloads = {
|
||||
bar.bg = color.hexS.base;
|
||||
|
||||
error.bg = color.hexS.base;
|
||||
error.fg = color.hexS.red;
|
||||
|
||||
# Color gradient
|
||||
start.bg = color.hexS.base;
|
||||
start.fg = color.hexS.blue;
|
||||
stop.bg = color.hexS.base;
|
||||
stop.fg = color.hexS.green;
|
||||
|
||||
# Set to "none" to disable gradient, otherwise "rgb"
|
||||
system.fg = "none";
|
||||
system.bg = "none";
|
||||
};
|
||||
|
||||
hints = {
|
||||
## Background color for hints. Note that you can use a `rgba(...)` value
|
||||
## for transparency.
|
||||
bg = color.hexS.accentDim;
|
||||
fg = color.hexS.accentText;
|
||||
|
||||
## Font color for the matched part of hints.
|
||||
match.fg = color.hexS.accent;
|
||||
};
|
||||
|
||||
keyhint = {
|
||||
## Background color of the keyhint widget.
|
||||
bg = color.hexS.accentDim;
|
||||
fg = color.hexS.accentText;
|
||||
|
||||
## Highlight color for keys to complete the current keychain.
|
||||
suffix.fg = color.hexS.accent;
|
||||
};
|
||||
|
||||
messages = {
|
||||
## Background color of an error message.
|
||||
error.bg = color.hexS.base;
|
||||
error.fg = color.hexS.red;
|
||||
error.border = color.hexS.red;
|
||||
|
||||
## Background color of an info message.
|
||||
info.bg = color.hexS.base;
|
||||
info.fg = color.hexS.blue;
|
||||
info.border = color.hexS.blue;
|
||||
|
||||
## Background color of a warning message.
|
||||
warning.bg = color.hexS.base;
|
||||
warning.fg = color.hexS.yellow;
|
||||
warning.border = color.hexS.yellow;
|
||||
};
|
||||
|
||||
prompts = {
|
||||
## Background color for prompts.
|
||||
bg = color.hexS.base;
|
||||
fg = color.hexS.text;
|
||||
|
||||
# ## Border used around UI elements in prompts.
|
||||
border = "1px solid " + color.hexS.overlay0;
|
||||
|
||||
## Background color for the selected item in filename prompts.
|
||||
selected.bg = color.hexS.accent;
|
||||
selected.fg = color.hexS.accentText;
|
||||
};
|
||||
|
||||
statusbar = {
|
||||
## Background color of the statusbar.
|
||||
normal.bg = color.hexS.base;
|
||||
normal.fg = color.hexS.text;
|
||||
|
||||
## Background color of the statusbar in insert mode.
|
||||
insert.bg = color.hexS.green;
|
||||
insert.fg = color.hexS.accentText;
|
||||
|
||||
## Background color of the statusbar in command mode.
|
||||
command.bg = color.hexS.peach;
|
||||
command.fg = color.hexS.accentText;
|
||||
|
||||
## Background color of the statusbar in caret mode.
|
||||
caret.bg = color.hexS.blue;
|
||||
caret.fg = color.hexS.accentText;
|
||||
|
||||
## Background color of the statusbar in caret mode with a selection.
|
||||
caret.selection.bg = color.hexS.blue;
|
||||
caret.selection.fg = color.hexS.accentText;
|
||||
|
||||
## Background color of the progress bar.
|
||||
progress.bg = color.hexS.base;
|
||||
|
||||
## Background color of the statusbar in passthrough mode.
|
||||
passthrough.bg = color.hexS.red;
|
||||
passthrough.fg = color.hexS.accentText;
|
||||
|
||||
## Default foreground color of the URL in the statusbar.
|
||||
# NOTE: The colors will be barely legible in different modes,
|
||||
# but currently we can't change url color per mode...
|
||||
url.fg = color.hexS.text;
|
||||
url.warn.fg = color.hexS.yellow;
|
||||
url.error.fg = color.hexS.red;
|
||||
url.hover.fg = color.hexS.sky;
|
||||
url.success.http.fg = color.hexS.red;
|
||||
url.success.https.fg = color.hexS.green;
|
||||
|
||||
## PRIVATE MODE COLORS
|
||||
## Background color of the statusbar in private browsing mode.
|
||||
private.bg = color.hexS.teal;
|
||||
private.fg = color.hexS.accentText;
|
||||
|
||||
## Background color of the statusbar in private browsing + command mode.
|
||||
command.private.bg = color.hexS.peach;
|
||||
command.private.fg = color.hexS.accentText;
|
||||
};
|
||||
|
||||
tabs = {
|
||||
## Background color of the tab bar.
|
||||
bar.bg = color.hexS.base;
|
||||
|
||||
# ## Background color of selected even tabs.
|
||||
selected.even.bg = color.hexS.accent;
|
||||
selected.even.fg = color.hexS.accentText;
|
||||
|
||||
# ## Background color of selected odd tabs.
|
||||
selected.odd.bg = color.hexS.accent;
|
||||
selected.odd.fg = color.hexS.accentText;
|
||||
|
||||
## Background color of unselected even tabs.
|
||||
even.bg = color.hexS.base;
|
||||
even.fg = color.hexS.accent;
|
||||
|
||||
## Background color of unselected odd tabs.
|
||||
odd.bg = color.hexS.base;
|
||||
odd.fg = color.hexS.accent;
|
||||
|
||||
## Color for the tab indicator on errors.
|
||||
indicator.error = color.hexS.red;
|
||||
|
||||
## Color gradient interpolation system for the tab indicator.
|
||||
## Valid values:
|
||||
## - rgb: Interpolate in the RGB color system.
|
||||
## - hsv: Interpolate in the HSV color system.
|
||||
## - hsl: Interpolate in the HSL color system.
|
||||
## - none: Don't show a gradient.
|
||||
indicator.system = "none";
|
||||
};
|
||||
|
||||
contextmenu = {
|
||||
menu.bg = color.hexS.base;
|
||||
menu.fg = color.hexS.accent;
|
||||
|
||||
disabled.bg = color.hexS.base;
|
||||
disabled.fg = color.hexS.text;
|
||||
|
||||
selected.bg = color.hexS.accent;
|
||||
selected.fg = color.hexS.accentText;
|
||||
};
|
||||
}
|
||||
181
home/homemodules/qutebrowser/default.nix
Normal file
181
home/homemodules/qutebrowser/default.nix
Normal file
@ -0,0 +1,181 @@
|
||||
{
|
||||
config,
|
||||
nixosConfig,
|
||||
lib,
|
||||
mylib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.modules) qutebrowser color;
|
||||
in {
|
||||
options.modules.qutebrowser = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
config = lib.mkIf qutebrowser.enable {
|
||||
programs.qutebrowser = {
|
||||
enable = true;
|
||||
loadAutoconfig = true; # Load settings set from GUI
|
||||
|
||||
# TODO: Find a unified version for qutebrowser + firefox (+ other browers ideally)
|
||||
quickmarks = let
|
||||
# Use this function to keep the quickmarks (almost) compatible with the firefox bookmarks
|
||||
mkBm = name: value: {
|
||||
${name} = value;
|
||||
};
|
||||
in
|
||||
lib.mergeAttrsList [
|
||||
(mkBm "Package Search" "https://search.nixos.org/packages")
|
||||
(mkBm "Option Search" "https://search.nixos.org/options?")
|
||||
(mkBm "Function Search" "https://noogle.dev/")
|
||||
(mkBm "HM Search" "https://mipmip.github.io/home-manager-option-search/")
|
||||
(mkBm "NUR Search" "https://nur.nix-community.org/")
|
||||
(mkBm "Nixpkgs Version Search" "https://lazamar.co.uk/nix-versions/")
|
||||
(mkBm "Nixpkgs PR Tracker" "https://nixpk.gs/pr-tracker.html")
|
||||
(mkBm "NixOS Wiki" "https://wiki.nixos.org/wiki/NixOS_Wiki")
|
||||
(mkBm "Nixpkgs Issues" "https://github.com/NixOS/nixpkgs/issues")
|
||||
(mkBm "Nixpkgs Manual" "https://nixos.org/manual/nixpkgs/unstable/")
|
||||
(mkBm "NixOS Manual" "https://nixos.org/manual/nixos/unstable/")
|
||||
(mkBm "Nix Manual" "https://nix.dev/manual/nix/stable/")
|
||||
(mkBm "Searchix" "https://searchix.ovh/")
|
||||
(mkBm "Latest" "https://discourse.nixos.org/latest")
|
||||
|
||||
(mkBm "LAN Smart Switch" "http://192.168.86.2/")
|
||||
(mkBm "WiFi Access Point" "http://192.168.86.3/")
|
||||
(mkBm "OPNsense" "https://192.168.86.5/")
|
||||
(mkBm "Synology DS223j" "https://synology.think.chriphost.de/")
|
||||
(mkBm "PVE Direct" "https://192.168.86.4:8006/#v1:0:18:4:::::::")
|
||||
(mkBm "PVF Direct" "https://192.168.86.13:8006/#v1:0:18:4:::::::")
|
||||
(mkBm "Portainer" "https://portainer.think.chriphost.de/")
|
||||
(mkBm "Local NGINX" "https://nginx.local.chriphost.de/")
|
||||
(mkBm "Think NGINX" "https://nginx.think.chriphost.de/")
|
||||
(mkBm "VPS NGINX" "http://vps.chriphost.de:51810/")
|
||||
(mkBm "WUD ServeNix" "https://update.local.chriphost.de/")
|
||||
(mkBm "WUD ThinkNix" "https://update.think.chriphost.de/")
|
||||
|
||||
(mkBm "Cloud" "https://nextcloud.local.chriphost.de/apps/files/files")
|
||||
(mkBm "Immich" "https://immich.local.chriphost.de/photos")
|
||||
(mkBm "Jelly" "https://jellyfin.local.chriphost.de/web/#/home.html")
|
||||
(mkBm "HASS" "https://hass.think.chriphost.de/lovelace")
|
||||
(mkBm "Docs" "https://paperless.local.chriphost.de/documents?sort=created&reverse=1&page=1")
|
||||
(mkBm "Gitea" "https://gitea.local.chriphost.de/christoph")
|
||||
# (mkBm "Chat" "http://localhost:11435/") # Local WebUI
|
||||
|
||||
(mkBm "C++Ref" "https://en.cppreference.com/w/")
|
||||
(mkBm "Rust" "https://doc.rust-lang.org/stable/book/ch03-00-common-programming-concepts.html")
|
||||
(mkBm "RustOS" "https://os.phil-opp.com/")
|
||||
(mkBm "Interpreters" "https://craftinginterpreters.com/contents.html")
|
||||
|
||||
(mkBm "Mistral Chat" "https://chat.mistral.ai/chat")
|
||||
(mkBm "DeepSeek Chat" "https://chat.deepseek.com/")
|
||||
(mkBm "Claude Chat" "https://claude.ai/new")
|
||||
(mkBm "ChatGPT" "https://chatgpt.com/")
|
||||
(mkBm "DeepWiki" "https://deepwiki.com/")
|
||||
(mkBm "Mistral API" "https://console.mistral.ai/usage")
|
||||
(mkBm "DeepSeek API" "https://platform.deepseek.com/usage")
|
||||
(mkBm "Claude API" "https://console.anthropic.com/usage")
|
||||
(mkBm "OpenRouter API" "https://openrouter.ai/activity")
|
||||
|
||||
(mkBm "GH" "https://github.com/churl")
|
||||
(mkBm "GL" "https://gitlab.com/churl")
|
||||
(mkBm "SO" "https://stackoverflow.com/users/saves/17337508/all")
|
||||
(mkBm "RegEx" "https://regex101.com/")
|
||||
(mkBm "Shell" "https://explainshell.com/")
|
||||
(mkBm "CDecl" "https://cdecl.org/")
|
||||
(mkBm "ECR" "https://gallery.ecr.aws/")
|
||||
(mkBm "Chmod" "https://chmod-calculator.com/")
|
||||
|
||||
(mkBm "Spiegel" "https://www.spiegel.de/")
|
||||
(mkBm "Heise" "https://www.heise.de/")
|
||||
(mkBm "HN" "https://news.ycombinator.com/news")
|
||||
(mkBm "Reddit" "https://www.reddit.com/user/FightingMushroom/saved/")
|
||||
(mkBm "F10" "https://f10.local.chriphost.de/race/Everyone")
|
||||
(mkBm "F11" "https://f11.local.chriphost.de/racepicks")
|
||||
(mkBm "F11PB" "https://f11pb.local.chriphost.de/_/#/collections?collection=pbc_1736455494&filter=&sort=-%40rowid")
|
||||
(mkBm "ISBNDB" "https://isbndb.com/")
|
||||
(mkBm "Music" "https://bandcamp.com/chriphost")
|
||||
(mkBm "Albums" "https://www.albumoftheyear.org/user/chriphost/list/307966/2025/")
|
||||
];
|
||||
|
||||
# TODO: Find a unified version for qutebrowser + firefox (+ other browsers ideally)
|
||||
searchEngines = {
|
||||
DEFAULT = "https://kagi.com/search?q={}";
|
||||
k = "https://kagi.com/search?q={}";
|
||||
w = "https://en.wikipedia.org/wiki/Special:Search?search={}";
|
||||
np = "https://searchix.ovh/?query={}";
|
||||
nf = "https://noogle.dev/q?term={}";
|
||||
nw = "https://wiki.nixos.org/index.php?search={}";
|
||||
aw = "https://wiki.archlinux.org/?search={}";
|
||||
i = "https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue%20{}";
|
||||
gh = "https://github.com/search?q={}&type=repositories";
|
||||
g = "https://www.google.com/search?hl=en&q={}";
|
||||
};
|
||||
|
||||
# greasemonkey = [];
|
||||
|
||||
# Map keys to other keys
|
||||
# keyMappings = {};
|
||||
|
||||
# Map keys to commands
|
||||
# keyBindings = {
|
||||
# normal = {
|
||||
# "<Ctrl-v>" = "spawn mpv {url}";
|
||||
# ",p" = "spawn --userscript qute-pass";
|
||||
# ",l" = ''config-cycle spellcheck.languages ["en-GB"] ["en-US"]'';
|
||||
# "<F1>" = lib.mkMerge [
|
||||
# "config-cycle tabs.show never always"
|
||||
# "config-cycle statusbar.show in-mode always"
|
||||
# "config-cycle scrolling.bar never always"
|
||||
# ];
|
||||
# };
|
||||
# prompt = {
|
||||
# "<Ctrl-y>" = "prompt-yes";
|
||||
# };
|
||||
# };
|
||||
enableDefaultBindings = true;
|
||||
|
||||
settings = {
|
||||
# Theme
|
||||
colors = import ./colors.nix {inherit color;};
|
||||
fonts = {
|
||||
default_family = color.font;
|
||||
default_size = "12pt";
|
||||
web.family.fixed = color.font;
|
||||
};
|
||||
hints.border = "1px solid " + color.hexS.mantle;
|
||||
|
||||
# Settings
|
||||
auto_save.session = true;
|
||||
changelog_after_upgrade = "minor";
|
||||
completion.height = "33%";
|
||||
content = {
|
||||
autoplay = true;
|
||||
blocking.enabled = true;
|
||||
blocking.method = "auto"; # "auto", "adblock", "hosts", "both"
|
||||
dns_prefetch = true;
|
||||
};
|
||||
editor.command = ["neovide" "{file}" "--" "normal {line}G{column0}l"];
|
||||
# TODO: termfilechooser, also for downloads (those are separate)
|
||||
# fileselect = {
|
||||
# handler = "external";
|
||||
# folder.command = [];
|
||||
# multiple_files.command = [];
|
||||
# single_file.command = [];
|
||||
# };
|
||||
input.media_keys = false;
|
||||
prompt.radius = 6;
|
||||
scrolling.smooth = true;
|
||||
session.lazy_restore = true;
|
||||
tabs.position = "right";
|
||||
url = {
|
||||
default_page = "about:blank";
|
||||
open_base_url = true;
|
||||
start_pages = ["https://kagi.com"];
|
||||
};
|
||||
};
|
||||
|
||||
# Same keys as qutebrowser.settings, but per domain
|
||||
# perDomainSettings = {
|
||||
# "github.com".colors.webpage.darkmode.enabled = false;
|
||||
# };
|
||||
};
|
||||
};
|
||||
}
|
||||
7
home/homemodules/qutebrowser/options.nix
Normal file
7
home/homemodules/qutebrowser/options.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
lib,
|
||||
mylib,
|
||||
...
|
||||
}: {
|
||||
enable = lib.mkEnableOption "TEMPLATE";
|
||||
}
|
||||
Reference in New Issue
Block a user