Snag help › Snag for the desktop
Settings
Settings live in ~/.config/snag/config.toml ($XDG_CONFIG_HOME/snag/config.toml). The first time Snag runs it writes this file with every setting present and commented out, showing its default. Uncomment a line to change it.
A command-line flag beats the file, and the file beats the built-in default.
An unknown key or a file that will not parse stops Snag at start with the line named. Fix the line, or delete the file and a fresh one is written.
Restart the daemon (systemctl --user restart snag) after editing.
Top level
| Key | Default | Means |
|---|---|---|
instance_url | the Snag server | the server address. snag login offers it as the default |
database | ~/.local/share/snag/timer.sqlite | the local database; back this file up |
label | "duration+project" | what the bar shows while running: off, duration, duration+project |
default_project | "" (unset) | where a capture with no #project goes, by project name. See Quick capture |
[idle]
| Key | Default | Means |
|---|---|---|
threshold | 360 | seconds with no input before an idle span opens |
grace | 600 | seconds an idle prompt waits before it becomes unanswered. Nothing is discarded either way. Minimum 1 |
advisory_only | false | record idle spans and never prompt |
[observe]
All off by default. See Observation.
| Key | Default | Means |
|---|---|---|
window | false | record the focused window's title and application |
shell | false | record the focused terminal's directory and git repository |
agent | false | record which repository a coding agent session is on (metadata only) |
screen | false | not built |
commit | false | reserved; no effect in this version |
title_deny | ["1Password", "Bitwarden", "KeePass", "password", "Private Browsing"] | window titles never recorded. Replaces the default list |
Example
default_project = "Inbox"
label = "duration"
[idle]
threshold = 600
advisory_only = false
[observe]
shell = trueFlags that override the file
Flag on snag run | Overrides |
|---|---|
--instance URL | instance_url |
--db PATH | database |
--label MODE | label |
--idle-threshold N | [idle] threshold |
--idle-grace N | [idle] grace |
--idle-advisory | [idle] advisory_only |
Environment
| Variable | Used for |
|---|---|
SNAG_URL, SNAG_TOKEN | when both are set, the capture box uses them instead of the stored token |
XDG_CONFIG_HOME, XDG_DATA_HOME, XDG_RUNTIME_DIR | where the config, database and runtime files go |
RUST_LOG | log detail, for example RUST_LOG=debug snag run |
Next: Keyboard shortcuts