feat(home-manager): add support for kitty (#19)
This commit is contained in:
parent
8fad8faf87
commit
bdc4336b37
2 changed files with 24 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
./bat.nix
|
./bat.nix
|
||||||
./bottom.nix
|
./bottom.nix
|
||||||
|
./kitty.nix
|
||||||
./starship.nix
|
./starship.nix
|
||||||
./helix.nix
|
./helix.nix
|
||||||
./gtk.nix
|
./gtk.nix
|
||||||
|
|
23
modules/home-manager/kitty.nix
Normal file
23
modules/home-manager/kitty.nix
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
let cfg = config.programs.kitty.catppuccin;
|
||||||
|
in {
|
||||||
|
options.programs.kitty.catppuccin = with lib; {
|
||||||
|
enable = mkEnableOption "Catppuccin theme";
|
||||||
|
flavour = mkOption {
|
||||||
|
type = types.enum [ "latte" "frappe" "macchiato" "mocha" ];
|
||||||
|
default = config.catppuccin.flavour;
|
||||||
|
description = "Catppuccin flavour for kitty";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config.programs.kitty = with lib;
|
||||||
|
let
|
||||||
|
# string -> string
|
||||||
|
# this capitalizes the first letter in a string
|
||||||
|
# it's used to set the theme name correctly here
|
||||||
|
mkUpper = word:
|
||||||
|
(toUpper (substring 0 1 word)) + (substring 1 (stringLength word) word);
|
||||||
|
|
||||||
|
flavourUpper = mkUpper cfg.flavour;
|
||||||
|
in mkIf cfg.enable { theme = "Catppuccin-${flavourUpper}"; };
|
||||||
|
}
|
Loading…
Reference in a new issue