From cd25a1a569a47fabab05b521c513456103e496ce Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Wed, 27 Aug 2025 23:59:29 +0200 Subject: [PATCH] mpv --- flake.lock | 132 +++++++++++++++++++--------- home-modules/chatterino.nix | 2 +- home-modules/mpv.nix | 47 +++++++++- home-modules/pkgs-list/programs.nix | 1 - home-modules/pkgs-list/shell.nix | 1 - home.nix | 1 + 6 files changed, 136 insertions(+), 48 deletions(-) diff --git a/flake.lock b/flake.lock index a14e36f..2ad837b 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1755632680, - "narHash": "sha256-EjaD8+d7AiAV2fGRN4NTMboWDwk8szDfwbzZ8DL1PhQ=", + "lastModified": 1755946532, + "narHash": "sha256-POePremlUY5GyA1zfbtic6XLxDaQcqHN6l+bIxdT5gc=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "50637ed23e962f0db294d6b0ef534f37b144644b", + "rev": "81584dae2df6ac79f6b6dae0ecb7705e95129ada", "type": "github" }, "original": { @@ -33,6 +33,25 @@ "type": "github" } }, + "copyparty": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1756320983, + "narHash": "sha256-huaJ1CvBsylibf55pjiFEpiKxYU235iAzwMhJ+iDSjw=", + "owner": "9001", + "repo": "copyparty", + "rev": "f4f702c39dd2365f6ca43ed6b72a84c708fded8d", + "type": "github" + }, + "original": { + "owner": "9001", + "repo": "copyparty", + "type": "github" + } + }, "crane": { "locked": { "lastModified": 1731098351, @@ -118,6 +137,21 @@ } }, "flake-utils": { + "locked": { + "lastModified": 1678901627, + "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { "inputs": { "systems": "systems_3" }, @@ -245,11 +279,11 @@ ] }, "locked": { - "lastModified": 1754305013, - "narHash": "sha256-u+M2f0Xf1lVHzIPQ7DsNCDkM1NYxykOSsRr4t3TbSM4=", + "lastModified": 1755678602, + "narHash": "sha256-uEC5O/NIUNs1zmc1aH1+G3GRACbODjk2iS0ET5hXtuk=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "4c1d63a0f22135db123fc789f174b89544c6ec2d", + "rev": "157cc52065a104fc3b8fa542ae648b992421d1c7", "type": "github" }, "original": { @@ -268,17 +302,17 @@ "hyprlang": "hyprlang", "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "pre-commit-hooks": "pre-commit-hooks", "systems": "systems", "xdph": "xdph" }, "locked": { - "lastModified": 1756069181, - "narHash": "sha256-FPur4yuDwzM9uHhPFJW6KD3Xys5fz0xmRmZqFfWQD3Y=", + "lastModified": 1756325904, + "narHash": "sha256-PRz3GE4ZBScWrHTVegpM4B2YLZplp1iPwmZ9AeYBbsg=", "ref": "refs/heads/main", - "rev": "0ed880f3f7dc2c746bf3590eee266c010d737558", - "revCount": 6393, + "rev": "378e130f1426648d8d734049800128f9882805bf", + "revCount": 6395, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -306,11 +340,11 @@ ] }, "locked": { - "lastModified": 1756311938, - "narHash": "sha256-XiNmc8kdOd4adzif9PABKOH3u4Nv+zadIRfH3XrJFy0=", + "lastModified": 1756325158, + "narHash": "sha256-aJ9jAYtZ64MWBpWPfH1q+t6U9b6kJWc2yK9Vrlj6fZY=", "owner": "hyprwm", "repo": "hyprland-plugins", - "rev": "ee66b49fda3423df8bfd6206d9101a81de9c1832", + "rev": "bf843fc6adf90d43a5dd7742e9df61d395ba780d", "type": "github" }, "original": { @@ -474,11 +508,11 @@ ] }, "locked": { - "lastModified": 1755416120, - "narHash": "sha256-PosTxeL39YrLvCX5MqqPA6NNWQ4T5ea5K55nmN7ju9Q=", + "lastModified": 1756117388, + "narHash": "sha256-oRDel6pNl/T2tI+nc/USU9ZP9w08dxtl7hiZxa0C/Wc=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "e631ea36ddba721eceda69bfee6dd01068416489", + "rev": "b2ae3204845f5f2f79b4703b441252d8ad2ecfd0", "type": "github" }, "original": { @@ -517,7 +551,7 @@ "crane": "crane", "flake-compat": "flake-compat_2", "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "pre-commit-hooks-nix": "pre-commit-hooks-nix", "rust-overlay": "rust-overlay" }, @@ -539,7 +573,7 @@ "nixos-wsl": { "inputs": { "flake-compat": "flake-compat_3", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1755261305, @@ -558,27 +592,26 @@ }, "nixpkgs": { "locked": { - "lastModified": 1755186698, - "narHash": "sha256-wNO3+Ks2jZJ4nTHMuks+cxAiVBGNuEBXsT29Bz6HASo=", + "lastModified": 1748162331, + "narHash": "sha256-rqc2RKYTxP3tbjA+PB3VMRQNnjesrT0pEofXQTrMsS8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fbcf476f790d8a217c3eab4e12033dc4a0f6d23c", + "rev": "7c43f080a7f28b2774f3b3f43234ca11661bf334", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" + "id": "nixpkgs", + "ref": "nixos-25.05", + "type": "indirect" } }, "nixpkgs-latest": { "locked": { - "lastModified": 1756321630, - "narHash": "sha256-Lrqzu9plqzo3Zp64X11qL1wWHrMYMGML9XKzuiv6QJE=", + "lastModified": 1756326156, + "narHash": "sha256-EvRCnKAE5oL9wOIT/LrA5+pJVpTvhH71OReJDTOZDyk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ebbc7fb3d213c5c7c9dcef705fa272073812f4c4", + "rev": "636dea4f2cd65b8c558149a957423da47c1cbc95", "type": "github" }, "original": { @@ -606,11 +639,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1756125398, - "narHash": "sha256-XexyKZpf46cMiO5Vbj+dWSAXOnr285GHsMch8FBoHbc=", + "lastModified": 1756266583, + "narHash": "sha256-cr748nSmpfvnhqSXPiCfUPxRz2FJnvf/RjJGvFfaCsM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3b9f00d7a7bf68acd4c4abb9d43695afb04e03a5", + "rev": "8a6d5427d99ec71c64f0b93d45778c889005d9c2", "type": "github" }, "original": { @@ -620,6 +653,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1756266583, + "narHash": "sha256-cr748nSmpfvnhqSXPiCfUPxRz2FJnvf/RjJGvFfaCsM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8a6d5427d99ec71c64f0b93d45778c889005d9c2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1731919951, "narHash": "sha256-vOM6ETpl1yu9KLi/icTmLJIPbbdJCdAVYUXZceO/Ce4=", @@ -635,7 +684,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1754725699, "narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=", @@ -651,7 +700,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1756217674, "narHash": "sha256-TH1SfSP523QI7kcPiNtMAEuwZR3Jdz0MCDXPs7TS8uo=", @@ -666,7 +715,7 @@ "type": "indirect" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1752596105, "narHash": "sha256-lFNVsu/mHLq3q11MuGkMhUUoSXEdQjCHvpReaGP1S2k=", @@ -692,11 +741,11 @@ ] }, "locked": { - "lastModified": 1755446520, - "narHash": "sha256-I0Ok1OGDwc1jPd8cs2VvAYZsHriUVFGIUqW+7uSsOUM=", + "lastModified": 1755960406, + "narHash": "sha256-RF7j6C1TmSTK9tYWO6CdEMtg6XZaUKcvZwOCD2SICZs=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "4b04db83821b819bbbe32ed0a025b31e7971f22e", + "rev": "e891a93b193fcaf2fc8012d890dc7f0befe86ec2", "type": "github" }, "original": { @@ -734,13 +783,14 @@ }, "root": { "inputs": { + "copyparty": "copyparty", "home-manager": "home-manager", "hyprland": "hyprland", "hyprland-plugins": "hyprland-plugins", "hyprspace": "hyprspace", "lanzaboote": "lanzaboote", "nixos-wsl": "nixos-wsl", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "nixpkgs-latest": "nixpkgs-latest", "nixpkgs-unstable": "nixpkgs-unstable", "sops-nix": "sops-nix", @@ -897,8 +947,8 @@ }, "yazi": { "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_5", + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_6", "rust-overlay": "rust-overlay_2" }, "locked": { diff --git a/home-modules/chatterino.nix b/home-modules/chatterino.nix index e0a8915..2faa000 100644 --- a/home-modules/chatterino.nix +++ b/home-modules/chatterino.nix @@ -52,7 +52,7 @@ in { packages = with pkgs; [ chatterino2 streamlink - mpv + # mpv ]; file = { ".local/share/chatterino/Settings/settings.json".text = with secrets.chatterino; /* json */ '' diff --git a/home-modules/mpv.nix b/home-modules/mpv.nix index feeb5eb..9e1b7e8 100644 --- a/home-modules/mpv.nix +++ b/home-modules/mpv.nix @@ -2,14 +2,53 @@ programs.mpv = { enable = true; package = pkgs.mpv; - scrips = with pkgs.mpvScripts; [ + config = { + # osc = false; # Disables the on-screen controller (seekbar, volume, etc.) + # osd-bar = false; # Disables the on-screen display progress bar + demuxer-max-back-bytes = 4294967296; # Sets the maximum number of bytes to buffer for seeking backwards + demuxer-max-bytes = 4294967296; # Sets the maximum number of bytes to buffer for seeking forwards + interpolation = true; # Enables frame interpolation for smoother playback + video-sync = "display-resample"; # Synchronizes video playback to the display's refresh rate + sub-visibility = true; # Hides subtitles by default + sub-auto = "fuzzy"; # Automatically loads subtitles if their filename is similar to the video file + sub-font = rice.font.base.name; + # sub-blur = 10; # this blurs the whole thing, text aswell + sub-color = rice.color.accent.bright; + sub-back-color = "${rice.color.background}${rice.lib.float-to-drune 0.8}"; # does not seem to work + # sub-border-size = 0; + sub-border-style = "opaque-box"; + background-color = "${rice.color.background}"; # transparency breaks blur on hyprland sometimes, so just rgb + alang = "en,eng,de,ger"; # Sets preferred audio languages in order + slang = "en,eng,de,ger"; # Sets preferred subtitle languages in order + vlang = "en,eng,de,ger"; # Sets preferred video languages in order + save-position-on-quit = true; # Saves the playback position when quitting + ignore-path-in-watch-later-config = true; # Ignores the path in the watch-later configuration + ytdl-format = "bestvideo[height<=?1080]+bestaudio/best"; # Sets the format for downloading YouTube videos + vo = pkgs.lib.mkIf hyper.nvidia.enable "gpu"; + hwdec = if hyper.nvidia.enable then "no" else "no"; # bugged + }; + scripts = with pkgs.mpvScripts; [ mpris # use media keys thumbfast # thumbnails on timeline hover - uosc # custom ui + # uosc # custom ui sponsorblock ]; bindings = { - O = ''no-osd cycle-values glsl-shaders "~~/shaders/invert.glsl" ""; show-text "Invert Shader"''; + "O" = ''no-osd cycle-values glsl-shaders "~~/shaders/invert.glsl" ""; show-text "Invert Shader"''; + # "tab" = ''script-binding uosc/toggle-ui''; + # "space" = ''cycle pause; script-binding uosc/flash-pause-indicator''; + # "right" = ''seek 5''; + # "left" = ''seek -5''; + # "shift+right" = ''seek 30; script-binding uosc/flash-timeline''; + # "shift+left" = ''seek -30; script-binding uosc/flash-timeline''; + # "m" = ''no-osd cycle mute; script-binding uosc/flash-volume''; + # "up" = ''no-osd add volume 10; script-binding uosc/flash-volume''; + # "down" = ''no-osd add volume -10; script-binding uosc/flash-volume''; + # "[" = ''no-osd add speed -0.25; script-binding uosc/flash-speed''; + # "]" = ''no-osd add speed 0.25; script-binding uosc/flash-speed''; + # "\\" = ''no-osd set speed 1; script-binding uosc/flash-speed''; + # ">" = ''script-binding uosc/next; script-message-to uosc flash-elements top_bar,timeline''; + # "<" = ''script-binding uosc/prev; script-message-to uosc flash-elements top_bar,timeline>''; }; scriptOpts = { thumbfast = { @@ -29,7 +68,7 @@ }; }; }; - xdg.configfile."mpv/shaders/invert.glsl".text = /* glsl */ '' + xdg.configFile."mpv/shaders/invert.glsl".text = /* glsl */ '' //!HOOK LUMA //!BIND HOOKED vec4 hook() diff --git a/home-modules/pkgs-list/programs.nix b/home-modules/pkgs-list/programs.nix index 4ac2595..c936a71 100644 --- a/home-modules/pkgs-list/programs.nix +++ b/home-modules/pkgs-list/programs.nix @@ -2,7 +2,6 @@ home.packages = with pkgs; [ chromium element-desktop - mpv qbittorrent unstable.spotify wl-clipboard diff --git a/home-modules/pkgs-list/shell.nix b/home-modules/pkgs-list/shell.nix index 90a8f6b..9c35172 100644 --- a/home-modules/pkgs-list/shell.nix +++ b/home-modules/pkgs-list/shell.nix @@ -20,7 +20,6 @@ lolcat lynx mediainfo - mpv neofetch pastel pdfgrep diff --git a/home.nix b/home.nix index cc672d4..194c3dc 100644 --- a/home.nix +++ b/home.nix @@ -28,6 +28,7 @@ ./home-modules/latex.nix ./home-modules/mako.nix # ./home-modules/matrix.nix + ./home-modules/mpv.nix ./home-modules/nh.nix ./home-modules/nixd.nix ./home-modules/nvidia.nix