]> git.scottworley.com Git - picsort/commitdiff
'e'xtra. Mostly like delete, but doesn't rm.
authorScott Worley <scottworley@scottworley.com>
Sun, 21 Dec 2014 20:05:41 +0000 (12:05 -0800)
committerScott Worley <scottworley@scottworley.com>
Sun, 21 Dec 2014 20:13:30 +0000 (12:13 -0800)
Set EXTRADIR appropriately.

picsorter.js

index bbd255419f384ead2252414a22acaa438aee8246..6608edff15549b05a438f67626a78941d372b332 100644 (file)
@@ -180,6 +180,10 @@ function show_commands() {
         commands.push("rm " + escaped_filename);
         return;
       }
+      if (picinfo[f].deleted == "extra") {
+        commands.push("mv " + escaped_filename + " \"$EXTRADIR\"");
+        return;
+      }
       var command = ["pic-mv"];
       if ("exposure" in picinfo[f]) {
         command.push("-e " + picinfo[f].exposure);
@@ -215,6 +219,8 @@ Mousetrap.bind('0', move_to_begenning);
 Mousetrap.bind('$', move_to_end);
 Mousetrap.bind('x', function(){ mark_deleted("deleted"); });
 Mousetrap.bind('X', mark_not_deleted);
+Mousetrap.bind('e', function(){ mark_deleted("extra"); });
+Mousetrap.bind('E', mark_not_deleted);
 Mousetrap.bind('r', rotate);
 Mousetrap.bind('i', announce);
 Mousetrap.bind('f', function() { say(files[input_index]); });