diff options
author | lassulus <lassulus@lassul.us> | 2017-08-25 23:48:16 +0200 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2017-08-25 23:48:16 +0200 |
commit | 7f08382fbe599a5907ebcdaba59aab1ecf6c71d9 (patch) | |
tree | bc0ca86aa715d473a78e68d4f2db2fe321798f2a | |
parent | 900441db8a557c602f478860d290c568c78f7b2a (diff) |
l mpv: remove unneded moveToDir bindings
-rw-r--r-- | lass/2configs/mpv.nix | 26 |
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 |