2 Commits db5a4181a7 ... 0c2286389d

Author SHA1 Message Date
  cinaeco 0c2286389d Put temp files in a tmpfs folder 4 months ago
  cinaeco b0628f7738 Put B5 before Letter sizes 4 months ago
1 changed files with 12 additions and 11 deletions
  1. 12 11
      scan-dialog

+ 12 - 11
scan-dialog

@@ -53,15 +53,6 @@ function run_scan {
     x=210
     y=148
     ;;
-  LTR)
-    x=216
-    y=279
-    ;;
-  LTR-R)
-    x=216
-    y=279
-    landscape=true
-    ;;
   B5)
     x=176
     y=250
@@ -71,11 +62,21 @@ function run_scan {
     y=250
     landscape=true
     ;;
+  LTR)
+    x=216
+    y=279
+    ;;
+  LTR-R)
+    x=216
+    y=279
+    landscape=true
+    ;;
   esac
 
   filename=$1/$2-$(date +"%Y-%m-%d-%H%M%S").$4
   filename=$(check_filename $filename)
-  tempname="./temp-$(date +%s).png"
+  userid=$(id -u $USER)
+  tempname="/var/run/user/$userid/temp-$(date +%s).png"
 
   echo "$7 $6 $x $y $filename"
 
@@ -123,7 +124,7 @@ yad --form --orient=hor --maximized --width=750 --height=250 --columns=3 --focus
   --field="Filename Prefix:SFL" scan \
   --field="Timestamp:CB" Yes\!No \
   --field="File format:CB" jpg\!png\!pdf \
-  --field="Paper Size:CB" A4\!A4-R\!A5\!A5-R\!LTR\!LTR-R\!B5\!B5-R\! \
+  --field="Paper Size:CB" A4\!A4-R\!A5\!A5-R\!B5\!B5-R\!LTR\!LTR-R\! \
   --field="Resolution (DPI):CB" 75\!150\!^300\!600\!1200 \
   --field="Scan Buttons:BTN" "" \
   --field="Colour:FBTN" 'bash -c "run_scan %1 %2 %3 %4 %5 %6 Color"' \