bin: make b more compatible and draft duploc
This commit is contained in:
parent
13105e0512
commit
e74af0904b
|
@ -62,8 +62,8 @@ for arg; do
|
||||||
case "$mime" in
|
case "$mime" in
|
||||||
(*\ application/pdf\;*)
|
(*\ application/pdf\;*)
|
||||||
echo Converting "$arg"
|
echo Converting "$arg"
|
||||||
test -f "$tmpfile-1.ppm" || pdftoppm -r 70 "$arg" "$tmpfile" -l $(expr $grid \& \( $grid \> 4 \| $# \> 1 \) \| $grid '*' 2)
|
test -f "$tmpfile-1.ppm" || pdftoppm -forcenum -r 70 "$arg" "$tmpfile" -l $(expr $grid \& \( $grid \> 4 \| $# \> 1 \) \| $grid '*' 2)
|
||||||
timg -W --grid=$grid $tmpfile-{01..$grid}.ppm
|
timg -W --grid=$grid "$tmpfile"*.ppm
|
||||||
;;
|
;;
|
||||||
(*\ application/*document*)
|
(*\ application/*document*)
|
||||||
# https://ask.libreoffice.org/t/convert-to-command-line-parameter/840/4
|
# https://ask.libreoffice.org/t/convert-to-command-line-parameter/840/4
|
||||||
|
@ -151,7 +151,7 @@ if test "$bat" -o "$batplain"; then
|
||||||
test "$(bat --version | cut -d. -f2)" -gt 16 && rule=,rule
|
test "$(bat --version | cut -d. -f2)" -gt 16 && rule=,rule
|
||||||
if test $# -gt ${#bat[@]} -a $# -gt ${#batplain[@]} && test -z "$flags"
|
if test $# -gt ${#bat[@]} -a $# -gt ${#batplain[@]} && test -z "$flags"
|
||||||
then cut="--line-range :7"
|
then cut="--line-range :7"
|
||||||
batpager="cut -c-$(echo "$(tput cols)*1.9" | bc | cut -d. -f1)"
|
batpager="cut -c-$(echo $(tput cols) \* 19 / 10 | cut -d. -f1)"
|
||||||
fi
|
fi
|
||||||
batcommand="$elevate bat $cut $flags --pager"
|
batcommand="$elevate bat $cut $flags --pager"
|
||||||
batstyle="--style plain$rule"
|
batstyle="--style plain$rule"
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# Delete files under current or given path which exist elsewhere as listed in the locate database
|
||||||
|
# Matches first by name, then by checksum
|
||||||
|
# TODO
|
||||||
|
find "$@" -size +50M | while read filepath
|
||||||
|
do f="$(basename "$filepath" | synct-unarchive)"
|
||||||
|
highlight "$filepath"
|
||||||
|
locate -b "$f"
|
||||||
|
done
|
Loading…
Reference in New Issue