From 798fe1a62226d66d1446ccad0c258c22da936846 Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Tue, 20 Aug 2019 19:51:53 +0100 Subject: [PATCH 01/36] 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. From 2e037df045a9a923f24ca61cbdb244630959a9d7 Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Thu, 22 Aug 2019 17:04:09 +0100 Subject: [PATCH 02/36] Add scdoc to meson build process --- meson.build | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index d4a1bf5..380b467 100644 --- a/meson.build +++ b/meson.build @@ -72,7 +72,7 @@ src_files = files( 'src/modules/clock.cpp', 'src/modules/custom.cpp', 'src/modules/cpu.cpp', - 'src/modules/idle_inhibitor.cpp', + 'src/modules/idle_inhibitor.cpp', 'src/modules/temperature.cpp', 'src/main.cpp', 'src/bar.cpp', @@ -153,6 +153,35 @@ install_data( install_dir: join_paths(get_option('out'), 'etc/xdg/waybar') ) +scdoc = dependency('scdoc', version: '>=1.9.2', native: true) + +if scdoc.found() + scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true) + sh = find_program('sh', native: true) + mandir = get_option('mandir') + man_files = [ + 'waybar.5.scd', + + ] + + foreach filename : man_files + topic = filename.split('.')[-3].split('/')[-1] + section = filename.split('.')[-2] + output = '@0@.@1@'.format(topic, section) + + custom_target( + output, + input: filename, + output: output, + command: [ + sh, '-c', '@0@ < @INPUT@ > @1@'.format(scdoc_prog.path(), output) + ], + install: true, + install_dir: '@0@/man@1@'.format(mandir, section) + ) + endforeach +endif + clangtidy = find_program('clang-tidy', required: false) if clangtidy.found() From cf72dee60c6d6f00c9f18b3a23b782b6e05a18e0 Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Thu, 22 Aug 2019 17:11:24 +0100 Subject: [PATCH 03/36] Add scdoc dependency to Dockerfiles --- Dockerfiles/alpine | 2 +- Dockerfiles/archlinux | 2 +- Dockerfiles/debian | 4 ++-- Dockerfiles/fedora | 2 +- Dockerfiles/opensuse | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfiles/alpine b/Dockerfiles/alpine index 20d2c48..367a3cf 100644 --- a/Dockerfiles/alpine +++ b/Dockerfiles/alpine @@ -1,3 +1,3 @@ FROM alpine:latest -RUN apk add --no-cache git meson alpine-sdk libinput-dev wayland-dev wayland-protocols mesa-dev libxkbcommon-dev eudev-dev pixman-dev gtkmm3-dev jsoncpp-dev libnl3-dev pulseaudio-dev libmpdclient-dev \ No newline at end of file +RUN apk add --no-cache git meson alpine-sdk libinput-dev wayland-dev wayland-protocols mesa-dev libxkbcommon-dev eudev-dev pixman-dev gtkmm3-dev jsoncpp-dev libnl3-dev pulseaudio-dev libmpdclient-dev scdoc diff --git a/Dockerfiles/archlinux b/Dockerfiles/archlinux index c4f4b43..de0f86c 100644 --- a/Dockerfiles/archlinux +++ b/Dockerfiles/archlinux @@ -1,4 +1,4 @@ FROM archlinux/base:latest RUN pacman -Syu --noconfirm && \ - pacman -S git meson base-devel libinput wayland wayland-protocols pixman libxkbcommon mesa gtkmm3 jsoncpp --noconfirm \ No newline at end of file + pacman -S git meson base-devel libinput wayland wayland-protocols pixman libxkbcommon mesa gtkmm3 jsoncpp scdoc --noconfirm diff --git a/Dockerfiles/debian b/Dockerfiles/debian index 04db7a6..b6cda88 100644 --- a/Dockerfiles/debian +++ b/Dockerfiles/debian @@ -1,5 +1,5 @@ FROM debian:sid RUN apt-get update && \ - apt-get install -y build-essential meson ninja-build git pkg-config libinput10 libinput-dev wayland-protocols libwayland-client0 libwayland-cursor0 libwayland-dev libegl1-mesa-dev libgles2-mesa-dev libgbm-dev libxkbcommon-dev libudev-dev libpixman-1-dev libgtkmm-3.0-dev libjsoncpp-dev && \ - apt-get clean \ No newline at end of file + apt-get install -y build-essential meson ninja-build git pkg-config libinput10 libinput-dev wayland-protocols libwayland-client0 libwayland-cursor0 libwayland-dev libegl1-mesa-dev libgles2-mesa-dev libgbm-dev libxkbcommon-dev libudev-dev libpixman-1-dev libgtkmm-3.0-dev libjsoncpp-dev scdoc && \ + apt-get clean diff --git a/Dockerfiles/fedora b/Dockerfiles/fedora index e290127..4e61055 100644 --- a/Dockerfiles/fedora +++ b/Dockerfiles/fedora @@ -1,5 +1,5 @@ FROM fedora:30 -RUN dnf install sway meson git libinput-devel wayland-devel wayland-protocols-devel egl-wayland-devel mesa-libEGL-devel mesa-libGLES-devel mesa-libgbm-devel libxkbcommon-devel libudev-devel pixman-devel gtkmm30-devel jsoncpp-devel -y && \ +RUN dnf install sway meson git libinput-devel wayland-devel wayland-protocols-devel egl-wayland-devel mesa-libEGL-devel mesa-libGLES-devel mesa-libgbm-devel libxkbcommon-devel libudev-devel pixman-devel gtkmm30-devel jsoncpp-devel scdoc -y && \ dnf group install "C Development Tools and Libraries" -y && \ dnf clean all -y diff --git a/Dockerfiles/opensuse b/Dockerfiles/opensuse index dc69bd7..8101b0e 100644 --- a/Dockerfiles/opensuse +++ b/Dockerfiles/opensuse @@ -2,4 +2,4 @@ FROM opensuse/tumbleweed:latest RUN zypper -n up && \ zypper -n install -t pattern devel_C_C++ && \ - zypper -n install git meson clang libinput10 libinput-devel libwayland-client0 libwayland-cursor0 wayland-protocols-devel wayland-devel Mesa-libEGL-devel Mesa-libGLESv2-devel libgbm-devel libxkbcommon-devel libudev-devel libpixman-1-0-devel gtkmm3-devel jsoncpp-devel \ No newline at end of file + zypper -n install git meson clang libinput10 libinput-devel libwayland-client0 libwayland-cursor0 wayland-protocols-devel wayland-devel Mesa-libEGL-devel Mesa-libGLESv2-devel libgbm-devel libxkbcommon-devel libudev-devel libpixman-1-0-devel gtkmm3-devel jsoncpp-devel scdoc From 9b9818e95df813b2d66b24d2cd2d0c7d3ea1407d Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Thu, 22 Aug 2019 17:13:04 +0100 Subject: [PATCH 04/36] Set scdoc dependency to required: false --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 380b467..60f5311 100644 --- a/meson.build +++ b/meson.build @@ -153,7 +153,7 @@ install_data( install_dir: join_paths(get_option('out'), 'etc/xdg/waybar') ) -scdoc = dependency('scdoc', version: '>=1.9.2', native: true) +scdoc = dependency('scdoc', version: '>=1.9.2', native: true, required: false) if scdoc.found() scdoc_prog = find_program(scdoc.get_pkgconfig_variable('scdoc'), native: true) From 9484cdff7de270c88689acabcb5feb02af37e5cd Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Sat, 24 Aug 2019 15:39:46 +0100 Subject: [PATCH 05/36] Add waybar-backlight.5.scd --- meson.build | 2 +- waybar-backlight.5.scd | 68 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 waybar-backlight.5.scd diff --git a/meson.build b/meson.build index 60f5311..5677bac 100644 --- a/meson.build +++ b/meson.build @@ -161,7 +161,7 @@ if scdoc.found() mandir = get_option('mandir') man_files = [ 'waybar.5.scd', - + 'waybar-backlight.5.scd', ] foreach filename : man_files diff --git a/waybar-backlight.5.scd b/waybar-backlight.5.scd new file mode 100644 index 0000000..1992558 --- /dev/null +++ b/waybar-backlight.5.scd @@ -0,0 +1,68 @@ +waybar-backlight(5) + +# NAME + +waybar - backlight module + +# DESCRIPTION + +The *backlight* module displays the current backlight level. + +# Config + +*interval* ++ + typeof: integer ++ + default: 2 ++ + The interval in which information gets polled. + +*format* ++ + typeof: string ++ + default: {percent}% ++ + The format, how information should be displayed. On {} data gets inserted. + +*max-length* ++ + typeof: integer ++ + The maximum length in characters the module should display. + +*rotate* ++ + typeof: integer ++ + Positive value to rotate the text label. + +*states* ++ + typeof: array ++ + A number of backlight states which get activated on certain brightness levels. + +*on-click* ++ + typeof: string ++ + Command to execute when the module is clicked. + +*on-click-right* ++ + typeof: string ++ + Command to execute when the module is right clicked. + +*on-scroll-up* ++ + typeof: string ++ + Command to execute when performing a scroll up on the module. + +*on-scroll-down* ++ + typeof: string + Command to execute when performing a scroll down on the module. + +*smooth-scrolling-threshold* ++ + typeof: double + Threshold to be used when scrolling. + +# Example: + +``` +"backlight": { + "device": "intel_backlight", + "format": "{percent}% {icon}", + "format-icons": ["", ""] +} + +``` + +# Style + +- `#backlight` From 8696ac77f9a4a0598cd53c138aa99295f826f221 Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Sat, 24 Aug 2019 17:19:32 +0100 Subject: [PATCH 06/36] Replace table with simpler format in waybar.5.scd --- waybar.5.scd | 94 +++++++++++++++++++++++++--------------------------- 1 file changed, 46 insertions(+), 48 deletions(-) diff --git a/waybar.5.scd b/waybar.5.scd index e4550b6..8f958a3 100644 --- a/waybar.5.scd +++ b/waybar.5.scd @@ -21,54 +21,52 @@ All valid options for the modules are listed on the modules page: https://github ## 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. +*layer* ++ + typeof: string ++ + default: bottom ++ + Decide if the bar is displayed in front of the windows or behind them. + +*output* ++ + typeof: string|array ++ + Specifies on which screen this bar will be displayed. + +*position* ++ + typeof: string ++ + default: top ++ + Bar position, can be `top`,`bottom`,`left`,`right`. + +*height* ++ + typeof: integer ++ + Height to be used by the bar if possible, leave blank for a dynamic value. + +*width* ++ + typeof: integer ++ + Width to be used by the bar if possible, leave blank for a dynamic value. + +*modules-left* ++ + typeof: array ++ + Modules that will be displayed on the left. + +*modules-center* ++ + typeof: array ++ + Modules that will be displayed in the center. + +*modules-right* ++ + typeof: array + Modules that will be displayed on the right. + +*margin* ++ + typeof: string ++ + Margins value using the css format without units. + +*margin-* ++ + typeof: integer ++ + Margins value without units. + +*name* ++ + typeof: string ++ + Optional name added as a CSS class, for styling multiple waybars. + ## Module format From f0ad918feb5488a7921a3d2eb907e0a8bfaab969 Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Sat, 24 Aug 2019 17:44:29 +0100 Subject: [PATCH 07/36] Add waybar-battery(5) --- meson.build | 1 + waybar-backlight.5.scd | 2 +- waybar-battery.5.scd | 121 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 waybar-battery.5.scd diff --git a/meson.build b/meson.build index 5677bac..c3314d9 100644 --- a/meson.build +++ b/meson.build @@ -162,6 +162,7 @@ if scdoc.found() man_files = [ 'waybar.5.scd', 'waybar-backlight.5.scd', + 'waybar-battery.5.scd', ] foreach filename : man_files diff --git a/waybar-backlight.5.scd b/waybar-backlight.5.scd index 1992558..765bd8c 100644 --- a/waybar-backlight.5.scd +++ b/waybar-backlight.5.scd @@ -65,4 +65,4 @@ The *backlight* module displays the current backlight level. # Style -- `#backlight` +- *#backlight* diff --git a/waybar-battery.5.scd b/waybar-battery.5.scd new file mode 100644 index 0000000..08a9432 --- /dev/null +++ b/waybar-battery.5.scd @@ -0,0 +1,121 @@ +waybar-battery(5) + +# NAME + +waybar - battery module + +# DESCRIPTION + +The *battery* module displays the current capacity and state (eg. charging) of your battery. + +*bat* ++ + typeof: string ++ + The battery to monitor, as in /sys/class/power_supply/ instead of auto detect. + +*adapter* ++ + typeof: string ++ + The adapter to monitor, as in /sys/class/power_supply/ instead of auto detect. + +*interval* ++ + typeof: integer ++ + default: 60 ++ + The interval in which the information gets polled. + +*states* ++ + typeof: array ++ + A number of battery states which get activated on certain capacity levels. See *waybar-states(5)*. + +*format* ++ + typeof: string ++ + default: {capacity}% ++ + The format, how the time should be displayed. + +*format-icons* + typeof: array/object + Based on the current capacity, the corresponding icon gets selected. ++ + The order is *low* to *high*. Or by the state if it is an object. + +*max-length* ++ + typeof: integer++ + The maximum length in character the module should display. + +*rotate* ++ + typeof: integer++ + Positive value to rotate the text label. + +*on-click* ++ + typeof: string ++ + Command to execute when clicked on the module. + +*on-click-right* ++ + typeof: string ++ + Command to execute when you right clicked on the module. + +*on-scroll-up* ++ + typeof: string ++ + Command to execute when scrolling up on the module. + +*on-scroll-down* ++ + typeof: string ++ + Command to execute when scrolling down on the module. + +*smooth-scrolling-threshold* ++ + typeof: double ++ + Threshold to be used when scrolling. + +*tooltip* ++ + typeof: bool ++ + default: true ++ + Option to disable tooltip on hover. + +# Format Replacements: + +*{capacity}*: Capacity in percentage + +*{icon}*: Icon, as defined in *format-icons*. + +*{time}*: Estimate of time until full or empty. Note that this is based on the power draw at the last refresh time, not an average. + +# Custom Formats: + +The *battery* module allows to define custom formats based on up to two factors. The best fitting format will be selected. + +*format-*: With *states*, a custom format can be set depending on the capacity of your battery. + +*format-*: With the status, a custom format can be set depending on the status in /sys/class/power_supply//status (in lowercase). + +*format--*: You can also set a custom format depending on both values. + +# States: + +- Every entry (*state*) consists of a ** (typeof: *string*) and a ** (typeof: *integer*). + - The state can be addressed as a CSS class in the *style.css*. The name of the CSS class is the ** of the state. Each class gets activated when the current capacity is equal or below the configured **. + - Also each state can have its own *format*. Those con be configured via *format-*. Or if you want to differentiate a bit more even as *format--*. For more information see *custom-formats*. + + + +# Example: + +``` +"battery": { + "bat": "BAT2", + "interval": 60, + "states": { + "warning": 30, + "critical": 15 + }, + "format": "{capacity}% {icon}", + "format-icons": ["", "", "", "", ""], + "max-length": 25 +} +``` + +# Style + +- *#battery* +- *#battery.* + - ** is the value of /sys/class/power_supply//status in lowercase. +- *#battery.* + - ** can be defined in the *config*. For more information see *states*. +- *#battery..* + - Combination of both ** and **. From cda9eb683fefd6cf5a7cabacec40bf0979a8902b Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Sat, 24 Aug 2019 18:09:08 +0100 Subject: [PATCH 08/36] Add waybar-clock(5) --- meson.build | 1 + waybar-clock.5.scd | 64 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 waybar-clock.5.scd diff --git a/meson.build b/meson.build index c3314d9..a7103b1 100644 --- a/meson.build +++ b/meson.build @@ -163,6 +163,7 @@ if scdoc.found() 'waybar.5.scd', 'waybar-backlight.5.scd', 'waybar-battery.5.scd', + 'waybar-clock.5.scd', ] foreach filename : man_files diff --git a/waybar-clock.5.scd b/waybar-clock.5.scd new file mode 100644 index 0000000..a0272a4 --- /dev/null +++ b/waybar-clock.5.scd @@ -0,0 +1,64 @@ +waybar-clock(5) + +# NAME + +waybar - clock module + +# DESCRIPTION + +The *clock* module displays the current date and time. + +*interval*: ++ + typeof: integer ++ + default: 60 ++ + The interval in which the information gets polled. + +*format*: ++ + typeof: string ++ + default: {:%H:%M} ++ + The format, how the date and time should be displayed. + +*max-length*: ++ + typeof: integer ++ + The maximum length in character the module should display. + +*rotate*: ++ + typeof: integer ++ + Positive value to rotate the text label. + +*on-click*: ++ + typeof: string ++ + Command to execute when clicked on the module. + +*on-click-right*: ++ + typeof: string ++ + Command to execute when you right clicked on the module. + +*on-scroll-up*: ++ + typeof: string ++ + Command to execute when scrolling up on the module. + +*on-scroll-down*: ++ + typeof: string ++ + Command to execute when scrolling down on the module. + +*smooth-scrolling-threshold*: ++ + typeof: double ++ + Threshold to be used when scrolling. + +View all valid format options in *strftime(3)*. + +# Example: + +``` +"clock": { + "interval": 60, + "format": "{:%H:%M}", + "max-length": 25 +} + +``` + +# Style + +- *#clock* From dd3da7b6ef439b97de6840d9cebbe88f7e355f45 Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Sat, 24 Aug 2019 18:11:03 +0100 Subject: [PATCH 09/36] Minor fixes to waybar(5) --- waybar.5.scd | 101 ++++++++++++++++++++++++--------------------------- 1 file changed, 47 insertions(+), 54 deletions(-) diff --git a/waybar.5.scd b/waybar.5.scd index 8f958a3..70f4efe 100644 --- a/waybar.5.scd +++ b/waybar.5.scd @@ -6,20 +6,18 @@ waybar - configuration file # 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: -- `~/.config/waybar/` -- `~/waybar/` -- `/etc/xdg/waybar/` +- *~/.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 +# Bar Config *layer* ++ typeof: string ++ @@ -67,8 +65,7 @@ All valid options for the modules are listed on the modules page: https://github typeof: string ++ 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). @@ -77,8 +74,7 @@ e.g. ``` "format": "{}" ``` - -## 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. 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"], "battery": { - "bat": "BAT1" + "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}" - } + "bat": "BAT2" } ``` -## 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", - "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"], - "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", - "modules-left": ["sway/workspaces", "sway/mode"], + "modules-left": ["sway/workspaces", "sway/mode"], ... }, { "layer": "top", "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: ``` { - "clock": { - "rotate": 90 - } + "clock": { + "rotate": 90 + } } - ``` Valid options for the "rotate" property are: 0, 90, 180 and 270. From df83404c8c951301eb78e0cb651fc1c625f06573 Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Sat, 24 Aug 2019 21:46:56 +0100 Subject: [PATCH 10/36] Format headers --- waybar-backlight.5.scd | 7 +++---- waybar-battery.5.scd | 12 +++++++----- waybar-clock.5.scd | 7 ++++--- waybar.5.scd | 8 ++++---- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/waybar-backlight.5.scd b/waybar-backlight.5.scd index 765bd8c..2d97199 100644 --- a/waybar-backlight.5.scd +++ b/waybar-backlight.5.scd @@ -8,7 +8,7 @@ waybar - backlight module The *backlight* module displays the current backlight level. -# Config +# CONFIGURATION *interval* ++ typeof: integer ++ @@ -52,7 +52,7 @@ The *backlight* module displays the current backlight level. typeof: double Threshold to be used when scrolling. -# Example: +# EXAMPLE: ``` "backlight": { @@ -60,9 +60,8 @@ The *backlight* module displays the current backlight level. "format": "{percent}% {icon}", "format-icons": ["", ""] } - ``` -# Style +# STYLE - *#backlight* diff --git a/waybar-battery.5.scd b/waybar-battery.5.scd index 08a9432..5e2f1d9 100644 --- a/waybar-battery.5.scd +++ b/waybar-battery.5.scd @@ -8,6 +8,8 @@ waybar - battery module The *battery* module displays the current capacity and state (eg. charging) of your battery. +# CONFIGURATION + *bat* ++ typeof: string ++ The battery to monitor, as in /sys/class/power_supply/ instead of auto detect. @@ -68,7 +70,7 @@ The *battery* module displays the current capacity and state (eg. charging) of y default: true ++ Option to disable tooltip on hover. -# Format Replacements: +# FORMAT REPLACEMENTS *{capacity}*: Capacity in percentage @@ -76,7 +78,7 @@ The *battery* module displays the current capacity and state (eg. charging) of y *{time}*: Estimate of time until full or empty. Note that this is based on the power draw at the last refresh time, not an average. -# Custom Formats: +# CUSTOM FORMATS The *battery* module allows to define custom formats based on up to two factors. The best fitting format will be selected. @@ -86,7 +88,7 @@ The *battery* module allows to define custom formats based on up to two factors. *format--*: You can also set a custom format depending on both values. -# States: +# STATES - Every entry (*state*) consists of a ** (typeof: *string*) and a ** (typeof: *integer*). - The state can be addressed as a CSS class in the *style.css*. The name of the CSS class is the ** of the state. Each class gets activated when the current capacity is equal or below the configured **. @@ -94,7 +96,7 @@ The *battery* module allows to define custom formats based on up to two factors. -# Example: +# EXAMPLE ``` "battery": { @@ -110,7 +112,7 @@ The *battery* module allows to define custom formats based on up to two factors. } ``` -# Style +# STYLE - *#battery* - *#battery.* diff --git a/waybar-clock.5.scd b/waybar-clock.5.scd index a0272a4..e69a397 100644 --- a/waybar-clock.5.scd +++ b/waybar-clock.5.scd @@ -8,6 +8,8 @@ waybar - clock module The *clock* module displays the current date and time. +# CONFIGURATION + *interval*: ++ typeof: integer ++ default: 60 ++ @@ -48,7 +50,7 @@ The *clock* module displays the current date and time. View all valid format options in *strftime(3)*. -# Example: +# EXAMPLE ``` "clock": { @@ -56,9 +58,8 @@ View all valid format options in *strftime(3)*. "format": "{:%H:%M}", "max-length": 25 } - ``` -# Style +# STYLE - *#clock* diff --git a/waybar.5.scd b/waybar.5.scd index 70f4efe..727efc1 100644 --- a/waybar.5.scd +++ b/waybar.5.scd @@ -17,7 +17,7 @@ Valid directories for this file are: 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. -# Bar Config +# BAR CONFIG *layer* ++ typeof: string ++ @@ -74,7 +74,7 @@ e.g. ``` "format": "{}" ``` -# 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. For example if you want a second battery module, you can add `"battery#bat2"` to your modules. @@ -92,7 +92,7 @@ This could then look something like this *(this is an incomplete example)*: } ``` -# Minimal config +# MINIMAL CONFIG A minimal *config* file could look like this: @@ -115,7 +115,7 @@ A minimal *config* file could look like this: } ``` -# Multi output config +# MULTI OUTPUT CONFIG ## Limit a configuration to some outputs From fba1f5c8af6c3700630c141d7fa9f4ec498595fc Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Mon, 26 Aug 2019 13:11:06 +0100 Subject: [PATCH 11/36] Move scd files to man/ folder --- waybar-backlight.5.scd => man/waybar-backlight.5.scd | 0 waybar-battery.5.scd => man/waybar-battery.5.scd | 0 waybar-clock.5.scd => man/waybar-clock.5.scd | 0 waybar.5.scd => man/waybar.5.scd | 0 meson.build | 2 +- 5 files changed, 1 insertion(+), 1 deletion(-) rename waybar-backlight.5.scd => man/waybar-backlight.5.scd (100%) rename waybar-battery.5.scd => man/waybar-battery.5.scd (100%) rename waybar-clock.5.scd => man/waybar-clock.5.scd (100%) rename waybar.5.scd => man/waybar.5.scd (100%) diff --git a/waybar-backlight.5.scd b/man/waybar-backlight.5.scd similarity index 100% rename from waybar-backlight.5.scd rename to man/waybar-backlight.5.scd diff --git a/waybar-battery.5.scd b/man/waybar-battery.5.scd similarity index 100% rename from waybar-battery.5.scd rename to man/waybar-battery.5.scd diff --git a/waybar-clock.5.scd b/man/waybar-clock.5.scd similarity index 100% rename from waybar-clock.5.scd rename to man/waybar-clock.5.scd diff --git a/waybar.5.scd b/man/waybar.5.scd similarity index 100% rename from waybar.5.scd rename to man/waybar.5.scd diff --git a/meson.build b/meson.build index a7103b1..49e70ae 100644 --- a/meson.build +++ b/meson.build @@ -173,7 +173,7 @@ if scdoc.found() custom_target( output, - input: filename, + input: 'man/@0@'.format(filename), output: output, command: [ sh, '-c', '@0@ < @INPUT@ > @1@'.format(scdoc_prog.path(), output) From 53614ab50c9130150fb8a1f4d4c33ef9d98e9efd Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Mon, 26 Aug 2019 13:23:11 +0100 Subject: [PATCH 12/36] Add waybar-cpu(5) --- man/waybar-cpu.5.scd | 78 ++++++++++++++++++++++++++++++++++++++++++++ meson.build | 1 + 2 files changed, 79 insertions(+) create mode 100644 man/waybar-cpu.5.scd diff --git a/man/waybar-cpu.5.scd b/man/waybar-cpu.5.scd new file mode 100644 index 0000000..9aa61e1 --- /dev/null +++ b/man/waybar-cpu.5.scd @@ -0,0 +1,78 @@ +waybar-cpu(5) + +# NAME + +waybar - cpu module + +# DESCRIPTION + +The *cpu* module displays the current cpu utilization. + +# CONFIGURATION + +*interval*: ++ + typeof: integer ++ + default: 10 ++ + The interval in which the information gets polled. + +*format*: ++ + typeof: string ++ + default: {usage}% ++ + The format, how information should be displayed. On {} data gets inserted. + +*max-length*: ++ + typeof: integer ++ + The maximum length in character the module should display. + +*rotate*: ++ + typeof: integer ++ + Positive value to rotate the text label. + +*states*: ++ + typeof: array ++ + A number of cpu usage states which get activated on certain usage levels. See *waybar-states(5)*. + +*on-click*: ++ + typeof: string ++ + Command to execute when clicked on the module. + +*on-click-right*: ++ + typeof: string ++ + Command to execute when you right clicked on the module. + +*on-scroll-up*: ++ + typeof: string ++ + Command to execute when scrolling up on the module. + +*on-scroll-down*: ++ + typeof: string ++ + Command to execute when scrolling down on the module. + +*smooth-scrolling-threshold*: ++ + typeof: double ++ + Threshold to be used when scrolling. + +*tooltip*: ++ + typeof: bool ++ + default: true ++ + Option to disable tooltip on hover. + +# FORMAT REPLACEMENTS + +*{load}*: Current cpu load. + +*{usage}*: Current cpu usage. + +# EXAMPLE + +``` +"cpu": { + "interval": 10, + "format": "{}% ", + "max-length": 10 +} +``` + +# STYLE + +- *#cpu* diff --git a/meson.build b/meson.build index 49e70ae..1765290 100644 --- a/meson.build +++ b/meson.build @@ -164,6 +164,7 @@ if scdoc.found() 'waybar-backlight.5.scd', 'waybar-battery.5.scd', 'waybar-clock.5.scd', + 'waybar-cpu.5.scd', ] foreach filename : man_files From 07d6a8e9360d8492f32b816a88c774d4362e5d46 Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Mon, 26 Aug 2019 13:31:57 +0100 Subject: [PATCH 13/36] Use tabs not spaces in scd files --- man/waybar-cpu.5.scd | 56 ++++++++++++++++++++++---------------------- meson.build | 3 ++- 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/man/waybar-cpu.5.scd b/man/waybar-cpu.5.scd index 9aa61e1..e4e5250 100644 --- a/man/waybar-cpu.5.scd +++ b/man/waybar-cpu.5.scd @@ -11,51 +11,51 @@ The *cpu* module displays the current cpu utilization. # CONFIGURATION *interval*: ++ - typeof: integer ++ - default: 10 ++ - The interval in which the information gets polled. + typeof: integer ++ + default: 10 ++ + The interval in which the information gets polled. *format*: ++ - typeof: string ++ - default: {usage}% ++ - The format, how information should be displayed. On {} data gets inserted. + typeof: string ++ + default: {usage}% ++ + The format, how information should be displayed. On {} data gets inserted. *max-length*: ++ - typeof: integer ++ - The maximum length in character the module should display. + typeof: integer ++ + The maximum length in character the module should display. *rotate*: ++ - typeof: integer ++ - Positive value to rotate the text label. + typeof: integer ++ + Positive value to rotate the text label. *states*: ++ - typeof: array ++ - A number of cpu usage states which get activated on certain usage levels. See *waybar-states(5)*. + typeof: array ++ + A number of cpu usage states which get activated on certain usage levels. See *waybar-states(5)*. *on-click*: ++ - typeof: string ++ - Command to execute when clicked on the module. + typeof: string ++ + Command to execute when clicked on the module. *on-click-right*: ++ - typeof: string ++ - Command to execute when you right clicked on the module. + typeof: string ++ + Command to execute when you right clicked on the module. *on-scroll-up*: ++ - typeof: string ++ - Command to execute when scrolling up on the module. + typeof: string ++ + Command to execute when scrolling up on the module. *on-scroll-down*: ++ - typeof: string ++ - Command to execute when scrolling down on the module. + typeof: string ++ + Command to execute when scrolling down on the module. *smooth-scrolling-threshold*: ++ - typeof: double ++ - Threshold to be used when scrolling. + typeof: double ++ + Threshold to be used when scrolling. *tooltip*: ++ - typeof: bool ++ - default: true ++ - Option to disable tooltip on hover. + typeof: bool ++ + default: true ++ + Option to disable tooltip on hover. # FORMAT REPLACEMENTS @@ -67,9 +67,9 @@ The *cpu* module displays the current cpu utilization. ``` "cpu": { - "interval": 10, - "format": "{}% ", - "max-length": 10 + "interval": 10, + "format": "{}% ", + "max-length": 10 } ``` diff --git a/meson.build b/meson.build index 1765290..d5ab199 100644 --- a/meson.build +++ b/meson.build @@ -163,8 +163,9 @@ if scdoc.found() 'waybar.5.scd', 'waybar-backlight.5.scd', 'waybar-battery.5.scd', - 'waybar-clock.5.scd', + 'waybar-clock.5.scd', 'waybar-cpu.5.scd', + 'warbar-custom.5.scd', ] foreach filename : man_files From db85224d59b695affaa8aeb469857a17d2cd2e97 Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Mon, 26 Aug 2019 13:42:59 +0100 Subject: [PATCH 14/36] Add waybar-custom(5) --- man/waybar-custom.5.scd | 190 ++++++++++++++++++++++++++++++++++++++++ meson.build | 2 +- 2 files changed, 191 insertions(+), 1 deletion(-) create mode 100644 man/waybar-custom.5.scd diff --git a/man/waybar-custom.5.scd b/man/waybar-custom.5.scd new file mode 100644 index 0000000..a427be3 --- /dev/null +++ b/man/waybar-custom.5.scd @@ -0,0 +1,190 @@ +waybar-custom(5) + +# NAME + +waybar - custom module + +# DESCRIPTION + +The *custom* module displays either the output of a script or static text. +To display static text, specify only the *format* field. + +# CONFIGURATION + +Addressed by *custom/* + +*exec*: ++ + typeof: string ++ + The path to the script, which should be executed. + +*exec-if*: ++ + typeof: string ++ + The path to a script, which determines if the script in *exec* should be executed. + *exec* will be executed if the exit code of *exec-if* equals 0. + +*return-type*: ++ + typeof: string ++ + See *return-type* + +*interval*: ++ + typeof: integer ++ + The interval (in seconds) in which the information gets polled. + Use *once* if you want to execute the module only on startup. + You can update it manually with a signal. If no *interval* is defined, + it is assumed that the out script loops it self. + +*signal*: ++ + typeof: integer ++ + The signal number used to update the module. + The number is valid between 1 and N, where *SIGRTMIN+N* = *SIGRTMAX*. + +*format*: ++ + typeof: string ++ + default: {} ++ + The format, how information should be displayed. On {} data gets inserted. + +*format-icons*: ++ + typeof: array ++ + Based on the set percentage, the corresponding icon gets selected. The order is *low* to *high*. + +*rotate*: ++ + typeof: integer ++ + Positive value to rotate the text label. + +*max-length*: ++ + typeof: integer ++ + The maximum length in character the module should display. + +*on-click*: ++ + typeof: string ++ + Command to execute when clicked on the module. + +*on-click-right*: ++ + typeof: string ++ + Command to execute when you right clicked on the module. + +*on-scroll-up*: ++ + typeof: string ++ + Command to execute when scrolling up on the module. + +*on-scroll-down*: ++ + typeof: string ++ + Command to execute when scrolling down on the module. + +*smooth-scrolling-threshold*: ++ + typeof: double ++ + Threshold to be used when scrolling. + +*tooltip*: ++ + typeof: bool ++ + default: true ++ + Option to disable tooltip on hover. + +*escape*: ++ + typeof: bool ++ + default: false ++ + Option to enable escaping of script output. + +# RETURN-TYPE + +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", "percentage": $percentage } +``` + +The *class* parameter also accepts an array of strings. + +If nothing or an invalid option is specified, Waybar expects i3blocks style output. Values are *newline* separated. +This should look like this: + +``` +$text\\n$tooltip\\n$class* +``` + +*class* is a CSS class, to apply different styles in *style.css* + +# FORMAT REPLACEMENTS + +*{}*: Output of the script. + +*{percentage}* Percentage which can be set via a json return-type. + +*{icon}*: An icon from 'format-icons' according to percentage. + +# EXAMPLES + +## Spotify: + +``` +"custom/spotify": { + "format": " {}", + "max-length": 40, + "interval": 30, // Remove this if your script is endless and write in loop + "exec": "$HOME/.config/waybar/mediaplayer.sh 2> /dev/null", // Script in resources folder + "exec-if": "pgrep spotify" +} +``` + +## mpd: + +``` +"custom/mpd": { + "format": "♪ {}", + //"max-length": 15, + "interval": 10, + "exec": "mpc current", + "exec-if": "pgrep mpd", + "on-click": "mpc toggle", + "on-click-right": "sonata" +} +``` + +## cmus: + +``` +"custom/cmus": { + "format": "♪ {}", + //"max-length": 15, + "interval": 10, + "exec": "cmus-remote -C \"format_print '%a - %t'\"", // artist - title + "exec-if": "pgrep cmus", + "on-click": "cmus-remote -u", //toggle pause + "escape": true //handle markup entities +} +``` + +## Pacman + +``` + +"custom/pacman": { + "format": "{} ", + "interval": "once", + "exec": "pacman_packages", + "on-click": "update-system", + "signal": 8 +} +``` + +## Alternate Pacman + +``` +"custom/pacman": { + "format": "{} ", + "interval": 3600, // every hour + "exec": "checkupdates | wc -l", // # of updates + "exec-if": "exit 0", // always run; consider advanced run conditions + "on-click": "termite -e 'sudo pacman -Syu'; pkill -SIGRTMIN+8 waybar", // update system + "signal": 8 +} +``` + +You can use the signal and update the number of available packages with *pkill -RTMIN+8 waybar*. + +# STYLE + +- *#custom-* +- *#custom-.* +- ** can be set by the script. For more information see *return-type* diff --git a/meson.build b/meson.build index d5ab199..a3cf2ed 100644 --- a/meson.build +++ b/meson.build @@ -165,7 +165,7 @@ if scdoc.found() 'waybar-battery.5.scd', 'waybar-clock.5.scd', 'waybar-cpu.5.scd', - 'warbar-custom.5.scd', + 'waybar-custom.5.scd', ] foreach filename : man_files From 87392ef653ecb7c4bbc61c6299c94b364190bde7 Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Mon, 26 Aug 2019 15:06:20 +0100 Subject: [PATCH 15/36] Add waybar-idle-inhibitor(5) --- man/waybar-idle-inhibitor.5.scd | 71 +++++++++++++++++++++++++++++++++ meson.build | 1 + 2 files changed, 72 insertions(+) create mode 100644 man/waybar-idle-inhibitor.5.scd diff --git a/man/waybar-idle-inhibitor.5.scd b/man/waybar-idle-inhibitor.5.scd new file mode 100644 index 0000000..d621288 --- /dev/null +++ b/man/waybar-idle-inhibitor.5.scd @@ -0,0 +1,71 @@ +waybar-idle_inhibitor(5) + +# NAME + +waybar - idle_inhibitor module + +# DESCRIPTION + +The *idle_inhibitor* module can inhibiting the idle behavior such as screen blanking, locking, and +screensaving, also known as "presentation mode". + +# CONFIGURATION + +*format*: ++ + typeof: string ++ + The format, how the state should be displayed. + +*format-icons*: ++ + typeof: array ++ + Based on the current state, the corresponding icon gets selected. + +*rotate*: ++ + typeof: integer ++ + Positive value to rotate the text label. + +*max-length*: ++ + typeof: integer ++ + The maximum length in character the module should display. + +*on-click*: ++ + typeof: string ++ + Command to execute when clicked on the module. A click also toggles the state + +*on-click-right*: ++ + typeof: string ++ + Command to execute when you right clicked on the module. + +*on-scroll-up*: ++ + typeof: string ++ + Command to execute when scrolling up on the module. + +*on-scroll-down*: ++ + typeof: string ++ + Command to execute when scrolling down on the module. + +*smooth-scrolling-threshold*: ++ + typeof: double ++ + Threshold to be used when scrolling. + +*tooltip*: ++ + typeof: bool ++ + default: true ++ + Option to disable tooltip on hover. + +# FORMAT REPLACEMENTS + +*{status}*: status (*activated* or *deactivated*) + +*{icon}*: Icon, as defined in *format-icons* + +# EXAMPLE + +``` +"idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "" + } +} +``` diff --git a/meson.build b/meson.build index a3cf2ed..d981848 100644 --- a/meson.build +++ b/meson.build @@ -166,6 +166,7 @@ if scdoc.found() 'waybar-clock.5.scd', 'waybar-cpu.5.scd', 'waybar-custom.5.scd', + 'waybar-idle-inhibitor.5.scd', ] foreach filename : man_files From 30efd28b6a5039be8f460e1c203d3bbb853704b1 Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Mon, 26 Aug 2019 15:12:42 +0100 Subject: [PATCH 16/36] Add waybar-memory(5) --- man/waybar-memory.5.scd | 93 +++++++++++++++++++++++++++++++++++++++++ meson.build | 1 + 2 files changed, 94 insertions(+) create mode 100644 man/waybar-memory.5.scd diff --git a/man/waybar-memory.5.scd b/man/waybar-memory.5.scd new file mode 100644 index 0000000..5b712a7 --- /dev/null +++ b/man/waybar-memory.5.scd @@ -0,0 +1,93 @@ +waybar-memory(5) + +# NAME + +waybar - memory module + +# DESCRIPTION + +The *memory* module displays the current date and time. + +# CONFIGURATION + +Addressed by *memory* + +*interval*: ++ + typeof: integer++ + default: 30 ++ + The interval in which the information gets polled. + +*format*: ++ + typeof: string ++ + default: {percentage}% ++ + The format, how information should be displayed. + +*rotate*: ++ + typeof: integer ++ + Positive value to rotate the text label. + +*states*: ++ + typeof: array ++ + A number of memory utilization states which get activated on certain percentage thresholds. See *waybar-states(5)*. + +*max-length*: ++ + typeof: integer ++ + The maximum length in character the module should display. + +*on-click*: ++ + typeof: string ++ + Command to execute when clicked on the module. + +*on-click-right*: ++ + typeof: string ++ + Command to execute when you right clicked on the module. + +*on-scroll-up*: ++ + typeof: string ++ + Command to execute when scrolling up on the module. + +*on-scroll-down*: ++ + typeof: string ++ + Command to execute when scrolling down on the module. + +*smooth-scrolling-threshold*: ++ + typeof: double ++ + Threshold to be used when scrolling. + +*tooltip*: ++ + typeof: bool ++ + default: true ++ + Option to disable tooltip on hover. + +# FORMAT REPLACEMENTS + +*{percentage}*: Percentage of memory in use. + +*{total}*: Amount of total memory available in GiB. + +*{used}*: Amount of used memory in GiB. + +*{avail}*: Amount of available memory in GiB. + +# EXAMPLE + +``` +"memory": { + "interval": 30, + "format": "{}% ", + "max-length": 10 +} +``` + +## FORMATTED MEMORY VALUES + +``` +"memory": { + "interval": 30, + "format": "{used:0.1f}G/{total:0.1f}G " +} +``` + +# STYLE + +- *#memory* diff --git a/meson.build b/meson.build index d981848..ebe91df 100644 --- a/meson.build +++ b/meson.build @@ -167,6 +167,7 @@ if scdoc.found() 'waybar-cpu.5.scd', 'waybar-custom.5.scd', 'waybar-idle-inhibitor.5.scd', + 'waybar-memory.5.scd', ] foreach filename : man_files From ac461f38f47f433420142ceaab0a00f1074e9520 Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Mon, 26 Aug 2019 15:23:07 +0100 Subject: [PATCH 17/36] Add waybar-mpd(5) --- man/waybar-mpd.5.scd | 200 +++++++++++++++++++++++++++++++++++++++++++ meson.build | 1 + 2 files changed, 201 insertions(+) create mode 100644 man/waybar-mpd.5.scd diff --git a/man/waybar-mpd.5.scd b/man/waybar-mpd.5.scd new file mode 100644 index 0000000..621691b --- /dev/null +++ b/man/waybar-mpd.5.scd @@ -0,0 +1,200 @@ +waybar-mpd(5) + +# NAME + +waybar - mpd module + +# DESCRIPTION + +The *mpd* module displays the current date and time. + +# CONFIGURATION + +Addressed by *mpd* + +*server*: ++ + typeof: string ++ + The network address or Unix socket path of the MPD server. If empty, connect to the default host. + +*port*: ++ + typeof: integer ++ + The port MPD listens to. If empty, use the default port. + +*interval*: ++ + typeof: integer++ + default: 5 ++ + The interval in which the connection to the MPD server is retried + +*timeout*: ++ + typeof: integer++ + default: 30 ++ + The timeout for the connection. Change this if your MPD server has a low `connection_timeout` setting + +*unknown-tag*: ++ + typeof: string ++ + default: "N/A" ++ + The text to display when a tag is not present in the current song, but used in `format` + +*format*: ++ + typeof: string ++ + default: "{album} - {artist} - {title}" ++ + Information displayed when a song is playing or paused + +*format-stopped*: ++ + typeof: string ++ + default: "stopped" ++ + Information displayed when the player is stopped. + +*format-disconnected*: ++ + typeof: string ++ + default: "disconnected" ++ + Information displayed when the MPD server can't be reached. + +*tooltip*: ++ + typeof: bool ++ + default: true ++ + Option to disable tooltip on hover. + +*tooltip-format*: ++ + typeof: string ++ + default: "MPD (connected)" ++ + Tooltip information displayed when connected to MPD. + +*tooltip-format-disconnected*: ++ + typeof: string ++ + default: "MPD (disconnected)" ++ + Tooltip information displayed when the MPD server can't be reached. + +*rotate*: ++ + typeof: integer ++ + Positive value to rotate the text label. + +*max-length*: ++ + typeof: integer ++ + The maximum length in character the module should display. + +*on-click*: ++ + typeof: string ++ + Command to execute when clicked on the module. + +*on-click-right*: ++ + typeof: string ++ + Command to execute when you right clicked on the module. + +*on-scroll-up*: ++ + typeof: string ++ + Command to execute when scrolling up on the module. + +*on-scroll-down*: ++ + typeof: string ++ + Command to execute when scrolling down on the module. + +*smooth-scrolling-threshold*: ++ + typeof: double ++ + Threshold to be used when scrolling. + +*state-icons*: ++ + typeof: object ++ + default: {} ++ + Icon to show depending on the play/pause state of the player (*{ "playing": "...", "paused": "..." }*) + +*consume-icons*: ++ + typeof: object ++ + default: {} ++ + Icon to show depending on the "consume" option (*{ "on": "...", "off": "..." }*) + +*random-icons*: ++ + typeof: object ++ + default: {} ++ + Icon to show depending on the "random" option (*{ "on": "...", "off": "..." }*) + +*repeat-icons*: ++ + typeof: object ++ + default: {} ++ + Icon to show depending on the "repeat" option (*{ "on": "...", "off": "..." }*) + +*single-icons*: ++ + typeof: object ++ + default: {} ++ + Icon to show depending on the "single" option (*{ "on": "...", "off": "..." }*) + +# FORMAT REPLACEMENTS + +## WHEN PLAYING/PAUSED + +*{artist}*: The artist of the current song + +*{albumArtist}*: The artist of the current album + +*{album}*: The album of the current song + +*{title}*: The title of the current song + +*{date}*: The date of the current song + +*{elapsedTime}*: The current position of the current song. To format as a date/time (see example configuration) + +*{totalTime}*: The length of the current song. To format as a date/time (see example configuration) + +*{stateIcon}*: The icon corresponding the playing or paused status of the player (see *state-icons* option) + +*{consumeIcon}*: The icon corresponding the "consume" option (see *consume-icons* option) + +*{randomIcon}*: The icon corresponding the "random" option (see *random-icons* option) + +*{repeatIcon}*: The icon corresponding the "repeat" option (see *repeat-icons* option) + +*{singleIcon}*: The icon corresponding the "single" option (see *single-icons* option) + + +## WHEN STOPPED + +*{consumeIcon}*: The icon corresponding the "consume" option (see *consume-icons* option) + +*{randomIcon}*: The icon corresponding the "random" option (see *random-icons* option) + +*{repeatIcon}*: The icon corresponding the "repeat" option (see *repeat-icons* option) + +*{singleIcon}*: The icon corresponding the "single" option (see *single-icons* option) + +## WHEN DISCONNECTED + +Currently, no format replacements when disconnected. + +# EXAMPLES + +``` +"mpd": { + "format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ", + "format-disconnected": "Disconnected ", + "format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ", + "interval": 2, + "consume-icons": { + "on": " " // Icon shows only when "consume" is on + }, + "random-icons": { + "off": " ", // Icon grayed out when "random" is off + "on": " " + }, + "repeat-icons": { + "on": " " + }, + "single-icons": { + "on": "1 " + }, + "state-icons": { + "paused": "", + "playing": "" + }, + "tooltip-format": "MPD (connected)", + "tooltip-format-disconnected": "MPD (disconnected)" +} +``` + +# STYLE + +- *#mpd* +- *#mpd.disconnected* +- *#mpd.stopped* +- *#mpd.playing* +- *#mpd.paused* diff --git a/meson.build b/meson.build index ebe91df..86d266f 100644 --- a/meson.build +++ b/meson.build @@ -168,6 +168,7 @@ if scdoc.found() 'waybar-custom.5.scd', 'waybar-idle-inhibitor.5.scd', 'waybar-memory.5.scd', + 'waybar-mpd.5.scd', ] foreach filename : man_files From 7f6e4801ebd87e1ecad1ce36d111f45e1b91cdc8 Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Mon, 26 Aug 2019 17:42:30 +0100 Subject: [PATCH 18/36] Add waybar-network(5) --- man/waybar-network.5.scd | 143 +++++++++++++++++++++++++++++++++++++++ meson.build | 1 + 2 files changed, 144 insertions(+) create mode 100644 man/waybar-network.5.scd diff --git a/man/waybar-network.5.scd b/man/waybar-network.5.scd new file mode 100644 index 0000000..ed8451f --- /dev/null +++ b/man/waybar-network.5.scd @@ -0,0 +1,143 @@ +waybar-network(5) + +# NAME + +waybar - network module + +# DESCRIPTION + +The *network* module displays information about the current network connections. + +# CONFIGURATION + +Addressed by *network* + +*interface*: ++ + typeof: string ++ + Use the defined interface instead of auto detection. Accepts wildcard. + +*interval*: ++ + typeof: integer ++ + default: 60 ++ + The interval in which the network information gets polled (e.g. signal strength). + +*format*: ++ + typeof: string ++ + default: *{ifname}* ++ + The format, how information should be displayed. This format is used when other formats aren't specified. + +*format-ethernet*: ++ + typeof: string ++ + This format is used when a ethernet interface is displayed. + +*format-wifi*: ++ + typeof: string ++ + This format is used when a wireless interface is displayed. + +*format-linked*: ++ + typeof: string ++ + This format is used when a linked interface with no ip address is displayed. + +*format-disconnected*: ++ + typeof: string ++ + This format is used when the displayed interface is disconnected. + +*rotate*: ++ + typeof: integer ++ + Positive value to rotate the text label. + +*max-length*: ++ + typeof: integer ++ + The maximum length in character the module should display. + +*on-click*: ++ + typeof: string ++ + Command to execute when clicked on the module. + +*on-click-right*: ++ + typeof: string ++ + Command to execute when you right clicked on the module. + +*on-scroll-up*: ++ + typeof: string ++ + Command to execute when scrolling up on the module. + +*on-scroll-down*: ++ + typeof: string ++ + Command to execute when scrolling down on the module. + +*smooth-scrolling-threshold*: ++ + typeof: double ++ + Threshold to be used when scrolling. + +*tooltip*: ++ + typeof: bool ++ + default: *true* ++ + Option to disable tooltip on hover. + +*tooltip-format*: ++ + typeof: string ++ + The format, how information should be displayed in the tooltip. This format is used when other formats aren't specified. + +*tooltip-format-ethernet*: ++ + typeof: string ++ + This format is used when a ethernet interface is displayed. + +*tooltip-format-wifi*: ++ + typeof: string ++ + This format is used when a wireless interface is displayed. + +*tooltip-format-disconnected*: ++ + typeof: string ++ + This format is used when the displayed interface is disconnected. + +# FORMAT REPLACEMENTS + +*{ifname}*: Name of the network interface. + +*{ipaddr}*: The first IP of the interface. + +*{netmask}*: The subnetmask corresponding to the IP. + +*{cidr}*: The subnetmask corresponding to the IP in CIDR notation. + +*{essid}*: Name (SSID) of the wireless network. + +*{signalStrength}*: Signal strength of the wireless network. + +*{signaldBm}*: Signal strength of the wireless network in dBm. + +*{frequency}*: Frequency of the wireless network in MHz. + +*{bandwidthUpBits}*: Instant up speed in bits/seconds. + +*{bandwidthDownBits}*: Instant down speed in bits/seconds. + +*{bandwidthUpOctets}*: Instant up speed in octets/seconds. + +*{bandwidthDownOctets}*: Instant down speed in octets/seconds. + +# EXAMPLES + +``` +"network": { + "interface": "wlp2s0", + "format": "{ifname}", + "format-wifi": "{essid} ({signalStrength}%) ", + "format-ethernet": "{ifname} ", + "format-disconnected": "", //An empty format will hide the module. + "tooltip-format": "{ifname}", + "tooltip-format-wifi": "{essid} ({signalStrength}%) ", + "tooltip-format-ethernet": "{ifname} ", + "tooltip-format-disconnected": "Disconnected", + "max-length": 50 +} +``` + +# STYLE + +- *#network* +- *#network.disconnected* +- *#network.linked* +- *#network.ethernet* +- *#network.wifi* diff --git a/meson.build b/meson.build index 86d266f..7ed762b 100644 --- a/meson.build +++ b/meson.build @@ -169,6 +169,7 @@ if scdoc.found() 'waybar-idle-inhibitor.5.scd', 'waybar-memory.5.scd', 'waybar-mpd.5.scd', + 'waybar-network.5.scd', ] foreach filename : man_files From f380844d61858d605dca3934fecc5024ce79b7cf Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Mon, 26 Aug 2019 17:50:16 +0100 Subject: [PATCH 19/36] Add waybar-pulseaudio(5) --- man/waybar-pulseaudio.5.scd | 132 ++++++++++++++++++++++++++++++++++++ meson.build | 1 + 2 files changed, 133 insertions(+) create mode 100644 man/waybar-pulseaudio.5.scd diff --git a/man/waybar-pulseaudio.5.scd b/man/waybar-pulseaudio.5.scd new file mode 100644 index 0000000..9b8e503 --- /dev/null +++ b/man/waybar-pulseaudio.5.scd @@ -0,0 +1,132 @@ +waybar-pulseaudio(5) + +# NAME + +waybar - pulseaudio module + +# DESCRIPTION + +The *pulseaudio* module displays the current volume reported by PulseAudio. + +Additionally you can control the volume by scrolling *up* or *down* while the cursor is over the module. + +# CONFIGURATION + +*format*: ++ + typeof: string ++ + default: {volume}% ++ + The format, how information should be displayed. This format is used when other formats aren't specified. + +*format-bluetooth*: ++ + typeof: string ++ + This format is used when using bluetooth speakers. + +*format-muted*: ++ + typeof: string ++ + This format is used when the sound is muted. + +*format-source*: ++ + typeof: string ++ + default: {volume}% ++ + This format used for the source. + +*format-source-muted*: ++ + typeof: string ++ + This format is used when the source is muted. + +*format-icons*: ++ + typeof: array ++ + Based on the current port-name and volume, the corresponding icon gets selected. The order is *low* to *high*. See [`Icons`](#module-pulseaudio-config-icons) + +*rotate*: ++ + typeof: integer ++ + Positive value to rotate the text label. + +*states*: ++ + typeof: array ++ + A number of volume states which get activated on certain volume levels. See *waybar-states(5)* + +*max-length*: ++ + typeof: integer ++ + The maximum length in character the module should display. + +*scroll-step*: ++ + typeof: float ++ + default: 1.0 ++ + The speed in which to change the volume when scrolling. + +*on-click*: ++ + typeof: string ++ + Command to execute when clicked on the module. + +*on-click-right*: ++ + typeof: string ++ + Command to execute when you right clicked on the module. + +*on-scroll-up*: ++ + typeof: string ++ + Command to execute when scrolling up on the module. This replaces the default behaviour of volume control. + +*on-scroll-down*: ++ + typeof: string ++ + Command to execute when scrolling down on the module. This replaces the default behaviour of volume control. + +*smooth-scrolling-threshold*: ++ + typeof: double ++ + Threshold to be used when scrolling. + +*tooltip*: ++ + typeof: bool ++ + default: true ++ + Option to disable tooltip on hover. + +# FORMAT REPLACEMENTS + +*{volume}*: Volume in percentage. + +*{icon}*: Icon, as defined in `format-icons`. + +*{format_source}*: Source format, `format-source`, `format-source-muted`. + +# ICONS: + +The following strings for `format-icons` are supported. +If they are found in the current PulseAudio port name, the corresponding icons will be selected. + +- *default* (Shown, when no other port is found) +- *headphones* +- *speaker* +- *hdmi* +- *headset* +- *handsfree* +- *portable* +- *car* +- *hifi* +- *phone* + +# EXAMPLES + +``` +"pulseaudio": { + "format": "{volume}% {icon}", + "format-bluetooth": "{volume}% {icon}", + "format-muted": "", + "format-icons": { + "headphones": "", + "handsfree": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", ""] + }, + "scroll-step": 1, + "on-click": "pavucontrol" +} +``` + +# STYLE + +- *#pulseaudio* +- *#pulseaudio.bluetooth* +- *#pulseaudio.muted* diff --git a/meson.build b/meson.build index 7ed762b..56d402f 100644 --- a/meson.build +++ b/meson.build @@ -170,6 +170,7 @@ if scdoc.found() 'waybar-memory.5.scd', 'waybar-mpd.5.scd', 'waybar-network.5.scd', + 'waybar-pulseaudio.5.scd', ] foreach filename : man_files From e01e3be488347b88a84d29097bb40ed79e7cc276 Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Mon, 26 Aug 2019 17:55:20 +0100 Subject: [PATCH 20/36] Add waybar-sway-mode(5) --- man/waybar-sway-mode.5.scd | 64 ++++++++++++++++++++++++++++++++++++++ meson.build | 1 + 2 files changed, 65 insertions(+) create mode 100644 man/waybar-sway-mode.5.scd diff --git a/man/waybar-sway-mode.5.scd b/man/waybar-sway-mode.5.scd new file mode 100644 index 0000000..64d9a3e --- /dev/null +++ b/man/waybar-sway-mode.5.scd @@ -0,0 +1,64 @@ +waybar-sway-mode(5) + +# NAME + +waybar - sway mode module + +# DESCRIPTION + +The *mode* module displays the current binding mode of Sway + +# CONFIGURATION + +Addressed by *sway/mode* + +*format*: ++ + typeof: string ++ + default: {} ++ + The format, how information should be displayed. On {} data gets inserted. + +*rotate*: ++ + typeof: integer ++ + Positive value to rotate the text label. + +*max-length*: ++ + typeof: integer ++ + The maximum length in character the module should display. + +*on-click*: ++ + typeof: string ++ + Command to execute when clicked on the module. + +*on-click-right*: ++ + typeof: string ++ + Command to execute when you right clicked on the module. + +*on-scroll-up*: ++ + typeof: string ++ + Command to execute when scrolling up on the module. + +*on-scroll-down*: ++ + typeof: string ++ + Command to execute when scrolling down on the module. + +*smooth-scrolling-threshold*: ++ + typeof: double ++ + Threshold to be used when scrolling. + +*tooltip*: ++ + typeof: bool ++ + default: true ++ + Option to disable tooltip on hover. + +# EXAMPLES + +``` +"sway/window": { + "format": " {}", + "max-length": 50 +} +``` + +# STYLE + +- *#mode* diff --git a/meson.build b/meson.build index 56d402f..3dbf28d 100644 --- a/meson.build +++ b/meson.build @@ -171,6 +171,7 @@ if scdoc.found() 'waybar-mpd.5.scd', 'waybar-network.5.scd', 'waybar-pulseaudio.5.scd', + 'waybar-sway-mode.5.scd', ] foreach filename : man_files From 05e212f67a30fa9da7810d4c3cdaf5e8f2201eac Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Mon, 26 Aug 2019 18:00:46 +0100 Subject: [PATCH 21/36] Add waybar-sway-window(5) --- man/waybar-sway-window.5.scd | 67 ++++++++++++++++++++++++++++++++++++ meson.build | 1 + 2 files changed, 68 insertions(+) create mode 100644 man/waybar-sway-window.5.scd diff --git a/man/waybar-sway-window.5.scd b/man/waybar-sway-window.5.scd new file mode 100644 index 0000000..75a974c --- /dev/null +++ b/man/waybar-sway-window.5.scd @@ -0,0 +1,67 @@ +waybar-sway-window(5) + +# NAME + +waybar - sway window module + +# DESCRIPTION + +The *window* module displays the title of the currently focused window in Sway + +# CONFIGURATION + +Addressed by *sway/window* + +*format*: ++ + typeof: string ++ + default: {} ++ + The format, how information should be displayed. On {} data gets inserted. + +*rotate*: ++ + typeof: integer ++ + Positive value to rotate the text label. + +*max-length*: ++ + typeof: integer ++ + The maximum length in character the module should display. + +*on-click*: ++ + typeof: string ++ + Command to execute when clicked on the module. + +*on-click-right*: ++ + typeof: string ++ + Command to execute when you right clicked on the module. + +*on-scroll-up*: ++ + typeof: string ++ + Command to execute when scrolling up on the module. + +*on-scroll-down*: ++ + typeof: string ++ + Command to execute when scrolling down on the module. + +*smooth-scrolling-threshold*: ++ + typeof: double ++ + Threshold to be used when scrolling. + +*tooltip*: ++ + typeof: bool ++ + default: true ++ + Option to disable tooltip on hover. + +# EXAMPLES + +``` +"sway/window": { + "format": "{}", + "max-length": 50 +} +``` + +# STYLE + +- *#window* +- *window#waybar.empty* When no windows is in the workspace +- *window#waybar.solo* When one window is in the workspace +- *window#waybar.* Where *app_id* is the app_id or *instance* name like (*chromium*) of the only window in the workspace diff --git a/meson.build b/meson.build index 3dbf28d..342eb6f 100644 --- a/meson.build +++ b/meson.build @@ -172,6 +172,7 @@ if scdoc.found() 'waybar-network.5.scd', 'waybar-pulseaudio.5.scd', 'waybar-sway-mode.5.scd', + 'waybar-sway-window.5.scd', ] foreach filename : man_files From c19a63e85e45cff5d991c1a349704bfef7238200 Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Mon, 26 Aug 2019 18:08:06 +0100 Subject: [PATCH 22/36] Add waybar-sway-workspaces(5) --- man/waybar-sway-workspaces.5.scd | 123 +++++++++++++++++++++++++++++++ meson.build | 1 + 2 files changed, 124 insertions(+) create mode 100644 man/waybar-sway-workspaces.5.scd diff --git a/man/waybar-sway-workspaces.5.scd b/man/waybar-sway-workspaces.5.scd new file mode 100644 index 0000000..39c8dae --- /dev/null +++ b/man/waybar-sway-workspaces.5.scd @@ -0,0 +1,123 @@ +waybar-sway-workspaces(5) + +# NAME + +waybar - sway workspaces module + +# DESCRIPTION + +The *workspaces* module displays the currently used workspaces in Sway. + +# CONFIGURATION + +Addressed by *sway/workspaces* + +*all-outputs*: ++ + typeof: bool ++ + default: false ++ + If set to false, workspaces will only be shown on the output they are on. If set to true all workspaces will be shown on every output. + +*format*: ++ + typeof: string ++ + default: {name} ++ + The format, how information should be displayed. + +*format-icons*: ++ + typeof: array ++ + Based on the workspace name and state, the corresponding icon gets selected. See *icons*. + +*disable-scroll*: ++ + typeof: bool ++ + default: false ++ + If set to false, you can scroll to cycle through workspaces. If set to true this behaviour is disabled. + +*smooth-scrolling-threshold*: ++ + typeof: double ++ + Threshold to be used when scrolling. + +*disable-scroll-wraparound*: ++ + typeof: bool ++ + default: false ++ + If set to false, scrolling on the workspace indicator will wrap around to the first workspace when reading the end, and vice versa. If set to true this behavior is disabled. + +*enable-bar-scroll*: ++ + typeof: bool ++ + default: false ++ + If set to false, you can't scroll to cycle throughout workspaces from the entire bar. If set to true this behaviour is enabled. + +*disable-markup*: ++ + typeof: bool ++ + default: false ++ + If set to true, button label will escape pango markup. + +*current-only*: ++ + typeof: bool ++ + default: false ++ + If set to true. Only focused workspaces will be shown. + +*persistent_workspaces*: ++ + typeof: json (see below) ++ + default: empty ++ + Lists workspaces that should always be shown, even when non existent + +# FORMAT REPLACEMENTS + +*{name}*: Name of the workspace, as defined by sway. + +*{icon}*: Icon, as defined in *format-icons*. + +*{index}*: Index of the workspace. + +# ICONS + +Additional to workspace name matching, the following *format-icons* can be set. + +- *default*: Will be shown, when no string matches is found. +- *urgent*: Will be shown, when workspace is flagged as urgent +- *focused*: Will be shown, when workspace is focused + +# PERSISTANT WORKSPACES + +Each entry of *persistant_workspace* names a workspace that should always be shown. +Associated with that value is a list of outputs indicating *where* the workspace should be shown, +an empty list denoting all outputs. + +``` +"sway/workspaces": { + "persistant_workspaces": { + "3": [], // Always show a workspace with name '3', on all outputs if it does not exists + "4": ["eDP-1"], // Always show a workspace with name '4', on output 'eDP-1' if it does not exists + "5": ["eDP-1", "DP-2"] // Always show a workspace with name '5', on outputs 'eDP-1' and 'DP-2' if it does not exists + } +} +``` + +n.b.: the list of outputs can be obtained from command line using *swaymsg -t get_outputs* + +# EXAMPLES + +``` +"sway/workspaces": { + "disable-scroll": true, + "all-outputs": true, + "format": "{name}: {icon}", + "format-icons": { + "1": "", + "2": "", + "3": "", + "4": "", + "5": "", + "urgent": "", + "focused": "", + "default": "" + } +} +``` + +# Style + +- *#workspaces button* +- *#workspaces button.visible* +- *#workspaces button.focused* +- *#workspaces button.urgent* +- *#workspaces button.persistant* diff --git a/meson.build b/meson.build index 342eb6f..89b8994 100644 --- a/meson.build +++ b/meson.build @@ -173,6 +173,7 @@ if scdoc.found() 'waybar-pulseaudio.5.scd', 'waybar-sway-mode.5.scd', 'waybar-sway-window.5.scd', + 'waybar-sway-workspaces.5.scd', ] foreach filename : man_files From 4f9c3d241383f5b4be1bc0ea8aa713a59cc33fa4 Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Mon, 26 Aug 2019 18:13:48 +0100 Subject: [PATCH 23/36] Add waybar-temperature(5) --- man/waybar-temperature.5.scd | 99 ++++++++++++++++++++++++++++++++++++ meson.build | 1 + 2 files changed, 100 insertions(+) create mode 100644 man/waybar-temperature.5.scd diff --git a/man/waybar-temperature.5.scd b/man/waybar-temperature.5.scd new file mode 100644 index 0000000..8177969 --- /dev/null +++ b/man/waybar-temperature.5.scd @@ -0,0 +1,99 @@ +waybar-temperature(5) + +# NAME + +waybar - temperature module + +# DESCRIPTION + +The *temperature* module displays the current temperature from a thermal zone. + +# CONFIGURATION + +Addressed by *temperature* + +*thermal-zone*: ++ + typeof: integer ++ + The thermal zone, as in */sys/class/thermal/*. + +*hwmon-path*: ++ + typeof: string ++ + The temperature path to use, e.g. */sys/class/hwmon/hwmon2/temp1_input* instead of one in */sys/class/thermal/*. + +*critical-threshold*: ++ + typeof: integer ++ + The threshold before it is considered critical (Celcius). + +*interval*: ++ + typeof: integer ++ + default: 10 ++ + The interval in which the information gets polled. + +*format-critical*: ++ + typeof: string ++ + The format to use when temperature is considered critical + +*format*: ++ + typeof: string ++ + default: {temperatureC}°C ++ + The format (Celcius/Farenheit) in which the temperature should be displayed. + +*format-icons*: ++ + typeof: array ++ + Based on the current temperature (Celcius) and *critical-threshold* if available, the corresponding icon gets selected. The order is *low* to *high*. + +*rotate*: ++ + typeof: integer ++ + Positive value to rotate the text label. + +*max-length*: ++ + typeof: integer ++ + The maximum length in characters the module should display. + +*on-click*: ++ + typeof: string ++ + Command to execute when you clicked on the module. + +*on-click-right*: ++ + typeof: string ++ + Command to execute when you right clicked on the module. + +*on-scroll-up*: ++ + typeof: string ++ + Command to execute when scrolling up on the module. + +*on-scroll-down*: ++ + typeof: string ++ + Command to execute when scrolling down on the module. + +*smooth-scrolling-threshold*: ++ + typeof: double ++ + Threshold to be used when scrolling. + +*tooltip*: ++ + typeof: bool ++ + default: true ++ + Option to disable tooltip on hover. + +# FORMAT REPLACEMENTS + +*{temperatureC}*: Temperature in Celcius. + +*{temperatureF}*: Temperature in Fahrenheit. + +# EXAMPLES + +``` + "temperature": { + // "thermal-zone": 2, + // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", + // "critical-threshold": 80, + // "format-critical": "{temperatureC}°C ", + "format": "{temperatureC}°C " +} +``` + +# STYLE + +- *#temperature* +- *#temperature.critical* diff --git a/meson.build b/meson.build index 89b8994..5040b66 100644 --- a/meson.build +++ b/meson.build @@ -174,6 +174,7 @@ if scdoc.found() 'waybar-sway-mode.5.scd', 'waybar-sway-window.5.scd', 'waybar-sway-workspaces.5.scd', + 'waybar-temperature.5.scd', ] foreach filename : man_files From 436fc94549925aee7039deb994485a7bf65f7ee3 Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Mon, 26 Aug 2019 18:15:58 +0100 Subject: [PATCH 24/36] Add waybar-tray(5) --- man/waybar-tray.5.scd | 35 +++++++++++++++++++++++++++++++++++ meson.build | 1 + 2 files changed, 36 insertions(+) create mode 100644 man/waybar-tray.5.scd diff --git a/man/waybar-tray.5.scd b/man/waybar-tray.5.scd new file mode 100644 index 0000000..bb4510d --- /dev/null +++ b/man/waybar-tray.5.scd @@ -0,0 +1,35 @@ +waybar-tray(5) + +# NAME + +waybar - tray module + +# DESCRIPTION + +_WARNING_ *tray* is still in beta. There may me bugs. Breaking changes may occur. + +# CONFIGURATION + +Addressed by *tray* + +*icon-size*: ++ + typeof: integer ++ + Defines the size of the tray icons. + +*spacing*: ++ + typeof: integer ++ + Defines the spacing between the tray icons. + +# EXAMPLES + +``` +"tray": { + "icon-size": 21, + "spacing": 10 +} + +``` + +# STYLE + +- *#tray* diff --git a/meson.build b/meson.build index 5040b66..78a556a 100644 --- a/meson.build +++ b/meson.build @@ -175,6 +175,7 @@ if scdoc.found() 'waybar-sway-window.5.scd', 'waybar-sway-workspaces.5.scd', 'waybar-temperature.5.scd', + 'waybar-tray.5.scd', ] foreach filename : man_files From e6fa37164c4fa0e81f99c99ce3f10fcb3b0f811b Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Mon, 26 Aug 2019 18:20:22 +0100 Subject: [PATCH 25/36] List supported modules in waybar(5) --- man/waybar.5.scd | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/man/waybar.5.scd b/man/waybar.5.scd index 727efc1..3665a34 100644 --- a/man/waybar.5.scd +++ b/man/waybar.5.scd @@ -65,7 +65,7 @@ Also a minimal example config can be found on the at the bottom of this man page typeof: string ++ 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). @@ -172,3 +172,21 @@ When positioning Waybar on the left or right side of the screen, sometimes it's ``` Valid options for the "rotate" property are: 0, 90, 180 and 270. + +# SUPPORTED MODULES + +- *waybar-backlight(5)* +- *waybar-battery(5)* +- *waybar-clock(5)* +- *waybar-cpu(5)* +- *waybar-custom(5)* +- *waybar-idle-inhibitor(5)* +- *waybar-memory(5)* +- *waybar-mdp(5)* +- *waybar-network(5)* +- *waybar-pulseaudio(5)* +- *waybar-sway-mode(5)* +- *waybar-sway-window(5)* +- *waybar-sway-workspaces(5)* +- *waybar-temperature(5)* +- *waybar-tray(5)* From 8134215839db99125114ca6657d0b42f7a33bc62 Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Mon, 26 Aug 2019 22:27:03 +0100 Subject: [PATCH 26/36] s/config/configuration where it makes sense --- man/waybar.5.scd | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/man/waybar.5.scd b/man/waybar.5.scd index 3665a34..0274ab9 100644 --- a/man/waybar.5.scd +++ b/man/waybar.5.scd @@ -14,10 +14,10 @@ Valid directories for this file are: - *~/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. +A good starting point is the default configuration found at https://github.com/Alexays/Waybar/blob/master/resources/config. +Also a minimal example configuration can be found on the at the bottom of this man page. -# BAR CONFIG +# BAR CONFIGURATION *layer* ++ typeof: string ++ @@ -92,7 +92,7 @@ This could then look something like this *(this is an incomplete example)*: } ``` -# MINIMAL CONFIG +# MINIMAL CONFIGURATION A minimal *config* file could look like this: @@ -115,7 +115,7 @@ A minimal *config* file could look like this: } ``` -# MULTI OUTPUT CONFIG +# MULTI OUTPUT CONFIGURATION ## Limit a configuration to some outputs From 6536f7adb6d7470704ef78db2ede3c6ee8363b83 Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Mon, 26 Aug 2019 22:28:24 +0100 Subject: [PATCH 27/36] Consistent header names --- man/waybar-battery.5.scd | 2 +- man/waybar-clock.5.scd | 2 +- man/waybar-idle-inhibitor.5.scd | 2 +- man/waybar-memory.5.scd | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/man/waybar-battery.5.scd b/man/waybar-battery.5.scd index 5e2f1d9..3d23a4c 100644 --- a/man/waybar-battery.5.scd +++ b/man/waybar-battery.5.scd @@ -96,7 +96,7 @@ The *battery* module allows to define custom formats based on up to two factors. -# EXAMPLE +# EXAMPLES ``` "battery": { diff --git a/man/waybar-clock.5.scd b/man/waybar-clock.5.scd index e69a397..d979a67 100644 --- a/man/waybar-clock.5.scd +++ b/man/waybar-clock.5.scd @@ -50,7 +50,7 @@ The *clock* module displays the current date and time. View all valid format options in *strftime(3)*. -# EXAMPLE +# EXAMPLES ``` "clock": { diff --git a/man/waybar-idle-inhibitor.5.scd b/man/waybar-idle-inhibitor.5.scd index d621288..0e9b863 100644 --- a/man/waybar-idle-inhibitor.5.scd +++ b/man/waybar-idle-inhibitor.5.scd @@ -58,7 +58,7 @@ screensaving, also known as "presentation mode". *{icon}*: Icon, as defined in *format-icons* -# EXAMPLE +# EXAMPLES ``` "idle_inhibitor": { diff --git a/man/waybar-memory.5.scd b/man/waybar-memory.5.scd index 5b712a7..2e9e5c5 100644 --- a/man/waybar-memory.5.scd +++ b/man/waybar-memory.5.scd @@ -69,7 +69,7 @@ Addressed by *memory* *{avail}*: Amount of available memory in GiB. -# EXAMPLE +# EXAMPLES ``` "memory": { From c60b90583156aa1951cd0eda85bdc0fbbbecc08d Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Mon, 26 Aug 2019 22:30:18 +0100 Subject: [PATCH 28/36] replace `` with ** --- man/waybar.5.scd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man/waybar.5.scd b/man/waybar.5.scd index 0274ab9..779f24f 100644 --- a/man/waybar.5.scd +++ b/man/waybar.5.scd @@ -31,7 +31,7 @@ Also a minimal example configuration can be found on the at the bottom of this m *position* ++ typeof: string ++ default: top ++ - Bar position, can be `top`,`bottom`,`left`,`right`. + Bar position, can be *top*, *bottom*, *left*, *right*. *height* ++ typeof: integer ++ @@ -77,7 +77,7 @@ e.g. # 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. +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)*: From 2a3f40bc02a14270b4b7843477238bf7c6e48f79 Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Mon, 26 Aug 2019 22:33:10 +0100 Subject: [PATCH 29/36] Minor fixes to waybar(5) --- man/waybar.5.scd | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/man/waybar.5.scd b/man/waybar.5.scd index 779f24f..bbf73ed 100644 --- a/man/waybar.5.scd +++ b/man/waybar.5.scd @@ -8,11 +8,11 @@ waybar - configuration file The configuration uses the JSON file format and is named *config*. -Valid directories for this file are: +Valid locations for this file are: -- *~/.config/waybar/* -- *~/waybar/* -- */etc/xdg/waybar/* +- *~/.config/waybar/config* +- *~/waybar/config* +- */etc/xdg/waybar/config* A good starting point is the default configuration found at https://github.com/Alexays/Waybar/blob/master/resources/config. Also a minimal example configuration can be found on the at the bottom of this man page. @@ -35,11 +35,11 @@ Also a minimal example configuration can be found on the at the bottom of this m *height* ++ typeof: integer ++ - Height to be used by the bar if possible, leave blank for a dynamic value. + Height to be used by the bar if possible. Leave blank for a dynamic value. *width* ++ typeof: integer ++ - Width to be used by the bar if possible, leave blank for a dynamic value. + Width to be used by the bar if possible. Leave blank for a dynamic value. *modules-left* ++ typeof: array ++ @@ -55,7 +55,7 @@ Also a minimal example configuration can be found on the at the bottom of this m *margin* ++ typeof: string ++ - Margins value using the css format without units. + Margins value using the CSS format without units. *margin-* ++ typeof: integer ++ From ba5592c86aee3cb8d8e81682ee7e5d7f3f8e2053 Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Mon, 26 Aug 2019 22:49:04 +0100 Subject: [PATCH 30/36] Add waybar-states(5) --- man/waybar-states.5.scd | 43 +++++++++++++++++++++++++++++++++++++++++ meson.build | 1 + 2 files changed, 44 insertions(+) create mode 100644 man/waybar-states.5.scd diff --git a/man/waybar-states.5.scd b/man/waybar-states.5.scd new file mode 100644 index 0000000..588f21d --- /dev/null +++ b/man/waybar-states.5.scd @@ -0,0 +1,43 @@ +waybar-states(5) + +# OVERVIEW + +Some modules support 'states' which allows percentage values to be used as styling triggers to +apply a class when the value matches the declared state value. + +# STATES + +- Every entry (*state*) consits of a ** (typeof: *string*) and a ** (typeof: *integer*). + + - The state can be addressed as a CSS class in the *style.css*. The name of the CSS class is the ** of the state. + Each class gets activated when the current capacity is equal or below the configured **. + + - Also each state can have its own *format*. + Those con be configured via *format-*. + Or if you want to differentiate a bit more even as *format--*. + +# EXAMPLE + +``` +"battery": { + "bat": "BAT2", + "interval": 60, + "states": { + "warning": 30, + "critical": 15 + }, + "format": "{capacity}% {icon}", + "format-icons": ["", "", "", "", ""], + "max-length": 25 +} +``` + +# STYLING STATES + +- *#battery.* + - ** can be defined in the *config*. + +# EXAMPLE: + +- *#battery.warning: { background: orange; }* +- *#battery.critical: { background: red; }* diff --git a/meson.build b/meson.build index 78a556a..51ffeb6 100644 --- a/meson.build +++ b/meson.build @@ -176,6 +176,7 @@ if scdoc.found() 'waybar-sway-workspaces.5.scd', 'waybar-temperature.5.scd', 'waybar-tray.5.scd', + 'waybar-states.5.scd', ] foreach filename : man_files From 8f9e6c132d27a0ecb3b94f7b6f5905a771ecba74 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Sat, 17 Aug 2019 18:11:22 -0700 Subject: [PATCH 31/36] fix(network): stack-use-after-return found by address sanitizer Fixes compilation with clang. --- src/modules/network.cpp | 5 +++-- src/modules/sni/host.cpp | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modules/network.cpp b/src/modules/network.cpp index a1e55e3..6ba607b 100644 --- a/src/modules/network.cpp +++ b/src/modules/network.cpp @@ -201,8 +201,9 @@ void waybar::modules::Network::worker() { } thread_timer_.sleep_for(interval_); }; - std::array events{}; - thread_ = [this, &events] { + thread_ = [this] { + std::array events{}; + int ec = epoll_wait(efd_, events.data(), EPOLL_MAX, -1); if (ec > 0) { for (auto i = 0; i < ec; i++) { diff --git a/src/modules/sni/host.cpp b/src/modules/sni/host.cpp index 015f756..204821b 100644 --- a/src/modules/sni/host.cpp +++ b/src/modules/sni/host.cpp @@ -130,7 +130,8 @@ std::tuple Host::getBusNameAndObjectPath(const std::st } void Host::addRegisteredItem(std::string service) { - auto [bus_name, object_path] = getBusNameAndObjectPath(service); + std::string bus_name, object_path; + std::tie(bus_name, object_path) = getBusNameAndObjectPath(service); auto it = std::find_if(items_.begin(), items_.end(), [&bus_name, &object_path](const auto& item) { return bus_name == item->bus_name && object_path == item->object_path; }); From 642fd48af10ac29e63b33eab4545805e93a195af Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Fri, 14 Jun 2019 06:44:11 -0700 Subject: [PATCH 32/36] fix(tray): restore Activate support for compliant SNI implementation Set ItemIsMenu to true by default because libappindicator supports neither ItemIsMenu nor Activate method and compiant SNI implementations are expected to reset the flag during initial property fetch. To be revisited if anyone finds the implementation that has Activate but does not set ItemIsMenu. --- include/modules/sni/item.hpp | 7 ++++++- src/modules/sni/item.cpp | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/modules/sni/item.hpp b/include/modules/sni/item.hpp index c8f835b..a6180db 100644 --- a/include/modules/sni/item.hpp +++ b/include/modules/sni/item.hpp @@ -46,7 +46,12 @@ class Item : public sigc::trackable { std::string menu; DbusmenuGtkMenu* dbus_menu = nullptr; Gtk::Menu* gtk_menu = nullptr; - bool item_is_menu = false; + /** + * ItemIsMenu flag means that the item only supports the context menu. + * Default value is true because libappindicator supports neither ItemIsMenu nor Activate method + * while compliant SNI implementation would always reset the flag to desired value. + */ + bool item_is_menu = true; private: void proxyReady(Glib::RefPtr& result); diff --git a/src/modules/sni/item.cpp b/src/modules/sni/item.cpp index 0d7ab69..51f9789 100644 --- a/src/modules/sni/item.cpp +++ b/src/modules/sni/item.cpp @@ -334,7 +334,7 @@ void Item::makeMenu(GdkEventButton* const& ev) { bool Item::handleClick(GdkEventButton* const& ev) { auto parameters = Glib::VariantContainerBase::create_tuple( {Glib::Variant::create(ev->x), Glib::Variant::create(ev->y)}); - if ((ev->button == 1 && (item_is_menu || !menu.empty())) || ev->button == 3) { + if ((ev->button == 1 && item_is_menu) || ev->button == 3) { makeMenu(ev); if (gtk_menu != nullptr) { #if GTK_CHECK_VERSION(3, 22, 0) From 01ad3d96d828d2aed852b719358c3efb8e5cc8d8 Mon Sep 17 00:00:00 2001 From: Aleksei Bavshin Date: Sat, 24 Aug 2019 08:20:32 -0700 Subject: [PATCH 33/36] fix(tray): pre-create dbusmenu for tray items It seems that dbusmenu is not ready to display menu immediately and needs some time to sync data via DBus. Fixes LIBDBUSMENU-GLIB-CRITICAL: dbusmenu_menuitem_send_about_to_show: assertion 'DBUSMENU_IS_MENUITEM(mi)' failed. Also fixes initial render of the menu with layer shell popups support patch. --- include/modules/sni/item.hpp | 2 +- src/modules/sni/item.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/modules/sni/item.hpp b/include/modules/sni/item.hpp index a6180db..fc04673 100644 --- a/include/modules/sni/item.hpp +++ b/include/modules/sni/item.hpp @@ -65,7 +65,7 @@ class Item : public sigc::trackable { Glib::RefPtr extractPixBuf(GVariant* variant); Glib::RefPtr getIconByName(const std::string& name, int size); static void onMenuDestroyed(Item* self, GObject* old_menu_pointer); - void makeMenu(GdkEventButton* const& ev); + void makeMenu(); bool handleClick(GdkEventButton* const& /*ev*/); Glib::RefPtr proxy_; diff --git a/src/modules/sni/item.cpp b/src/modules/sni/item.cpp index 51f9789..bcc66e2 100644 --- a/src/modules/sni/item.cpp +++ b/src/modules/sni/item.cpp @@ -128,6 +128,7 @@ void Item::setProperty(const Glib::ustring& name, Glib::VariantBase& value) { } } else if (name == "Menu") { menu = get_variant(value); + makeMenu(); } else if (name == "ItemIsMenu") { item_is_menu = get_variant(value); } @@ -319,7 +320,7 @@ void Item::onMenuDestroyed(Item* self, GObject* old_menu_pointer) { } } -void Item::makeMenu(GdkEventButton* const& ev) { +void Item::makeMenu() { if (gtk_menu == nullptr && !menu.empty()) { dbus_menu = dbusmenu_gtkmenu_new(bus_name.data(), menu.data()); if (dbus_menu != nullptr) { @@ -335,7 +336,7 @@ bool Item::handleClick(GdkEventButton* const& ev) { auto parameters = Glib::VariantContainerBase::create_tuple( {Glib::Variant::create(ev->x), Glib::Variant::create(ev->y)}); if ((ev->button == 1 && item_is_menu) || ev->button == 3) { - makeMenu(ev); + makeMenu(); if (gtk_menu != nullptr) { #if GTK_CHECK_VERSION(3, 22, 0) gtk_menu->popup_at_pointer(reinterpret_cast(ev)); From 0b237246f0e7b672b3133726e0764ab3797eeef9 Mon Sep 17 00:00:00 2001 From: Michael Aquilina Date: Tue, 27 Aug 2019 10:40:19 +0100 Subject: [PATCH 34/36] Fixes to man pages --- man/waybar-idle-inhibitor.5.scd | 2 +- man/waybar-mpd.5.scd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/man/waybar-idle-inhibitor.5.scd b/man/waybar-idle-inhibitor.5.scd index 0e9b863..74e2192 100644 --- a/man/waybar-idle-inhibitor.5.scd +++ b/man/waybar-idle-inhibitor.5.scd @@ -1,4 +1,4 @@ -waybar-idle_inhibitor(5) +waybar-idle-inhibitor(5) # NAME diff --git a/man/waybar-mpd.5.scd b/man/waybar-mpd.5.scd index 621691b..155e7b3 100644 --- a/man/waybar-mpd.5.scd +++ b/man/waybar-mpd.5.scd @@ -6,7 +6,7 @@ waybar - mpd module # DESCRIPTION -The *mpd* module displays the current date and time. +The *mpd* module displays information about a running "Music Player Daemon" instance. # CONFIGURATION From e38df047fd090dcdda4bb0a8bac1c8a1c6e01643 Mon Sep 17 00:00:00 2001 From: xPMo Date: Wed, 28 Aug 2019 19:48:33 -0500 Subject: [PATCH 35/36] sway/mode: enable pango markup on supported modes IPC reports {"mode": "mode_string", "pango_markup": bool}. Use this to conditionally enable pango markup. --- src/modules/sway/mode.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/sway/mode.cpp b/src/modules/sway/mode.cpp index d202b8b..cd02c0c 100644 --- a/src/modules/sway/mode.cpp +++ b/src/modules/sway/mode.cpp @@ -17,7 +17,11 @@ void Mode::onEvent(const struct Ipc::ipc_response& res) { std::lock_guard lock(mutex_); auto payload = parser_.parse(res.payload); if (payload["change"] != "default") { - mode_ = Glib::Markup::escape_text(payload["change"].asString()); + if (payload["pango_markup"].asBool()) { + mode_ = payload["change"].asString(); + } else { + mode_ = Glib::Markup::escape_text(payload["change"].asString()); + } } else { mode_.clear(); } From da43336409f20da36cb2bf875636ede4076aa060 Mon Sep 17 00:00:00 2001 From: xPMo Date: Wed, 28 Aug 2019 22:05:03 -0500 Subject: [PATCH 36/36] man: add supported xdg-spec directory $XDG_CONFIG_HOME --- man/waybar.5.scd | 1 + 1 file changed, 1 insertion(+) diff --git a/man/waybar.5.scd b/man/waybar.5.scd index bbf73ed..3278c63 100644 --- a/man/waybar.5.scd +++ b/man/waybar.5.scd @@ -10,6 +10,7 @@ The configuration uses the JSON file format and is named *config*. Valid locations for this file are: +- *$XDG_CONFIG_HOME/waybar/config* - *~/.config/waybar/config* - *~/waybar/config* - */etc/xdg/waybar/config*