From 90334d88a86f2dcfea57b901671897488dc24917 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Mon, 10 Jun 2024 20:48:01 +0100 Subject: [PATCH] add docs for 18.3 (#55) --- src/content/docs/configuration/config.mdx | 46 ++++++++++++++++++++++ src/content/docs/guide/dotfiles.mdx | 48 ++++++++++++++++++++++- src/content/docs/reference/daemon.mdx | 31 +++++++++++++++ 3 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 src/content/docs/reference/daemon.mdx diff --git a/src/content/docs/configuration/config.mdx b/src/content/docs/configuration/config.mdx index 92d19cd..6d3a4e2 100644 --- a/src/content/docs/configuration/config.mdx +++ b/src/content/docs/configuration/config.mdx @@ -526,3 +526,49 @@ Atuin version: >= 18.1 Default: true Configures whether the TUI exits, when scrolled past the last or first entry. + +## Daemon +Atuin version: >= 18.3 + +Default: false + +Enable the background daemon + +Add the new section to the bottom of your config file + +``` +[daemon] +enabled = true +``` + +### sync_frequency + +How often the daemon should sync, in seconds + +``` +sync_frequency = 300 +``` + +### socket_path + +Where to bind a unix socket for client -> daemon communication + +``` +socket_path = "~/.local/share/atuin/atuin.sock" +``` + +### systemd_socket + +Use a socket passed via systemd socket activation protocol instead of the path + +``` +systemd_socket = false +``` + +### tcp_port + +The port to use for client -> daemon communication. Only used on non-unix systems. + +``` +systemd_socket = false +``` diff --git a/src/content/docs/guide/dotfiles.mdx b/src/content/docs/guide/dotfiles.mdx index ab9fabe..bbc7e2d 100644 --- a/src/content/docs/guide/dotfiles.mdx +++ b/src/content/docs/guide/dotfiles.mdx @@ -86,7 +86,53 @@ You can list all aliases with: atuin dotfiles alias list ``` -## Syncing and backing up aliases +## Env vars + +After creating or deleting an env var, remember to restart your shell! + +### Creating a var + +``` +atuin dotfiles var set NAME 'value' +``` + +For example, to set `FOO` to be `bar` + + +``` +atuin dotfiles var set FOO 'bar' +``` + +Vars are exported by default, but you can create a shell var like so + +``` +atuin dotfiles var set -n foo 'bar' +``` + + +### Deleting a var + +Deleting a var is as simple as: + +``` +atuin dotfiles var delete NAME +``` + +For example, to delete the above var `FOO`: + +``` +atuin dotfiles var delete FOO +``` + +### Listing vars + +You can list all vars with: + +``` +atuin dotfiles var list +``` + +## Syncing and backing up dotfiles If you have [setup sync](/guide/sync), then running ``` diff --git a/src/content/docs/reference/daemon.mdx b/src/content/docs/reference/daemon.mdx new file mode 100644 index 0000000..d21afdd --- /dev/null +++ b/src/content/docs/reference/daemon.mdx @@ -0,0 +1,31 @@ +--- +title: daemon +--- + +# `atuin daemon` +_This is experimental!_ + +The Atuin daemon is a background daemon designed to + +1. Speed up database writes +2. Allow machines to sync when not in use, so they're ready to go right away +3. Perform background maintenance + +It may also resolve issues with ZFS/SQLite performance. + +It's currently experimental, but is safe to use with a little bit of setup + +## To enable + +Add the following to the bottom of your Atuin config file + +```toml +[daemon] +enabled = true +``` + +Then, run `atuin daemon`. This might make sense in a tmux session, systemd unit, etc. Once it's ready for wider use, we will handle this setup for you. + +## Extra config + +See the [config section](/configuration/config/#daemon)