💾 Archived View for ait.place › dot › bin › dlocate.txt captured on 2022-07-16 at 13:48:37.

View Raw

More Information

-=-=-=-=-=-=-

#!/bin/bash

query=$@

#Prompt user if no query given
[ -z "$query" ] && query=$(printf "" | dmenu -p "Locate:")

#exit if input is empty
[ -z "$query" ] && exit 1

file="$(dmenu -l 20 < <(locate ${query}))" && $TERMINAL -e $FILE "$file"