Dvlv / BoxBuddyRS

A Graphical Interface for Distrobox
MIT License
229 stars 24 forks source link

Specify custom home when creating a new distrobox container #23

Closed VortexAcherontic closed 7 months ago

VortexAcherontic commented 7 months ago

Hello there, I'd like to contribute the feature in #21 and on the roadmap to specify custom home directoies when creating a new distrobox container.

Bildschirmfoto vom 2024-01-18 14-01-24

In the new container view I added a new ActionRow containing an EntryRow and a button which will open up a directory chooser using FileDialog (FileChooser etc are deprecated by GTK4 / Adw so I did not used those). After selecting a directory the selected path will be set as the text of the EntryRow allowing for the user to manually edit the chosen directory without the need to open the FileDialog again.

If the EntryRow is empty the --home parameter will not be added to the distrobox-create args hence the default by distrobox will be used.

Before create_box is called in the home path all spaces will be replaced with backslash space to avoid incomplete directories being passed to distrobox create.

I'd like to note I am not very fluent in Rust and kinda happy it worked in the first place 😆 please feel free to suggest any changes especially on how to do certain thing in Rust and which don't.

I appreciate your feedback.

Kind regards,
V.

Dvlv commented 7 months ago

Thank you! I might move the home dir input down underneath Image, then release this as 1.1.0 (I keep messing up the release numbers, I need to automate it somehow).