Skip to content

Conversation

sgtaziz
Copy link
Contributor

@sgtaziz sgtaziz commented Sep 14, 2025

Add an update widget for Arch-based systems. Requires AUR helper (paru and/or yay, will default to paru if available.)
image

Might be nice if we can somehow disable the widget from the list of widgets to be picked if not an Arch-based system.

It currently requires TERMINAL env variable to be set, otherwise fallback to xterm. I'm not sure if there is a way to open default term through XDG or similar?

@Purian23 Purian23 requested a review from bbedward September 14, 2025 20:42
@Vantesh
Copy link
Contributor

Vantesh commented Sep 15, 2025

It currently requires TERMINAL env variable to be set, otherwise fallback to xterm. I'm not sure if there is a way to open default term through XDG or similar?

You can try out this xdg-terminal-exec, It allows opening the default terminal or any terminal added in .config/xdg-terminals.list

@bbedward
Copy link
Collaborator

I'm going to do some mods to this after merging to make it more generic per-distro, but I like the idea

@bbedward bbedward merged commit e4f86ab into AvengeMedia:master Sep 15, 2025
@Vantesh
Copy link
Contributor

Vantesh commented Sep 15, 2025

I'm going to do some mods to this after merging to make it more generic per-distro, but I like the idea

Suggestion: Add an option to hide it when there are no updates.

@bbedward
Copy link
Collaborator

My mods are kind of a fail because paru and yay don't let you run with sudo so there's no non-interactive path. With pacman or dnf or other distros I could bring up a polkit dialog 😢 but not with paru, not sure what the solution to that is.

@sgtaziz
Copy link
Contributor Author

sgtaziz commented Sep 15, 2025

I'm not sure, but maybe we can avoid AUR updates all together if you really want it non-interactive? there is a "checkupdates" command on Arch, which shows all non-AUR updates. Then instead of an AUR helper ig we can do pacman directly with polkit. Though might be risky to do non-interactive updates, for example if a kernel or a kernel driver update failed and you didn't know, you might not be aware until the next time you restart

I think even if we get paru/yay working, idk how safe/secure it is to build AUR packages as root, so sticking to non-AUR only might be best in that case

@bbedward
Copy link
Collaborator

I just thought it'd be cool to be able to contain the update output into the shell rather than opening an xterm, but the AUR helpers are tricky because they cant be run as root - the TERMINAL env var is fine for now - it works well enough I think.

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.

3 participants