feat: flavours colorscheme

This commit is contained in:
2024-04-07 17:05:31 +02:00
parent 136cf83105
commit 040515003f
6 changed files with 104 additions and 6 deletions

View File

@@ -1 +1,4 @@
{ ... }: { }
{ ... }:
{
theme.base16.enable = true;
}

View File

@@ -1,7 +1,5 @@
{
username,
desktop,
stateVersion,
osConfig,
inputs,
...
@@ -18,7 +16,9 @@
inputs.anyrun.homeManagerModules.default
./clean-home-dir.nix
./programs/neovide.nix
# ./default-apps.nix
./theme
./packages
./programs
./services

View File

@@ -6,8 +6,6 @@
symbol_map U+23FB-U+23FE,U+2665,U+26A1,U+2B58,U+E000-U+E00A,U+E0A0-U+E0A3,U+E0B0-U+E0D4,U+E200-U+E2A9,U+E300-U+E3E3,U+E5FA-U+E6AA,U+E700-U+E7C5,U+EA60-U+EBEB,U+F000-U+F2E0,U+F300-U+F32F,U+F400-U+F4A9,U+F500-U+F8FF,U+F0001-U+F1AF0 Symbols Nerd Font Mono
font_size 13
include ./current-theme.conf
'';
settings = {
background_opacity = "0.8";

View File

@@ -0,0 +1,37 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.theme.base16;
in
{
imports = [ ./integrations/kitty ];
options.theme.base16 = {
enable = mkEnableOption "Enable a global base16 theme";
options = {
shell = mkOption {
type = types.string;
default = "bash -c '{}'";
};
items = mkOption {
type = types.listOf types.attrs;
default = [ ];
};
};
};
config = mkIf cfg.enable {
home.packages = with pkgs; [ flavours ];
xdg.configFile."flavours/config.toml".source =
(pkgs.formats.toml { }).generate "config.toml"
cfg.options;
};
}

View File

@@ -0,0 +1,35 @@
# Base16 {{scheme-name}} - kitty color config
# Scheme by {{scheme-author}}
background #{{base00-hex}}
foreground #{{base05-hex}}
selection_background #{{base05-hex}}
selection_foreground #{{base00-hex}}
url_color #{{base04-hex}}
cursor #{{base05-hex}}
active_border_color #{{base03-hex}}
inactive_border_color #{{base01-hex}}
active_tab_background #{{base00-hex}}
active_tab_foreground #{{base05-hex}}
inactive_tab_background #{{base01-hex}}
inactive_tab_foreground #{{base04-hex}}
tab_bar_background #{{base01-hex}}
# normal
color0 #{{base00-hex}}
color1 #{{base08-hex}}
color2 #{{base0B-hex}}
color3 #{{base0A-hex}}
color4 #{{base0D-hex}}
color5 #{{base0E-hex}}
color6 #{{base0C-hex}}
color7 #{{base05-hex}}
# bright
color8 #{{base03-hex}}
color9 #{{base09-hex}}
color10 #{{base01-hex}}
color11 #{{base02-hex}}
color12 #{{base04-hex}}
color13 #{{base06-hex}}
color14 #{{base0F-hex}}
color15 #{{base07-hex}}

View File

@@ -0,0 +1,25 @@
{ config, lib, ... }:
with lib;
let
cfg = config.theme.base16;
in
{
config = mkIf cfg.enable {
programs.kitty.extraConfig = ''
include ./current-theme.conf
'';
xdg.configFile."flavours/templates/kitty/templates/default.mustache".source = ./default.mustache;
theme.base16.options.items = [
{
file = "${config.xdg.configHome}/kitty/current-theme.conf";
template = "kitty";
hook = "kill -SIGUSR1 $(pgrep kitty)";
rewrite = true;
}
];
};
}