feat(tmux): Catppuccin -> Rose Pine
Some checks are pending
CI / Format Nix files (push) Waiting to run
CI / Test Modules (push) Waiting to run
CI / Validate sources (push) Waiting to run
Release / Publish to Flake registries (push) Blocked by required conditions
Release / Make release (push) Waiting to run
Build & deploy website / Build site (push) Waiting to run
Build & deploy website / Deploy website (push) Blocked by required conditions

This commit is contained in:
punkfairie 2024-10-20 13:12:44 -07:00
parent 2fbe5e2779
commit 9947d603d0
Signed by: punkfairie
GPG key ID: 01823C057725C266
2 changed files with 19 additions and 45 deletions

View file

@ -360,18 +360,6 @@
"url": "https://github.com/rose-pine/tm-theme/archive/c4235f9a65fd180ac0f5e4396e3a86e21a0884ec.tar.gz", "url": "https://github.com/rose-pine/tm-theme/archive/c4235f9a65fd180ac0f5e4396e3a86e21a0884ec.tar.gz",
"hash": "19k0r1mrhqhlf1xfzvd1q8ihpic86f84kbmgy0m314w3w9cbqf4f" "hash": "19k0r1mrhqhlf1xfzvd1q8ihpic86f84kbmgy0m314w3w9cbqf4f"
}, },
"tmux": {
"type": "Git",
"repository": {
"type": "GitHub",
"owner": "catppuccin",
"repo": "tmux"
},
"branch": "main",
"revision": "1612a23174a6771ac466312eb156f83b8b89d907",
"url": "https://github.com/catppuccin/tmux/archive/1612a23174a6771ac466312eb156f83b8b89d907.tar.gz",
"hash": "0mrj9kasry1csfh24gpdh713ha3ia2vfljjd81kw40rg1nn58g4d"
},
"tofi": { "tofi": {
"type": "Git", "type": "Git",
"repository": { "repository": {
@ -434,4 +422,5 @@
} }
}, },
"version": 3 "version": 3
} }

View file

@ -3,44 +3,29 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: let
let cfg = config.programs.tmux.rose-pine;
inherit (lib)
ctp
mkOption
types
concatStrings
;
inherit (config.catppuccin) sources;
cfg = config.programs.tmux.catppuccin;
enable = cfg.enable && config.programs.tmux.enable; enable = cfg.enable && config.programs.tmux.enable;
in {
plugin = options.programs.tmux.rose-pine =
# TODO @getchoo: upstream this in nixpkgs lib.rp.mkRosePineOpt {name = "tmux";}
pkgs.tmuxPlugins.mkTmuxPlugin { // {
pluginName = "catppuccin"; extraConfig = lib.mkOption {
version = builtins.substring 0 7 sources.tmux.revision; type = lib.types.lines;
src = sources.tmux; description = "Additional configuration for the rose-pine plugin.";
default = "";
example = ''
set -g @rose-pine "application session user host date_time"
'';
};
}; };
in
{
options.programs.tmux.catppuccin = ctp.mkCatppuccinOpt { name = "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"
'';
};
};
config.programs.tmux.plugins = lib.mkIf enable [ config.programs.tmux.plugins = lib.mkIf enable [
{ {
inherit plugin; plugin = pkgs.tmuxPlugins.rose-pine;
extraConfig = concatStrings [ extraConfig = lib.concatStrings [
'' ''
set -g @catppuccin_flavor '${cfg.flavor}' set -g @rose_pine_variant '${cfg.flavor}'
'' ''
cfg.extraConfig cfg.extraConfig
]; ];