From 8e5214fb2d4589e74c3fffb714ea0e9904ccf272 Mon Sep 17 00:00:00 2001 From: Gareth Dwyer Date: Fri, 24 Apr 2026 22:22:31 +0200 Subject: [PATCH] fix config --- src/config.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/config.rs b/src/config.rs index 187e03d..805c9a3 100644 --- a/src/config.rs +++ b/src/config.rs @@ -39,5 +39,13 @@ impl Config { } fn config_path() -> Option { + // Check XDG-style ~/.config first (takes precedence on all platforms), + // then fall back to the platform config dir (e.g. ~/Library/Preferences on macOS). + let xdg = dirs::home_dir().map(|h| h.join(".config").join("mdterm").join("config.toml")); + if let Some(ref p) = xdg { + if p.exists() { + return xdg; + } + } dirs::config_dir().map(|d| d.join("mdterm").join("config.toml")) }