summaryrefslogtreecommitdiffhomepage
path: root/doc/plugins.org
diff options
context:
space:
mode:
Diffstat (limited to 'doc/plugins.org')
-rw-r--r--doc/plugins.org41
1 files changed, 30 insertions, 11 deletions
diff --git a/doc/plugins.org b/doc/plugins.org
index e5bf42a..7453d4b 100644
--- a/doc/plugins.org
+++ b/doc/plugins.org
@@ -1351,24 +1351,43 @@
the display of those numeric fields.
- Default template: =Up: <days>d <hours>h <minutes>m=
-*** =ArchUpdates' (Zero, One, Many) Rate=
+*** =ArchUpdates (Zero, One, Many) Rate=
+
- Aliases to =arch=
+ - =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
+ a =?= character as a placeholder for the number of updates.
+ - Example:
+ #+begin_src haskell
+ ArchUpdates ("<fc=green>up to date</fc>",
+ "<fc=yellow>1 update</fc>,
+ "<fc=red>? updates</fc>")
+ 600
+ #+end_src
- - =Zero=: a =String= for when the system is up to date.
+*** =makeAccordion Tuning [Runnable]=
- - =One=: a =String= for when only one update is available.
+ - Wraps other =Runnable= plugins and makes them all collapsible to a single string:
- - =Many=: a =String= for when several updates are available; it must contain a =?=
- character as a placeholder for the number of updates.
+ [[file:accordion.gif]]
- - Example:
- In a plain configuration file:
+ - Aliases to =alias' tuning=, being =tuning= of type =Tuning=, so one can use multiple such "accordions"
+ - **Disclaimer**: This only works for Haskell =xmobar.hs=
+ - =Tuning=: the "settings", for which a default value is provided,
#+begin_src haskell
- ArchUpdates' ("<fc=green>up to date</fc>",
- "<fc=yellow>1 update</fc>,
- "<fc=red>? updates</fc>")
- 600
+ defaultTuning = Tuning {
+ alias' = "accordion"
+ , initial = True
+ , expand = "<>"
+ , shrink = "><"
+ }
#+end_src
+ - =expand=: =String= shown when the accordion is contracted (defaults to ="<>"=).
+ - =shrink=: =String= shown when the accordion is expanded (defaults to ="><"=).
+ - =initial=: =Bool= to tell whether the accordion is initially expanded (defaults to =True=).
+ - =[Runnable]=: a list of =Runnable= plugins
+
* Interfacing with window managers
:PROPERTIES:
:CUSTOM_ID: interfacing-with-window-managers