Skip to content

davidevofficial/anything

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

120 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Anything

Simple program made in rust with a GUI to find any file/directory in a list of drives.

Installation

image image

Supports:

  • Supported Filesystems: ExFAT, Ext4, NTFS
  • Indexing of drives
  • Ignoring entries
  • Sorting files
  • Searches the full path or the file name
  • Powerful search options
  • (Planned) Use of the journal on the root drive to check if anything changed and update the index accordingly

Why?

When I had a windows machine I had Everything (the tool from void tools) but when I switched to linux I found myself without a true alternative to Everything. I've tried countless tools and methods but all seem to be very slow, so I built myself this little tool.

I don't have a true benchmark but I tried dolphin (the file manager just to count files and dirs) and fsearch on my 1Tb ExFAT drive that contains 1 million files and they all took more than 30 minutes to index the drive while my little tool took 40 seconds.

Searching throught the index was on par with other tools.

Installation

Pre-built

Download pre-built binaries or the AppImage from the latest release.

Download FUSE if necessary:

For Ubuntu 22.04 LTS

sudo apt install libfuse2   

For Ubuntu 24.04 LTS

sudo apt install libfuse2t64 

Ready to use! (see how to use it)

If you find any errors check "Troubleshoot errors"

Build from source

git clone https://github.com/davidevofficial/anything.git
(cd inside where Cargo.toml is)
sudo apt install rustup
rustup default stable
(The following I believe are all necessary dependencies)
sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev
sudo apt-get install libatk1.0-dev libgdk-pixbuf2.0-dev
sudo apt-get install libgtk-3-dev
cargo build --release (or debug if you want debug)

Final File structure (after running for the first time) should look like this:

./
├── Anything
└── settings/
    ├── cache.txt
    ├── drives.txt
    ├── icon.png
    └── settings.txt

Desktop Integration

To create a way to double click and run the AppImage you can generate a .desktop file

touch Anything.desktop

and write into the file (substitute /path/to/Anything.AppImage with the path to the AppImage). it should look something like this: (remove "APPIMAGE_EXTRACT_AND_RUN=1" if FUSE is installed)

[Desktop Entry]
Comment=
Exec=pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY APPIMAGE_EXTRACT_AND_RUN=1 '/path/to/Anything.AppImage'
GenericName=file search GUI
Icon=/path/to/icon.png
Name=Anything
NoDisplay=false
Path=/path/to/directory/that/contains/anything
PrefersNonDefaultGPU=false
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-KDE-SubstituteUID=false
X-KDE-Username=

Based on the Desktop Environment you can copy the file inside of /usr/share/applications/ or to /home/USER/.local/share/applications , doing so will add desktop integration

In the future I'll support other means for distributing the binary such as Flatpaks

How to use

run with sudo for indexing and if indexing is not necessary you can drop priviliges.

The main interface should be familiar to you if you come from windows (everything).

The bottom bar is a status bar, it tells you how many files it has found or if it is searching/indexing, errors, etc...

At the centre is a table containing five columns. Click any button on the column header to change sort mode. columns are also resizable.

The Top bar has three buttons and a search bar:

from left to right:

  1. Settings Button
  2. Index Button
  3. Search Button
  4. Search Bar

Click the Search button to search based on what you wrote in the search bar (if instant search is active it searches automatically 0.3 seconds after having finished typing)

Click the index button to read and index all files on all disks you selected.

The settings button opens a sub-menu with four buttons: Behaviour, Disks, Light mode and Help

Behaviour

Index on startup: If it should automatically index when starting up the program

Index Once every __ xyz __ minutes: Checks for changes after xyz minutes

Instant Search: Whether to click the search button to search (if not it automatically starts the search 0.3 seconds after you started typing and interrupts it when starting typing again)

Journal: I have yet to add this functionality

Ignore Case: Whether to ignore the case when searching for a file (for example if on xyz matches XyZ but also xyz or Xyz)

Search full path: If it searches the full path or just the file name

Disks

Click the + button to start adding disks: that will open the lsblk window (select all drive you want to add)

Click the - button to remove any drive, click the combobox that says ExFAT to change the filesystem type of the disk (it doesn't support automatic filesystem type recognition)

To modify the ignored directories of a disk open: drives.txt and type inside the square brackets

Example:

/dev/sdc1 /media/1 Exfat [/media/1/.Trash-1000, /media/1/useless_directory, /media/1/top_secret_data]

it is important that each entry is separated by a comma AND a space (", ").

Search Options

There are some options you can use to enhance your search to the next level, each starts with the backslash ("\")

Each "\" defines the start of a predicate (if no \ checks if file contains what you typed).

Predicates contain options:

\! : Negation

\ : Normal (the space is necessary)

\_*: Starts with

\*_: Ends with

Examples:

xyz yyy      -> Searches if file contains "xyz yyy"
\!xyz yyy    -> Searches if file doesn't contain "xyz yyy"
\!xyz\ yyy   -> Searches if file doesn't contain "xyz" AND contains "yyy" (spaces must be escaped to create a new predicate)
\_*xyz       -> Starts with "xyz"
\*_xyz       -> Ends with "xyz"
\!_*xyz      -> Doesn't ends with "xyz"
\!*_xyz      -> Doesn't starts with "xyz"
\*_xyz\ yyy  -> Ends with "xyz" AND contains "yyy"   

Troubleshoot Errors

Q: WARNING: no drive selected A: Open the settings (top left) -> Disks -> + -> Select the right disk -> Select the FilesystemType (if unsure type "df -Th" in a console and find the drive) -> OK

Q: I have selected a drive but nothing shows up A: You must also select the drive type (if unsure type "df -Th" in a console and find the drive)

Q: WARNING: x selected drives' magic header does not match selected filesystem type A: means that one or more selected drives should have another filesystem type (if unsure type "df -Th" in a console and find the drive)

Q: WARNING: x drives do not exist or you do not have permission to open them A: Means that one or more drives do not exist (incorrect path, drive was unmounted, bad drive) or that you ran the program without sudo and it attemps to open the drives with lacking permissions

Anything else send me an email at davidevufficial@gmail.com or open an issue here on github.

Limitations

Anything requires sudo to index ( you can run the program without sudo to search and sort the files ) because it reads the /dev/sdXY drives directly.

In my case sudo is perfectly acceptable (especially because I made the program myself so I know it is not dangerous to run with sudo)

Also the index gets written to "settings/cache.txt" after quitting the program, my "settings/cache.txt" with 1 million files is 175mb so make sure you have free space.

License

Copyright (c) Davidevofficial

This project is licensed under the GNU General Public License v3.0 (GPL-3.0).

Any contribution is appreciated <3.

About

File search GUI inspired by Everything, blazingly fast, made for Linux

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages