💾 Archived View for ait.place › dot › bin › .local › bin › dlocate.txt captured on 2022-06-03 at 22:56:10.

View Raw

More Information

⬅️ Previous capture (2022-04-28)

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

#!/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"