Omahub
← All plugins
P

Trash

by paranojik

Trash can for the Omarchy bar: browse recently deleted files, restore them, or empty the trash.

Security review

No obvious issues detected

Deterministic scan — not a security guarantee

None
Risk level
None
Analyzed commit
ab3babc
Scanned
1 month ago

No potentially dangerous behavior detected in the analyzed commit.

Automated analysis only — not a security guarantee.

AI advisory review

No obvious issues detected

Language-model assessment · ~deepseek/deepseek-v4-flash-latest — advisory only

None
AI risk level
None
Recommendation
install
Model
~deepseek/deepseek-v4-flash-latest
Analyzed commit
ab3babc
Reviewed
1 month ago

The plugin is a well-engineered trash widget that uses gio/gvfs for all operations, with careful input validation, timeouts, and caps on untrusted trash metadata. The restore path includes a confirmation step for sensitive destinations (dot-prefixed or PATH directories), and all destructive actions (delete, empty) are explicit user-initiated. No obfuscation, persistence, credential theft, or hidden destructive behavior was found.

How this check works

This review combines the deterministic scan (the rule-based results above) with an independent look at the plugin's code by a language model. The model reads a trimmed sample of the repository's files, the manifest, and the README, then gives a plain-language risk level and a recommendation: install (no notable danger), review (look closer first), or avoid (clearly dangerous).

It runs on the same analyzed commit as the deterministic scan and is strictly advisory — it is not a security guarantee and never blocks a plugin by itself. A human moderator still reviews plugins before they are listed.

AI advisory only — automated analysis, not a security guarantee.

Install
$ omarchy plugin add https://github.com/paranojik/omarchy-trash --enable
System #bar #quickshell #system

Trash

Trash plugin preview

A trash can for the Omarchy Quattro bar. Browse recently deleted files, restore them to their original location, or empty the trash — without leaving the bar.

It drives the trash through gio/gvfs (trash:///) — the exact same backend Nautilus uses — so it sees everything any freedesktop.org Trash spec tool trashes, including items in per-volume trash directories on external drives and other partitions, aggregated into one list.

Install

omarchy plugin add https://github.com/paranojik/omarchy-trash.git --enable

Usage

  • Click the 🗑 icon to open the list of trashed items.
  • Click a row (or its filename) to open the trash (trash:///) in your default file manager.
  • ↺ Restore moves an item back to its original path. If something already exists at that path, the restored copy is renamed with a (restored N) suffix rather than overwriting it.
    • A trashed item's original path comes from its own metadata, which is ordinary writable data — and the trash spans every mounted volume, so it may come from a USB stick or a network share. If that path points into a configuration or startup location (anything with a dot-prefixed component, or a directory on your PATH), the restore stops and shows you the exact destination first, because a file placed there can run automatically at your next login. Ordinary documents restore in one click.
  • ✕ Delete permanently removes a single item — this cannot be undone.
  • The 🗑 button next to the panel title permanently empties everything currently in the trash, after a confirmation.
  • Filter by filename narrows the list to matching names — useful for quickly checking whether a specific file is still in the trash.
  • Hover a filename to see its full original path in a tooltip.
  • The bar icon glows briefly whenever something new lands in the trash while the bar is running — no desktop notification is sent.

Configure

omarchy bar move io.github.paranojik.trash --section left

Two settings are available from Omarchy's plugin settings UI (or by editing the widget's entry in ~/.config/omarchy/shell.json):

  • Show count next to icon (showCount, default on) — hides the number entirely when off, leaving just the icon.
  • Count display (countMode, default items) — items shows the trashed-item count; size shows the total trash size (e.g. 1.8 GB) instead.

Remove

omarchy plugin remove io.github.paranojik.trash

Dependencies

  • gvfs (the gvfsd-trash backend) — does the actual trash handling; part of the Omarchy base install (pulled in by nautilus/gvfs-*)
  • jq — used by the helper scripts to build JSON output and encode URIs
  • xdg-open — used to open the trash in your file manager
  • Standard coreutils (stat, du) — used only to report accurate recursive sizes for home-trash directories

No new background daemon is started by the plugin itself; gvfsd-trash is spawned on demand by gvfs. The bar widget polls the trash every 2 seconds while the panel's Loader is active (which Quickshell keeps alive for the lifetime of the bar), and every mutation (restore/delete/empty) shells out to one of the three scripts in scripts/.

Known limitations

  • Only sees the freedesktop trash. A plain rm in a terminal bypasses trash entirely and is invisible to this plugin, the same as it would be to any file manager's trash.
  • Directory sizes on other volumes are approximate. gvfs reports a directory's entry size, not its content size; accurate recursive sizes are computed only for items in the home trash.
  • Filenames containing a newline are skipped in the listing (the gio output is line-based); they remain visible in Nautilus.
  • Names are shown with control and direction-changing characters replaced. A file name can contain codepoints that make a row lie about itself (a right-to-left override renders invoice<RLO>gpj.exe as invoiceexe.jpg). Those are displayed as �; the real name is still used for restore and delete.
  • The panel refreshes every 2 seconds while open, every 15 when closed. Sizing trashed folders is the expensive part, so the closed-panel rate is backed off; a newly trashed file can take up to 15 seconds to show up in the bar count.
  • At most 500 entries are listed. Trash contents are untrusted input, so the helper caps how much gio output it reads and how many entries it processes rather than growing without bound. Beyond that the list is truncated and a notice is written to the shell's log; empty-all still clears everything, and Nautilus shows the full trash.

License

MIT — see LICENSE.