Add first try of a delete scritp for MPV
This commit is contained in:
parent
020954cf91
commit
b65c8d6b60
|
@ -1,15 +1,33 @@
|
||||||
{ ... }:
|
{ lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
delete-current-file = (pkgs.stdenvNoCC.mkDerivation rec {
|
||||||
|
name = "mpv-delete-current-file";
|
||||||
|
src = pkgs.fetchurl {
|
||||||
|
url = "https://git.2li.ch/various/mpv-scripts/raw/commit/e8ff33e18197e10e458e0392b337b5da4a420049/delete_current_file.lua";
|
||||||
|
sha256 = "sha256-tsN7zB1eTgGVSKyE010DNajV7/e0tNDvxbVYlMsdoKs=";
|
||||||
|
};
|
||||||
|
dontBuild = true;
|
||||||
|
dontUnpack = true;
|
||||||
|
installPhase = ''
|
||||||
|
install -Dm644 ${src} $out/share/mpv/scripts/delete_current_file.lua
|
||||||
|
'';
|
||||||
|
passthru.scriptName = "delete_current_file.lua";
|
||||||
|
});
|
||||||
|
in
|
||||||
{
|
{
|
||||||
programs.mpv = {
|
programs.mpv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
bindings = {
|
bindings = {
|
||||||
s = "playlist-shuffle";
|
s = "playlist-shuffle";
|
||||||
r = "cycle_values video-rotate 90 180 270 0";
|
r = "cycle_values video-rotate 90 180 270 0";
|
||||||
|
d = "script-message-to delete_current_file delete-file";
|
||||||
};
|
};
|
||||||
config = {
|
config = {
|
||||||
"keepaspect-window" = "no";
|
"keepaspect-window" = "no";
|
||||||
};
|
};
|
||||||
|
scripts = [ delete-current-file ];
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.mimeApps = {
|
xdg.mimeApps = {
|
||||||
enable = true;
|
enable = true;
|
||||||
associations.added = {
|
associations.added = {
|
||||||
|
@ -75,3 +93,4 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user