Widgets

> Published on Wed, 24 Jul 2024, 19:26> Updated on Wed, 24 Jul 2024, 19:30

When using the widget realm, target is the name of the widget you want to refresh or toggle (see the list below for allowed widget names) and action is the action you want to perform on it (allowed actions are refresh, toggle, disable or enable).

Here is the list of the available widgets:

  • battery
  • browser-track
  • cpu
  • crypto
  • date-display
  • keyboard
  • mic
  • mpd
  • music
  • netstats
  • sound
  • spotify
  • stock
  • time
  • viscosity-vpn
  • weather
  • wifi
  • zoom

For the user widgets, the request is composed of the following parts:

shell
# Toggle, disable, enable or refresh a user widget
curl http://localhost:7776/<realm>/user-widget/<action>/<id>

id is the number of the widget displayed in each custom user widget in the settings module (it is based on their order).

Examples:

shell
# Force time widget refresh
curl http://localhost:7776/widget/time/refresh

# Toggle time widget visibility
curl http://localhost:7776/widget/time/toggle

# Force the user widget n°1 to refresh
curl http://localhost:7776/widget/user-widget/refresh/1

# Toggle the user widget n°1 visibility
curl http://localhost:7776/widget/user-widget/toggle/1

# Hide cpu widget
curl http://localhost:7776/widget/cpu/disable

# Show cpu widget
curl http://localhost:7776/widget/cpu/enable

If you try to hide or show a widget already in the desired state, the request will be ignored.

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