summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2018-10-22 23:43:24 +1100
committerDylan Araps <dylan.araps@gmail.com>2018-10-22 23:43:24 +1100
commitfc87e5d0c6ea091b7fd180aa2b3a9d3fcdd756d4 (patch)
treec4314b1ab3ff4a925f5e480b18277813930a7845
parent116b7de0849b64d9b4a089c641cd616a6804e36f (diff)
added favourites
-rw-r--r--README.md13
-rwxr-xr-xfff4
-rw-r--r--fff.124
3 files changed, 41 insertions, 0 deletions
diff --git a/README.md b/README.md
index 848b7af..a178d18 100644
--- a/README.md
+++ b/README.md
@@ -57,6 +57,8 @@ p: paste/move
r: rename
d: trash (~/.cache/fff/bin/)
+\[1-9\]: favourites (see customization)
+
q: exit
```
@@ -74,6 +76,17 @@ export FFF_COL3=6
# Text Editor
export EDITOR="cmd"
+
+# Favourites (keys 1-9) (dir or file)
+export FFF_FAV1=~/projects
+export FFF_FAV2=~/.bashrc
+export FFF_FAV3=~/Pictures/Wallpapers/
+export FFF_FAV4=/usr/share
+export FFF_FAV5=/
+export FFF_FAV6=
+export FFF_FAV7=
+export FFF_FAV8=
+export FFF_FAV9=
```
## Why?
diff --git a/fff b/fff
index 421815b..b23b666 100755
--- a/fff
+++ b/fff
@@ -100,6 +100,10 @@ key() {
r|d|n|f|/) prompt "$1" ;;
\~) g="$PWD"; hist; open ~ ;;
t) g="$PWD"; hist; open ~/.cache/fff/bin ;;
+
+ [1-9]) fa="FFF_FAV${1}"; fa="${!fa%/}"
+ [[ ${fa:-/} ]] && { g="$PWD"; hist; open "$fa"; } ;;
+
q) exit ;;
B|j) ((l=l==c-1?l:++l,j!=c&&l==j-m/2+1))&&((k=k>=j?k:++k,j=j<c?++j:j)) ;;
diff --git a/fff.1 b/fff.1
index 109cda9..75d9646 100644
--- a/fff.1
+++ b/fff.1
@@ -81,6 +81,10 @@ rename
trash (~/.cache/fff/bin/)
.TP
+\fB[1-9]\fR
+favourites (see customization)
+
+.TP
\fBq\fR
exit
@@ -100,3 +104,23 @@ export FFF_COL3=6
\fBText Editor\fR
export EDITOR="cmd"
.TP
+
+\fBFavourites (keys 1-9) (dir or file)\fR
+export FFF_FAV1=~/projects
+
+export FFF_FAV2=~/.bashrc
+
+export FFF_FAV3=~/Pictures/Wallpapers/
+
+export FFF_FAV4=/usr/share
+
+export FFF_FAV5=/
+
+export FFF_FAV6=
+
+export FFF_FAV7=
+
+export FFF_FAV8=
+
+export FFF_FAV9=
+.TP