Skip to content

An update notifier/applier for Arch Linux with a systray applet that assists you with important pre/post update tasks.

License

Notifications You must be signed in to change notification settings

max276/arch-update

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arch-Update

lang-fr

Table of contents

Description

An update notifier/applier for Arch Linux that assists you with important pre/post update tasks and that includes a clickeable systray applet for an easy integration with any panel on any DE/WM.
Optional support for AUR/Flatpak packages and desktop notifications.

Features:

  • Includes a clickeable systray applet that dynamically changes to act as an update notifier/applier. Easy to integrate with any panel on any DE/WM.
  • Automatic check and listing of every packages available for update.
  • Offers to display the latest Arch Linux news before applying updates.
  • Automatic check and listing of orphan packages and offers to remove them.
  • Automatic check for old and/or uninstalled cached packages and offers to remove them.
  • Lists and helps you processing pacnew/pacsave files.
  • Automatic check for pending kernel updates requiring a reboot to be applied and offers to do so if there's one.
  • Support for sudo, doas & run0.
  • Optional support for AUR packages (through yay or paru).
  • Optional support for Flatpak packages.
  • Optional support for desktop notifications on new available updates.

Installation

AUR

Install the arch-update AUR package.
Also check the list of optional dependencies you might need or want.

From Source

Install required dependencies:

sudo pacman -S --needed pacman-contrib curl htmlq diffutils hicolor-icon-theme python python-pyqt6 qt6-svg glib2

Additional optional dependencies you might need or want:

Download the archive of the latest stable release and extract it (alternatively, you can clone this repository via git clone).

To install arch-update, go into the extracted/cloned directory and run the following command:

sudo make install

To uninstall arch-update, go into the extracted/cloned directory and run the following command:

sudo make uninstall

Usage

The usage consist of starting the systray applet and enabling the systemd timer.

The systray applet

To start the systray applet automatically at boot, add the arch-update --tray command to your auto-start commands/WM config or start/enable the associated systemd service like so:

systemctl --user enable --now arch-update-tray.service

The systray icon will automatically change depending on the current state of your system ('up to date' or 'updates available'). When clicked, it launches arch-update via the arch-update.desktop file.

The systray applet attempts to read the arch-update.desktop file at the below paths and in the following order:

  • $XDG_DATA_HOME/applications/arch-update.desktop
  • $HOME/.local/share/applications/arch-update.desktop
  • $XDG_DATA_DIRS/applications/arch-update.desktop
  • /usr/local/share/applications/arch-update.desktop <-- Default installation path when installing Arch-Update from source
  • /usr/share/applications/arch-update.desktop <-- Default installation path when installing Arch-Update from the AUR

In case you want/need to customize the arch-update.desktop file, copy it in a path that has a higher priority than the default installation path and modify it there (to ensure that your custom arch-update.desktop file supersedes the default one and that your modifications are not being overwritten on updates).

This can be useful to force the arch-update.desktop file to launch Arch-Update with a specific terminal emulator for instance.
If clicking the systray applet does nothing, please read this chapter.

The systemd timer

There is a systemd service (in /usr/lib/systemd/user/arch-update.service or in /usr/local/lib/systemd/user/arch-update.service if you installed Arch-Update from source) that executes the check function when started (see the Documentation chapter).
To start it automatically at boot and then once every hour, enable the associated systemd timer (you can modify the auto-check cycle to your liking, see the Tips and tricks - Modify the auto-check cycle chapter):

systemctl --user enable --now arch-update.timer

Screenshots

Once started, the systray applet appears in the systray area of your panel.
It is the icon at the right of the 'wifi' one in the screenshot below:

systray-icon

With the system timer enabled, Arch-Update automatically checks for updates at boot and then once every hour. The check can be manually triggered by running the arch-update --check command.

If there are new available updates, the systray icon will show a red circle and a desktop notification indicating the number of available updates will be sent if there are new available updates compared to the last check (requires libnotify and a running notification server):

notification

When the systray applet is clicked, it prints the list of packages available for updates inside a terminal window and asks for the user's confirmation to proceed with the installation (it can also be launched by running the arch-update command, requires yay or paru for AUR packages support and flatpak for Flatpak packages support).

listing_packages

By default, if at least one Arch Linux news has been published since the last run, Arch-Update will offer you to read the latest Arch Linux news directly from your terminal window.
The news published since the last run are tagged as [NEW]:

listing_news

When recent news gets listed, either type the number associated to a news to read it (you'll be re-prompted to read other news afterwards so you can read multiple news in one run), or simply press "enter" to proceed with the update.
If no news has been published since the last run, Arch-Update will directly proceed to the update after you gave your confirmation.

In both cases, from there, you just have to let Arch-Update guide you through the various steps required for a complete and proper update of your system! 😄

Certain options can be enabled/disabled or modified via the arch-update.conf configuration file. See the arch-update.conf documentation chapter for more details.

Documentation

arch-update

An update notifier/applier for Arch Linux that assists you with
important pre/post update tasks.

Run arch-update to perform the main "update" function:
Display the list of packages available for update, then ask for the user's confirmation
to proceed with the installation.
Before performing the update, offer to display the latest Arch Linux news.
Post update, check for orphan/unused packages, old cached packages, pacnew/pacsave files
and pending kernel update and, if there are, offers to process them.

Options:
-c, --check       Check for available updates, change the systray icon and send a desktop notification containing the number of available updates (if there are new available updates compared to the last check)
-l, --list        Display the list of pending updates
-d, --devel       Include AUR development packages updates
-n, --news [Num]  Display latest Arch News, you can optionally specify the number of Arch news to display with `--news [Num]` (e.g. `--news 10`)
-D, --debug       Display debug traces
--gen-config      Generate a default/example configuration file (see the arch-update.conf(5) man page for more details)
--show-config     Display the `arch-update.conf` configuration file currently used (if it exists)
--tray            Launch the Arch-Update systray applet
-h, --help        Display this help message and exit
-V, --version     Display version information and exit

Exit Codes:
0  OK
1  Invalid option
2  No privilege elevation command (sudo, doas or run0) is installed or the one set in the `arch-update.conf` configuration file isn't found
3  Error when launching the Arch-Update systray applet
4  User didn't gave the confirmation to proceed
5  Error when updating the packages
6  Error when calling the reboot command to apply a pending kernel update
7  No pending update when using the `-l/--list` option
8  Error when generating a configuration file with the `--gen-config` option
9  Error when reading the configuration file with the `--show-config` option

For more information, see the arch-update(1) man page.
Certain options can be enabled/disabled or modified via the arch-update.conf configuration file, see the arch-update.conf(5) man page.

arch-update configuration file

The arch-update.conf file is an optional configuration file for arch-update to enable/disable
or modify certain options within the script.

This configuration file has to be located in "${XDG_CONFIG_HOME}/arch-update/arch-update.conf"
or "${HOME}/.config/arch-update/arch-update.conf".
A default/example configuration file can be generated by running: `arch-update --gen-config`

The supported options are:

- NoColor # Do not colorize output.
- NoVersion # Do not show versions changes for packages when listing pending updates (including when using the `-l/--list` option).
- AlwaysShowNews # Always display Arch news before updating, regardless of whether there's a new one since the last run or not.
- NewsNum=[Num] # Number of Arch news to display before updating and with the `-n/--news` option (see the arch-update(1) man page for more details). Defaults to 5.
- KeepOldPackages=[Num] # Number of old packages' versions to keep in pacman's cache. Defaults to 3.
- KeepUninstalledPackages=[Num] # Number of uninstalled packages' versions to keep in pacman's cache. Defaults to 0.
- PrivilegeElevationCommand=[Cmd] # Command to be used for privilege elevation. Valid options are `sudo`, `doas` or `run0`. If this option is not set, Arch-Update will use the first available command in the following order: `sudo`, `doas` then `run0`.

Options are case sensitive, so capital letters have to be respected.

For more information, see the arch-update.conf(5) man page.

Tips and tricks

AUR support

Arch-Update supports AUR packages if yay or paru is installed:
See https://github.com/Jguer/yay and https://aur.archlinux.org/packages/yay
See https://github.com/morganamilo/paru and https://aur.archlinux.org/packages/paru

Flatpak support

Arch-Update supports Flatpak packages if flatpak is installed:
See https://www.flatpak.org/ and https://archlinux.org/packages/extra/x86_64/flatpak/

Desktop notifications support

Arch-Update supports desktop notifications when performing the --check function if libnotify is installed (and a notification server is running):
See https://wiki.archlinux.org/title/Desktop_notifications

Modify the auto-check cycle

If you enabled the systemd.timer, the --check option is automatically launched at boot and then once per hour.

If you want to change the check cycle, run systemctl --user edit --full arch-update.timer and modify the OnUnitActiveSec value to your liking.
For instance, if you want Arch-Update to check for new updates every 10 minutes instead:

[...]
[Timer]
OnStartupSec=15
OnUnitActiveSec=10m
[...]

Time units are s for seconds, m for minutes, h for hours, d for days...
See https://www.freedesktop.org/software/systemd/man/latest/systemd.time.html#Parsing%20Time%20Spans for more details.

In case you want Arch-Update to check for new updates only once at boot, you can simply delete the OnUnitActiveSec line completely.

Force the desktop file to run with a specific terminal emulator

gio (which is used to launch the arch-update.desktop file when the systray applet is clicked) currently supports a limited list of terminal emulators.
If you don't have any of these terminal emulators installed on your system, you might face an issue where clicking the systray applet does nothing and reports the following error: [...] Unable to find terminal required for application.

While waiting for Gnome to implement a way to allow people using their terminal emulator of choice with gio (which will hopefully happen at some point), you can workaround this issue by copying the arch-update.desktop file to $HOME/.local/share/applications/arch-update.desktop (for instance, see this chapter for more details) and modifying the Exec line in it to "force" arch-update to run with your terminal emulator of choice.
For instance, with alacritty (check your terminal emulator's manual to find the correct option to use):

[...]
Exec=alacritty -e arch-update

Alternatively, you can create a symlink for your terminal emulator that points to /usr/bin/xterm, which is the fallback option for gio (for instance, with alacritty: sudo ln -s /usr/bin/alacritty /usr/bin/xterm) or you can simply install one of the terminal emulators known/supported by gio.

Contributing

You can raise your issues, feedbacks and suggestions in the issues tab.
Pull requests are welcomed as well!

About

An update notifier/applier for Arch Linux with a systray applet that assists you with important pre/post update tasks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 76.1%
  • Makefile 12.2%
  • Python 11.7%