battery only on NxXPS

This commit is contained in:
Lennart J. Kurzweg (Nx2)
2025-08-27 23:59:11 +02:00
parent b4b7378afa
commit d009d109a9
2 changed files with 42 additions and 1 deletions

41
home-modules/mpv.nix Normal file
View File

@@ -0,0 +1,41 @@
{ 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);
}
'';
}