From 798fe1a62226d66d1446ccad0c258c22da936846 Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Tue, 20 Aug 2019 19:51:53 +0100 Subject: [PATCH] Add initial man 5 waybar --- waybar.5.scd | 183 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 183 insertions(+) create mode 100644 waybar.5.scd diff --git a/waybar.5.scd b/waybar.5.scd new file mode 100644 index 0000000..e4550b6 --- /dev/null +++ b/waybar.5.scd @@ -0,0 +1,183 @@ +waybar(5) + +# NAME + +waybar - configuration file + +# DESCRIPTION + +The configuration uses the JSON file format and is named `config`. + +Valid directories for this file are: + +- `~/.config/waybar/` +- `~/waybar/` +- `/etc/xdg/waybar/` + +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. + +All valid options for the modules are listed on the modules page: https://github.com/Alexays/Waybar/wiki/Modules. + +## Bar Config + +[- option +:- typeof +:- default +:- description +|- `layer` +:- string +:- `bottom` +:- Decide if the bar is displayed in front of the windows or behind them. +|- `output` +:- string|array +:- +:- Specifies on which screen this bar will be displayed. +|- `position` +:- string +:- `top` +:- Bar position, can be `top`,`bottom`,`left`,`right`. +|- `height` +:- integer +:- +:- Height to be used by the bar if possible, leave blank for a dynamic value. +|- `width` +:- integer +:- +:- Width to be used by the bar if possible, leave blank for a dynamic value. +|- `modules-left` +:- array +:- +:- Modules that will be displayed on the left. +|- `modules-center` +:- array +:- +:- Modules that will be displayed in the center. +|- `modules-right` +:- array +:- +:- Modules that will be displayed on the right. +|- `margin` +:- string +:- +:- Margins value using the css format without units. +|- `margin-` +:- integer +:- +:- Margins value without units. +|- `name` +:- string +:- +:- Optional name added as a CSS class, for styling multiple waybars. + +## Module format + +You can use PangoMarkupFormat (See https://developer.gnome.org/pango/stable/PangoMarkupFormat.html#PangoMarkupFormat). + +e.g. + +``` +"format": "{}" +``` + +## 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. +For example if you want a second battery module, you can add `"battery#bat2"` to your modules. +To configure the newly added module, you then also add a module configuration with the same name. + +This could then look something like this *(this is an incomplete example)*: + +``` +"modules-right": ["battery", "battery#bat2"], +"battery": { + "bat": "BAT1" +}, +"battery#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 + +*Limit a configuration to some outputs* + +``` +{ + "layer": "top", + "output": "eDP-1", + "modules-left": ["sway/workspaces", "sway/mode"], + ... + +} + +``` + +``` +{ + "layer": "top", + "output": ["eDP-1", "VGA"], + "modules-left": ["sway/workspaces", "sway/mode"], + ... +} + +``` + +*Configuration of multiple outputs* + +Don't specify an output to create multiple bars on the same screen + +``` +[{ + "layer": "top", + "output": "eDP-1", + "modules-left": ["sway/workspaces", "sway/mode"], + ... +}, { + "layer": "top", + "output": "VGA", + "modules-right": ["clock"], + ... + +}] + +``` + +*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: + +``` +{ + "clock": { + "rotate": 90 + } +} + +``` + +Valid options for the "rotate" property are: 0, 90, 180 and 270.