scun (simple CRUX update notifier) can be used on CRUX to check for available updates in your local ports tree and send a notification via libnotify. It can also show the total number of available updates. That's it, make your own sandwich!
- be as minimal as possible
- don't depend on a lot of crates
- don't execute outside system commands to accomplish the job
Running scun
without any argument will show a short help message.
Available arguments:
print
: prints the total number of differences between installed versions and available versions--icon|-i
will prepend
to the update number (requires a nerd font)--long|-l
will print the list to the terminal
notify
: useslibnotify
(external dependency) to display a notification that shows all available updates
This program will read /var/lib/pkg/db
on the system and extract the names of installed packages along with the currently installed version.
Then it will read /etc/prt-get.conf
to figure out which directory it needs to search in for these ports.
It will construct a list of all installed ports which have some form of update available that you can display with either print or notify modes.
There is no intelligent logic in this code, no version comparator or anything.
This means that an installed port which can't be found in your tree will show up in this list (as Available Update: "N/A"
) and even downgrades (for whatever reasons) will be displayed.
This is developed to be used with i3status-rust in a custom block configuration:
[[block]]
block = "custom"
command = "/usr/local/bin/scun print --icon"
interval = 60
[[block.click]]
button = "left"
cmd = "/usr/local/bin/scun notify"