Battery

> Published on Sun, 3 Dec 2023, 16:14> Updated on Mon, 11 Nov 2024, 14:48

Description

The battery widget displays the current battery level of your Mac and if it is charging. When low power mode is enabled, the battery filling indicator turns yellow.

Interactions

You can toggle caffeinate mode by clicking on the battery widget if you enable this option in settings.

Available settings

You can set the following battery widget settings in the simple-bar settings:

  • Refresh frequency: The refresh frequency in milliseconds. Default is 10000 (10 seconds).
  • Show on display: The displays on which the widget will be displayed. Add a list of indexes (for example: "1,2"). Leave blank to display the widget on every spaces. Default is "".
  • Toggle caffeinate on click: Enable the toggle of caffeinate mode on click. Default is true.
  • Caffeinate options: The options to pass to caffeinate when toggling it. Default is "" (no options).

You'll find bellow all the available option params:

  • no option (default) — Prevent the system from sleeping, not the display
  • "-d" — Prevent the display from sleeping.
  • "-i" — Prevent the system from idle sleeping.
  • "-s" — Prevent the system from sleeping. This is valid only when system is running on AC power.
  • "-u" — Declare that a user is active. If the display is off, this option turns the display on and prevents the display from going into idle sleep.
  • "-t 60" — Specifies the timeout value in seconds for which the command is valid.

You can combine options by separating them with a space. For example, if you want to prevent the system from sleeping and prevent the display from sleeping, you can use the following options: "-s -d".

Something is wrong in this documentation? Please open an issue on GitHub in simple-bar repo.