| Post Reply | RetroFed Forum Forum Index » Arch Linux |
| Author | Message | ||
|---|---|---|---|
promitheas
programming.dev
promitheas@programming.devJoined: 2023-06-12 |
Hello everyone :) I have this in a script which I call from my .zshrc:
It works, but when I open a new terminal it may take up to 2 seconds for the prompt to show up. Is there a way of speeding this up? Would it be a good idea to perform the checks in the background every hour or so, maybe with a systemd timer or something, and cache the results (or possibly to make it even more efficient, just store a file somewhere out of the way containing the number of updates and if there is a kernel mismatch - maybe on separate lines so when I open a terminal I can easily query the file and get exactly what I need) so that when I open a new terminal instead of checking with the live repositories it checks the cached data? Also, I guess this would mean that if a package has become available for update after the last time the check script runs, then the number it tells me will be less than the actual number of available updates, right? Thanks in advance! |
||
| 1 Original | |||
| Post Reply |
Back to top |