summaryrefslogtreecommitdiffstats
path: root/lass/2configs/mpv.nix
diff options
context:
space:
mode:
Diffstat (limited to 'lass/2configs/mpv.nix')
-rw-r--r--lass/2configs/mpv.nix26
1 files changed, 1 insertions, 25 deletions
diff --git a/lass/2configs/mpv.nix b/lass/2configs/mpv.nix
index 04fd9213e..b3de42c7b 100644
--- a/lass/2configs/mpv.nix
+++ b/lass/2configs/mpv.nix
@@ -2,40 +2,16 @@
let
- scripts = lib.concatStringsSep "," [
- good
- delete
- ];
-
mpv = pkgs.symlinkJoin {
name = "mpv";
paths = [
(pkgs.writeDashBin "mpv" ''
- exec ${pkgs.mpv}/bin/mpv --no-config --script=${scripts} "$@"
+ exec ${pkgs.mpv}/bin/mpv --no-config "$@"
'')
pkgs.mpv
];
};
- moveToDir = key: dir: pkgs.writeText "move-with-${key}.lua" ''
- tmp_dir = "${dir}"
-
- function move_current_track_${key}()
- track = mp.get_property("path")
- os.execute("mkdir -p '" .. tmp_dir .. "'")
- os.execute("mv '" .. track .. "' '" .. tmp_dir .. "'")
- print("moved '" .. track .. "' to " .. tmp_dir)
- end
-
- mp.add_key_binding("${key}", "move_current_track_${key}", move_current_track_${key})
- '';
-
- good = moveToDir "G" "./.good";
- delete = moveToDir "D" "./.graveyard";
-
- up = moveToDir "U" "./up";
- down = moveToDir "Y" "./down";
-
in {
environment.systemPackages = [
mpv