A generic selector tool for handling various types of entries with text and image preview modes.
pantry is a GTK4-based graphical interface tool for managing and selecting various types of entries such as bookmarks, commands, and images. It reads data from TOML configuration files and provides search and filtering capabilities, supporting both text and image preview modes.
- Support for text and image preview modes
- Search and filtering functionality
- Responsive user interface
- Image preview and detailed information display
- Configuration file-driven data management
- Output piping for integration with other tools
- Dynamic source mode for real-time command execution
git clone https://github.com/lonerOrz/pantry.git
cd pantry
cargo build --release{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
pantry.url = "github:lonerOrz/pantry";
};
outputs =
inputs @{
self,
flake-utils,
nixpkgs,
...
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
};
in
{
devShells.default = pkgs.mkShell {
packages = [ inputs.pantry.packages.${system}.pantry ];
};
}
);
}Basic usage:
pantry -f /path/to/config.tomlSpecify category:
pantry -f /path/to/config.toml -c bookmarksOptions:
-f, --config: Configuration file path [default:~/.config/pantry/config.toml]-c, --category: Specify the category to load (load only categories matching the global display mode if not specified)-d, --display: Display mode: text or picture (overrides config file setting)
Use with piped input:
echo -e "Option 1\nOption 2\nOption 3" | pantryForce picture mode (use with image paths):
pantry -f pictures.toml -d pictureForce text mode (use with URLs or text):
pantry -f bookmarks.toml -d textUse dynamic source mode for real-time command integration:
# config.toml
[cliphist]
display = "picture"
source = "dynamic"
[cliphist.entries]
"cliphist list | head -n 10" = "cliphist decode {}"Then run:
pantry -f config.toml -c cliphistIn dynamic mode, the left side of entries specifies a command whose output populates the list, and the right side specifies a command template where {} gets replaced with the selected item's value.
For detailed usage instructions and examples, see our Getting Started Guide.
pantry uses TOML format configuration files with separate display and input modes. Each category can optionally specify its own modes, which will override the global defaults.
For detailed configuration examples, see our Getting Started Guide and example files in the doc directory.
BSD 3-Clause License
If you find
pantryuseful, please give it a ⭐ and share! 🎉
