dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

[FEATURE] List of updates available (right click on icon?)

Open Neo-29 opened this issue 8 months ago • 1 comments

Is your feature request related to a problem? Please describe.

Describe the solution you'd like

It would be cool to have the list of available updates, before having to accept the update. Maybe by a right click on the update icon in waybar?

Describe alternatives you've considered

No response

Additional context

No response

Support or Contribution

Neo-29 avatar Mar 29 '26 20:03 Neo-29

You can solve this as follows, but an update will overwrite the modification. Create a file e.g. available.sh

#!/bin/bash

echo "=== Available Updates ==="
echo ""

echo "Official Repositories:"
pacman -Qu
echo ""

echo "AUR Packages:"
yay -Qua
echo ""

# Optional: Count number of updates
OFFICIAL_COUNT=$(pacman -Qu | wc -l)
AUR_COUNT=$(yay -Qua | wc -l)

echo "═══════════════════════════"
echo "Official Repos: $OFFICIAL_COUNT Updates"
echo "AUR: $AUR_COUNT Updates"
echo "Total: $((OFFICIAL_COUNT + AUR_COUNT)) Updates"

echo ""
echo "Press Enter to close..."
read

Then you'll need a wrapper script to run the window as a floating window. For example, start_available.sh both must be excutable. The start_available.sh looks like this:

#!/bin/bash
clear
kitty --class dotfiles-floating -e ~/available.sh

To bind this function to the right-click of the update icon, you need to edit the modules.json file, located at ~/.config/waybar/modules.json You have to search for:

  "custom/updates": {
    "format": "  {}",
    "escape": true,
    "return-type": "json",
    "exec": "~/.config/ml4w/scripts/ml4w-check-system-updates",
    "interval": 1800,
    // "signal": 1,
    // "hide-empty-text": true,
    "on-click": "~/.config/ml4w/settings/installupdates.sh",
    "on-click-right": "~/.config/ml4w/settings/software.sh"

Change the line "on-click-right": "~/.config/ml4w/settings/software.sh" to point to your start_available.sh

Adjust the filenames to match your own setup

tetam01 avatar Apr 01 '26 13:04 tetam01