gissehel / BarLauncher-UnitConverter

A simple but powerfull physical units converter for BarLauncher application (like Wox and Flow Launcher).
MIT License
0 stars 0 forks source link

Flow Launcher Portable Mode #4

Open stefnotch opened 1 year ago

stefnotch commented 1 year ago

The Flow Launcher can be used in portable mode. When this is the case, it expects that plugins save their configuration in a certain non-appdata directory. For that, the Flow launcher has a "setting save" and a "settings load" helper method.

However, it might be tricky to get the unit converter to work with those constraints. Depending on how it goes, the easiest way could be to politely ask the Flow Launcher developers to add a method to get the plugin settings directory?

Here's the part of the plugin that I think doesn't quite follow Flow's current expectations https://github.com/gissehel/BarLauncher-EasyHelper/blob/b1fca2ff12eb46f4d8262c744b28ac8285ea7bfe/BarLauncher.EasyHelper/Service/SystemService.cs#L20

See also: https://github.com/jjw24/Wox.Plugin.Runner/issues/25 and https://github.com/stax76/Flow.Launcher.Plugin.Favorites/issues/1

jjw24 commented 1 year ago

There is already support for this if you load and save via the API and is very simple to add. Have a look at the Explorer plugin's implementation. Basically you want to save your user settings to Flow's UserData/Settings/Your-Plugin-Folder. Portable mode moves this entire UserData into the application directory and this folder is persisted throughout app updates.

gissehel commented 1 year ago

Yes, I know that FlowLauncher has that API, and that I'm currently not using it (mainly because this is an adpatation of an extension made for Wox only. I'll try to fix this.