Skip to content
Robin edited this page Nov 12, 2018 · 5 revisions

//TODO: on_click //TODO: on_scroll_up //TODO: on_scroll_down

Battery

The battery module displays the current capacity and state (eg. charging) of your battery.

Config

Addressed by battery

  • bat
    • Typeof: string
    • Optional: true
    • Description: The battery to monitor, as in /sys/class/power_supply/.
    • Example: "bat": "BAT2"
  • interval
    • Typeof: integer
    • Optional: true
    • Default: 60
    • Description: The interval in which the information gets polled.
    • Example: "interval": 60
  • states
    • Typeof: array
    • Optional: true
    • Description: Every entry (state) consits of a <name> (typeof: string) and a <value> (typeof: integer).
      • The state can be adressed as a CSS class in the style.css. The name of the CSS class is the <name> of the state. Each class gets activated when the current capacity is equal or below the configured <value>.
      • Also each state can have its own format. Those con be configured via format-<name>. Or if you want to differntiate a bit more even as format-<status>-<state>. For more information see custom formats.
    • Example:
      "state": {
          "warning": 30,
          "critical": 15
      }
  • format
    • Typeof: string
    • Optional: true
    • Default: {capacity}%
    • Description: The format, how information should be displayed. On {capacity} the capacity gets inserted. On {icon} the icon, as defined in format-icons gets inserted. An empty format will hide the module.
    • Example: "format": "{capacity}% {icon}"
  • Custom Formats The battery module allows to define custom formats based on up to two factors. The best fitting format will be selected.
    • format-<state> With states, a custom format can be set depending on the capacity of your battery.
    • format-<status> With the status, a custom format can be set depending on the status in /sys/class/power_supply/<bat>/status (in lowercase).
    • format-<status>-<state> You can also set a custom format depending on both vaules.
  • format-icons
    • Typeof: array
    • Optional: true
    • Description: A comma seperated list, enclosed by square brackets. The list gets divided in percentages, and each entry represents one part. Based on the current capacity, the corresponding icon gets selected. The order is low to high.
    • Example: "format-icons": ["", "", "", "", ""]
  • max-length
    • Typeof: integer
    • Optional: true
    • Description: The maximum length in character the module should display.
    • Example: "max-length": 50

Style

  • #battery
  • #battery.<status>
    • <status is the value of /sys/class/power_supply/<bat>/status in lowercase.
  • #battery.<state>
    • <state> can be defined in the config. For more information see states
  • #battery.<status>.<state>
    • Combination of both <status> and <state>.

Clock

The clock module displays the current date and time.

Config

Addressed by clock

  • interval
    • Typeof: integer
    • Optional: true
    • Default: 60
    • Description: The interval in which the information gets polled.
    • Example: "interval": 60
  • format
    • Typeof: string
    • Optional: true
    • Default: {:%H:%M}
    • Description: The format, how the time should be displayed. For valid format options have a look here.
    • Example: "format": "{:%H:%M}"
  • max-length
    • Typeof: integer
    • Optional: true
    • Description: The maximum length in character the module should display.
    • Example: "max-length": 50

Style

  • #clock

CPU

The cpu module displays the current cpu utilization.

Config

Addressed by cpu

  • interval
    • Typeof: integer
    • Optional: true
    • Default: 10
    • Description: The interval in which the information gets polled.
    • Example: "interval": 10
  • format
    • Typeof: string
    • Optional: true
    • Default: {}%
    • Description: The format, how information should be displayed. On {} data gets inserted.
    • Example: "format": "{}% "
  • max-length
    • Typeof: integer
    • Optional: true
    • Description: The maximum length in character the module should display.
    • Example: "max-length": 50

Style

  • #cpu

Custom

The custom module displays the output of a script.

Config

Addressed by custom/<name>

  • exec
    • Typeof: string
    • Optional: false
    • Description: The path to the script, which should be executed.
    • Example: "exec": "$HOME/.config/waybar/mediaplayer.sh 2> /dev/null"
  • exec-if
    • Typeof: string
    • Optional: true
    • Description: The path to an script, which determines if the script in exec should be executed. exec will be executed if the exit code of exec-if equals 0.
    • Example: "exec-if": "pgrep spotify"
  • return-type
    • Typeof: string
    • Optional: true
    • Valid options: json
    • Description:
      • When return-type is set to json, Waybar expects the exec-script to output its data in JSON format. This should look like this: {"text": "$text", "tooltip": "$tooltip", "class": "$class"}
      • If nothing or an invalid option is specified Waybar expects i3blocks style output, where values are newline separated. This should look like this: $text\n$tooltip\n$class
      • class is an CSS-class, to apply different styles in style.css
    • Example: "return-type": "json"
  • interval
    • Typeof: integer
    • Optional: true
    • Description: The interval in which the information gets polled. If no interval is defined, it is assumed that the out script loops it self.
    • Example: "interval": 30
  • format
    • Typeof: string
    • Optional: true
    • Default: {}
    • Description: The format, how information should be displayed. On {} data gets inserted.
    • Example: "format": "{} "
  • max-length
    • Typeof: integer
    • Optional: true
    • Description: The maximum length in character the module should display.
    • Example: "max-length": 50

Style

  • #custom-<name>
  • #custom-<name>.<class>
    • <class> can be set by the script. For more information see return-type

Memory

The memory module displays the current memory utilization.

Config

Addressed by memory

  • interval
    • Typeof: integer
    • Optional: true
    • Default: 30
    • Description: The interval in which the information gets polled.
    • Example: "interval": 30
  • format
    • Typeof: string
    • Optional: true
    • Default: {}%
    • Description: The format, how information should be displayed. On {} data gets inserted.
    • Example: "format": "{}% "
  • max-length
    • Typeof: integer
    • Optional: true
    • Description: The maximum length in character the module should display.
    • Example: "max-length": 50

Style

  • #memory

Network

The network module displays information about the current network connections.

Config

Addressed by network

  • interface
    • Typeof: string
    • Optional: true
    • Description: Use the defined interface instead of auto detection.
    • Example: "interface": "wlp2s0"
  • format
    • Typeof: string
    • Optional: true
    • Default: {ifname}
    • Description: The format, how information should be displayed. On {ifname} the name of the network interface gets displayed. Depending on the connection network can use different formats. See below. An empty format will hide the module. Example: "format": "{ifname}"
  • format-ethernet
    • Typeof: string
    • Optional: true
    • Description: This format is used when a ethernet interface is displayed.
    • Example: "format-ethernet": "{ifname} "
  • format-wifi
    • Typeof: string
    • Optional: true
    • Description: This format is used when a wireless interface is displayed. On {essid} the SSID of the wireless network gets displayed. On {signalStrength} the signal strenth of the wireless network gets displayed.
    • Example: "format-wifi": "{essid} ({signalStrength}%) "
  • format-disconnected
    • Typeof: string
    • Optional: true
    • Description: This format is used when the displayed interface is disconnected.
    • Example: "format-disconnected": "Disconnected ⚠"
  • max-length
    • Typeof: integer
    • Optional: true
    • Description: The maximum length in character the module should display.
    • Example: "max-length": 50

Style

  • #network
  • #network.disconnected

PulseAudio

The pulseaudio module displays the current volume reported by PulseAudio.

Additionally you can control the volume by scrolling up or down ehile the cursor ist over the module.

Config

//TODO: Config

Style

  • #pulseaudio
  • #pulseaudio.bluetooth
  • #pulseaudio.muted

Mode

The mode module displays the current binding mode of sway.

Config

Addressed by sway/mode

  • format
    • Typeof: string
    • Optional: true
    • Default: {}
    • Description: The format, how information should be displayed. On {} data gets inserted.
    • Example: "format": " {}"
  • max-length
    • Typeof: integer
    • Optional: true
    • Description: The maximum length in character the module should display.
    • Example: "max-length": 50

Style

  • #mode

Window

The window module displays the title of the currently focused window in sway.

Config

Addressed by sway/window

  • format
    • Typeof: string
    • Optional: true
    • Default: {}
    • Description: The format, how information should be displayed. On {} data gets inserted.
    • Example: "format": "{}"
  • max-length
    • Typeof: integer
    • Optional: true
    • Description: The maximum length in character the module should display.
    • Example: "max-length": 50

Style

  • #window

Workspace

//TODO

Tray

tray is still in beta. There may me bugs. Breaking changed may occur

//TODO

Clone this wiki locally