Skip to main content

Module config

Module config 

Source
Expand description

Handles persistent configuration loading and provides desktop keyring access helpers.

Configuration lives in a JSON file under the XDG config directory. Watch-path entries support both simple paths and extended per-folder rules (sync method, extension filters, size limits). The API key is stored in the desktop keyring via oo7 and never written to disk.

Structsยง

Config
Persistent config container wrapping loaded schema and file source info.
ConfigData
Configuration schema driving application behavior and connection settings.
FolderRules
Defines per-folder filters and guardrails applied before a file is queued for upload.

Enumsยง

FolderSyncMethod
StartupCatchupMode
Catch-up strategy applied to existing files when the application boots.
WatchPathEntry
A watch path entry stored in config.

Functionsยง

best_matching_watch_entry
Find the most specific configured watch entry that contains path.
default_cache_disk_cap_mb ๐Ÿ”’
Default total on-disk cache cap in MB.
default_grid_border_color ๐Ÿ”’
default_grid_quality ๐Ÿ”’
default_true ๐Ÿ”’
Helper to default boolean fields to true during serialization.
default_upload_concurrency ๐Ÿ”’
Helper to default parallel upload worker threads to 3.
keyring_error_hint ๐Ÿ”’
Short diagnostic label for log messages.
keyring_error_message ๐Ÿ”’
Return a user-facing error message for a keyring failure, tailored to the specific backend that failed.
keyring_with_dbus_fallback ๐Ÿ”’
Try oo7::Keyring::new(), which auto-selects portal (Flatpak) or D-Bus (native). If the portal backend fails โ€“ common on Hyprland, Sway, XFCE, and other non-GNOME/KDE desktops โ€“ explicitly attempt the D-Bus Secret Service as a fallback before returning an error.
watch_entry_for_album
Find a configured watch path entry by its target album name.