thumbnailer-bridge

Crates.io License: MIT

This tool makes requests to create thumbnails through D-Bus following org.freedesktop.thumbnails.Thumbnailer1 specification. It doesn't create thumbnails on it's own, but acts as a bridge between your file manager and thumbnailer.

To create thumbnails you will need a daemon, like tumbler.

Features

What are the advantages of using this instead of a shell script with dbus-send?

Dependencies

Usage

``` Bridge between your file manager and thumbnail daemon.

Usage: thumbnailer-bridge [OPTIONS] [FILE]...

Arguments: [FILE]...

Options: -t, --thumbnail Print path to thumbnail if it exists and up to date -f, --flavor Flavor of the thumbnails [default: normal] -s, --scheduler Scheduler for thumbnail generation [default: default] -u, --unchecked Do not check if thumbnail already exists and up to date -l, --listen Listen for notifications --list-flavors List supported schedulers --list-schedulers List supported thumbnail flavors --list-mime List supported media types -h, --help Print help -V, --version Print version ```

This is how you request thumbnails. Flavor -f or --flavor is usually responsible for the size of a thumbnail.

bash thumbnailer-bridge -f x-large $PWD/*

I recommend you to use full path to your current directory that your file manager provides, instead of using relative path, this way, if you're inside a sym-linked location /home/user/pictures -> /mnt/nas, your thumbnails will be preserved if you decide to remount original location /home/user/pictures -> /mnt/nas-old

If you want to be notified when thumbnails are ready to use, add --listen flag. bash $ thumbnailer-bridge --listen /home/user/pictures/meal-2023-02-22.png /home/user/pictures/booty.jpg /home/user/books/how_to_eat_chicken.epub ...

You will find your thumbnails at ${XDG_CACHE_HOME:-~/.cache}/thumbnails/(flavor)/.

To find a thumbnail, corresponding to your file, you can use -t or --thumbnail flag. bash $ thumbnailer-bridge -f x-large -t ~/pictures/cat.png /home/user/.cache/thumbnails/x-large/722b4dbaa8bf716e9f9f7f33f72fd9d4.png

For additional information: Thumbnail Managing Standard.

Installation

Can be installed from crates.io with cargo:

bash cargo install thumbnailer-bridge

Building

To build this little thing, you'll need some Rust.

bash git clone --depth 1 https://github.com/Elvyria/thumbnailer-bridge cd thumbnailer-bridge cargo build --release

Integrations

lf

```

lfrc

cmd on-cd &{{ case $PWD in "$XDGCACHEHOME:-$HOME/.cache"/thumbnails/*) exit 0 ;; esac

thumbnailer-bridge -f x-large "$PWD"/*

}}

on-cd ```