diff options
author | tv <tv@krebsco.de> | 2017-08-29 21:08:02 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2017-08-29 21:08:02 +0200 |
commit | 247477863628a44c60f591c6df6cc9f5e7818e89 (patch) | |
tree | 2492ffb4cda34e13d9653fbebbaba8823875d0a9 /lass/2configs/mpv.nix | |
parent | fd69096a27575b9d4d87a10af1492b273dad167c (diff) | |
parent | 48c75276c5a5ed8e7ea33ccb330f8ee6b7a6a927 (diff) |
Merge remote-tracking branch 'stro/master'
Diffstat (limited to 'lass/2configs/mpv.nix')
-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 |