Skip to content

feat(desktop): declare the trash URI scheme handler - #2065

Merged
l0gicgate merged 1 commit into
mainfrom
feat/2052-declare-trash-scheme-handler
Nov 5, 2026
Merged

l0gicgate merged 1 commit into
mainfrom
feat/2052-declare-trash-scheme-handler

Conversation

@l0gicgate

Copy link
Copy Markdown
Contributor

Description

Adds x-scheme-handler/trash to the desktop entry's MimeType=. Strata already opens trash:/// through Exec=strata %U, but without the declaration xdg-mime-based tooling and application choosers never offered it for the scheme, so it had to be mapped by hand.

The existing installers and the in-app updater rewrite the entry and run update-desktop-database, so per-user installs pick this up on their next update.

One behaviour to weigh: a default set in mimeapps.list always wins, but when none is set for the scheme, GIO falls back to the first declared handler. Strata can therefore become the effective trash handler on a system with no explicit default.

Visual evidence

N/A: desktop entry metadata only, with no change to Strata's interface.

How to test

  1. Install the entry to ~/.local/share/applications with mise run install-local, which also refreshes the MIME cache.
  2. Run gio mime x-scheme-handler/trash and confirm Strata is listed under Registered and Recommended applications.
  3. Run gio open trash:/// with Strata as the default for the scheme.
  4. Set another handler as the default in mimeapps.list and rerun step 2.

Expected result: Strata is offered as a handler and gio open trash:/// opens its Trash view. In step 4 the other handler stays the default, with Strata still listed as a candidate.

Related issue

Closes #2052

Strata already opens trash:/// through Exec=strata %U, but the desktop entry
only declared inode/directory, so xdg-mime tooling and application choosers
never offered it for the scheme.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Declare x-scheme-handler/trash in the desktop entry

1 participant