From 0f2d9b48b893bc096d8f080c257af86bf2e970be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 21 Apr 2019 20:44:13 +0200 Subject: [PATCH] wip: man pages --- doc/CMakeLists.txt | 4 +- doc/f00bar-decorations.5.scd | 4 ++ doc/f00bar-module-alsa.5.scd | 47 ----------------------- doc/f00bar-modules.5.scd | 72 ++++++++++++++++++++---------------- doc/f00bar-particles.5.scd | 4 ++ doc/f00bar-tags.5.scd | 38 +++++++++++++++++++ doc/f00bar.5.scd | 5 +++ 7 files changed, 94 insertions(+), 80 deletions(-) delete mode 100644 doc/f00bar-module-alsa.5.scd create mode 100644 doc/f00bar-tags.5.scd diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 8b4d486..3a1ac3a 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -32,8 +32,8 @@ add_man_pages( f00bar.5.scd f00bar-modules.5.scd - f00bar-module-alsa.5.scd - f00bar-particles.5.scd f00bar-decorations.5.scd + f00bar-particles.5.scd + f00bar-tags.5.scd ) diff --git a/doc/f00bar-decorations.5.scd b/doc/f00bar-decorations.5.scd index 8c60eba..7f23c84 100644 --- a/doc/f00bar-decorations.5.scd +++ b/doc/f00bar-decorations.5.scd @@ -89,3 +89,7 @@ content: - background: ... - underline: ... ``` + +# SEE ALSO + +*f00bar-particles*(5) diff --git a/doc/f00bar-module-alsa.5.scd b/doc/f00bar-module-alsa.5.scd deleted file mode 100644 index 4597988..0000000 --- a/doc/f00bar-module-alsa.5.scd +++ /dev/null @@ -1,47 +0,0 @@ -f00bar-module-alsa(5) - -# NAME -f00bar-module-alsa - configuration file - -# DESCRIPTION - -Monitors an alsa soundcard for volume and mute/unmute changes. - -# TAGS - -[[ *Name* -:[ *Type* -:[ *Description* -| volume -: range -: Volume level, with min and max as start and end range values -| muted -: bool -: True if muted, otherwise false - - -# CONFIGURATION - -[[ *Name* -:[ *Type* -:[ *Req* -:[ *Description* -| card -: string -: yes -: The soundcard name. _Default_ might work. -| mixer -: string -: yes -: Mixer channel to monitor. _Master_ might work. - -# EXAMPLES - -``` -bar: - left: - - alsa: - card: hw:PCH - mixer: Master - content: {string: {text: "{volume}"}} -``` diff --git a/doc/f00bar-modules.5.scd b/doc/f00bar-modules.5.scd index f656c83..a81420c 100644 --- a/doc/f00bar-modules.5.scd +++ b/doc/f00bar-modules.5.scd @@ -10,7 +10,7 @@ bar. All modules expose their data through *tags*. Each tag has a *name*, *type* and *value*. The name and type is fixed, while the value -typically changes over time. See *TAGS*. +typically changes over time. See *f00bar-tags(5)*. The tags are rendered by _particles_. Each particle has its own way of representing tag values. The simplest one is the _string_ particle, @@ -33,39 +33,49 @@ following attributes are supported by all modules: : associative array : Free-to-use associative array, where you can put yaml anchor definitions -# TAGS +# ALSA -Tags are the data carriers; it is through tags that modules expose -their information. Each module defines its own set of tags. +Monitors an alsa soundcard for volume and mute/unmute changes. -The available tag *types* are: +## TAGS -[[ *Type* +[[ *Name* +:[ *Type* :[ *Description* -| string -: Value is a string. Rendered as-is by the _string_ particle. -| int -: Value is an integer. Rendered in base 10 by the _string_ particle. -| bool -: Value is true or false. Rendered as "true" or "false" by the _string_ - particle -| float -: Value is a float. Rendered in base 10, with two decimal digits by the - _string_ particle -| range -: Value is an integer, with a minimum and maximum value associated - with it. By default, the _string_ particle renders the value. The - _:min_ or _:max_ suffixes by be added to instead render the mininum - or maximum value (_\"{tag_name:min}\"_). -| realtime -: Value is an integer that changes in a predictable manner (in - "realtime"). This allows the particle to update itself - periodically. Only supported by the - *f00bar-particle-progress-bar*(5). Other particles can still render - the tag's value. And, the _string_ particle recognizes the _:unit_ - suffix, which will be translated to a "s" for a tag with "seconds" - resolution, or "ms" for one with "milliseconds" resolution. +| volume +: range +: Volume level, with min and max as start and end range values +| muted +: bool +: True if muted, otherwise false -# MODULES -- *f00bar-module-alsa*(5) +## CONFIGURATION + +[[ *Name* +:[ *Type* +:[ *Req* +:[ *Description* +| card +: string +: yes +: The soundcard name. _Default_ might work. +| mixer +: string +: yes +: Mixer channel to monitor. _Master_ might work. + +## EXAMPLES + +``` +bar: + left: + - alsa: + card: hw:PCH + mixer: Master + content: {string: {text: "{volume}"}} +``` + +# SEE ALSO + +*f00bar-particles*(5), *f00bar-tags*(5), *f00bar-decorations*(5) diff --git a/doc/f00bar-particles.5.scd b/doc/f00bar-particles.5.scd index 5a4c2bf..494ee3a 100644 --- a/doc/f00bar-particles.5.scd +++ b/doc/f00bar-particles.5.scd @@ -303,3 +303,7 @@ content: empty: {string: {text: ╌}} indicator: {string: {text: ┼}} ``` + +# SEE ALSO + +*f00bar-tags*(5), *f00bar-decorations*(5) diff --git a/doc/f00bar-tags.5.scd b/doc/f00bar-tags.5.scd new file mode 100644 index 0000000..4f007e9 --- /dev/null +++ b/doc/f00bar-tags.5.scd @@ -0,0 +1,38 @@ +f00bar-tags(5) + +# NAME +f00bar-tags - configuration file + +# DESCRIPTION + +Tags are the data carriers; it is through tags that modules expose +their information. Each module defines its own set of tags. + +The available tag *types* are: + +[[ *Type* +:[ *Description* +| string +: Value is a string. Rendered as-is by the _string_ particle. +| int +: Value is an integer. Rendered in base 10 by the _string_ particle. +| bool +: Value is true or false. Rendered as "true" or "false" by the _string_ + particle +| float +: Value is a float. Rendered in base 10, with two decimal digits by the + _string_ particle +| range +: Value is an integer, with a minimum and maximum value associated + with it. By default, the _string_ particle renders the value. The + _:min_ or _:max_ suffixes by be added to instead render the mininum + or maximum value (_\"{tag_name:min}\"_). +| realtime +: Value is an integer that changes in a predictable manner (in + "realtime"). This allows the particle to update itself + periodically. Only supported by the + *f00bar-particle-progress-bar*(5). Other particles can still render + the tag's value. And, the _string_ particle recognizes the _:unit_ + suffix, which will be translated to a "s" for a tag with "seconds" + resolution, or "ms" for one with "milliseconds" resolution. + diff --git a/doc/f00bar.5.scd b/doc/f00bar.5.scd index 94b8f6a..6728877 100644 --- a/doc/f00bar.5.scd +++ b/doc/f00bar.5.scd @@ -141,3 +141,8 @@ bar: # FILES _$HOME/.config/f00bar/config.yml_ + +# SEE ALSO + +*f00bar-modules*(5), *f00bar-particles*(5), *f00bar-tags*(5), +*f00bar-decorations*(5)