zen: stage markers for the autoconfig theme watcher
fred.zenTheme.autoconfig / .cfg / .status say which of the three stages the theme watcher reaches, using the one API autoconfig always has. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
7a4bda9a21
commit
657da242d4
1 changed files with 11 additions and 1 deletions
12
apps/zen.nix
12
apps/zen.nix
|
|
@ -28,6 +28,13 @@ let
|
||||||
# Diagnosing a silent failure: about:config -> fred.zenTheme.status holds
|
# Diagnosing a silent failure: about:config -> fred.zenTheme.status holds
|
||||||
# "ok <mtime>", "missing <path>" or "error <exception>" from the last pass.
|
# "ok <mtime>", "missing <path>" or "error <exception>" from the last pass.
|
||||||
themeHotReload = ''
|
themeHotReload = ''
|
||||||
|
// Stage markers, in about:config. pref() is the one API autoconfig always
|
||||||
|
// has, sandboxed or not, so this line cannot be what fails:
|
||||||
|
// fred.zenTheme.autoconfig defaults/pref/autoconfig.js was read
|
||||||
|
// fred.zenTheme.cfg mozilla.cfg executed
|
||||||
|
// fred.zenTheme.status the watcher ran, and what it did
|
||||||
|
pref("fred.zenTheme.cfg", true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const kCc = Components.classes;
|
const kCc = Components.classes;
|
||||||
const kCi = Components.interfaces;
|
const kCi = Components.interfaces;
|
||||||
|
|
@ -96,7 +103,10 @@ in
|
||||||
(inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.default.override {
|
(inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.default.override {
|
||||||
# Lands in defaults/pref/autoconfig.js, the only place this pref is
|
# Lands in defaults/pref/autoconfig.js, the only place this pref is
|
||||||
# read — setting it from mozilla.cfg is too late to unsandbox itself.
|
# read — setting it from mozilla.cfg is too late to unsandbox itself.
|
||||||
extraAutoConfig = ''pref("general.config.sandbox_enabled", false);'';
|
extraAutoConfig = ''
|
||||||
|
pref("general.config.sandbox_enabled", false);
|
||||||
|
pref("fred.zenTheme.autoconfig", true);
|
||||||
|
'';
|
||||||
extraPrefs = themeHotReload;
|
extraPrefs = themeHotReload;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue