2023-07-13 09:17:51 -07:00
|
|
|
{ config
|
|
|
|
, lib
|
2023-11-02 10:55:47 -07:00
|
|
|
, pkgs
|
|
|
|
, sources
|
2023-07-13 09:17:51 -07:00
|
|
|
, ...
|
|
|
|
}:
|
2023-04-15 17:22:31 -07:00
|
|
|
let
|
2024-05-13 10:59:12 -07:00
|
|
|
inherit (lib) ctp mkOption types concatStrings;
|
2023-04-15 17:22:31 -07:00
|
|
|
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
|
|
|
|
2023-11-02 10:55:47 -07:00
|
|
|
plugin =
|
|
|
|
# TODO @getchoo: upstream this in nixpkgs
|
|
|
|
pkgs.tmuxPlugins.mkTmuxPlugin {
|
2023-04-15 17:22:31 -07:00
|
|
|
pluginName = "catppuccin";
|
2023-11-02 10:55:47 -07:00
|
|
|
version = builtins.substring 0 7 sources.tmux.rev;
|
|
|
|
src = sources.tmux;
|
2023-04-15 17:22:31 -07:00
|
|
|
};
|
2023-04-18 17:01:16 -07:00
|
|
|
in
|
|
|
|
{
|
2023-04-17 09:44:07 -07:00
|
|
|
options.programs.tmux.catppuccin =
|
2024-05-13 10:59:12 -07:00
|
|
|
ctp.mkCatppuccinOpt "tmux"
|
|
|
|
// {
|
|
|
|
extraConfig = mkOption {
|
|
|
|
type = types.lines;
|
|
|
|
description = "Additional configuration for the catppuccin plugin.";
|
|
|
|
default = "";
|
|
|
|
example = ''
|
|
|
|
set -g @catppuccin_status_modules_right "application session user host date_time"
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
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;
|
2024-05-13 10:59:12 -07:00
|
|
|
extraConfig = concatStrings [
|
|
|
|
''
|
|
|
|
set -g @catppuccin_flavour '${cfg.flavour}'
|
|
|
|
''
|
|
|
|
cfg.extraConfig
|
|
|
|
];
|
2023-04-15 17:22:31 -07:00
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|