Module i3status_rs::blocks::pacman

source ·
👎Deprecated since 0.33.0: The block has been deprecated in favor of the the packages block
Expand description

Pending updates available on pacman or an AUR helper.

Requires fakeroot to be installed (only required for pacman).

Tip: You can grab the list of available updates using fakeroot pacman -Qu --dbpath /tmp/checkup-db-i3statusrs-$USER/. If you have the CHECKUPDATES_DB env var set on your system then substitute that dir instead.

Note: pikaur may hang the whole block if there is no internet connectivity reference. In that case, try a different AUR helper.

§Pacman hook

Tip: On Arch Linux you can setup a pacman hook to signal i3status-rs to update after packages have been upgraded, so you won’t have stale info in your pacman block.

In the block configuration, set signal = 1 (or other number if 1 is being used by some other block):

[[block]]
block = "pacman"
signal = 1

Create /etc/pacman.d/hooks/i3status-rust.hook with the below contents:

[Trigger]
Operation = Upgrade
Type = Package
Target = *

[Action]
When = PostTransaction
Exec = /usr/bin/pkill -SIGRTMIN+1 i3status-rs

§Configuration

KeyValuesDefault
intervalUpdate interval, in seconds. If setting aur_command then set interval appropriately as to not exceed the AUR’s daily rate limit.600
formatA string to customise the output of this block. See below for available placeholders." $icon $pacman.eng(w:1) "
format_singularSame as format but for when exactly one update is available." $icon $pacman.eng(w:1) "
format_up_to_dateSame as format but for when no updates are available." $icon $pacman.eng(w:1) "
warning_updates_regexDisplay block as warning if updates matching regex are available.None
critical_updates_regexDisplay block as critical if updates matching regex are available.None
aur_commandAUR command to check available updates, which outputs in the same format as pacman. e.g. yay -QuaRequired if $both or $aur are used
PlaceholderValueTypeUnit
iconA static iconIcon-
pacmanNumber of updates available according to pacmanNumber-
aurNumber of updates available according to <aur_command>Number-
bothCumulative number of updates available according to pacman and <aur_command>Number-

§Examples

pacman only config:

[[block]]
block = "pacman"
interval = 600
format = " $icon $pacman updates available "
format_singular = " $icon $pacman update available "
format_up_to_date = " $icon system up to date "
critical_updates_regex = "(linux|linux-lts|linux-zen)"
[[block.click]]
# pop-up a menu showing the available updates. Replace wofi with your favourite menu command.
button = "left"
cmd = "fakeroot pacman -Qu --dbpath /tmp/checkup-db-i3statusrs-$USER/ | wofi --show dmenu"
[[block.click]]
# Updates the block on right click
button = "right"
update = true

pacman only config using warnings with ZFS modules:

[[block]]
block = "pacman"
interval = 600
format = " $icon $pacman updates available "
format_singular = " $icon $pacman update available "
format_up_to_date = " $icon system up to date "
# If a linux update is available, but no ZFS package, it won't be possible to
# actually perform a system upgrade, so we show a warning.
warning_updates_regex = "(linux|linux-lts|linux-zen)"
# If ZFS is available, we know that we can and should do an upgrade, so we show
# the status as critical.
critical_updates_regex = "(zfs|zfs-lts)"

pacman and AUR helper config:

[[block]]
block = "pacman"
interval = 600
error_interval = 300
format = " $icon $pacman + $aur = $both updates available "
format_singular = " $icon $both update available "
format_up_to_date = " $icon system up to date "
critical_updates_regex = "(linux|linux-lts|linux-zen)"
# aur_command should output available updates to stdout (ie behave as echo -ne "update\n")
aur_command = "yay -Qua"

§Icons Used

  • update

Structs§

Functions§