53 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

2024-04-23 07:34:15 +05:00
#!/bin/sh
2024-05-25 20:48:42 +05:00
dwmc setlayoutex 2
2024-04-23 07:34:15 +05:00
search_dir="${1:-.}"
preview='bat --style=header,numbers --color=always {}'
fd_command="fd . \
--type file \
--hidden \
--follow \
--color always \
--exclude .git \
--exclude .github \
--exclude *.o \
--exclude *.pyc \
--exclude node_modules \
2024-04-23 07:34:15 +05:00
--full-path \"$search_dir\""
fzf_command="fzf \
--ansi \
2024-05-18 13:41:08 +05:00
--height=100% \
--keep-right \
2024-04-23 07:34:15 +05:00
--layout=reverse \
2024-05-18 13:41:08 +05:00
--scheme=path \
2024-07-05 11:58:36 +05:00
--multi \
2024-04-23 07:34:15 +05:00
--preview=\"[[ -n {1} ]] && $preview\" \
2024-05-18 13:41:08 +05:00
--preview-window='bottom,60%,border-top' \
2024-05-25 20:48:42 +05:00
--scrollbar='▐' --info=inline-right \
2024-05-18 13:41:08 +05:00
--margin=5%,10%,5%,10% --border=none \
2024-07-05 11:58:36 +05:00
--highlight-line \
2024-09-03 10:45:41 +05:00
--color=bg+:#b7c1e3 \
--color=bg:#d0d5e3 \
--color=border:#4094a3 \
--color=fg:#3760bf \
--color=gutter:#d0d5e3 \
--color=header:#b15c00 \
--color=hl+:#188092 \
--color=hl:#188092 \
--color=info:#8990b3 \
--color=marker:#d20065 \
--color=pointer:#d20065 \
--color=prompt:#188092 \
--color=query:#3760bf:regular \
--color=spinner:#d20065 \
2024-05-18 13:41:08 +05:00
--prompt='  ' --pointer=' ' --ellipsis='' "
2024-04-23 07:34:15 +05:00
eval "$fd_command" | eval "$fzf_command"
2024-05-25 20:48:42 +05:00
dwmc setlayoutex 0
2024-04-23 07:34:15 +05:00
exit 0