from.baseimportBase,add_propfrom.enumsimport(AnimationSpeeds,LastQueryMode,SearchPrecisionScore,SearchWindowAligns,SearchWindowScreens,)Double=(int|float)# C# doubles are just floats in python, however there is some typemismatch, so some "doubles" are integers.__all__=("CustomFileManager","CustomBrowser","CustomPluginHotkey","CustomQueryShortcut","HttpProxy","PartialPlugin","PluginsSettings","FlowSettings",)
[docs]classCustomFileManager(Base):"""This is a replica of the ``CustomExplorerViewModel`` dataclass in flow. This is an entry for a custom file manager, which is under the ``Default File Manager`` option in flow's ui settings. Attributes ----------- name: :class:`str` The name of the filemanager path: :class:`str` The path to the filemanager file_argument: :class:`str` How to tell the filemanager which file to open directory_argument: :class:`str` How to tell the filemanager which directory to open editable: :class:`bool` Whether or not the user can edit this entry in the ui """name:str=add_prop("Name")path:str=add_prop("Path")file_argument:str=add_prop("FileArgument")directory_argument:str=add_prop("DirectoryArgument")editable:bool=add_prop("Editable")
[docs]classCustomBrowser(Base):"""This is a replica of the ``CustomBrowserViewModel`` dataclass in flow. This represents an entry for a custom browser, which is under the ``Default Web Browser`` option in flow's ui settings. Attributes ----------- name: :class:`str` The name of the browser path: :class:`str` The path to the browser's executable private_arg: :class:`str` The argument that is used to tell the browser to open in incognito/private mode enable_private: :class:`bool` Whether or not to open the browser in private/incognito mode open_in_tab: :class:`bool` Whether to open the link in a new tab or browser window editable: :class:`bool` Whether the user can edit this entry in the ui """name:str=add_prop("Name")path:str=add_prop("Path")private_arg:str=add_prop("PrivateArg")enable_private:bool=add_prop("EnablePrivate")open_in_tab:bool=add_prop("OpenInTab")editable:bool=add_prop("Editable")
[docs]classCustomPluginHotkey(Base):"""This is a replica of the ``CustomPluginHotkey`` dataclass in flow. Attributes ----------- hotkey: :class:`str` keyword: :class:`str` """hotkey:str=add_prop("Hotkey")keyword:str=add_prop("ActionKeyword")
[docs]classCustomQueryShortcut(Base):"""This is a replica of the ``CustomShortcutModel`` dataclass in flow. This represents a custom shortcut in flow's config file. Attributes ----------- value: :class:`str` The shortcut's value, which in the ui is called the ``Expansion`` key: :class:`str` The shortcut's key, which in the ui is called the `Shortcut`` """value:str=add_prop("Value")key:str=add_prop("Key")
[docs]classHttpProxy(Base):"""This represents the user's proxy info Attributes ----------- enabled: :class:`bool` Whether or not the proxy is active server: :class:`str` | ``None`` The proxy's server port: :class:`int` | ``None`` The proxy's port username: :class:`str` | ``None`` The proxy's username password: :class:`str` | ``None`` The proxy's password """enabled:bool=add_prop("Enabled")server:str|None=add_prop("Server")port:int|None=add_prop("Port")username:str|None=add_prop("UserName")password:str|None=add_prop("Password")
[docs]classPartialPlugin(Base):"""This is a partial plugin from flow. Attributes ----------- id: :class:`str` The plugin's ID name: :class:`str` The plugin's name version: :class:`str` The plugin's version priority: :class:`int` The plugin's priority disabled: :class:`bool` Whether or not the plugin is disabled keywords: list[:class:`str`] The plugin's keywords """id:str=add_prop("ID")name:str=add_prop("Name")version:str=add_prop("Version")priority:int=add_prop("Priority")disabled:bool=add_prop("Disabled")keywords:list[str]=add_prop("ActionKeywords")
[docs]classPluginsSettings(Base):"""This represents the user's plugin settings from the general flow config file. Attributes ----------- python_executable: :class:`str` The location of the user's python executable. If there is none, this attribute will be an empty string. node_executable: :class:`str` The location of the user's node executable. If there is none, this attribute will be an empty string. plugins: list[:class:`PartialPlugin`] A list of the user's plugins, in partial form. """python_executable:str=add_prop("PythonExecutablePath")node_executable:str=add_prop("NodeExecutablePath")plugins:dict[str,PartialPlugin]=add_prop("Plugins",cls=lambdax:[PartialPlugin(value)forvalueinx.values()])