~rkintzi/statusbar

641f4c6cd61ceee366e86ec2a381316c169502b4 — RadosÅ‚aw Kintzi 10 months ago 5708ed7
Fix formatting in README.md
1 files changed, 23 insertions(+), 24 deletions(-)

M README.md
M README.md => README.md +23 -24
@@ 56,65 56,65 @@ The BatteryMonitor widget is used to display the status and level of the
system battery. Users have the option to customize its appearance using the
following settings:

- format: This setting determines the format in which the battery status is
  shown. The default format is "{icon} {level}". Users can include "{status}"
- `format`: This setting determines the format in which the battery status is
  shown. The default format is `{icon} {level}`. Users can include `{status}`
  in the format to display the battery status. By default, the statuses are
  displayed as "Full," "Not charging," "Charging," "Discharging," and
  "Unknown." However, users can specify their preferred labels for each status
  using the options statusFull, statusNotCharging, statusCharging, and
  statusDischarging. The placeholder for the battery level can also include
  using the options `statusFull`, `statusNotCharging`, `statusCharging`, and
  `statusDischarging`. The placeholder for the battery level can also include
  a formatting verb, as defined in the [Golang's fmt package
  documentation](https://pkg.go.dev/fmt#hdr-Printing). For example, you can
  use {level:%2d} to format the level as a two-digit integer.

- statusIcons: This option allows to specify four icons (ie. Unicode points)
- `statusIcons`: This option allows to specify four icons (ie. Unicode points)
  that correspond to the "Full", "Not charging", "Charging", and "Discharging"
  statuses. The default icons are "FNCD".
  statuses. The default icons are `FNCD`.

- "chargingIcons": This setting allows users to specify icons that are
  displayed instead of the "C" icon defined using the "statusIcons" option.
- `chargingIcons`: This setting allows users to specify icons that are
  displayed instead of the `C` icon defined using the `statusIcons` option.
  Users can provide as many icons as they like. These icons should represent
  different battery levels, starting with the icon that represents the lowest
  level.

- "dischargingIcons": This setting allows users to specify icons that are
  displayed instead of the "D" icon defined using the "statusIcons" option.
- `dischargingIcons`: This setting allows users to specify icons that are
  displayed instead of the `D` icon defined using the `statusIcons` option.

- "statusFull", "statusNotCharging", "statusCharging", "statusDischarging":
- `statusFull`, `statusNotCharging`, `statusCharging`, `statusDischarging`:
  These options allows to specify labels for the "Full", "Not charging",
  "Charging", and "Discharging" statuses.

- "colors": This setting allows users to specify the colors in which the
- `colors`: This setting allows users to specify the colors in which the
  widget is rendered, depending on the battery levels. For example, if this
  option is set to "#9e1828,10,#968a38,20,#ccc", the widget will appear red
  option is set to `#9e1828,10,#968a38,20,#ccc`, the widget will appear red
  when the level is below or equal to 10, yellow if the level is between 10
  and 20 (inclusive), and light gray otherwise.

- "criticalLevel": If this option is set above 0, the user will receive an
- `criticalLevel`: If this option is set above 0, the user will receive an
  urgent notification when the battery level falls below the provided value.
  Notifications are sent using D-bus.

- "notificationTitle": This option allows users to customize the title of the
- `notificationTitle`: This option allows users to customize the title of the
  notification sent when the battery level reaches a critically low level. The
  default title is: "Critical Battery Level"

- "notificationBody": This setting allows users to customize notifications
- `notificationBody`: This setting allows users to customize notifications
  body. The default message is: "Your battery level is critically low.\nPlease
  connect your device to a power source immediately to avoid any unexpected
  shutdowns."

- "notificationIcon": This option allows to set notification icon.
- `notificationIcon`: This option allows to set notification icon.

### DateTime

The DateTime widget displays the current date and time. It has one
configuration option, which is `format`. The default format is "2006-01-02
15:04:05", and you can specify any format that is accepted by Golang's
configuration option, which is `format`. The default format is `2006-01-02
15:04:05`, and you can specify any format that is accepted by Golang's
time.Format method.

### ExternalProgram

The "ExternalPrgram" widget runs an external program that generates
The ExternalPrgram widget runs an external program that generates
swaybar/i3bar content. It relays the output of the program to the bar and also
forwards events from the bar to the external program. This widget is
beneficial if you want to incorporate information from another content


@@ 127,8 127,8 @@ allows you to specify the command that will execute the external generator.

The SystemMonitor widget provides information regarding the utilization of the
CPU and RAM, as well as the system load. It offers a single configuration
option, which is the `format`. The default format is "CPU:{cpu}% MEM:{mem}%
LOAD:{load}%". You have the flexibility to change the order or remove any of
option, which is the `format`. The default format is `CPU:{cpu}% MEM:{mem}%
LOAD:{load}%`. You have the flexibility to change the order or remove any of
the indicators. 

Additionally, the format option allows you to specify the width and precision


@@ 139,7 139,6 @@ necessary, and will display two digits for the fractional part. Please note
that the width and precision specification should be followed by the 'f'
suffix, but no '%' prefix should be included.


## statusbar - The Library

If there is a widget that you believe is missing from the project, you can


@@ 221,7 220,7 @@ forget to update the swaybar configuration (as described in the
4. In general, the Run method should continue running until the context is
   canceled. However, it may exit earlier if necessary. In such cases, the
   status bar will preserve the last version of the widget's blocks. In the
   provided example, the "<-ctx.Done()" statement could be omitted.
   provided example, the `<-ctx.Done()` statement could be omitted.

5. The Run method must call the done function just before it returns. To
   achieve this, it is suggested to use the `defer done()` statement as the first