Install waybar-module-pacman-updates
sudo pacman -S waybar-module-pacman-updates-git
Edit ~/.config/waybar/config
"modules-right": [ "custom/pacman"
to
"modules-right": [ "custom/updates"
and
"custom/pacman": {
"format": " {}",
"interval": 7200, // every two hours
"exec": "checkupdates | wc -l", // # of updates
//"exec": "i=$(checkupdates); echo \"$i\" |wc -l; echo \"$i\" |column -t |tr '\n' '\r'", // # of updates and tooltip details
"exec-if": "exit 0", // always run; consider advanced run conditions
"on-click": "foot -e update", // update system
"signal": 8
to
"custom/updates": {
"format": "{} {icon}",
"return-type": "json",
"format-icons": {
"has-updates": "",
"updated": "",
"updated": "",
"interval": 3600,
},
"exec-if": "which waybar-module-pacman-updates",
"exec": "waybar-module-pacman-updates",
"on-click": "foot -e update"