From 82398b1603d139898be70af97ef9d59ba441bae0 Mon Sep 17 00:00:00 2001 From: Alexander 'ccntrq' Pankoff Date: Thu, 10 Apr 2025 08:20:15 +0200 Subject: feat: add new PacmanUpdates plugin the new PacmanUpdates plugin behaves similar to the ArchUpdates plugin while additionally allowing to pass in a custom error message for unknown pacman failures. The default error message of `pacman: Unknown cause of failure.` of the ArchUpdates plugin is too long for my taste. The ArchUpdates plugin was modified to delegate to the new PacmanUpdates plugin while providing the default error message and to show a deprecation notice in the zero updates case. The new name better represents the Plugin's compatibility with all pacman-based distributions, not just Arch. The docs have been updated to reflect the existence of the new plugin and to highlight the similarities between the ArchUpdates and PacmanUpdates plugins. The ArchUpdates plugin has been marked has deprecated there to. --- doc/plugins.org | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'doc/plugins.org') diff --git a/doc/plugins.org b/doc/plugins.org index 21a9452..6f474e1 100644 --- a/doc/plugins.org +++ b/doc/plugins.org @@ -1353,21 +1353,37 @@ the display of those numeric fields. - Default template: =Up: d h m= -*** =ArchUpdates (Zero, One, Many) Rate= +*** =PacmanUpdates (Zero, One, Many, Error) Rate= - - Aliases to =arch= + - Aliases to =pacman= - =Zero=: a =String= to use when the system is up to date. - =One=: a =String= to use when only one update is available. - - =Many=: a =String= to use when several updates are available; it must contain + - =Many=: a =String= to use when several updates are available; it can contain a =?= character as a placeholder for the number of updates. + - =Error=: a =String= to use when pacman fails for unkown reasons (e.g. + network error) - Example: #+begin_src haskell ArchUpdates ("up to date", "1 update, - "? updates") + "? updates", + "!Pacman Error!") 600 #+end_src +*** =ArchUpdates (Zero, One, Many) Rate= + + - *This plugin is deprecated. Use =PacmanUpdates= instead.* + - Aliases to =arch= + - Same As: + #+begin_src haskell + PacmanUpdates (Zero, + One, + Many, + "pacman: Unknown cause of failure.") + Rate + #+end_src + *** =makeAccordion Tuning [Runnable]= - Wraps other =Runnable= plugins and makes them all collapsible to a single string: -- cgit v1.2.3