Skip to content

Commit

Permalink
fix(home-manager/mpv): avoid IFD (#303)
Browse files Browse the repository at this point in the history
* chore(home-manager/mpv): update mpv port

* fix(home-manager/mpv): avoid ifd
  • Loading branch information
Anomalocaridid authored Aug 7, 2024
1 parent afe2c4c commit f1ccaad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .sources/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,9 @@
"repo": "mpv"
},
"branch": "main",
"revision": "da9199f55b42f9158371f31a7e34d88d1d7c7145",
"url": "https://github.com/catppuccin/mpv/archive/da9199f55b42f9158371f31a7e34d88d1d7c7145.tar.gz",
"hash": "1zwzplbn0a043gxl1q239mbb824qm5jl965qyb6rfg66x3ws5wi8"
"revision": "7b93fb0febd0490a8ccfe3077ab7741a9b4ef44a",
"url": "https://github.com/catppuccin/mpv/archive/7b93fb0febd0490a8ccfe3077ab7741a9b4ef44a.tar.gz",
"hash": "1wzahqxqrblalkcxi4ll05vi5rhmsm3z4mk7d96rfka2c38wc5wj"
},
"newsboat": {
"type": "Git",
Expand Down
9 changes: 1 addition & 8 deletions modules/home-manager/mpv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,13 @@ let
inherit (lib) ctp mkIf;
cfg = config.programs.mpv.catppuccin;
enable = cfg.enable && config.programs.mpv.enable;
themeDir = sources.mpv + "/themes/${cfg.flavor}/${cfg.accent}";
uoscDir = sources.mpv + "/uosc/themes/${cfg.flavor}/${cfg.accent}";
in
{
options.programs.mpv.catppuccin = ctp.mkCatppuccinOpt { name = "mpv"; } // {
accent = ctp.mkAccentOpt "mpv";
};

# Note that the theme is defined across multiple files
config.programs.mpv = mkIf enable {
config = ctp.fromINI (themeDir + "/mpv.conf");
scriptOpts = {
stats = ctp.fromINI (themeDir + "/script-opts/stats.conf");
uosc = ctp.fromINI (uoscDir + "/script-opts/uosc.conf");
};
config.include = sources.mpv + "/themes/${cfg.flavor}/${cfg.accent}.conf";
};
}

0 comments on commit f1ccaad

Please sign in to comment.