aurora.configlfremage-pick
| 1 | #!/bin/sh |
| 2 | # Run from lf (needs $id): remage ARGS..., then the images marked there (m) become lf's selection. |
| 3 | # One file = remage opens its whole directory at that file; several = just those; -t DIR = the grid. |
| 4 | |
| 5 | marked=$(remage -o "$@" 2>/dev/null) |
| 6 | [ -n "$marked" ] || exit 0 |
| 7 | |
| 8 | files="" |
| 9 | while IFS= read -r file; do |
| 10 | files="$files \"$(printf '%s' "$file" | sed 's/[\\"]/\\&/g')\"" |
| 11 | done <<EOF |
| 12 | $marked |
| 13 | EOF |
| 14 | lf -remote "send $id :unselect; toggle$files" |