View how many updates are available on Void Linux's XPBS package manager, straight from Polybar.
- Download the files as a ZIP or clone into a temporary directory.
- Move
xbps-updates.sh
to the~/.config/polybar/
directory. - Make
xbps-updates.sh
executable by executingchmod u+x ~/.config/polybar/xbps-updates.sh
. - Decide where you will put the module. Depending on your choice, add
xbps-updates
to themodules-left
,modules-center
ormodules-right
variable in your polybar config file. - Add the following lines to the
~/.config/polybar/config
file:
[module/xbps-updates]
type = custom/script
exec = ~/.config/polybar/xbps-updates.sh
interval = 120
It's entirely possible to add a quick shortcut to install the available update(s) directly from Polybar. I use the alacritty terminal, and for this terminal it can easily be achieved by adding an additional line under the [module/xbps-updates]
section as follows:
click-left = alacritty -e sudo xbps-install -Su
Please refer to the manual or wiki of your terminal emulator on the exact syntax required to implement this.