daemon
The xeno daemon
subcommand manages execution of the xeno daemon.
xeno sessions are simply passive Git repositories which will not synchronize themselves. In order to synchronize them, the xeno sync
subcommand is provided. To spare the user from having to invoke the xeno sync
subcommand every time they want to sync, the xeno daemon will run in the background and periodically call xeno sync
.
The xeno daemon is not a system daemon, and it does not run as root. Instead, it runs on a per-user basis and syncs only the xeno sessions belonging to that user.
The xeno daemon is launched automatically (if it is not already running) when the xeno edit
or xeno resume
command is used. However, there may be cases where you want to manually start the xeno daemon, e.g. if you restart your computer or if you manually stop the daemon. You can accomplish this by doing:
xeno daemon
The xeno daemon
subcommand will only launch a daemon if one is not already running. Thus it is often useful to just insert the xeno daemon
subcommand into your shell initialization script. If you wish to stop the xeno daemon, you can do so by doing:
xeno daemon --stop
There are a few configuration parameters which affect the behavior of the xeno daemon:
- sync.interval: The period, in seconds, for the daemon to wait between checks for local changes. The default is 10.
- sync.force: By default, the daemon only checks for changes on the remote when pushing local changes. If this is set to "true", xeno will check the remote for changes every time it checks the local copy.
For more information on setting configuration parameters, see the xeno config
subcommand.
For any configuration changes to take affect, the xeno daemon must be restarted with:
xeno daemon --stop
xeno daemon