mpv: init (#949)
Closes: https://github.com/danth/stylix/issues/185 Closes: https://github.com/danth/stylix/issues/186 Link: https://github.com/danth/stylix/pull/949 Co-authored-by: NAHO <90870942+trueNAHO@users.noreply.github.com> Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> Tested-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
This commit is contained in:
parent
6a7d563370
commit
6c42dc31ef
3 changed files with 70 additions and 0 deletions
33
modules/mpv/hm.nix
Normal file
33
modules/mpv/hm.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.stylix.targets.mpv.enable = config.lib.stylix.mkEnableTarget "mpv" true;
|
||||
|
||||
config = lib.mkIf (config.stylix.enable && config.stylix.targets.mpv.enable) {
|
||||
programs.mpv = {
|
||||
config = with config.lib.stylix.colors.withHashtag; {
|
||||
osd-font = config.stylix.fonts.monospace.name;
|
||||
sub-font = config.stylix.fonts.monospace.name;
|
||||
osd-font-size = config.stylix.fonts.sizes.applications;
|
||||
sub-font-size = config.stylix.fonts.sizes.applications;
|
||||
|
||||
background-color = base00;
|
||||
osd-back-color = base01;
|
||||
osd-border-color = base01;
|
||||
osd-color = base05;
|
||||
osd-shadow-color = base00;
|
||||
};
|
||||
|
||||
scriptOpts.uosc.color =
|
||||
with config.lib.stylix.colors;
|
||||
lib.concatMapAttrsStringSep "," (name: value: "${name}=${value}") {
|
||||
background = base00;
|
||||
background_text = base05;
|
||||
foreground = base05;
|
||||
foreground_text = base00;
|
||||
curtain = base0D;
|
||||
success = base0A;
|
||||
error = base0F;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
18
modules/mpv/testbeds/default.nix
Normal file
18
modules/mpv/testbeds/default.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ lib, pkgs, ... }:
|
||||
let
|
||||
package = pkgs.mpv;
|
||||
in
|
||||
{
|
||||
stylix.testbed.application = {
|
||||
enable = true;
|
||||
name = "mpv";
|
||||
inherit package;
|
||||
};
|
||||
|
||||
home-manager.sharedModules = lib.singleton {
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
inherit package;
|
||||
};
|
||||
};
|
||||
}
|
||||
19
modules/mpv/testbeds/uosc.nix
Normal file
19
modules/mpv/testbeds/uosc.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{ lib, pkgs, ... }:
|
||||
let
|
||||
package = pkgs.mpv;
|
||||
in
|
||||
{
|
||||
stylix.testbed.application = {
|
||||
enable = true;
|
||||
name = "mpv";
|
||||
inherit package;
|
||||
};
|
||||
|
||||
home-manager.sharedModules = lib.singleton {
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
inherit package;
|
||||
scripts = [ pkgs.mpvScripts.uosc ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue