Add .pacnew and reboot reminders
Remind about files to merge with pacdiff and a reboot after the running kernel was upgraded. They join every notification and notify alone only for new items; PACNEW_CHECK/REBOOT_CHECK disable them, and the pending file gets pacnew/reboot lines.
This commit is contained in:
@@ -7,11 +7,13 @@ update-notify runs on a systemd user timer and checks:
|
||||
- **Repo updates**, using `checkupdates` from pacman-contrib.
|
||||
- **AUR updates** for packages in a local aurutils repository (`aur repo -u`).
|
||||
- **Custom kernel rebuilds**: when a stock kernel (e.g. `linux-lts`) has a newer version than your custom build of it (e.g. `linux-lts-custom`).
|
||||
- **Maintenance**: `.pacnew`/`.pacsave` files to merge (`pacdiff -o`), and a reboot after the running kernel was upgraded.
|
||||
|
||||
It sends one notification, and only when its content changes since the last one:
|
||||
|
||||
- Update counts are shown once the total number of updates reaches a threshold (default 30). Reminders for `git-monitor` and pending firmware updates (`fwupdmgr`) are added when those tools are installed.
|
||||
- Kernel rebuild reminders are always shown, even below the threshold.
|
||||
- Maintenance reminders are added to every notification. On their own, they notify only when something new appears (a new file to merge, a new kernel to reboot into), so a `.pacnew` you keep isn't repeated.
|
||||
|
||||
## Requirements
|
||||
|
||||
@@ -79,6 +81,8 @@ Settings are read from `$XDG_CONFIG_HOME/update-notify/config` (default `~/.conf
|
||||
- `THRESHOLD`: minimum number of updates before update counts are shown (default 30).
|
||||
- `AUR_REPO`: name of the local aurutils repository (default `aur-local`).
|
||||
- `KERNELS`: maps each stock kernel package to its custom build (default: `linux`, `linux-lts` and `linux-zen` to `<name>-custom`). Kernels where either package isn't installed are skipped. Set `KERNELS=()` to disable the kernel check.
|
||||
- `PACNEW_CHECK`: set to `0` to disable the `.pacnew`/`.pacsave` reminder (default `1`).
|
||||
- `REBOOT_CHECK`: set to `0` to disable the reboot reminder (default `1`). A reboot is needed when the running kernel's `/usr/lib/modules/<version>/vmlinuz` is gone.
|
||||
|
||||
A commented sample config is installed with the package. To start from it:
|
||||
|
||||
@@ -100,9 +104,11 @@ threshold <THRESHOLD from the config, not the argument>
|
||||
repo <pkg> <newver>
|
||||
aur <pkg> <newver>
|
||||
kernel <custom-pkg> <stock-ver>
|
||||
pacnew <path>
|
||||
reboot <running kernel version>
|
||||
```
|
||||
|
||||
The file reflects the last timer or `update-notify.path` run. To keep a bar current in between, e.g. right 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.
|
||||
The file reflects the last timer or `update-notify.path` run. To keep a bar current in between, e.g. right after an upgrade, drop entries whose installed version (`pacman -Q`) is no longer older than `newver`; for `kernel` lines, whose custom build has caught up with `stock-ver` (ignoring `pkgrel`); for `pacnew` lines, whose file is gone; for `reboot` lines, whose version is no longer `uname -r`. This only reads local data, so it's cheap to run often.
|
||||
|
||||
## License
|
||||
|
||||
|
||||
Reference in New Issue
Block a user