summaryrefslogtreecommitdiffhomepage
path: root/doc
diff options
context:
space:
mode:
authorEnrico Maria De Angelis <enricomaria.dean6elis@gmail.com>2024-05-27 09:24:02 +0100
committerEnrico Maria De Angelis <enricomaria.dean6elis@gmail.com>2024-06-21 20:01:27 +0100
commita0c38f57d370534e94a569f89ace8be1780be71b (patch)
treec8508f7eaf9fe817e17d218e4dd75d7b60810106 /doc
parenta28c1f1239cba49da1f38aac4bba76fd110994fd (diff)
downloadxmobar-a0c38f57d370534e94a569f89ace8be1780be71b.tar.gz
xmobar-a0c38f57d370534e94a569f89ace8be1780be71b.tar.bz2
Accordion: a plugin two wrap other plugins and collapse them to a single replacement string
Diffstat (limited to 'doc')
-rw-r--r--doc/accordion.gifbin0 -> 71898 bytes
-rw-r--r--doc/plugins.org23
2 files changed, 23 insertions, 0 deletions
diff --git a/doc/accordion.gif b/doc/accordion.gif
new file mode 100644
index 0000000..c21d2b0
--- /dev/null
+++ b/doc/accordion.gif
Binary files 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 @@
"<fc=red>? updates</fc>")
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