Update 2024-02-14 07:51 OpenBSD/amd64-x13
This commit is contained in:
21
.bin/OLD/imagesort_bg
Executable file
21
.bin/OLD/imagesort_bg
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
ncpu=$(sysctl -n hw.ncpuonline)
|
||||
temp=$(mktemp -d)
|
||||
|
||||
find ${@:-.} -maxdepth 1 -type f \( -iname "*.jpg" \
|
||||
-o -iname "*.jpeg" \
|
||||
-o -iname "*.png" \
|
||||
-o -iname "*.gif" \
|
||||
-o -iname "*.heic" \
|
||||
-o -iname "*.tif" \
|
||||
\) | sort -R > $temp/filelist.txt
|
||||
|
||||
count=$(( $(wc -l < $temp/filelist.txt) / ncpu ))
|
||||
|
||||
( cd $temp && split -l $count $temp/filelist.txt )
|
||||
|
||||
for f in $temp/x*
|
||||
do
|
||||
nsxiv -ati < $f &
|
||||
done
|
||||
Reference in New Issue
Block a user