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*: ++ *rotate*: ++
typeof: integer ++ typeof: integer ++
Positive value to rotate the text label. Positive value to rotate the text label (in 90 degree increments).
*states*: ++ *states*: ++
typeof: object ++ typeof: object ++

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -31,7 +31,7 @@ The *wireplumber* module displays the current volume reported by WirePlumber.
*rotate*: ++ *rotate*: ++
typeof: integer ++ typeof: integer ++
Positive value to rotate the text label. Positive value to rotate the text label (in 90 degree increments).
*states*: ++ *states*: ++
typeof: object ++ 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()) { if (config_["rotate"].isUInt()) {
rotate = config["rotate"].asUInt(); 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); label_.set_angle(rotate);
} }