f4 - fuzzy file finder gtkdialog - 1.0.0

Moderator: Forum moderators

Post Reply
step
Posts: 546
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 57 times
Been thanked: 198 times
Contact:

f4 - fuzzy file finder gtkdialog - 1.0.0

Post by step »

f4 - fuzzy file finder CLI in a GTK dialog

This is yet another file finder script for Fatdog64, FossaPup, FossaDog and Slacko64.
Since my main development focus is Fatdog64, you will forgive me if something minor went amiss for the Fossas and Slacko. I did test with virtual machines running the Fossas and Slacko and f4 seemed to work fine, you'll see. But I digress.

f4 combines the power of fzf, a very popular fuzzy finder for the command line interface (CLI), with gtkdialog compiled with VTE. The result is a live search that updates results as you type your search terms. By default the search terms are approximate, so you don't need to have perfect recollection of file names. You can combine approximate and exact search terms together with AND and OR, and even negate some terms. The search dialog includes a comprehensive built-in help, both as text and HTML. Some advanced controls are available to tweak the search engine though my design goal was to write something simple enough that one could use just by running the search terms.

When you spot the file/folder that you are looking for in the search results list, place the cursor on it and press ENTER to locate it in a ROX window. Pressing control-o opens the file with its associated program--for a document--or executes it directly--for a program and the like. Locating and opening multiple items at once is supported. Saving and reusing the list of search results are also supported.

ROX is not a requirement. You can override it with an environment variable. I tried to set pcmanfm for FossaDog but it simply wasn't convenient, so I'll leave it to FossaDog users to suggest an alternative for ROX.

Links

home

downloads

You will find a .tar.gz file for all supported platforms. Download it, unpack it in /tmp, read the included README file. This .tag.gz file includes an install script. Fossas users can install dependencies from their package repositories. Fatdog64 users, should install packages fzf-0.25.1 and gtkdialog-vte with Fatdog64's Gslapt. The next post includes additional instructions for Slacko64 users.

Screenshots

f4's main window--search results
f4's main window--search results
xscreenshot-20210212-001.png (52.8 KiB) Viewed 708 times
f4's main window--advanced settings expander
f4's main window--advanced settings expander
xscreenshot-20210212-002.png (67.17 KiB) Viewed 708 times
f4's built-in help
f4's built-in help
xscreenshot-20210212-003.png (56.7 KiB) Viewed 708 times
Last edited by step on Sat Mar 06, 2021 5:59 pm, edited 2 times in total.
step
Posts: 546
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 57 times
Been thanked: 198 times
Contact:

Re: f4 - fuzzy file finder gtkdialog - 1.0.0

Post by step »

Installing on Slacko64. The following section complements the main installation document.

Slacko64 7.0

Slacko64's package repositories lack fzf. I uploaded an unofficial .pet package of fzf version 0.25.1 at f4's download page. Alternatively, the official fzf installer can be found at fzf's project page. Install fzf.

  • Download fzf
    • install package fzf.
  • Download the latest version of f4
    • unpack the archive and run the installer following the included README file.
  • In a terminal run the following commands:

Code: Select all

fixmenus
gtk-update-icon-cache -f /usr/share/icons/hicolor
sed -i -e 's/command:sleep[^<]\+/command:sleep 0.5/' /usr/bin/f4
step
Posts: 546
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 57 times
Been thanked: 198 times
Contact:

Re: f4 - fuzzy file finder gtkdialog - 1.0.0

Post by step »

Usage Tips

So you have some folder open in ROX and you think that some file of yours should be here but you can't find it. Hmm, maybe the file is in a sub-folder, maybe not. Try this. In ROX type !f4 and press ENTER. This should start f4 in the current folder. Now start typing to f4 the approximate name of the file you're searching for...

Explanation: In ROX the bang (!) key starts the minibuffer command line. It's basically a reduced shell prompt. So when you type !f4 you tell ROX to start a shell and run f4 inside that shell and inside the current folder.

Post Reply

Return to “Filesystem”