Merge pull request #3580 from hramrach/rotate-doc

Clarify documentation of 'rotate' option.
This commit is contained in:
Alexis Rouillard 2024-09-13 09:52:59 +02:00 committed by GitHub
commit 59b7715309
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
26 changed files with 27 additions and 25 deletions

View File

@ -38,7 +38,7 @@ The *backlight* module displays the current backlight level.
*rotate*: ++
typeof: integer ++
Positive value to rotate the text label.
Positive value to rotate the text label (in 90 degree increments).
*states*: ++
typeof: object ++

View File

@ -69,7 +69,7 @@ The *battery* module displays the current capacity and state (eg. charging) of y
*rotate*: ++
typeof: integer++
Positive value to rotate the text label.
Positive value to rotate the text label (in 90 degree increments).
*on-click*: ++
typeof: string ++

View File

@ -54,7 +54,7 @@ Addressed by *bluetooth*
*rotate*: ++
typeof: integer ++
Positive value to rotate the text label.
Positive value to rotate the text label (in 90 degree increments).
*max-length*: ++
typeof: integer ++

View File

@ -51,7 +51,7 @@ $XDG_CONFIG_HOME/waybar/config ++
|[ *rotate*
:[ integer
:[
:[ Positive value to rotate the text label
:[ Positive value to rotate the text label (in 90 degree increments)
|[ *on-click*
:[ string
:[

View File

@ -43,7 +43,7 @@ The *cpu* module displays the current CPU utilization.
*rotate*: ++
typeof: integer ++
Positive value to rotate the text label.
Positive value to rotate the text label (in 90 degree increments).
*states*: ++
typeof: object ++

View File

@ -64,7 +64,7 @@ Addressed by *custom/<name>*
*rotate*: ++
typeof: integer ++
Positive value to rotate the text label.
Positive value to rotate the text label (in 90 degree increments).
*max-length*: ++
typeof: integer ++

View File

@ -29,7 +29,7 @@ Addressed by *disk*
*rotate*: ++
typeof: integer ++
Positive value to rotate the text label.
Positive value to rotate the text label (in 90 degree increments).
*states*: ++
typeof: object ++

View File

@ -19,7 +19,7 @@ Addressed by *dwl/window*
*rotate*: ++
typeof: integer ++
Positive value to rotate the text label.
Positive value to rotate the text label (in 90 degree increments).
*max-length*: ++
typeof: integer ++

View File

@ -19,7 +19,7 @@ Addressed by *hyprland/submap*
*rotate*: ++
typeof: integer ++
Positive value to rotate the text label.
Positive value to rotate the text label (in 90 degree increments).
*max-length*: ++
typeof: integer ++

View File

@ -21,7 +21,7 @@ screensaver, also known as "presentation mode".
*rotate*: ++
typeof: integer ++
Positive value to rotate the text label.
Positive value to rotate the text label (in 90 degree increments).
*max-length*: ++
typeof: integer ++

View File

@ -25,7 +25,7 @@ See *systemd-inhibit*(1) for more information.
*rotate*: ++
typeof: integer ++
Positive value to rotate the text label.
Positive value to rotate the text label (in 90 degree increments).
*max-length*: ++
typeof: integer ++

View File

@ -51,7 +51,7 @@ Addressed by *jack*
*rotate*: ++
typeof: integer ++
Positive value to rotate the text label.
Positive value to rotate the text label (in 90 degree increments).
*max-length*: ++
typeof: integer ++

View File

@ -29,7 +29,7 @@ Addressed by *memory*
*rotate*: ++
typeof: integer ++
Positive value to rotate the text label.
Positive value to rotate the text label (in 90 degree increments).
*states*: ++
typeof: object ++

View File

@ -91,7 +91,7 @@ Addressed by *mpd*
*rotate*: ++
typeof: integer ++
Positive value to rotate the text label.
Positive value to rotate the text label (in 90 degree increments).
*max-length*: ++
typeof: integer ++

View File

@ -107,7 +107,7 @@ The *mpris* module displays currently playing media via libplayerctl.
*rotate*: ++
typeof: integer ++
Positive value to rotate the text label.
Positive value to rotate the text label (in 90 degree increments).
*max-length*: ++
typeof: integer ++

View File

@ -58,7 +58,7 @@ Addressed by *network*
*rotate*: ++
typeof: integer ++
Positive value to rotate the text label.
Positive value to rotate the text label (in 90 degree increments).
*max-length*: ++
typeof: integer ++

View File

@ -40,7 +40,7 @@ Additionally, you can control the volume by scrolling *up* or *down* while the c
*rotate*: ++
typeof: integer ++
Positive value to rotate the text label.
Positive value to rotate the text label (in 90 degree increments).
*states*: ++
typeof: object ++

View File

@ -21,7 +21,7 @@ Addressed by *river/layout*
*rotate*: ++
typeof: integer ++
Positive value to rotate the text label.
Positive value to rotate the text label (in 90 degree increments).
*max-length*: ++
typeof: integer ++

View File

@ -19,7 +19,7 @@ Addressed by *river/mode*
*rotate*: ++
typeof: integer ++
Positive value to rotate the text label.
Positive value to rotate the text label (in 90 degree increments).
*max-length*: ++
typeof: integer ++

View File

@ -19,7 +19,7 @@ Addressed by *river/window*
*rotate*: ++
typeof: integer ++
Positive value to rotate the text label.
Positive value to rotate the text label (in 90 degree increments).
*max-length*: ++
typeof: integer ++

View File

@ -20,7 +20,7 @@ cursor is over the module, and clicking on the module toggles mute.
*rotate*: ++
typeof: integer ++
Positive value to rotate the text label.
Positive value to rotate the text label (in 90 degree increments).
*max-length*: ++
typeof: integer ++

View File

@ -19,7 +19,7 @@ Addressed by *sway/mode*
*rotate*: ++
typeof: integer ++
Positive value to rotate the text label.
Positive value to rotate the text label (in 90 degree increments).
*max-length*: ++
typeof: integer ++

View File

@ -19,7 +19,7 @@ Addressed by *sway/window*
*rotate*: ++
typeof: integer ++
Positive value to rotate the text label.
Positive value to rotate the text label (in 90 degree increments).
*max-length*: ++
typeof: integer ++

View File

@ -60,7 +60,7 @@ Addressed by *temperature*
*rotate*: ++
typeof: integer ++
Positive value to rotate the text label.
Positive value to rotate the text label (in 90 degree increments).
*max-length*: ++
typeof: integer ++

View File

@ -31,7 +31,7 @@ The *wireplumber* module displays the current volume reported by WirePlumber.
*rotate*: ++
typeof: integer ++
Positive value to rotate the text label.
Positive value to rotate the text label (in 90 degree increments).
*states*: ++
typeof: object ++

View File

@ -45,6 +45,8 @@ ALabel::ALabel(const Json::Value& config, const std::string& name, const std::st
if (config_["rotate"].isUInt()) {
rotate = config["rotate"].asUInt();
if (not (rotate == 0 || rotate == 90 || rotate == 180 || rotate == 270))
spdlog::warn("'rotate' is only supported in 90 degree increments {} is not valid.", rotate);
label_.set_angle(rotate);
}