Module settings

Module settings 

Source
Expand description

Persistent user settings for the OneDrop GUI.

Stored at ${XDG_CONFIG_HOME:-~/.config}/onedrop/settings.toml. The file is loaded once at startup; the Options overlay calls Settings::save whenever the user tweaks a value so the change survives the next launch.

Runtime state that isn’t user-authored (ratings, history) lives under data_dir()${XDG_DATA_HOME:-~/.local/share}/onedrop/. Use data_path to resolve a leaf file inside it.

Structs§

AudioSettings
EngineSettings
KeymapSettings
Per-action keybind overrides, keyed by canonical action name (see onedrop-gui::keymap::Action::as_str). Each value is a human-readable binding string like "Ctrl+Shift+K" parsed by the keymap loader. Unrecognised actions are ignored; unbound actions inherit the GUI’s built-in defaults.
PlaybackSettings
PresetsSettings
Preset library settings — the bits of MD2’s behaviour that survive across launches.
Settings
User-facing knobs persisted between launches.
VisualsSettings
WindowSettings

Enums§

PresetSelectionMode
Random / sequential selection — what R toggles between.

Functions§

data_dir
Resolve ${XDG_DATA_HOME:-~/.local/share}/onedrop/. Returns None only in stripped-down sandboxes that don’t expose a data dir. Callers should treat None as “don’t persist” and keep going.
data_path
Resolve a leaf file inside data_dir. Convenience for the ratings.toml / history.toml callers so they don’t all repeat the .map(|d| d.join(...)) chain.