From a0c38f57d370534e94a569f89ace8be1780be71b Mon Sep 17 00:00:00 2001 From: Enrico Maria De Angelis Date: Mon, 27 May 2024 09:24:02 +0100 Subject: Accordion: a plugin two wrap other plugins and collapse them to a single replacement string --- doc/accordion.gif | Bin 0 -> 71898 bytes doc/plugins.org | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 doc/accordion.gif (limited to 'doc') diff --git a/doc/accordion.gif b/doc/accordion.gif new file mode 100644 index 0000000..c21d2b0 Binary files /dev/null and b/doc/accordion.gif differ diff --git a/doc/plugins.org b/doc/plugins.org index 3433df3..7453d4b 100644 --- a/doc/plugins.org +++ b/doc/plugins.org @@ -1365,6 +1365,29 @@ "? updates") 600 #+end_src + +*** =makeAccordion Tuning [Runnable]= + + - Wraps other =Runnable= plugins and makes them all collapsible to a single string: + + [[file:accordion.gif]] + + - 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 + 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 -- cgit v1.2.3