Files
dotfiles/home-modules/mpv.nix
Lennart J. Kurzweg (Nx2) d009d109a9 battery only on NxXPS
2025-08-27 23:59:11 +02:00

42 lines
1.1 KiB
Nix

{ pkgs, ... }@all: with all; {
programs.mpv = {
enable = true;
package = pkgs.mpv;
scrips = with pkgs.mpvScripts; [
mpris # use media keys
thumbfast # thumbnails on timeline hover
uosc # custom ui
sponsorblock
];
bindings = {
O = ''no-osd cycle-values glsl-shaders "~~/shaders/invert.glsl" ""; show-text "Invert Shader"'';
};
scriptOpts = {
thumbfast = {
spawn_first = true;
network = true;
hwdec = true;
};
uosc = {
timeline_size = 25;
timeline_persistency = "paused,audio";
progress = "always";
progress_size = 4;
progress_line_width = 4;
controls = "subtitles,<has_many_audio>audio,<has_many_video>video,<has_many_edition>editions,<stream>stream-quality";
top_bar = "never";
refine = "text_width";
};
};
};
xdg.configfile."mpv/shaders/invert.glsl".text = /* glsl */ ''
//!HOOK LUMA
//!BIND HOOKED
vec4 hook()
{
float luma = LUMA_texOff(0).x;
return vec4(1.0 - luma);
}
'';
}