use home-manager mpv config

This commit is contained in:
Sean Kovacs 2026-01-30 13:28:41 -05:00
commit efae34ec37
Signed by: sckova
GPG key ID: 00F325187C68651A

View file

@ -1,43 +1,49 @@
{ {
config, config,
pkgs, pkgs,
lib,
... ...
}: }:
{ {
home.packages = with pkgs; [ programs.mpv = {
(mpv.override { enable = true;
scripts = with mpvScripts; [ package = pkgs.mpv;
bindings = { };
config = with config.scheme.withHashtag; {
background-color = "#000000";
osd-back-color = base11;
osd-border-color = base11;
osd-color = base05;
osd-shadow-color = base00;
sub-font = config.userOptions.fontSans.name;
osd-font = config.userOptions.fontSans.name;
};
scripts = with pkgs.mpvScripts; [
uosc uosc
mpv-subtitle-lines # requires uosc
sponsorblock sponsorblock
mpris mpris
autosub
youtube-upnext
youtube-chat
mpv-notify-send
]; ];
}) scriptOpts = {
]; uosc = {
home.file.".config/mpv/mpv.conf" = { color =
text = with config.scheme; '' with config.scheme;
# Credit to https://github.com/catppuccin/mpv lib.concatStringsSep "," (
# Main mpv options lib.mapAttrsToList (key: value: "${key}=${value}") {
background-color='#000000' foreground = base09;
osd-back-color='${config.scheme.withHashtag.base11}' foreground_text = base01;
osd-border-color='${config.scheme.withHashtag.base11}' background = base00;
osd-color='${config.scheme.withHashtag.base05}' background_text = base05;
osd-shadow-color='${config.scheme.withHashtag.base00}' curtain = base10;
success = base0B;
# Stats script options error = base08;
# Options are on separate lines for clarity }
# Colors are in #BBGGRR format );
script-opts-append=stats-border_color=${base08} };
script-opts-append=stats-font_color=${base06} };
script-opts-append=stats-plot_bg_border_color=${base16}
script-opts-append=stats-plot_bg_color=${base08}
script-opts-append=stats-plot_color=${base16}
# External script options
# It is fine to leave these here even if one does not use these scripts because they are just ignored unless a script uses them
# UOSC options
script-opts-append=uosc-color=foreground=${base09},foreground_text=${base01},background=${base00},background_text=${base05},curtain=${base10},success=${base0B},error=${base08}
'';
force = true;
}; };
} }