Skip to main content

Crate mimick

Crate mimick 

Source
Expand description

Handles application bootstrap, single-instance wiring, and daemon startup flow.

Initialises GTK/Libadwaita, registers the D-Bus application name for single-instance enforcement, and decides whether to present the library window or settings window based on user configuration. Background sync, tray icon, and filesystem monitor are wired up before entering the main event loop.

Modulesยง

api_client ๐Ÿ”’
Integrates with the Immich API, handles connectivity failover, and provides album/cache helpers.
app_context ๐Ÿ”’
Consolidated application context passed through the UI and background services.
autostart ๐Ÿ”’
Handles autostart integration for both native installations and sandboxed Flatpak builds.
cache_manager ๐Ÿ”’
Unified prune + clear over every on-disk cache subdirectory.
config ๐Ÿ”’
Handles persistent configuration loading and provides desktop keyring access helpers.
diagnostics ๐Ÿ”’
Exports a support-friendly diagnostics bundle with sensitive local data redacted for privacy.
library ๐Ÿ”’
Library view module โ€“ browse, search, and download assets from an Immich server.
logging ๐Ÿ”’
media_kinds ๐Ÿ”’
Central registry of supported media extensions, MIME types, and asset kinds.
monitor ๐Ÿ”’
Provides live filesystem monitoring, file-settling checks, and checksum generation.
notifications ๐Ÿ”’
Provides desktop notification helpers using the GIO notification portal.
profile ๐Ÿ”’
Per-profile state isolation driven by the MIMICK_PROFILE env var.
queue_manager ๐Ÿ”’
Manages upload queue orchestration, retry persistence, and sync-index updates.
remote_sync ๐Ÿ”’
Periodic remote-album reconciler.
runtime_env ๐Ÿ”’
Provides best-effort checks of system conditions to determine when uploads should be deferred.
sanitize ๐Ÿ”’
Input sanitisation for file paths and URLs.
settings_window ๐Ÿ”’
Implements the GTK4/Libadwaita settings window and status dashboard.
sidecar ๐Ÿ”’
XMP sidecar file discovery.
startup_scan ๐Ÿ”’
Performs a startup catch-up scan for files that were missed while Mimick was not running.
state_manager ๐Ÿ”’
Stores persistent status snapshots to restore basic UI state across application launches.
sync_index ๐Ÿ”’
Maintains a persistent index of files that have been previously synced.
tray_icon ๐Ÿ”’
Integrates StatusNotifier tray functionality and provides GTK-facing control signals.
util ๐Ÿ”’
Shared filesystem and I/O utilities.
watch_path_display ๐Ÿ”’
Provides user-friendly display names for watch paths.

Staticsยง

APP_CONTEXT ๐Ÿ”’
Shared application context reused by UI entry points and the shutdown path.

Functionsยง

consume_flag ๐Ÿ”’
Atomically check and clear a cross-thread boolean flag. Returns true if the flag was set, clearing it in the process.
find_window ๐Ÿ”’
Helper to look up active GTK window instances by widget name.
main ๐Ÿ”’
open_default_window ๐Ÿ”’
Open whichever window the user prefers, presenting an existing instance if available.
open_library_window_now ๐Ÿ”’
Open Library window, falling back to Settings if disabled.
open_settings_window_now ๐Ÿ”’
Open Settings window or present existing settings instance.