Merge pull request #3580 from hramrach/rotate-doc
Clarify documentation of 'rotate' option.
This commit is contained in:
commit
59b7715309
|
@ -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 ++
|
||||||
|
|
|
@ -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 ++
|
||||||
|
|
|
@ -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 ++
|
||||||
|
|
|
@ -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
|
||||||
:[
|
:[
|
||||||
|
|
|
@ -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 ++
|
||||||
|
|
|
@ -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 ++
|
||||||
|
|
|
@ -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 ++
|
||||||
|
|
|
@ -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 ++
|
||||||
|
|
|
@ -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 ++
|
||||||
|
|
|
@ -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 ++
|
||||||
|
|
|
@ -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 ++
|
||||||
|
|
|
@ -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 ++
|
||||||
|
|
|
@ -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 ++
|
||||||
|
|
|
@ -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 ++
|
||||||
|
|
|
@ -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 ++
|
||||||
|
|
|
@ -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 ++
|
||||||
|
|
|
@ -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 ++
|
||||||
|
|
|
@ -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 ++
|
||||||
|
|
|
@ -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 ++
|
||||||
|
|
|
@ -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 ++
|
||||||
|
|
|
@ -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 ++
|
||||||
|
|
|
@ -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 ++
|
||||||
|
|
|
@ -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 ++
|
||||||
|
|
|
@ -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 ++
|
||||||
|
|
|
@ -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 ++
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue