i3status_rs::blocks

Module apt

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

Pending updates available for your Debian/Ubuntu based system

Behind the scenes this uses apt, and in order to run it without root privileges i3status-rust will create its own package database in /tmp/i3rs-apt/ which may take up several MB or more. If you have a custom apt config then this block may not work as expected - in that case please open an issue.

Tip: You can grab the list of available updates using APT_CONFIG=/tmp/i3rs-apt/apt.conf apt list --upgradable

§Configuration

KeyValuesDefault
intervalUpdate interval in seconds.600
formatA string to customise the output of this block. See below for available placeholders." $icon $count.eng(w:1) "
format_singularSame as format, but for when exactly one update is available." $icon $count.eng(w:1) "
format_up_to_dateSame as format, but for when no updates are available." $icon $count.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
ignore_updates_regexDoesn’t include updates matching regex in the count.None
ignore_phased_updatesDoesn’t include potentially held back phased updates in the count.false
PlaceholderValueTypeUnit
iconA static iconIcon-
countNumber of updates availableNumber-

§Example

Update the list of pending updates every thirty minutes (1800 seconds):

[[block]]
block = "apt"
interval = 1800
format = " $icon $count updates available "
format_singular = " $icon One update available "
format_up_to_date = " $icon system up to date "
critical_updates_regex = "(linux|linux-lts|linux-zen)"
[[block.click]]
# shows dmenu with cached available updates. Any dmenu alternative should also work.
button = "left"
cmd = "APT_CONFIG=/tmp/i3rs-apt/apt.conf apt list --upgradable | tail -n +2 | rofi -dmenu"
[[block.click]]
# Updates the block on right click
button = "right"
update = true

§Icons Used

  • update

Structs§

Functions§