From fa86ab0c595991edbaf825a2b6d71382211a85a1 Mon Sep 17 00:00:00 2001 From: protagonista-design <64110002+usefulish@users.noreply.github.com> Date: Tue, 4 Aug 2026 17:47:47 -0400 Subject: [PATCH 1/2] feat: fall back to macos syncthing config location Co-Authored-By: Claude Fable 5 --- src/config.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/config.rs b/src/config.rs index f983c0f..456ebae 100644 --- a/src/config.rs +++ b/src/config.rs @@ -42,8 +42,15 @@ impl Config { let xdg_dirs = xdg::BaseDirectories::with_prefix("syncthing"); let st_config_filepath = xdg_dirs .find_state_file("config.xml") - .or_else(|| xdg_dirs.find_config_file("config.xml")) - .context("Unable fo find Synthing config file")?; + .or_else(|| xdg_dirs.find_config_file("config.xml")); + // Syncthing on macOS defaults to a location outside of XDG paths + #[cfg(target_os = "macos")] + let st_config_filepath = st_config_filepath.or_else(|| { + expand_tilde("~/Library/Application Support/Syncthing/config.xml") + .filter(|p| p.is_file()) + }); + let st_config_filepath = + st_config_filepath.context("Unable fo find Synthing config file")?; log::debug!("Found Syncthing config in {st_config_filepath:?}"); let st_config_xml = fs::read_to_string(st_config_filepath)?; let st_config: SyncthingXmlConfig = quick_xml::de::from_str(&st_config_xml)?; From c66c5597774940209bc406133fa5eab6f0fd42b8 Mon Sep 17 00:00:00 2001 From: protagonista-design <64110002+usefulish@users.noreply.github.com> Date: Wed, 5 Aug 2026 17:02:26 -0400 Subject: [PATCH 2/2] doc: macos notes Co-Authored-By: Claude Fable 5 --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index fdc7079..a488a27 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ It is very light on ressource usage and is therefore suitable for use in all con - synchronisation conflict - light on system ressources - no runtime dependency outside of Syncthing +- supports Linux and macOS ## Installation @@ -38,6 +39,8 @@ systemctl --user daemon-reload systemctl --user enable --now stfed.service ``` +On macOS, no service file is provided, use your preferred way of running a background service (for example a launchd user agent). + ### From the AUR Arch Linux users can install the [stfed AUR package](https://aur.archlinux.org/packages/stfed/). @@ -84,6 +87,7 @@ event = "file_down_sync_done" filter = "shopping-list.txt" # command to run when event triggers +# (notify-send is Linux specific, on macOS use for example: osascript -e 'display notification "..."') command = "notify-send 'stfef event triggered!'" # Whether to allow several commands for the same hook to run simultaneously