From c8995031cd6e4abb4284c2d4272d38a1c7e0bafe Mon Sep 17 00:00:00 2001 From: Anomalocaridid <29845794+Anomalocaridid@users.noreply.github.com> Date: Tue, 9 Apr 2024 17:08:48 -0400 Subject: [PATCH] fixup! feat(home-manager): init mpv module --- _sources/generated.json | 8 ++++---- _sources/generated.nix | 8 ++++---- modules/home-manager/mpv.nix | 21 ++------------------- 3 files changed, 10 insertions(+), 27 deletions(-) diff --git a/_sources/generated.json b/_sources/generated.json index 469fbe59..659fd6d1 100644 --- a/_sources/generated.json +++ b/_sources/generated.json @@ -281,7 +281,7 @@ }, "mpv": { "cargoLocks": null, - "date": "2024-01-17", + "date": "2024-04-09", "extract": null, "name": "mpv", "passthru": null, @@ -293,11 +293,11 @@ "name": null, "owner": "catppuccin", "repo": "mpv", - "rev": "77dac62e40b957968cb22c430e3ad2c676d02e38", - "sha256": "sha256-vRLo8bKy8O3WvuX9IWy5lrTGkOrgZifQtxDFOScnP3Y=", + "rev": "db31f00b5107320f8882eb8c727060d5eab702c9", + "sha256": "sha256-QxPUjd2Y4FpvEg2aYrKkJVkLNfYtESryY+w5NNMUMZc=", "type": "github" }, - "version": "77dac62e40b957968cb22c430e3ad2c676d02e38" + "version": "db31f00b5107320f8882eb8c727060d5eab702c9" }, "neovim": { "cargoLocks": null, diff --git a/_sources/generated.nix b/_sources/generated.nix index fafc353c..435b387a 100644 --- a/_sources/generated.nix +++ b/_sources/generated.nix @@ -171,15 +171,15 @@ }; mpv = { pname = "mpv"; - version = "77dac62e40b957968cb22c430e3ad2c676d02e38"; + version = "db31f00b5107320f8882eb8c727060d5eab702c9"; src = fetchFromGitHub { owner = "catppuccin"; repo = "mpv"; - rev = "77dac62e40b957968cb22c430e3ad2c676d02e38"; + rev = "db31f00b5107320f8882eb8c727060d5eab702c9"; fetchSubmodules = false; - sha256 = "sha256-vRLo8bKy8O3WvuX9IWy5lrTGkOrgZifQtxDFOScnP3Y="; + sha256 = "sha256-QxPUjd2Y4FpvEg2aYrKkJVkLNfYtESryY+w5NNMUMZc="; }; - date = "2024-01-17"; + date = "2024-04-09"; }; neovim = { pname = "neovim"; diff --git a/modules/home-manager/mpv.nix b/modules/home-manager/mpv.nix index f2e1213d..a02fc646 100644 --- a/modules/home-manager/mpv.nix +++ b/modules/home-manager/mpv.nix @@ -6,8 +6,7 @@ let cfg = config.programs.mpv.catppuccin; enable = cfg.enable && config.programs.mpv.enable; - palette = (lib.importJSON "${sources.palette}/palette.json").${cfg.flavour}.colors; - themeDir = sources.mpv + /themes/${cfg.flavour}; + themeDir = sources.mpv + /themes/${cfg.flavour}/${cfg.accent}; in { options.programs.mpv.catppuccin = @@ -18,22 +17,6 @@ in # 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") // rec { - # Convert #RRGGBB into BBGGRR - plot_color = lib.trivial.pipe - palette.${cfg.accent}.hex - [ - # Strip initial # - (color: builtins.substring 1 6 color) - # Split into RR GG BB chunks - (x: builtins.genList - (n: builtins.substring (n * 2) 2 x) 3) - lib.lists.reverseList - lib.strings.concatStrings - ]; - - plot_bg_border_color = plot_color; - }; + scriptOpts.stats = lib.ctp.fromINI (themeDir + "/script-opts/stats.conf"); }; }