💾 Archived View for alpha.lyk.so › gemlog › 008-searching-the-bins.gmi captured on 2024-08-31 at 12:22:13. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-01-08)

-=-=-=-=-=-=-

searching the bins

I keep a lot of my things tagged with identifiers and stashed away in bins. To keep track of which bins hold which things, I keep a set of TSV files matching identifiers to bins, item descriptions, and other category-specific fields.

Until today, whenever I needed to locate an item I'd pull up a terminal, navigate to my inventory directory, and run "grep -ri 'some item'". It worked well enough, but I've been wanting to explore what could be done to streamline my workflow using tools like fuzzel and fzf for a while now. Searching my inventory interactively seemed like a natural fit for fzf.

fzf is a "command-line fuzzy finder." It takes some input from stdin, provides an interactive text-based interface for searching through it, and outputs the user's final selection to stdout. It also has a "preview" flag, which takes a command string to be executed on the user's current selection and presents the output in a preview pane alongside the search interface.

I was able to combine this flag with a script that pretty-prints an inventory entry to create a simple command-line interface for exploring my inventory entries. I bound this to a hotkey in sway, and now I can look up anything in my inventory with just a few keystrokes! 😁

I describe the system in greater detail, and provide the source code for these scripts, on my "bins" system page.