buscar-archivos: usar fzf y abrir en caja

This commit is contained in:
Cat /dev/Nulo 2021-11-16 08:34:15 -03:00
parent 0c74b897c0
commit 1794c85308

View file

@ -1,7 +1,8 @@
#!/bin/sh
set -e
cd ~
file="$(find \
if test "$1" = "elegir"; then
find \
Documents Sync Pictures Downloads Proyectos \
-iname '*.jpg' -or \
-iname '*.png' -or \
@ -13,10 +14,21 @@ file="$(find \
-iname '*.docx' -or \
-iname '*.mp3' -or \
-type d \
| fuzzel-run --dmenu --width=40)"
| fzf > "$2"
exit $?
fi
out="$(mktemp)"
footclient buscar-archivos elegir $out
file="$(cat $out)"
# | fuzzel-run --dmenu --width=40)"
if test -e "$file"; then
xdg-open "$file"
if test -d "$file"; then
exec caja "$file"
else
exec xdg-open "$file"
fi
fi
# if test -d "$file"; then