Skip to content

List phones and cameras in the sidebar - #109

Open
amagdy46 wants to merge 2 commits into
omacom:mainfrom
amagdy46:phones-plugin
Open

amagdy46 wants to merge 2 commits into
omacom:mainfrom
amagdy46:phones-plugin

Conversation

@amagdy46

Copy link
Copy Markdown

A phone plugged in over USB showed nowhere in Folio: Devices lists mounted block devices, and a phone (MTP) or camera (PTP) is a GVfs volume instead. Nautilus lists them with the drives.

What changes

A bundled plugin, phones, built only on what plugins.md describes:

  • Its poll lists the MTP and gphoto2 volumes gio mount -li reports, every 5 seconds, so a phone shows up when it's unlocked and set to file transfer, and goes when it's unplugged.
  • Each row opens with {"mount": "mtp://…", "verified": true}, so Folio mounts it through GVfs and goes to its storage.
  • It needs only gio, from glib2, which Folio already depends on.
  • A phone glyph, and catalogs for the section title and subtitles in every language Folio has.

The README and plugins.md now count it among the bundled plugins.

Tested with a OnePlus 13 over MTP. The suite passes.

A phone plugged in over USB (MTP) or a camera (PTP) showed nowhere, as
Folio lists only mounted block devices. A bundled plugin lists what GVfs
sees in a Phones section and mounts one through GVfs when opened, as
Nautilus does.
@greptile-apps

greptile-apps Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; both earlier findings are addressed and no new actionable issues were found.

Summary

Adds the bundled phones plugin to show USB phones and cameras in the sidebar.

  • Folio lists connected phones and cameras in the sidebar.

Reviews (2) · Last reviewed commit: "Report gio failing in the phones plugin,..." · Reviewed by Greptile

Comment thread plugins/phones/phones Resolved
Comment thread plugins/phones/phones Resolved
A gio that couldn't list volumes left an empty Phones section and nothing
in the journal; the plugin now fails with gio's own error. A test runs it
against gio's output for a disk, a mounted phone and a camera whose name
needs escaping, and against gio failing.
@omarchybot omarchybot added the enhancement New feature or request label Nov 15, 2026
@dhh

dhh commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Thanks for this, it's a neat use of the plugin interface. It overlaps with #22, though, which makes Devices list GIO's volumes the way Nautilus does, mounted or not, and mounts one on a click. GIO's volume monitor includes the MTP and gphoto2 volumes, so with #22 a phone or camera should show under Devices with the drives (as it does in Nautilus) rather than in a section of its own, and without a 5-second gio mount -li poll.

So this one waits on #22. If #22 goes in and phones do show there, this isn't needed; if it doesn't, or phones turn out to need something it doesn't cover, this can be picked up again (rebased onto main, which it conflicts with now). If you have a phone handy, trying #22's branch with it would settle it quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants