feat(home-manager/mpv): add support for uosc (#291)
This commit is contained in:
parent
d75d580385
commit
8bdb55cc1c
1 changed files with 10 additions and 5 deletions
|
@ -1,18 +1,23 @@
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
inherit (config.catppuccin) sources;
|
inherit (config.catppuccin) sources;
|
||||||
|
inherit (lib) ctp mkIf;
|
||||||
cfg = config.programs.mpv.catppuccin;
|
cfg = config.programs.mpv.catppuccin;
|
||||||
enable = cfg.enable && config.programs.mpv.enable;
|
enable = cfg.enable && config.programs.mpv.enable;
|
||||||
themeDir = sources.mpv + "/themes/${cfg.flavor}/${cfg.accent}";
|
themeDir = sources.mpv + "/themes/${cfg.flavor}/${cfg.accent}";
|
||||||
|
uoscDir = sources.mpv + "/uosc/themes/${cfg.flavor}/${cfg.accent}";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.mpv.catppuccin = lib.ctp.mkCatppuccinOpt { name = "mpv"; } // {
|
options.programs.mpv.catppuccin = ctp.mkCatppuccinOpt { name = "mpv"; } // {
|
||||||
accent = lib.ctp.mkAccentOpt "mpv";
|
accent = ctp.mkAccentOpt "mpv";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Note that the theme is defined across multiple files
|
# Note that the theme is defined across multiple files
|
||||||
config.programs.mpv = lib.mkIf enable {
|
config.programs.mpv = mkIf enable {
|
||||||
config = lib.ctp.fromINI (themeDir + "/mpv.conf");
|
config = ctp.fromINI (themeDir + "/mpv.conf");
|
||||||
scriptOpts.stats = lib.ctp.fromINI (themeDir + "/script-opts/stats.conf");
|
scriptOpts = {
|
||||||
|
stats = ctp.fromINI (themeDir + "/script-opts/stats.conf");
|
||||||
|
uosc = ctp.fromINI (uoscDir + "/script-opts/uosc.conf");
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue