Overview
Minimal Tray Tasker exposes four Tauri commands from the Rust backend to the TypeScript frontend. These commands are registered insrc-tauri/src/lib.rs:111-116 and implemented in the settings service.
All commands can be invoked from the frontend using Tauri’s invoke function.
get_settings
Retrieves all current user settings from the application state. Source:src-tauri/src/services/settings_service.rs:22-33
Parameters
This command takes no parameters.Returns
A map containing all user settings with their current values:
Whether the application starts automatically on system boot (default:
true)Whether hourly reminder notifications are enabled (default:
true)Whether RAM saver mode is enabled (default:
false)Example
Rust Implementation
set_autostart
Enables or disables automatic application startup on system boot. Source:src-tauri/src/services/settings_service.rs:35-46
Parameters
Whether to enable (
true) or disable (false) autostart functionalityReturns
This command returns nothing (void).Side Effects
- Updates the application state
- Persists the setting to
usersettings.jsonstore - Emits a
settings_changedevent that triggers the autostart service to reconfigure itself
Example
Rust Implementation
set_reminders
Enables or disables hourly reminder notifications. Source:src-tauri/src/services/settings_service.rs:48-59
Parameters
Whether to enable (
true) or disable (false) hourly reminder notificationsReturns
This command returns nothing (void).Side Effects
- Updates the application state
- Persists the setting to
usersettings.jsonstore - Emits a
settings_changedevent - Affects the behavior of the notification service running in the background
Example
Rust Implementation
set_ram_saver
Enables or disables RAM saver mode, which helps reduce memory usage of the application. Source:src-tauri/src/services/settings_service.rs:61-72
Parameters
Whether to enable (
true) or disable (false) RAM saver modeReturns
This command returns nothing (void).Side Effects
- Updates the application state
- Persists the setting to
usersettings.jsonstore - Emits a
settings_changedevent