mirror of
https://github.com/mintycube/dotfiles.git
synced 2024-10-22 14:05:41 +02:00
52 lines
1.9 KiB
Bash
Executable File
52 lines
1.9 KiB
Bash
Executable File
#!/usr/bin/env bash
|
||
|
||
# Populated by fuz-cache script through xprofile at startup
|
||
CACHE_DIR="/tmp/fuz_cache"
|
||
|
||
h_padding=$(printf '%*s' 14 ' ')
|
||
h_gap=$(printf '%*s' 4 ' ')
|
||
|
||
# Define the header using the escape sequences
|
||
HEADER="${h_padding}\
|
||
[1;34m Prefix[1;90m:[0mAlt${h_gap}\
|
||
[1;34m 1[1;90m:[0mAll/Folders/Git${h_gap}\
|
||
[1;34m 2[1;90m:[0mDocuments${h_gap}\
|
||
[1;34m 3[1;90m:[0mImages${h_gap}\
|
||
[1;34m 4[1;90m:[0mVideos${h_gap}\
|
||
[1;34m f[1;90m:[0mlf"
|
||
|
||
OPENER="fuz-opener"
|
||
PREVIEWER="fuz-preview"
|
||
|
||
cat $CACHE_DIR/all | fzf --ansi --prompt " All " \
|
||
--bind "alt-1:transform:(
|
||
([[ \$FZF_PROMPT =~ All ]] && echo 'change-prompt( Folders )+reload(cat $CACHE_DIR/folders)') ||
|
||
([[ \$FZF_PROMPT =~ Folders ]] && echo 'change-prompt( Git )+reload(cat $CACHE_DIR/git)') ||
|
||
echo 'change-prompt( All )+reload(cat $CACHE_DIR/all)')" \
|
||
--bind "alt-2:change-prompt( Documents )+reload(cat $CACHE_DIR/documents)" \
|
||
--bind "alt-3:change-prompt( Images )+reload(cat $CACHE_DIR/images)" \
|
||
--bind "alt-4:change-prompt( Videos )+reload(cat $CACHE_DIR/videos)" \
|
||
--header "$HEADER" \
|
||
--height=100% --pointer=" " --ellipsis= --header-first --scheme=path --algo=v2 \
|
||
--preview-window "bottom,60%,border-top" --border=none --margin=5%,10%,5%,10% --info=inline-right \
|
||
--preview "$PREVIEWER {}" \
|
||
--bind "enter:execute:$OPENER {}" \
|
||
--highlight-line \
|
||
--color=bg+:#2d3f76 \
|
||
--color=bg:#1e2030 \
|
||
--color=border:#589ed7 \
|
||
--color=fg:#c8d3f5 \
|
||
--color=gutter:#1e2030 \
|
||
--color=header:#ff966c \
|
||
--color=hl+:#65bcff \
|
||
--color=hl:#65bcff \
|
||
--color=info:#545c7e \
|
||
--color=marker:#ff007c \
|
||
--color=pointer:#ff007c \
|
||
--color=prompt:#65bcff \
|
||
--color=query:#c8d3f5:regular \
|
||
--color=scrollbar:#589ed7 \
|
||
--color=separator:#ff966c \
|
||
--color=spinner:#ff007c \
|
||
--bind "alt-f:execute:lf {}"
|