docs.html 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <!DOCTYPE html>
  2. <html lang="en_US">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <title>Configuring the Sync Daemon &mdash; Docs</title>
  6. <meta property="og:site_name" content="Example Docs">
  7. </head>
  8. <body class="docs">
  9. <div class="sidebar"><ul><li><a href="/docs/install">Install</a></li><li><a href="/docs/config">Configure</a></li><li><a href="/docs/faq">FAQ</a></li></ul></div>
  10. <div class="content" role="main">
  11. <article id="main-article">
  12. <h1 id="top">Configuring the Sync Daemon</h1>
  13. <p onclick="track('intro')" style="font-size:18px;color:#666">The sync daemon reads a single configuration file at start-up. This page describes every option, the defaults, and a few common recipes&nbsp;&mdash; including how to keep battery use low on e-ink devices.</p>
  14. <h2>File location</h2>
  15. <p>The daemon looks for <code>config.toml</code> in these places, in order:</p>
  16. <ol>
  17. <li><code>$XDG_CONFIG_HOME/syncd/config.toml</code></li>
  18. <li><code>~/.config/syncd/config.toml</code></li>
  19. <li><code>/etc/syncd/config.toml</code><p>System-wide settings &amp; defaults.</p></li>
  20. </ol>
  21. <h2>Options</h2>
  22. <table class="options">
  23. <thead><tr><th>Option</th><th>Type</th><th>Default</th><th colspan="0">Notes</th></tr></thead>
  24. <tr><td><code>interval</code></td><td>duration</td><td>15m</td><td>How often to check for changes. Values under 1m are rounded up.</td></tr>
  25. <tr><td><code>wifi_only</code></td><td>bool</td><td>true</td><td>Skip syncing on mobile data.</td></tr>
  26. <tr><td rowspan="2"><code>paths</code></td><td>list</td><td>[]</td><td>Folders to watch &lt;relative to home&gt;.</td></tr>
  27. <tr><td colspan="3">May be empty, in which case nothing is synced.</td></tr>
  28. </table>
  29. <h3>Durations</h3>
  30. <p>Durations use Go syntax: <kbd>90s</kbd>, <kbd>15m</kbd> or <kbd>1h30m</kbd>. The &ldquo;quotes&rdquo; are optional.</p>
  31. <h4>Edge cases</h4>
  32. <dl><dt>Zero</dt><dd>Disables periodic sync; only manual sync runs.</dd><dt>Negative</dt><dd>Rejected at start-up with an error.</dd></dl>
  33. <h2>Example</h2>
  34. <pre class="language-toml"><code><span class="k">interval</span> = <span class="s">"30m"</span>
  35. <span class="k">wifi_only</span> = true
  36. <span class="k">paths</span> = ["Books", "Articles/very/long/path/that/would/overflow/a/small/e-ink/screen/if/it/did/not/wrap"]
  37. </code></pre>
  38. <div class="note"><p><b>Note:</b> restart the daemon after editing &ndash; it does not watch its own config file.<div>See also the <a href="../faq#restart">FAQ</a>.</div></p></div>
  39. <p>Questions? <a href="mailto:docs@example.com">Email the docs team</a> or <a href="javascript:openChat()">open chat</a>.</p>
  40. <form class="feedback"><p>Was this page helpful?</p><button>Yes</button><button>No</button></form>
  41. </article>
  42. </div>
  43. <footer><p>&copy; Example Inc.</p></footer>
  44. <script>analytics.page();</script>
  45. </body>
  46. </html>