You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

10 lines
264 B

#!/bin/sh
while name=$(xsel -o | dmenu -p 'Find File') || exit
do
[[ $name ]] || exit
list=$(sudo locate -A -e -i $name)
[[ $list ]] || continue
file=$(echo -e "$list" | dmenu -l 12 -p 'Open') || exit
echo -n "$file" | xsel -b -i
xdg-open "$file"
done