Skip to content

Commit

Permalink
Merge pull request #3580 from hramrach/rotate-doc
Browse files Browse the repository at this point in the history
Clarify documentation of 'rotate' option.
  • Loading branch information
Alexays authored Sep 13, 2024
2 parents d56dd6e + 5b1826d commit 59b7715
Show file tree
Hide file tree
Showing 26 changed files with 27 additions and 25 deletions.
2 changes: 1 addition & 1 deletion man/waybar-backlight.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -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 ++
Expand Down
2 changes: 1 addition & 1 deletion man/waybar-battery.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -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 ++
Expand Down
2 changes: 1 addition & 1 deletion man/waybar-bluetooth.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -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 ++
Expand Down
2 changes: 1 addition & 1 deletion man/waybar-clock.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -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
:[
Expand Down
2 changes: 1 addition & 1 deletion man/waybar-cpu.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -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 ++
Expand Down
2 changes: 1 addition & 1 deletion man/waybar-custom.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -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 ++
Expand Down
2 changes: 1 addition & 1 deletion man/waybar-disk.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -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 ++
Expand Down
2 changes: 1 addition & 1 deletion man/waybar-dwl-window.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -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 ++
Expand Down
2 changes: 1 addition & 1 deletion man/waybar-hyprland-submap.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -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 ++
Expand Down
2 changes: 1 addition & 1 deletion man/waybar-idle-inhibitor.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -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 ++
Expand Down
2 changes: 1 addition & 1 deletion man/waybar-inhibitor.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -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 ++
Expand Down
2 changes: 1 addition & 1 deletion man/waybar-jack.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -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 ++
Expand Down
2 changes: 1 addition & 1 deletion man/waybar-memory.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -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 ++
Expand Down
2 changes: 1 addition & 1 deletion man/waybar-mpd.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -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 ++
Expand Down
2 changes: 1 addition & 1 deletion man/waybar-mpris.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -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 ++
Expand Down
2 changes: 1 addition & 1 deletion man/waybar-network.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -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 ++
Expand Down
2 changes: 1 addition & 1 deletion man/waybar-pulseaudio.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -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 ++
Expand Down
2 changes: 1 addition & 1 deletion man/waybar-river-layout.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -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 ++
Expand Down
2 changes: 1 addition & 1 deletion man/waybar-river-mode.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -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 ++
Expand Down
2 changes: 1 addition & 1 deletion man/waybar-river-window.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -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 ++
Expand Down
2 changes: 1 addition & 1 deletion man/waybar-sndio.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -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 ++
Expand Down
2 changes: 1 addition & 1 deletion man/waybar-sway-mode.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -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 ++
Expand Down
2 changes: 1 addition & 1 deletion man/waybar-sway-window.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -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 ++
Expand Down
2 changes: 1 addition & 1 deletion man/waybar-temperature.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -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 ++
Expand Down
2 changes: 1 addition & 1 deletion man/waybar-wireplumber.5.scd
Original file line number Diff line number Diff line change
Expand Up @@ -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 ++
Expand Down
2 changes: 2 additions & 0 deletions src/ALabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 59b7715

Please sign in to comment.