diff options
author | Dylan Araps <dylan.araps@gmail.com> | 2018-10-21 12:58:51 +1100 |
---|---|---|
committer | Dylan Araps <dylan.araps@gmail.com> | 2018-10-21 12:58:51 +1100 |
commit | ccbb680ce500073c1c4f866f9e28f807e354ac2c (patch) | |
tree | ca99f99fb7f643fcac8f353d3e766bef0591480c | |
parent | 3099cc576a03cb3bd02f87ba5af4f18888adcd52 (diff) |
more color
-rw-r--r-- | README.md | 3 | ||||
-rwxr-xr-x | fff | 8 |
2 files changed, 7 insertions, 4 deletions
@@ -64,6 +64,9 @@ export FFF_COL1=2 # Status color [0-9] export FFF_COL2=7 +# Selection color [0-9] (copied/moved files) +export FFF_COL3=6 + # Text Editor export EDITOR="cmd" ``` @@ -21,10 +21,10 @@ f_print() { c="${#f[@]}" for((i=${k:=0};i<(j=j>c?c:j);i++));{ ((c<=0)) && { get_dir; f_print; return; } || path="${f[i]##*/}" - [[ -d "${f[i]}" ]] && path="\\e[1m\\e[3${FFF_COL1:-2}m${path}/\\e[m" - [[ "${f[i]}" == "${f[l]}" ]] && path="\\e[7m${path}\\e[m" - [[ "$co" == "${f[i]}" ]] && path="\\e[1m\\e[38m\\e[7m${f[i]}\\e[m" - printf '\e[K%b\n' "$path" + [[ -d ${f[i]} ]] && path="\\e[1m\\e[3${FFF_COL1:-2}m${path}/" + [[ ${f[i]} == "${f[l]}" ]] && path="\\e[7m${path}" + [[ $co == "${f[i]}" ]] && path="\\e[1m\\e[3${FFF_COL3:-6}m\\e[7m${f[i]}" + printf '\e[K%b\e[m\n' "$path" } printf '\e[3%sm\e[%s;H\e[K\n\e[K%b\e[m\e[H' "${FFF_COL2:-7}" "$((LINES-2))" \ "${PWD/\/\//\/} (${l:-1}/$((c-1))) ${co:+${pr[*]}: ${co##*/} [p]}" |