thud, short for thumbnail directory, is a tool that lets you generate directory thumbnails from images inside them. Useful for a Dolphin/KDE-like experience with GTK-based file browsers that don't show the contents of directories by default.
thud can be customized with rules and strategies that reside in ~/.config/thud/config.toml
. By default, it creates thumbnails from cover.{png,jpg}
files.
Tested and works in: Caja, Nemo, Thunar, Nautilus.
NixOS (Recommended)
Add thud
to your systemPackages
and rebuild.
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
thud
];
}
I don't use Arch Linux anymore, but I wrote a PKGBUILD for the pacman
enjoyers out there. Feel free to add it to the AUR.
git clone https://github.com/donovanglover/thud -b 0.3.1 && cd thud && makepkg -si
git clone https://github.com/donovanglover/thud && cd thud
cargo build --release
sudo install -Dm755 ./target/release/thud /usr/bin/thud
sudo install -Dm644 ./assets/thud.thumbnailer /usr/share/thumbnailers/thud.thumbnailer
Usage: thud [OPTIONS] <INPUT_DIRECTORY> <OUTPUT_FILE>
Arguments:
<INPUT_DIRECTORY> Directory to thumbnail
<OUTPUT_FILE> Where to save the output image
Options:
-s, --size <INTEGER> Thumbnail size [default: 128]
-v, --verbose Print what thud is doing
-h, --help Print help (see more with '--help')
-V, --version Print version
By default, directories with cover.jpg
or cover.png
will automatically generate cover images. You can customize this with ~/.config/thud/config.toml
.
Creating your own strategy for thud is easy for both new and experienced Rustaceans. Here are the steps:
- First add a new function to
./src/strategy.rs
- Next add your strategy to
match rule.strategy.as_str()
in./src/main.rs
- Finally, make a pull request to let anyone be able to use your thumbnailing strategy.
That's it! The possibilities are endless when it comes to how you want your directory thumbnails to look.