add mpv delete file script

This commit is contained in:
Noah Masur 2023-03-25 10:51:20 -04:00
parent f9c09deb2a
commit 57de089baf

View File

@ -22,7 +22,28 @@
enable = true; enable = true;
bindings = { }; bindings = { };
config = { image-display-duration = 2; }; config = { image-display-duration = 2; };
scripts = [ pkgs.mpvScripts.autoload ]; scripts = [
# Automatically load playlist entries before and after current file
pkgs.mpvScripts.autoload
# Delete current file after quitting
(pkgs.stdenv.mkDerivation rec {
pname = "mpv-delete-file";
version = "0.1"; # made-up
src = pkgs.fetchFromGitHub {
owner = "zenyd";
repo = "mpv-scripts";
rev = "19ea069abcb794d1bf8fac2f59b50d71ab992130";
sha256 = "sha256-OBCuzCtgfSwj0i/rBNranuu4LRc47jObwQIJgQQoerg=";
} + "/delete_file.lua";
dontBuild = true;
dontUnpack = true;
installPhase =
"install -Dm644 ${src} $out/share/mpv/scripts/delete_file.lua";
passthru.scriptName = "delete_file.lua";
})
];
}; };
# Set default for opening PDFs # Set default for opening PDFs