2023-07-13 09:17:51 -07:00
|
|
|
{ config
|
|
|
|
, pkgs
|
|
|
|
, lib
|
|
|
|
, ...
|
|
|
|
}:
|
2023-04-15 17:22:31 -07:00
|
|
|
let
|
|
|
|
cfg = config.programs.tmux.catppuccin;
|
2023-07-13 09:17:51 -07:00
|
|
|
enable = cfg.enable && config.programs.tmux.enable;
|
2023-04-15 17:22:31 -07:00
|
|
|
|
|
|
|
plugin = with builtins;
|
2023-07-13 09:17:51 -07:00
|
|
|
with pkgs; let
|
|
|
|
rev = "4e48b09a76829edc7b55fbb15467cf0411f07931";
|
|
|
|
in
|
|
|
|
tmuxPlugins.mkTmuxPlugin {
|
2023-04-15 17:22:31 -07:00
|
|
|
pluginName = "catppuccin";
|
|
|
|
version = substring 0 7 rev;
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "catppuccin";
|
|
|
|
repo = "tmux";
|
|
|
|
inherit rev;
|
|
|
|
sha256 = "sha256-bXEsxt4ozl3cAzV3ZyvbPsnmy0RAdpLxHwN82gvjLdU=";
|
|
|
|
};
|
|
|
|
};
|
2023-04-18 17:01:16 -07:00
|
|
|
in
|
|
|
|
{
|
2023-04-17 09:44:07 -07:00
|
|
|
options.programs.tmux.catppuccin =
|
|
|
|
lib.ctp.mkCatppuccinOpt "tmux" config;
|
2023-04-15 17:22:31 -07:00
|
|
|
|
2023-07-13 09:17:51 -07:00
|
|
|
config.programs.tmux.plugins = lib.mkIf enable [
|
2023-04-15 17:22:31 -07:00
|
|
|
{
|
|
|
|
inherit plugin;
|
|
|
|
extraConfig = "set -g @catppuccin_flavour '${cfg.flavour}'";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|