feat(home-manager): init mpv module (#95)

This commit is contained in:
Anomalocaridid 2024-04-18 17:55:19 -04:00 committed by GitHub
parent ef26304aa1
commit f9d03f81f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 59 additions and 0 deletions

View file

@ -439,6 +439,26 @@
}, },
"version": "ed8ef015f97c357575b5013e18042c9faa6c068a" "version": "ed8ef015f97c357575b5013e18042c9faa6c068a"
}, },
"mpv": {
"cargoLocks": null,
"date": "2024-04-09",
"extract": null,
"name": "mpv",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"owner": "catppuccin",
"repo": "mpv",
"rev": "db31f00b5107320f8882eb8c727060d5eab702c9",
"sha256": "sha256-QxPUjd2Y4FpvEg2aYrKkJVkLNfYtESryY+w5NNMUMZc=",
"type": "github"
},
"version": "db31f00b5107320f8882eb8c727060d5eab702c9"
},
"neovim": { "neovim": {
"cargoLocks": null, "cargoLocks": null,
"date": "2024-03-29", "date": "2024-03-29",

View file

@ -265,6 +265,18 @@
}; };
date = "2022-09-27"; date = "2022-09-27";
}; };
mpv = {
pname = "mpv";
version = "db31f00b5107320f8882eb8c727060d5eab702c9";
src = fetchFromGitHub {
owner = "catppuccin";
repo = "mpv";
rev = "db31f00b5107320f8882eb8c727060d5eab702c9";
fetchSubmodules = false;
sha256 = "sha256-QxPUjd2Y4FpvEg2aYrKkJVkLNfYtESryY+w5NNMUMZc=";
};
date = "2024-04-09";
};
neovim = { neovim = {
pname = "neovim"; pname = "neovim";
version = "aebe43db9cb26e1c70fc5b2fd4158169c405e720"; version = "aebe43db9cb26e1c70fc5b2fd4158169c405e720";

View file

@ -0,0 +1,22 @@
{ config
, lib
, sources
, ...
}:
let
cfg = config.programs.mpv.catppuccin;
enable = cfg.enable && config.programs.mpv.enable;
themeDir = sources.mpv + /themes/${cfg.flavour}/${cfg.accent};
in
{
options.programs.mpv.catppuccin =
lib.ctp.mkCatppuccinOpt "mpv" // {
accent = lib.ctp.mkAccentOpt "mpv";
};
# Note that the theme is defined across multiple files
config.programs.mpv = lib.mkIf enable {
config = lib.ctp.fromINI (themeDir + "/mpv.conf");
scriptOpts.stats = lib.ctp.fromINI (themeDir + "/script-opts/stats.conf");
};
}

View file

@ -86,6 +86,10 @@ fetch.github = "catppuccin/mako"
src.git = "https://github.com/catppuccin/micro.git" src.git = "https://github.com/catppuccin/micro.git"
fetch.github = "catppuccin/micro" fetch.github = "catppuccin/micro"
[mpv]
src.git = "https://github.com/catppuccin/mpv.git"
fetch.github = "catppuccin/mpv"
[neovim] [neovim]
src.git = "https://github.com/catppuccin/nvim.git" src.git = "https://github.com/catppuccin/nvim.git"
fetch.github = "catppuccin/nvim" fetch.github = "catppuccin/nvim"

View file

@ -78,6 +78,7 @@ in
kitty = ctpEnable; kitty = ctpEnable;
lazygit = ctpEnable; lazygit = ctpEnable;
micro = ctpEnable; micro = ctpEnable;
mpv = ctpEnable;
neovim = ctpEnable; neovim = ctpEnable;
rio = ctpEnable; rio = ctpEnable;
rofi = ctpEnable; rofi = ctpEnable;