feat(privacy): add DO_NOT_TRACK and DISABLE_TELEMETRY env vars under C3 privacy

This commit is contained in:
2026-09-03 22:35:05 -04:00
parent d278a47b32
commit 28a88a9bdf
9 changed files with 47 additions and 6 deletions
+1 -1
View File
@@ -293,7 +293,7 @@ If you'd rather set them by hand, each category is controlled by a universal var
|---|---| |---|---|
| `__fish_config_op_aliases` | Command shadows: `ls`→eza, `cat`→bat, `cd`→zoxide, `rm`→trash, `top`→btop, `edit`→multi-editor launcher, and friends; `grep`/`cp`/`mv`/`wget` flag injection | | `__fish_config_op_aliases` | Command shadows: `ls`→eza, `cat`→bat, `cd`→zoxide, `rm`→trash, `top`→btop, `edit`→multi-editor launcher, and friends; `grep`/`cp`/`mv`/`wget` flag injection |
| `__fish_config_op_autoexec` | Startup side-effects: Fisher bootstrap, theme apply, `paru`/`yay` wrapper generation, auto venv activation, WakaTime hook, auto-pull background fast-forward | | `__fish_config_op_autoexec` | Startup side-effects: Fisher bootstrap, theme apply, `paru`/`yay` wrapper generation, auto venv activation, WakaTime hook, auto-pull background fast-forward |
| `__fish_config_op_overrides` | Vi mode, `exit``smart_exit`, `$PAGER`/`$MANPAGER`/`$CDPATH`/`XDG`/`PATH`, bang-bang history expansion, autopair, puffer, Starship prompt, theme colors | | `__fish_config_op_overrides` | Vi mode, `exit``smart_exit`, `$PAGER`/`$MANPAGER`/`$CDPATH`/`XDG`/`PATH`, `$DO_NOT_TRACK`/`$DISABLE_TELEMETRY`, bang-bang history expansion, autopair, puffer, Starship prompt, theme colors |
| `__fish_config_op_integrations` | Kitty/WezTerm window abbreviations, `done` notifications, `spwin`/`tab`/`split`, `hist`, `logs`, `upgrade`, WakaTime | | `__fish_config_op_integrations` | Kitty/WezTerm window abbreviations, `done` notifications, `spwin`/`tab`/`split`, `hist`, `logs`, `upgrade`, WakaTime |
| `__fish_config_op_logging` | **Opt-in — off unless explicitly enabled.** Scrollback capture on exit, tmux `pipe-pane` pane logging, zellij `dump-screen` capture on exit, `paru`/`yay` AUR log wrappers, Kitty watcher capture (sentinel-file coordinated) | | `__fish_config_op_logging` | **Opt-in — off unless explicitly enabled.** Scrollback capture on exit, tmux `pipe-pane` pane logging, zellij `dump-screen` capture on exit, `paru`/`yay` AUR log wrappers, Kitty watcher capture (sentinel-file coordinated) |
| `__fish_config_op_greeting` | Per-session `fish_greeting` (suppresses distro greetings such as CachyOS fastfetch by overriding with an empty function); first-run welcome banner | | `__fish_config_op_greeting` | Per-session `fish_greeting` (suppresses distro greetings such as CachyOS fastfetch by overriding with an empty function); first-run welcome banner |
+2
View File
@@ -34,6 +34,7 @@ set -g __fish_config_op_registry_keys \
"config:greeting-stamp" \ "config:greeting-stamp" \
"config:pager-editor-gpg" \ "config:pager-editor-gpg" \
"config:path-setup" \ "config:path-setup" \
"config:privacy" \
"config:vi-mode" \ "config:vi-mode" \
"done:" \ "done:" \
"du:" \ "du:" \
@@ -100,6 +101,7 @@ set -g __fish_config_op_registry_values \
"greeting/greeting-message" \ "greeting/greeting-message" \
"overrides/environment" \ "overrides/environment" \
"overrides/environment" \ "overrides/environment" \
"overrides/privacy" \
"overrides/key-bindings" \ "overrides/key-bindings" \
"integrations/notifications" \ "integrations/notifications" \
"aliases/filesystem" \ "aliases/filesystem" \
+9
View File
@@ -25,6 +25,7 @@
# site cachyos-tricks: overrides/environment # site cachyos-tricks: overrides/environment
# site cachyos-strip-aliases: aliases/filesystem # site cachyos-strip-aliases: aliases/filesystem
# site cachyos-strip-overrides: overrides/key-bindings # site cachyos-strip-overrides: overrides/key-bindings
# site privacy: overrides/privacy
# site pager-editor-gpg: overrides/environment # site pager-editor-gpg: overrides/environment
# site exit-wiring: overrides/key-bindings # site exit-wiring: overrides/key-bindings
# site path-setup: overrides/environment # site path-setup: overrides/environment
@@ -104,6 +105,14 @@ set -q NVIDIA_SETTINGS_RW_CONFIG_FILE; or set -gx NVIDIA_SETTINGS_RW_CONFIG_FILE
set -q CODEIUM_HOME; or set -gx CODEIUM_HOME "$XDG_CONFIG_HOME/codeium" set -q CODEIUM_HOME; or set -gx CODEIUM_HOME "$XDG_CONFIG_HOME/codeium"
set -q WORDLIST; or set -gx WORDLIST "$XDG_CONFIG_HOME/hunspell_en_US" set -q WORDLIST; or set -gx WORDLIST "$XDG_CONFIG_HOME/hunspell_en_US"
# ───────────────────────── Privacy variables ────────────────────────────
# Global telemetry opt-out variables (C3 overrides: privacy)
# Various CLI tools, runtimes, and AI-agent tools respect these variables.
if __fish_config_op_enabled (status basename) privacy
set -gx DO_NOT_TRACK 1
set -gx DISABLE_TELEMETRY 1
end
# ─────────────────────────── Pager variables ──────────────────────────── # ─────────────────────────── Pager variables ────────────────────────────
# Overriding $PAGER, $EDITOR, and $GPG_TTY is opinionated (C3 overrides) # Overriding $PAGER, $EDITOR, and $GPG_TTY is opinionated (C3 overrides)
if __fish_config_op_enabled (status basename) pager-editor-gpg if __fish_config_op_enabled (status basename) pager-editor-gpg
+4
View File
@@ -305,6 +305,10 @@ bang-bang=## C3 — Key and Environment Overrides
bindings-toggle=### key-bindings bindings-toggle=### key-bindings
environment=### environment environment=### environment
prompt-toggle=### prompt prompt-toggle=### prompt
privacy=### privacy
privacy-toggle=### privacy
do-not-track=### privacy
disable-telemetry=### privacy
c4=## C4 — Terminal and Tool Integration c4=## C4 — Terminal and Tool Integration
integrations-detail=## C4 — Terminal and Tool Integration integrations-detail=## C4 — Terminal and Tool Integration
terminal-abbrs=### terminal-abbrs terminal-abbrs=### terminal-abbrs
+9 -2
View File
@@ -3358,7 +3358,7 @@ category variable.
C5 Logging and Capture — Session logs, command duration C5 Logging and Capture — Session logs, command duration
C6 Greeting & First-Run UI — Custom startup banner C6 Greeting & First-Run UI — Custom startup banner
Each category further sub-divides into two to six sub-categories (24 in Each category further sub-divides into two to six sub-categories (25 in
total) with their own `__fish_config_op_<category>_<subcategory>` toggles total) with their own `__fish_config_op_<category>_<subcategory>` toggles
-- see that category's page for its sub-category list. -- see that category's page for its sub-category list.
@@ -3528,6 +3528,8 @@ all of them.
Catppuccin colors 30+ fish_color_* variables set to Mocha palette Catppuccin colors 30+ fish_color_* variables set to Mocha palette
FZF_DEFAULT_OPTS FZF themed to Catppuccin Mocha colors FZF_DEFAULT_OPTS FZF themed to Catppuccin Mocha colors
Right prompt fish_right_prompt: exit code (on failure) + dim timestamp; always rendered; Docker context added when starship+C3 active Right prompt fish_right_prompt: exit code (on failure) + dim timestamp; always rendered; Docker context added when starship+C3 active
DO_NOT_TRACK=1 Universal telemetry opt-out for tools and AI agents
DISABLE_TELEMETRY=1 Telemetry opt-out for telemetry-aware CLIs
The bang-bang system spans `key_bindings.fish`, `abbr.fish`, `puffer.fish`, and The bang-bang system spans `key_bindings.fish`, `abbr.fish`, `puffer.fish`, and
six `expand_bang_*.fish` functions. All are gated together — disabling C3 six `expand_bang_*.fish` functions. All are gated together — disabling C3
@@ -3539,7 +3541,7 @@ is independently controlled by C5 (see below).
### Sub-categories ### Sub-categories
`__fish_config_op_overrides` sub-divides into three sub-categories, each `__fish_config_op_overrides` sub-divides into four sub-categories, each
with its own `__fish_config_op_overrides_<slug>` toggle: with its own `__fish_config_op_overrides_<slug>` toggle:
### key-bindings ### key-bindings
@@ -3557,6 +3559,11 @@ Starship, the right prompt, Catppuccin syntax/prompt colors, and FZF
theming (`$FZF_DEFAULT_OPTS`) -- all driven by the same guard as a single theming (`$FZF_DEFAULT_OPTS`) -- all driven by the same guard as a single
unit, not independently toggleable from each other. unit, not independently toggleable from each other.
### privacy
`$DO_NOT_TRACK` and `$DISABLE_TELEMETRY` environment variables for
telemetry opt-out across CLI tools, runtimes, and AI agents.
## C4 — Terminal and Tool Integration ## C4 — Terminal and Tool Integration
These features couple the shell to specific external tools. Disabling These features couple the shell to specific external tools. Disabling
@@ -24,6 +24,8 @@ all of them.
Catppuccin colors 30+ fish_color_* variables set to Mocha palette Catppuccin colors 30+ fish_color_* variables set to Mocha palette
FZF_DEFAULT_OPTS FZF themed to Catppuccin Mocha colors FZF_DEFAULT_OPTS FZF themed to Catppuccin Mocha colors
Right prompt fish_right_prompt: exit code (on failure) + dim timestamp; always rendered; Docker context added when starship+C3 active Right prompt fish_right_prompt: exit code (on failure) + dim timestamp; always rendered; Docker context added when starship+C3 active
DO_NOT_TRACK=1 Universal telemetry opt-out for tools and AI agents
DISABLE_TELEMETRY=1 Telemetry opt-out for telemetry-aware CLIs
The bang-bang system spans `key_bindings.fish`, `abbr.fish`, `puffer.fish`, and The bang-bang system spans `key_bindings.fish`, `abbr.fish`, `puffer.fish`, and
six `expand_bang_*.fish` functions. All are gated together — disabling C3 six `expand_bang_*.fish` functions. All are gated together — disabling C3
@@ -35,7 +37,7 @@ is independently controlled by C5 (see below).
## Sub-categories ## Sub-categories
`__fish_config_op_overrides` sub-divides into three sub-categories, each `__fish_config_op_overrides` sub-divides into four sub-categories, each
with its own `__fish_config_op_overrides_<slug>` toggle: with its own `__fish_config_op_overrides_<slug>` toggle:
## key-bindings ## key-bindings
@@ -53,3 +55,8 @@ Starship, the right prompt, Catppuccin syntax/prompt colors, and FZF
theming (`$FZF_DEFAULT_OPTS`) -- all driven by the same guard as a single theming (`$FZF_DEFAULT_OPTS`) -- all driven by the same guard as a single
unit, not independently toggleable from each other. unit, not independently toggleable from each other.
## privacy
`$DO_NOT_TRACK` and `$DISABLE_TELEMETRY` environment variables for
telemetry opt-out across CLI tools, runtimes, and AI agents.
+1 -1
View File
@@ -19,7 +19,7 @@ category variable.
C5 [Logging and Capture](/08-components-reference/05-c5-logging-and-capture/) — Session logs, command duration C5 [Logging and Capture](/08-components-reference/05-c5-logging-and-capture/) — Session logs, command duration
C6 [Greeting & First-Run UI](/08-components-reference/06-c6-greeting-and-first-run-ui/) — Custom startup banner C6 [Greeting & First-Run UI](/08-components-reference/06-c6-greeting-and-first-run-ui/) — Custom startup banner
Each category further sub-divides into two to six sub-categories (24 in Each category further sub-divides into two to six sub-categories (25 in
total) with their own `__fish_config_op_<category>_<subcategory>` toggles total) with their own `__fish_config_op_<category>_<subcategory>` toggles
-- see that category's page for its sub-category list. -- see that category's page for its sub-category list.
+2 -1
View File
@@ -44,7 +44,8 @@ function __config_settings_subcats --description 'List the sub-categories for on
printf '%s\t%s\t%s\n' \ printf '%s\t%s\t%s\n' \
key-bindings Key-bindings "vi-mode, autopair, puffer, bang-bang" \ key-bindings Key-bindings "vi-mode, autopair, puffer, bang-bang" \
environment Environment "PATH, PAGER, EDITOR, CDPATH" \ environment Environment "PATH, PAGER, EDITOR, CDPATH" \
prompt Prompt "Starship, right prompt, theme + FZF colors" prompt Prompt "Starship, right prompt, theme + FZF colors" \
privacy Privacy "DO_NOT_TRACK, DISABLE_TELEMETRY"
case __fish_config_op_integrations case __fish_config_op_integrations
printf '%s\t%s\t%s\n' \ printf '%s\t%s\t%s\n' \
terminal-abbrs Term-abbrs "Kitty/WezTerm abbreviations" \ terminal-abbrs Term-abbrs "Kitty/WezTerm abbreviations" \
+11
View File
@@ -48,6 +48,17 @@ function test_op_registry_lookup
test $status -eq 0 -a (count $tags) -gt 0 test $status -eq 0 -a (count $tags) -gt 0
end end
function test_privacy_variables
test "$DO_NOT_TRACK" = "1" -a "$DISABLE_TELEMETRY" = "1"
end
function test_privacy_op_registry_lookup
functions -q __fish_config_op_registry_lookup
or return 1
set -l tags (__fish_config_op_registry_lookup config privacy)
test $status -eq 0 -a "$tags" = "overrides/privacy"
end
function test_op_enabled_fail_open function test_op_enabled_fail_open
# An identity/site pair with no registry entry must resolve to # An identity/site pair with no registry entry must resolve to
# enabled -- the documented fail-open default. # enabled -- the documented fail-open default.