Skip to content

Commit

Permalink
feat(home-manager): init mpv module
Browse files Browse the repository at this point in the history
  • Loading branch information
Anomalocaridid committed Apr 9, 2024
1 parent 03b95ca commit e7d7b37
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 0 deletions.
20 changes: 20 additions & 0 deletions _sources/generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,26 @@
},
"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": {
"cargoLocks": null,
"date": "2024-03-05",
Expand Down
12 changes: 12 additions & 0 deletions _sources/generated.nix
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,18 @@
};
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 = {
pname = "neovim";
version = "045e3499d9ec8d84635fb08877ae44fd33f6a38d";
Expand Down
22 changes: 22 additions & 0 deletions modules/home-manager/mpv.nix
Original file line number Diff line number Diff line change
@@ -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");
};
}
4 changes: 4 additions & 0 deletions nvfetcher.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ fetch.github = "catppuccin/mako"
src.git = "https://github.com/catppuccin/micro.git"
fetch.github = "catppuccin/micro"

[mpv]
src.git = "https://github.com/catppuccin/mpv.git"
fetch.github = "catppuccin/mpv"

[neovim]
src.git = "https://github.com/catppuccin/nvim.git"
fetch.github = "catppuccin/nvim"
Expand Down
1 change: 1 addition & 0 deletions test.nix
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ in
kitty = ctpEnable;
lazygit = ctpEnable;
micro = ctpEnable;
mpv = ctpEnable;
neovim = ctpEnable;
starship = ctpEnable;
tmux = ctpEnable;
Expand Down

0 comments on commit e7d7b37

Please sign in to comment.