New waybar menu for updates

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"

image

7 Likes

Thanks for this.

I could not find waybar-module-pacman

I did find waybar-module-pacman-updates-git

d

1 Like

Correct, I fix it to

pacman -Qi waybar-module-pacman-updates-git
Name                     : waybar-module-pacman-updates-git

thanks for pointing out :slight_smile:

3 Likes

You are welcome.
thanks for the updated code. Works great!

1 Like

tried it works nice :slight_smile: thanks SGS

1 Like

I’m the one who plugged this thing, but beware, it seems to me it is running a checkupdates way too often for my taste.

1 Like

Do you know how to change it’s interval ?

It’s the 300 (checkupdates rate, 5 min) and 5 (checkupdates -n rate, 5 sec) in the source code.

1 Like