Write the pending updates to a file for status bars
Each run saves the pending repo, AUR and kernel updates to $XDG_STATE_HOME/update-notify/pending, independent of the threshold, so a status bar can show them and drop the ones installed since.
This commit is contained in:
@@ -69,6 +69,19 @@ Kernel versions are compared without `pkgrel`, so a stock packaging-only update
|
||||
|
||||
The content of the last notification is stored in `$XDG_STATE_HOME/update-notify` (default `~/.local/state/update-notify`). Delete it to get the current notification again.
|
||||
|
||||
## Status bars
|
||||
|
||||
Each run also writes the pending updates to `$XDG_STATE_HOME/update-notify/pending`, whether or not the threshold is reached, for status bars such as xmobar to read:
|
||||
|
||||
```
|
||||
threshold 30
|
||||
repo <pkg> <newver>
|
||||
aur <pkg> <newver>
|
||||
kernel <custom-pkg> <stock-ver>
|
||||
```
|
||||
|
||||
The file reflects the last run. To keep a bar current after an upgrade, drop entries whose installed version (`pacman -Q`) is no longer older than `newver`, or, for `kernel` lines, whose custom build has caught up with `stock-ver` (ignoring `pkgrel`). This only reads local data, so it's cheap to run often.
|
||||
|
||||
## License
|
||||
|
||||
GPL-3.0-or-later. See [LICENSE](LICENSE).
|
||||
|
||||
Reference in New Issue
Block a user