From 70ff05b2e2f936244887fad95139128aaf203bf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Mon, 22 Apr 2019 12:22:40 +0200 Subject: [PATCH] doc: removables --- doc/f00bar-modules.5.scd | 76 ++++++++++++++++++++++++++++++++++++++ doc/f00bar-particles.5.scd | 4 +- 2 files changed, 78 insertions(+), 2 deletions(-) diff --git a/doc/f00bar-modules.5.scd b/doc/f00bar-modules.5.scd index f87a6e5..47c077b 100644 --- a/doc/f00bar-modules.5.scd +++ b/doc/f00bar-modules.5.scd @@ -464,6 +464,82 @@ bar: string: {text: "{name}: {state} ({ipv4})"} ``` +# REMOVABLES + +This module detects removable drives (USB sticks, CD-ROMs) and +instantiates the provided _content_ particle for each detected drive. + +## TAGS + +[[ *Name* +:[ *Type* +:[ *Description* +| vendor +: string +: Name of the drive vendor +| model +: string +: Drive model name +| optical +: bool +: True if the drive is an optical drive (CD-ROM, DVD-ROM etc) +| device +: string +: Volume device name (typically */dev/sd?*) +| size +: range +: The volume's size, in bytes. The tag's maximum value is set to the + underlying block device's size +| label +: string +: The volume's label, or its size if it has no label +| mounted +: bool +: True if the volume is mounted +| mount_point +: string +: Path where the volume is mounted, or *""* if it is not mounted + +## CONFIGURATION + +[[ *Name* +:[ *Type* +:[ *Req* +:[ *Description* +| left-spacing +: int +: no +: Space, in pixels, in the left side of each rendered volume +| right-spacing +: int +: no +: Space, in pixels, on the right side of each rendered volume +| spacing +: int +: no +: Short-hand for setting both _left-spacing_ and _right-spacing_ + +## EXAMPLES + +``` +bar: + right: + - removables: + content: + map: + tag: mounted + values: + false: + string: + on-click: udisksctl mount -b {device} + text: "{label}" + true: + string: + on-click: udisksctl unmount -b {device} + text: "{label}" + deco: {underline: {size: 2, color: ffffffff}} +``` + # 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 494ee3a..d47d4e9 100644 --- a/doc/f00bar-particles.5.scd +++ b/doc/f00bar-particles.5.scd @@ -38,8 +38,8 @@ following attributes are supported by all particles: | on-click : string : no -: Command to execute when the particle is clicked. Note that the - string is *not* executed in a shell. +: Command to execute when the particle is clicked. Tags can be + used. Note that the string is *not* executed in a shell. | deco : decoration : no