Minor fixes to waybar(5)

This commit is contained in:
Michael Aquilina 2019-08-24 18:11:03 +01:00
parent cda9eb683f
commit dd3da7b6ef
No known key found for this signature in database
GPG Key ID: 636066730B056BD1

View File

@ -6,20 +6,18 @@ waybar - configuration file
# DESCRIPTION # DESCRIPTION
The configuration uses the JSON file format and is named `config`. The configuration uses the JSON file format and is named *config*.
Valid directories for this file are: Valid directories for this file are:
- `~/.config/waybar/` - *~/.config/waybar/*
- `~/waybar/` - *~/waybar/*
- `/etc/xdg/waybar/` - */etc/xdg/waybar/*
A good starting point is the default config found at https://github.com/Alexays/Waybar/blob/master/resources/config. A good starting point is the default config found at https://github.com/Alexays/Waybar/blob/master/resources/config.
Also a minimal example config can be found on the at the bottom of this man page. Also a minimal example config can be found on the at the bottom of this man page.
All valid options for the modules are listed on the modules page: https://github.com/Alexays/Waybar/wiki/Modules. # Bar Config
## Bar Config
*layer* ++ *layer* ++
typeof: string ++ typeof: string ++
@ -67,8 +65,7 @@ All valid options for the modules are listed on the modules page: https://github
typeof: string ++ typeof: string ++
Optional name added as a CSS class, for styling multiple waybars. Optional name added as a CSS class, for styling multiple waybars.
# Module format
## Module format
You can use PangoMarkupFormat (See https://developer.gnome.org/pango/stable/PangoMarkupFormat.html#PangoMarkupFormat). You can use PangoMarkupFormat (See https://developer.gnome.org/pango/stable/PangoMarkupFormat.html#PangoMarkupFormat).
@ -77,8 +74,7 @@ e.g.
``` ```
"format": "<span style=\"italic\">{}</span>" "format": "<span style=\"italic\">{}</span>"
``` ```
# Multiple instances of a module
## Multiple instances of a module
If you want to have a second instance of a module, you can suffix it by a '#' and a custom name. If you want to have a second instance of a module, you can suffix it by a '#' and a custom name.
For example if you want a second battery module, you can add `"battery#bat2"` to your modules. For example if you want a second battery module, you can add `"battery#bat2"` to your modules.
@ -89,46 +85,45 @@ This could then look something like this *(this is an incomplete example)*:
``` ```
"modules-right": ["battery", "battery#bat2"], "modules-right": ["battery", "battery#bat2"],
"battery": { "battery": {
"bat": "BAT1" "bat": "BAT1"
}, },
"battery#bat2": { "battery#bat2": {
"bat": "BAT2" "bat": "BAT2"
}
```
## Minimal config
A minimal `config` file could look like this:
```
{
"layer": "top",
"modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": ["sway/window"],
"modules-right": ["battery", "clock"],
"sway/window": {
"max-length": 50
},
"battery": {
"format": "{capacity}% {icon}",
"format-icons": ["", "", "", "", ""]
},
"clock": {
"format-alt": "{:%a, %d. %b %H:%M}"
}
} }
``` ```
## Multi output config # Minimal config
*Limit a configuration to some outputs* A minimal *config* file could look like this:
``` ```
{ {
"layer": "top", "layer": "top",
"modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": ["sway/window"],
"modules-right": ["battery", "clock"],
"sway/window": {
"max-length": 50
},
"battery": {
"format": "{capacity}% {icon}",
"format-icons": ["", "", "", "", ""]
},
"clock": {
"format-alt": "{:%a, %d. %b %H:%M}"
}
}
```
# Multi output config
## Limit a configuration to some outputs
```
{
"layer": "top",
"output": "eDP-1", "output": "eDP-1",
"modules-left": ["sway/workspaces", "sway/mode"], "modules-left": ["sway/workspaces", "sway/mode"],
... ...
} }
@ -137,45 +132,43 @@ A minimal `config` file could look like this:
``` ```
{ {
"layer": "top", "layer": "top",
"output": ["eDP-1", "VGA"], "output": ["eDP-1", "VGA"],
"modules-left": ["sway/workspaces", "sway/mode"], "modules-left": ["sway/workspaces", "sway/mode"],
... ...
} }
``` ```
*Configuration of multiple outputs* ## Configuration of multiple outputs
Don't specify an output to create multiple bars on the same screen Don't specify an output to create multiple bars on the same screen.
``` ```
[{ [{
"layer": "top", "layer": "top",
"output": "eDP-1", "output": "eDP-1",
"modules-left": ["sway/workspaces", "sway/mode"], "modules-left": ["sway/workspaces", "sway/mode"],
... ...
}, { }, {
"layer": "top", "layer": "top",
"output": "VGA", "output": "VGA",
"modules-right": ["clock"], "modules-right": ["clock"],
... ...
}] }]
``` ```
*Rotating modules* ## Rotating modules
When positioning Waybar on the left or right side of the screen, sometimes it's useful to be able to rotate the contents of a module so the text runs vertically. This can be done using the "rotate" property of the module. Example: When positioning Waybar on the left or right side of the screen, sometimes it's useful to be able to rotate the contents of a module so the text runs vertically. This can be done using the "rotate" property of the module. Example:
``` ```
{ {
"clock": { "clock": {
"rotate": 90 "rotate": 90
} }
} }
``` ```
Valid options for the "rotate" property are: 0, 90, 180 and 270. Valid options for the "rotate" property are: 0, 90, 180 and 270.