mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-02-18 10:47:31 -08:00
20 lines
470 B
Bash
20 lines
470 B
Bash
#!/usr/bin/env bash
|
|
# https://gist.github.com/nicedreams/f8d0a6373949f6d9b9583e7e1634a1c3
|
|
|
|
bmenu() {
|
|
launchapp=$(IFS=':'; \
|
|
for p in ${PATH}; \
|
|
do find -L "${p}" -type f -executable -print 2> /dev/null; done \
|
|
| fzf --header="Select application to launch from PATH:" \
|
|
--multi=0 \
|
|
--exact \
|
|
--height="50%" \
|
|
--preview-window="down:wrap:3")
|
|
if [[ "${launchapp}" ]]; then
|
|
setsid -f "${launchapp}" &> /dev/null &
|
|
sleep .1
|
|
fi
|
|
}
|
|
|
|
bmenu "$@"
|