- git clone this-repo ~/.local/share/cinnamon/applets/pacman-updater@smanilov
- Build the update viewer:
cd pacman-update-viewer && cargo build --release - Alt+F2, r to restart Cinnamon
- add pacman-updater@smanilov to Applets
- this applet will run
checkupdates(you need to install it separately) repeatedly and count the number of returned lines - if updates are available, a notification is shown as
N (M)where N is the number of packages being updated and M is the total count of all transitively impacted installed packages (viarequired_bytraversal) - from the taskbar, the user can click the smiley and run the updater; this
opens a terminal running
pacman-update-viewer— a TUI that lists pending updates sorted by impact factor as a collapsible tree - inside the viewer:
↑/↓navigate the list;PgUp/PgDnmove a page;Home/Endjump to the first/last item→expands a node to show all installed packages that depend on it←collapses an expanded node, or moves to the parent if already collapsedishowspacman -Qioutput for the current item in a scrollable popup/filters the visible root packages by name;Esccancels andEnterkeeps the selected matchatoggles between pending updates and all installed packagesttransposes the tree betweenrequired_by(used-by) anddepends_on(deps) traversalgtoggles package group labelsrrunssudo pacman -Syu(suspends the TUI, then resumes it); also runsfc-cache -fvon successuinstalls the currently selected package withsudo pacman -S, then rebuildsdepgraph.jsondremoves the currently selected package withsudo pacman -R, then rebuildsdepgraph.jsonhor?opens the help popupqquits; exits with code 0 only if an update or install succeeded
- if there are no pending updates but
depgraph.jsonexists, the viewer opens directly in all-packages mode instead of exiting - after the update completes successfully,
depgraph.jsonis refreshed automatically; it is also refreshed on applet startup and rebuilt after package installation or deletion from inside the viewer
depgraph.json is written by the applet and contains the dependency graph between
pacman managed packages. It is updated on startup and after each successful
sudo pacman -Syu. The viewer also rewrites it after package deletion. An
example follows:
{
"last_updated": 1774870313,
"packages": {
"firefox": {
"name": "firefox",
"version": "123.0-1",
"depends_on": ["nss", "gtk3"],
"reason": "explicit",
"required_by": [],
"groups": []
},
"nss": {
"name": "nss",
"version": "3.98-1",
"depends_on": ["nspr"],
"reason": "dependency",
"required_by": ["firefox"],
"groups": []
}
}
}