flake/home/applications/mpv/default.nix

86 lines
3 KiB
Nix
Raw Normal View History

2023-12-13 11:02:11 +00:00
{
pkgs,
lib,
...
}: {
2023-12-12 18:53:45 +00:00
programs.mpv = {
enable = true;
config = {
2023-12-14 08:07:54 +00:00
ao = "pipewire,";
vo = "gpu-next,gpu,";
2023-12-12 18:53:45 +00:00
hwdec = "auto-safe";
profile = "gpu-hq";
osc = "no";
2024-06-01 21:48:22 +00:00
alang = "jpn,ja";
slang = "eng,en";
2023-12-12 18:53:45 +00:00
};
2024-06-11 17:00:11 +00:00
2024-06-21 03:05:31 +00:00
scripts =
(with pkgs.mpvScripts; [
thumbfast
sponsorblock
modernx-zydezu
])
2024-07-20 05:04:12 +00:00
++ lib.optional pkgs.stdenv.hostPlatform.isLinux pkgs.mpvScripts.mpris;
bindings = let
inherit (pkgs) anime4k;
setShader = message: files: ''no-osd change-list glsl-shaders set "${lib.concatStringsSep ":" files}"; show-text "${message}"'';
in {
"CTRL+1" = setShader "Anime4K: Mode A (Fast)" [
"${anime4k}/Anime4K_Clamp_Highlights.glsl"
"${anime4k}/Anime4K_Restore_CNN_M.glsl"
"${anime4k}/Anime4K_Upscale_CNN_x2_M.glsl"
"${anime4k}/Anime4K_AutoDownscalePre_x2.glsl"
"${anime4k}/Anime4K_AutoDownscalePre_x4.glsl"
"${anime4k}/Anime4K_Upscale_CNN_x2_S.glsl"
];
"CTRL+2" = setShader "Anime4K: Mode B (Fast)" [
"${anime4k}/Anime4K_Clamp_Highlights.glsl"
"${anime4k}/Anime4K_Restore_CNN_Soft_M.glsl"
"${anime4k}/Anime4K_Upscale_CNN_x2_M.glsl"
"${anime4k}/Anime4K_AutoDownscalePre_x2.glsl"
"${anime4k}/Anime4K_AutoDownscalePre_x4.glsl"
"${anime4k}/Anime4K_Upscale_CNN_x2_S.glsl"
];
"CTRL+3" = setShader "Anime4K: Mode C (Fast)" [
"${anime4k}/Anime4K_Clamp_Highlights.glsl"
"${anime4k}/Anime4K_Upscale_Denoise_CNN_x2_M.glsl"
"${anime4k}/Anime4K_AutoDownscalePre_x2.glsl"
"${anime4k}/Anime4K_AutoDownscalePre_x4.glsl"
"${anime4k}/Anime4K_Upscale_CNN_x2_S.glsl"
];
"CTRL+4" = setShader "Anime4K: Mode A+A (Fast)" [
"${anime4k}/Anime4K_Clamp_Highlights.glsl"
"${anime4k}/Anime4K_Restore_CNN_M.glsl"
"${anime4k}/Anime4K_Upscale_CNN_x2_M.glsl"
"${anime4k}/Anime4K_Restore_CNN_S.glsl"
"${anime4k}/Anime4K_AutoDownscalePre_x2.glsl"
"${anime4k}/Anime4K_AutoDownscalePre_x4.glsl"
"${anime4k}/Anime4K_Upscale_CNN_x2_S.glsl"
];
"CTRL+5" = setShader "Anime4K: Mode B+B (Fast)" [
"${anime4k}/Anime4K_Clamp_Highlights.glsl"
"${anime4k}/Anime4K_Restore_CNN_Soft_M.glsl"
"${anime4k}/Anime4K_Upscale_CNN_x2_M.glsl"
"${anime4k}/Anime4K_AutoDownscalePre_x2.glsl"
"${anime4k}/Anime4K_AutoDownscalePre_x4.glsl"
"${anime4k}/Anime4K_Restore_CNN_Soft_S.glsl"
"${anime4k}/Anime4K_Upscale_CNN_x2_S.glsl"
];
"CTRL+6" = setShader "Anime4K: Mode C+A (Fast)" [
"${anime4k}/Anime4K_Clamp_Highlights.glsl"
"${anime4k}/Anime4K_Upscale_Denoise_CNN_x2_M.glsl"
"${anime4k}/Anime4K_AutoDownscalePre_x2.glsl"
"${anime4k}/Anime4K_AutoDownscalePre_x4.glsl"
"${anime4k}/Anime4K_Restore_CNN_S.glsl"
"${anime4k}/Anime4K_Upscale_CNN_x2_S.glsl"
];
"CTRL+0" = ''no-osd change-list glsl-shaders clr ""; show-text "GLSL shaders cleared"'';
};
2023-12-12 18:53:45 +00:00
};
2023-11-28 05:40:22 +00:00
}