Skip to content

feat: Arch Linux support (pacman + AUR via paru/yay)#6

Open
Rocho-EL-Locho wants to merge 3 commits into
rahulmysore23:mainfrom
Rocho-EL-Locho:feat/arch-pacman-aur
Open

feat: Arch Linux support (pacman + AUR via paru/yay)#6
Rocho-EL-Locho wants to merge 3 commits into
rahulmysore23:mainfrom
Rocho-EL-Locho:feat/arch-pacman-aur

Conversation

@Rocho-EL-Locho

Copy link
Copy Markdown

Implements #5 — adds Arch Linux support to the widget.

What this does

The plugin now auto-detects the native package manager at runtime instead of assuming DNF:

  • DNF (Fedora/RHEL) — unchanged behavior.
  • pacman (Arch & derivatives) — repo updates checked with checkupdates (from pacman-contrib).
  • AUR — a separate section, checked via the auto-detected helper (paru preferred, yay fallback) with -Qua.
  • Flatpak — unchanged, and now hidden automatically when flatpak isn't installed.

Update actions per section open a terminal and run:

Section Command
DNF sudo dnf upgrade -y
Pacman sudo pacman -Syu (interactive — review the transaction)
AUR <helper> -Sua (as the invoking user, never sudo)
Flatpak sudo flatpak update -y

Safety / correctness notes

  • Repo checks on Arch use checkupdates, which syncs to a temporary cache DB. It needs no root and does not run pacman -Sy against the system database (which would risk a partial-upgrade state).
  • AUR helpers are never run as root.
  • checkupdates exit codes are handled (0 = updates, 2 = none, other = failure); a timed-out or failed check is shown distinctly from "no updates available" instead of silently reading as up-to-date.
  • Each Proc.runCommand id is suffixed per widget instance, so multi-monitor instances don't collide on the global (singleton) Proc debounce key.

Settings

Adds a "Show AUR Updates" toggle (default on; ignored when no helper is installed). DNF/Flatpak settings are unchanged.

Notes

  • Screenshot updated to show the pacman + AUR layout (demo data).
  • plugin.json version and the changelog version are left for you to assign — there's an "Unreleased" changelog stub you can rename on release.
  • Tested on CachyOS (Arch) with pacman + checkupdates + paru/yay.

Happy to adjust the approach (e.g. an explicit backend setting instead of auto-detect, or folding AUR into the native section) if you'd prefer it shaped differently.

Detect the native package manager at runtime (dnf vs pacman) and drive the existing native section off it, so Fedora behavior is unchanged.

On pacman systems: repo updates are checked with checkupdates (pacman-contrib), which syncs to a temporary cache DB and never runs 'pacman -Sy' against the system DB (avoids a partial-upgrade state); AUR updates are listed in a separate section via the detected helper (paru preferred, yay fallback) using -Qua; update actions run 'sudo pacman -Syu' and '<helper> -Sua' (the AUR helper as the invoking user, never via sudo).

The Flatpak section is hidden automatically when flatpak isn't installed. Each Proc command id is suffixed with a per-instance value so multi-monitor widget instances don't collide on the global Proc debounce key. A timed-out or errored check is shown distinctly from 'no updates available', and a hint is shown when no supported package manager is present.

Adds a 'Show AUR Updates' toggle to the settings.
Update the README (intro, features, configuration, requirements) and the plugin.json description for the new native-PM detection and Arch/AUR support, and add an Unreleased changelog entry. Also correct the Flatpak update command in the features list to match the code (sudo flatpak update -y).

Version number is intentionally left for the maintainer to assign.
@rahulmysore23 rahulmysore23 self-requested a review June 13, 2026 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant