dafta / DeckMTP

A DeckyLoader plugin for enabling MTP transfer over USB
https://deckbrew.xyz
Other
79 stars 5 forks source link

[Feature Request] Expose mounted filesystems #4

Closed Riven-Spell closed 11 months ago

Riven-Spell commented 1 year ago

Currently, only the home directory is exposed, which is fine if you symlink other drives into the home directory, but it would be nice to have other filesystems (e.g. the MicroSD) exposed via MTP here

image

dafta commented 1 year ago

As for the SD card, the plugin already does this. It tries to detect if an SD card is present, and creates a new share if it is:

image

As for other drives, first of, they don't have to be drives. You can share whatever folder you want. Secondly, while this isn't directly supported in the interface, you can already add whatever folder you want to the share by editing the config file at ~/homebrew/plugins/DeckMTP/bin/umtprd.conf. There are examples inside the file for how to define the shares, and the home share is defined there as well.

You can even add shares on the fly using the ~/homebrew/plugins/DeckMTP/bin/umtprd executable. The way to do this is described here, and it's used in the start script of this plugin to add the SD card share, as seen here.

I would love to add UI support for adding different folders as shares, but unfortunately I don't think Decky currently has a file picker API. The best I could do at this point would be to add a couple of text fields, which would then require people to write the full path to the folder themselves.

EDIT: Apparently, there is a file picker API, so I might add this at some point in the future.

Riven-Spell commented 1 year ago

Oh, maybe I'm experiencing a bug then. Oddly, it's not picking my SD up.

dafta commented 1 year ago

It's possible that your Deck is mounting the SD card in a different location. I know that Valve did do something with the mount location of SD cards a while back that broke Emudeck. Could you please post the output of the lsblk command?