Daemon mode pins an animated fetch at the top of the terminal and keeps looping it in the background, so the shell prompt stays usable below it — without splits or an extra terminal multiplexer.
When daemon mode is active, xfetch forks to the background: the parent writes its
PID to ~/.config/xfetch/daemon.pid and exits immediately, so the shell
prompt returns instantly. The child keeps rendering the animation loop pinned at
the top of the terminal, reserving the top rows with a terminal scroll region
(DECSTBM) and drawing each frame with absolute cursor positioning.
No extra shell configuration is required — everything activates from the JSON.
On Windows there is no fork: the parent renders the first frame and
spawns a worker copy of itself that inherits the console, and
xfetch --daemon-stop signals a named stop event (falling back to
terminating the worker) so the terminal is restored either way. The worker also
exits on its own when the shell leaves the console — the Windows equivalent of
the pty hangup. Scroll region, absolute rows and cursor save/restore are the
same on every platform.
From the CLI:
xfetch --daemon
Or from the config file:
{
"daemon": true,
"logo_animation": {
"plugin": "animate-logo",
"style": "frame",
"fps": 6,
"frames_path": "~/.config/xfetch/logos/fox.txt"
}
}
The --daemon CLI flag overrides the daemon config value.
xfetch --daemon-stop
This reads the PID from ~/.config/xfetch/daemon.pid, verifies it is an
xfetch process, sends SIGTERM, and restores the terminal (cursor shown,
scroll region reset, PID file removed).
On Windows the same command signals the worker's named stop event instead of
SIGTERM; if the worker does not exit within a second it is
terminated and the terminal is restored from the stop command. The PID is
validated against the process image name (xfetch.exe), mirroring
the /proc/<pid>/comm check on Linux.
| Field | Type | Default | Description |
|---|---|---|---|
daemon | boolean | false |
Enable daemon mode. |
daemon_min_rows | number | 6 | Minimum number of terminal rows left free below the pinned block for command output. |
logo_animation block with a plugin (e.g. animate-logo); without one, daemon mode does nothing.SIGWINCH) are detected and the geometry is recomputed automatically.duration_ms and loop in logo_animation are ignored. For a finite animation that stops on its own, use "daemon": false.
Tall figures (e.g. cat ~29 rows, matrix ~24 rows) take up
almost a whole 30-row terminal and leave little room for command output. The daemon
reserves the top rows for the logo and keeps command output in the remaining height
below it. Medium-height figures (~13-17 rows) are recommended for standard terminals.
~/.config/xfetch/daemon.rows stores the pinned block height, available for optional shell integration.xfetch --daemon-stop reports "No daemon running" and cleans up the stale file.SIGKILL cannot clean up after itself; xfetch --daemon-stop (or pkill xfetch) clears the leftover file.
The live stats daemon (daemon_live) is a sibling of the
animated-logo daemon: it pins the fetch block at the top of the terminal and
re-probes a lightweight subset of modules every few seconds, re-rendering
the block with fresh values (cpu, memory, swap, disk, battery, uptime, datetime).
Your fetch stops being a static snapshot and becomes a live panel — think
"conky pinned at the top", not an interactive btop.
The existing animated daemon is untouched: the two modes are independent and share the same pinning/scroll-region machinery.
{
"daemon_live": true,
"daemon_live_refresh": 2
}
Activation is config-only; the terminal flags only disable/stop/force:
xfetch --no-daemon-live # disable even if the config enables it
xfetch --daemon-live-stop # stop the running live daemon
xfetch --daemon-live-reload # force hot reload (same as "daemon_live_reload": true)
| Field | Type | Default | Description |
|---|---|---|---|
daemon_live | boolean | false |
Enable the live stats daemon. |
daemon_live_refresh | number | per-platform | Seconds between refreshes. Defaults to the platform policy (platform/<os>/live.rs): Linux 2, macOS 3, Windows 5. |
daemon_live_modules | array | per-platform | Modules shown (and refreshed). Defaults to the platform's live set: Linux/macOS cpu, memory, swap, disk, battery, uptime, datetime; Windows excludes battery (opt-in) unless you add it back. |
daemon_live_reload | boolean | false |
Hot reload: watch the config file (and the active theme) and re-apply changes — modules, colors, icons, layout, logo, refresh cadence — without restarting the daemon. Equivalent CLI flag: --daemon-live-reload. |
logo_animation is configured, the logo keeps animating while the content refreshes live; otherwise the logo is static.daemon_live_modules are probed on each tick — heavy work (packages, public IP, plugins) is never re-run.~/.config/xfetch/daemon_live.pid, separate from the animated daemon's; --daemon-live-stop targets it.daemon_min_rows applies to both.--daemon-live-stop — setting daemon_live back to false does not stop a running daemon.