macbook: add warmup service for Zen Browser
Start Zen headless for 3s at login to prime the page cache and shared libraries on the slow MacBook Air hardware. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ca6699f6f4
commit
8c1f248fb9
1 changed files with 19 additions and 0 deletions
|
|
@ -74,6 +74,25 @@
|
|||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
systemd.user.services.zen-warmup = {
|
||||
Unit = {
|
||||
Description = "Pre-warm Zen Browser";
|
||||
After = [ "graphical-session.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${pkgs.writeShellScript "zen-warmup" ''
|
||||
${inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.default}/bin/zen-beta --headless &
|
||||
ZEN_PID=$!
|
||||
sleep 3
|
||||
kill $ZEN_PID 2>/dev/null || true
|
||||
wait $ZEN_PID 2>/dev/null || true
|
||||
''}";
|
||||
};
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
systemd.user.services.nemo-warmup = {
|
||||
Unit = {
|
||||
Description = "Pre-warm Nemo file manager libraries";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue