Use command line instead of clipboard to specify urls
[llpp.git] / misc / dllpp
blob1c112c6cf1c9bc2966330a1a1463399dc95dd056
1 #!/bin/sh
2 set -e
4 test -z "$1" && {
5 echo "usage: $0 file_extension"
6 exit 1
9 getpath() {
10 locate -e -0 -r '\.'$1'$' \
11 | du -bh --files0-from=- \
12 | sort -h -k1 | cut --output-delimiter=: -f1,2- \
13 | dmenu -nf white -l 40 | cut -d: -f2- || exit 1
16 exec llppac "$(getpath "$1")"