diff --git a/man/waybar-backlight-slider.5.scd b/man/waybar-backlight-slider.5.scd index c6f027a1..e15b4026 100644 --- a/man/waybar-backlight-slider.5.scd +++ b/man/waybar-backlight-slider.5.scd @@ -31,6 +31,11 @@ The brightness can be controlled by dragging the slider across the bar or clicki typeof: string ++ The name of the preferred device to control. If left empty, a device will be chosen automatically. +*interval*: ++ + typeof: uint ++ + default: 1000 ++ + The interval in milliseconds at which the brightness is polled and the slider is updated. + *expand*: ++ typeof: bool ++ default: false ++ diff --git a/man/waybar-backlight.5.scd b/man/waybar-backlight.5.scd index 20810051..27e97863 100644 --- a/man/waybar-backlight.5.scd +++ b/man/waybar-backlight.5.scd @@ -15,6 +15,10 @@ The *backlight* module displays the current backlight level. default: 2 ++ The interval in which information gets polled. +*device*: ++ + typeof: string ++ + The name of the preferred backlight device to display. If left empty, a device will be chosen automatically. + *format*: ++ typeof: string ++ default: {percent}% ++ @@ -104,6 +108,16 @@ The *backlight* module displays the current backlight level. default: false ++ Enables this module to consume all left over space dynamically. +# FORMAT REPLACEMENTS + +*{percent}*: The current brightness in percent. + +*{percent_exp}*: The current brightness in percent, adjusted with a power curve to better match perceived brightness. + +*{icon}*: The icon from *format-icons* chosen according to *{percent}*. + +*{icon_exp}*: The icon from *format-icons* chosen according to *{percent_exp}*. + # EXAMPLE: ``` diff --git a/man/waybar-battery.5.scd b/man/waybar-battery.5.scd index 0c71518c..136bee0c 100644 --- a/man/waybar-battery.5.scd +++ b/man/waybar-battery.5.scd @@ -37,6 +37,16 @@ The *battery* module displays the current capacity and state (eg. charging) of y default: 60 ++ The interval in which the information gets polled. +*smooth-power*: ++ + typeof: bool ++ + default: false ++ + Enable exponential smoothing of the battery power reading used to estimate the *{time}* remaining, so the estimate fluctuates less between refreshes. + +*smooth-power-time-constant*: ++ + typeof: double ++ + default: 260.0 ++ + The time constant (in seconds) of the *smooth-power* exponential filter. Only used when *smooth-power* is enabled. Values below 1.0 are clamped to 1.0. + *states*: ++ typeof: object ++ A number of battery states which get activated on certain capacity levels. See *waybar-states(5)*. diff --git a/man/waybar-bluetooth.5.scd b/man/waybar-bluetooth.5.scd index 36c6443a..2fb6b90f 100644 --- a/man/waybar-bluetooth.5.scd +++ b/man/waybar-bluetooth.5.scd @@ -16,6 +16,10 @@ Addressed by *bluetooth* typeof: string ++ Use the controller with the defined alias. Otherwise, a random controller is used. Recommended to define when there is more than 1 controller available to the system. +*controller-alias*: ++ + typeof: string ++ + Synonym for *controller*. If both are set, *controller-alias* takes precedence. + *format-device-preference*: ++ typeof: array ++ A ranking of bluetooth devices, addressed by their alias. The order is from *first displayed* to *last displayed*. ++ @@ -241,6 +245,7 @@ Split keyboard with separate central/peripheral batteries (e.g., ZMK): - *#bluetooth.off* - *#bluetooth.on* - *#bluetooth.connected* +- *#bluetooth.no-controller* - *#bluetooth.discoverable* - *#bluetooth.discovering* - *#bluetooth.pairable* diff --git a/man/waybar-cava.5.scd b/man/waybar-cava.5.scd index 95336e24..439858a1 100644 --- a/man/waybar-cava.5.scd +++ b/man/waybar-cava.5.scd @@ -37,7 +37,7 @@ libcava lives in: |[ *method* \[output\] :[ string :[ -:< Manages which frontend Waybar cava module should use. Values: raw, sdl_glsl +:< Manages which frontend Waybar cava module should use. Values: raw, sdl_glsl. Not a waybar JSON key: it is set through the *method* option in the *\[output\]* section of the cava configuration file (*cava_config*) |[ *framerate* :[ integer :[ 30 @@ -111,12 +111,20 @@ libcava lives in: :[ false :[ Disables or enables the so-called "Monstercat smoothing" with or without "waves" |[ *noise_reduction* +:[ double +:[ 0.77 +:[ Fractional value between 0.0 - 1.0. The raw visualization is very noisy, this factor adjusts the integral and gravity filters to keep the signal smooth. Values near 1.0 will be very slow and smooth, near 0.0 will be fast but noisy +|[ *gravity* :[ integer -:[ 77 -:[ Range between 0 - 100. The raw visualization is very noisy, this factor adjusts the integral and gravity filters to keep the signal smooth. 100 will be very slow and smooth, 0 will be fast but noisy +:[ +:[ Gravity smoothing filter. Higher values make the bars drop faster. Adjusted by *noise_reduction* when set +|[ *integral* +:[ integer +:[ +:[ Integral smoothing filter. Higher values make the visualization smoother but less precise. Adjusted by *noise_reduction* when set |[ *input_delay* :[ integer -:[ 2 +:[ 4 :[ Sets the delay before fetching audio source thread start working. On author's machine, Waybar starts much faster than pipewire audio server, and without a little delay cava module fails because pipewire is not ready |[ *ascii_max_range* :[ integer @@ -124,7 +132,7 @@ libcava lives in: :[ It's impossible to set it directly. The value is dictated by the number of icons in the array *format-icons* |[ *data_format* :[ string -:[ asci +:[ ascii :[ Raw data format. Can be 'binary' or 'ascii' |[ *raw_target* :[ string @@ -157,11 +165,11 @@ libcava lives in: |[ *background* :[ string :[ -:[ GLSL actual. Support hex code colors only. Must be within '' +:[ GLSL actual. Support hex code colors only. Must be within ''. Not a waybar JSON key: set it as *background* in the *\[color\]* section of the cava configuration file (*cava_config*) |[ *foreground* :[ string :[ -:[ GLSL actual. Support hex code colors only. Must be within '' +:[ GLSL actual. Support hex code colors only. Must be within ''. Not a waybar JSON key: set it as *foreground* in the *\[color\]* section of the cava configuration file (*cava_config*) |[ *gradient* :[ integer :[ 0 @@ -185,7 +193,7 @@ libcava lives in: |[ *continuous_rendering* :[ integer :[ 0 -:[ GLSL actual. Keep rendering even if no audio. Recommended to set to 1 +:[ GLSL actual. Keep rendering even if no audio. Recommended to set to 1. Not a waybar JSON key: set it as *continuous_rendering* in the *\[output\]* section of the cava configuration file (*cava_config*) Configuration can be provided as: - The only cava configuration file which is provided through *cava_config*. The rest configuration can be skipped @@ -253,9 +261,12 @@ In case when cava releases new version and you're wanna get it, it should be rai ``` # STYLE -- *#cava* +- *#cava* Raw frontend widget - *#cava.silent* Applied after no sound has been detected for sleep_timer seconds - *#cava.updated* Applied when a new frame is shown +- *#cavaGLSL* GLSL frontend widget (used instead of *#cava* when the cava *method* is *sdl_glsl*) +- *#cavaGLSL.silent* Applied after no sound has been detected for sleep_timer seconds +- *#cavaGLSL.updated* Applied when a new frame is shown # FRONTENDS ## RAW diff --git a/man/waybar-clock.5.scd b/man/waybar-clock.5.scd index 62d1394d..0901098b 100644 --- a/man/waybar-clock.5.scd +++ b/man/waybar-clock.5.scd @@ -120,8 +120,9 @@ View all valid format options in *strftime(3)* or have a look https://en.cpprefe :[ Calendar view mode. Possible values: year|month |[ *mode-mon-col* :[ integer -:[ 3 -:[ Relevant for *mode=year*. Count of months per row +:[ 1 +:[ Relevant for *mode=year*. Count of months per row. Must be a divisor of 12 + (one of 1, 2, 3, 4, 6, 12); an invalid value falls back to 3 |[ *weeks-pos* :[ string :[ @@ -193,6 +194,8 @@ View all valid format options in *strftime(3)* or have a look https://en.cpprefe :[ Switch to the next calendar month/year |[ *shift_down* :[ Switch to the previous calendar month/year +|[ *shift_reset* +:[ Reset the calendar shift back to the current month/year |[ *exec * :[ Execute the specified command @@ -292,6 +295,16 @@ View all valid format options in *strftime(3)* or have a look https://en.cpprefe - *#clock* +The following classes are used only inside the *{calendar}* tooltip. Their +foreground *color* is read and applied to the corresponding calendar cells in +the tooltip markup: + +- *.calendar-today*: The current day +- *.calendar-days*: The day numbers +- *.calendar-weeks*: The week numbers +- *.calendar-weekdays*: The weekday header (Su, Mo, ...) +- *.calendar-months*: The month header (January, February, ...) + # Troubleshooting If clock module is disabled at startup with locale::facet::\_S\_create\_c\_locale ++ diff --git a/man/waybar-cpu-graph.5.scd b/man/waybar-cpu-graph.5.scd index 1877aeeb..59d39cc1 100644 --- a/man/waybar-cpu-graph.5.scd +++ b/man/waybar-cpu-graph.5.scd @@ -11,10 +11,15 @@ The *cpu graph* module displays a line graph with the CPU utilization. # CONFIGURATION *interval*: ++ - typeof: integer ++ - default: 10 ++ + typeof: integer or float ++ + default: 5 ++ The interval in which the information gets polled. +*graph_type*: ++ + typeof: string ++ + default: line ++ + The rendering style of the graph. One of 'line', 'bar', or 'gauge'. + *width*: ++ typeof: integer ++ The length in pixels the module should display. diff --git a/man/waybar-cpu.5.scd b/man/waybar-cpu.5.scd index 3f68998f..dda55daf 100644 --- a/man/waybar-cpu.5.scd +++ b/man/waybar-cpu.5.scd @@ -124,7 +124,7 @@ The *cpu* module displays the current CPU utilization. *{icon*{n}*}*: Icon for CPU core n usage. Use like {icon0}. -*{icon0}{icon1}{icon2}{icon3}*: All per-core icons concatenated. Equivalent to {icon0}{icon1}...{icon*N*} but adapts to the number of cores automatically. +*{icons}*: All per-core icons concatenated. Equivalent to {icon0}{icon1}...{icon*N*} but adapts to the number of cores automatically. # EXAMPLES diff --git a/man/waybar-custom-graph.5.scd b/man/waybar-custom-graph.5.scd index 4f020a6c..9a134fd6 100644 --- a/man/waybar-custom-graph.5.scd +++ b/man/waybar-custom-graph.5.scd @@ -38,9 +38,8 @@ Addressed by *custom-graph/* If a *signal* is defined then the script will run once on startup and will only update with a signal. *restart-interval*: ++ - typeof: integer or float ++ - The restart interval (in seconds). ++ - Minimum value is 0.001 (1ms). Values smaller than 1ms will be set to 1ms. ++ + typeof: integer ++ + The restart interval (in whole seconds). ++ Can't be used with the *interval* option, so only with continuous scripts. ++ Once the script exits, it'll be re-executed after the *restart-interval*. @@ -50,18 +49,20 @@ Addressed by *custom-graph/* The number is valid between 1 and N, where *SIGRTMIN+N* = *SIGRTMAX*. ++ If no interval is defined then a signal will be the only way to update the module. -*format*: ++ +*graph_type*: ++ typeof: string ++ - default: {text} ++ - The format, how information should be displayed. On {text} data gets inserted. + default: line ++ + The style of graph to render. One of *line*, *bar* or *gauge*. -*format-icons*: ++ - typeof: array ++ - Based on the set percentage, the corresponding icon gets selected. The order is *low* to *high*. - -*rotate*: ++ +*width*: ++ typeof: integer ++ - Positive value to rotate the text label (in 90 degree increments). + default: 100 ++ + The width of the graph in pixels. + +*datapoints*: ++ + typeof: integer ++ + default: 20 ++ + The number of most recent values to retain and plot on the graph. *on-click*: ++ typeof: string ++ @@ -99,7 +100,7 @@ Addressed by *custom-graph/* *tooltip-format*: ++ typeof: string ++ The tooltip format. If specified, overrides any tooltip output from the script in *exec*. ++ - Uses the same format replacements as *format*. + See *FORMAT REPLACEMENTS*. *escape*: ++ typeof: bool ++ @@ -146,11 +147,13 @@ $text\\n$tooltip\\n$class* # FORMAT REPLACEMENTS +These replacements are available in *tooltip-format*. + *{text}*: Output of the script. -*{percentage}* Percentage which can be set via a json return type. +*{alt}*: The *alt* value from a json return type. -*{icon}*: An icon from 'format-icons' according to percentage. +*{percentage}* Percentage which can be set via a json return type. # EXAMPLES diff --git a/man/waybar-custom.5.scd b/man/waybar-custom.5.scd index 88b79151..2d8161ca 100644 --- a/man/waybar-custom.5.scd +++ b/man/waybar-custom.5.scd @@ -145,6 +145,18 @@ Addressed by *custom/* default: false ++ Enables this module to consume all left over space dynamically. +*image-path*: ++ + typeof: string ++ + Path to an image file to display in the module. + +*image-name*: ++ + typeof: string ++ + Name of a themed icon to display in the module. + +*icon-size*: ++ + typeof: integer ++ + The size (in pixels) of the image set via *image-path* or *image-name*. + # RETURN-TYPE When *return-type* is set to *json*, Waybar expects the *exec*-script to output its data in JSON format. @@ -169,6 +181,8 @@ $text\\n$tooltip\\n$class* *{text}*: Output of the script. +*{alt}*: The *alt* value from a json return type. + *{percentage}* Percentage which can be set via a json return type. *{icon}*: An icon from 'format-icons' according to percentage. @@ -248,3 +262,5 @@ Under the premise that interval is not defined, you can use the signal and updat - *#custom-* - *#custom-.* - ** can be set by the script. For more information see *return-type* +- *.flat* and *.text-button* are always applied to the module's label. +- *.image-button* is always applied to the module's image (see *image-path*/*image-name*). diff --git a/man/waybar-disk.5.scd b/man/waybar-disk.5.scd index dab6af7e..16e0d360 100644 --- a/man/waybar-disk.5.scd +++ b/man/waybar-disk.5.scd @@ -19,8 +19,8 @@ Addressed by *disk* *format*: ++ typeof: string ++ - default: "{percentage_used}%" ++ - The format, how information for each disk should be displayed. + default: "{}%" ++ + The format, how information for each disk should be displayed. Note: in the default the positional field "{}" resolves to *{percentage_free}*. *rotate*: ++ typeof: integer ++ @@ -101,7 +101,7 @@ Addressed by *disk* *tooltip-format*: ++ typeof: string ++ - default: "{used} out of {total} used ({percentage_used}%)" ++ + default: "{used} used out of {total} on {path} ({percentage_used}%)" ++ The format of the information displayed in the tooltip. *unit*: ++ diff --git a/man/waybar-dwl-window.5.scd b/man/waybar-dwl-window.5.scd index 907d5332..b347b1d8 100644 --- a/man/waybar-dwl-window.5.scd +++ b/man/waybar-dwl-window.5.scd @@ -14,7 +14,7 @@ Addressed by *dwl/window* *format*: ++ typeof: string ++ - default: {title} ++ + default: {} ++ The format, how information should be displayed. *hide-empty*: ++ diff --git a/man/waybar-ext-workspaces.5.scd b/man/waybar-ext-workspaces.5.scd index 3fdae606..0ee17097 100644 --- a/man/waybar-ext-workspaces.5.scd +++ b/man/waybar-ext-workspaces.5.scd @@ -37,6 +37,10 @@ Addressed by *ext/workspaces* default: false ++ Should workspaces be sorted by ID. Workspace ID will be sorted numerically when all ID are numbers. Takes precedence over any other sort-by option. +*sort-by-number*: ++ + typeof: bool ++ + Deprecated alias of *sort-by-id*. Setting it emits a warning; prefer *sort-by-id*. + *all-outputs*: ++ typeof: bool ++ default: false ++ @@ -52,6 +56,18 @@ Addressed by *ext/workspaces* default: true ++ If set to false hidden workspaces will be shown. +*on-click*: ++ + typeof: string ++ + The action to perform on left-click. See *CLICK ACTIONS* for the possible values. + +*on-click-middle*: ++ + typeof: string ++ + The action to perform on middle-click. See *CLICK ACTIONS* for the possible values. + +*on-click-right*: ++ + typeof: string ++ + The action to perform on right-click. See *CLICK ACTIONS* for the possible values. + # FORMAT REPLACEMENTS *{name}*: Name of workspace assigned by compositor. diff --git a/man/waybar-gamemode.5.scd b/man/waybar-gamemode.5.scd index bb82e0aa..d7e1991b 100644 --- a/man/waybar-gamemode.5.scd +++ b/man/waybar-gamemode.5.scd @@ -28,7 +28,7 @@ Feral Gamemode optimizations. *tooltip-format*: ++ typeof: string ++ - default: Games running: {glyph} ++ + default: Games running: {count} ++ The text format of the tooltip. *hide-not-running*: ++ diff --git a/man/waybar-gps.5.scd b/man/waybar-gps.5.scd index e7473601..d25204ea 100644 --- a/man/waybar-gps.5.scd +++ b/man/waybar-gps.5.scd @@ -26,7 +26,7 @@ libgps lives in: *format*: ++ typeof: string ++ - default: {glyph} ++ + default: {mode} ++ The text format. *tooltip*: ++ @@ -36,7 +36,7 @@ libgps lives in: *tooltip-format*: ++ typeof: string ++ - default: Games running: {glyph} ++ + default: The value of *format* ++ The text format of the tooltip. *interval*: ++ @@ -93,10 +93,10 @@ libgps lives in: "gps": { "format": "{mode}", "format-disabled": "", // an empty format will hide the module - "format-no-fix": "No fix", + "format-fix-none": "No fix", "format-fix-3d": "{status}", "tooltip-format": "{mode}", - "tooltip-format-no-fix": "{satellites_visible} satellites visible", + "tooltip-format-fix-none": "{satellites_visible} satellites visible", "tooltip-format-fix-2d": "{satellites_used}/{satellites_visible} satellites used", "tooltip-format-fix-3d": "Altitude: {altitude_hae}m", "hide-disconnected": false @@ -106,6 +106,7 @@ libgps lives in: - *#gps* - *#gps.disabled* Applied when GPS is disabled. +- *#gps.disconnected* Applied when no GPS receiver is present. - *#gps.fix-none* Applied when GPS is present, but there is no fix. - *#gps.fix-2d* Applied when there is a 2D fix. - *#gps.fix-3d* Applied when there is a 3D fix. diff --git a/man/waybar-hyprland-language.5.scd b/man/waybar-hyprland-language.5.scd index 88dd82d7..12ae0acc 100644 --- a/man/waybar-hyprland-language.5.scd +++ b/man/waybar-hyprland-language.5.scd @@ -68,7 +68,7 @@ Addressed by *hyprland/language* # FORMAT REPLACEMENTS -*{short}*: Short name of layout (e.g. "us"). Equals to {}. +*{short}*: Short name of layout (e.g. "us"). *{shortDescription}*: Short description of layout (e.g. "en"). @@ -113,3 +113,4 @@ Addressed by *hyprland/language* # STYLE - *#language* +- *#language.* (per-layout class derived from the layout short name, e.g. '.us') diff --git a/man/waybar-hyprland-window.5.scd b/man/waybar-hyprland-window.5.scd index ecbacd4b..a79596c0 100644 --- a/man/waybar-hyprland-window.5.scd +++ b/man/waybar-hyprland-window.5.scd @@ -31,8 +31,8 @@ Addressed by *hyprland/window* *tooltip-format*: ++ typeof: string ++ - default: {title} ++ - The format of the tooltip shown on hover. Supports the same replacements as *format*. Requires *tooltip* to be enabled. + The format of the tooltip shown on hover. Supports the same replacements as *format*. Requires *tooltip* to be enabled. When unset, the tooltip falls back to the formatted label text. ++ + default: (the formatted label text) *icon*: ++ typeof: bool ++ diff --git a/man/waybar-hyprland-workspaces.5.scd b/man/waybar-hyprland-workspaces.5.scd index e296b6b9..f85ac382 100644 --- a/man/waybar-hyprland-workspaces.5.scd +++ b/man/waybar-hyprland-workspaces.5.scd @@ -14,11 +14,11 @@ Addressed by *hyprland/workspaces* *format*: ++ typeof: string ++ - default: {id} ++ + default: {name} ++ The format, how information should be displayed. *format-icons*: ++ - typeof: array ++ + typeof: object ++ Based on the workspace ID and state, the corresponding icon gets selected. See *icons*. *window-rewrite*: ++ @@ -201,7 +201,7 @@ This setting is ignored if *workspace-taskbar.enable* is set to true. Option to disable tooltip on hover. *tooltips*: ++ - typeof: array ++ + typeof: object ++ Based on the workspace ID and state, the corresponding tooltip gets selected. Selection works the same as *format-icons* do. Format replacements are supported. See *icons*. *expand*: ++ @@ -217,6 +217,8 @@ This setting is ignored if *workspace-taskbar.enable* is set to true. *{icon}*: Icon, as defined in *format-icons*. +*{windows}*: The windows in the workspace, formatted according to *window-rewrite* and joined with *format-window-separator*. + # ICONS Additional to workspace name matching, the following *format-icons* can be set. @@ -348,6 +350,8 @@ Additional to workspace name matching, the following *format-icons* can be set. - *#workspaces button.persistent* - *#workspaces button.special* - *#workspaces button.urgent* +- *#workspaces button.workspace-hover* (applied while the pointer is over the button) +- *#workspaces button.* (per-workspace class derived from the workspace name, sanitized to a valid CSS class name, e.g. a workspace named "1" yields '.ws-1'; special workspaces also get the raw name class) - *#workspaces button.hosting-monitor* (gets applied if workspace-monitor == waybar-monitor) - *#workspaces .workspace-label* - *#workspaces .taskbar-window* (each window in the taskbar, only if 'workspace-taskbar.enable' is true) diff --git a/man/waybar-idle-inhibitor.5.scd b/man/waybar-idle-inhibitor.5.scd index 8cbba56e..405258c1 100644 --- a/man/waybar-idle-inhibitor.5.scd +++ b/man/waybar-idle-inhibitor.5.scd @@ -84,7 +84,8 @@ screensaver, also known as "presentation mode". *dynamic-timeouts*: ++ typeof: bool ++ default: false ++ - Option to enable dynamic timeouts. + Option to enable dynamic timeouts. ++ + The legacy singular spelling *dynamic-timeout* is also accepted as an alias. *wait-for-activity*: ++ typeof: bool ++ diff --git a/man/waybar-image.5.scd b/man/waybar-image.5.scd index 029f6ad2..3a7813c2 100644 --- a/man/waybar-image.5.scd +++ b/man/waybar-image.5.scd @@ -110,16 +110,16 @@ $path\\n$tooltip For multiple *image* *size*: ++ - typeof: string ++ + typeof: integer ++ default: 16 ++ Minumum size of the rendered image in pixels. *interval*: ++ - typeof: interger ++ - default: INT_MAX ++ - The interval in seconds to redraw module ++ - Default value is max value of int and changing it is only recommended ++ - if image path or other property is being changed overtime ++ + typeof: integer or float ++ + The interval (in seconds) to re-render the module. ++ + If set to a positive value, the minimum is 0.001 (1ms). Values smaller than 1ms will be set to 1ms. ++ + Zero or negative values (and the literal "once") are treated as "once". ++ + This is useful if image path or other property is being changed over time. ++ If no *interval* is provided, the module will only be rendered once. *multiple*: ++ @@ -246,7 +246,7 @@ print(res) - *#image* - *#image*.empty /\*when image could not be rendered\*/ -- *#image*.button /\*when on-click is provided\*/ +- *#image* button /\*when on-click is provided; a Gtk::Button is matched by the element selector, not a class\*/ - *#image*.*marker* /\*where *marker* is parameter from config\*/ -- *#image*.button.*marker* +- *#image* button.*marker* diff --git a/man/waybar-inhibitor.5.scd b/man/waybar-inhibitor.5.scd index fce6f4f8..2e9759ad 100644 --- a/man/waybar-inhibitor.5.scd +++ b/man/waybar-inhibitor.5.scd @@ -100,6 +100,12 @@ See *systemd-inhibit*(1) for more information. *{icon}*: Icon, as defined in *format-icons* +# STYLE + +- *#inhibitor* +- *#inhibitor.activated* +- *#inhibitor.deactivated* + # EXAMPLES ``` diff --git a/man/waybar-mango-language.5.scd b/man/waybar-mango-language.5.scd index b153f0d3..7b50f4ad 100644 --- a/man/waybar-mango-language.5.scd +++ b/man/waybar-mango-language.5.scd @@ -47,11 +47,11 @@ Addressed by *mango/language* # FORMAT REPLACEMENTS -*{short}*: Short name of the layout (e.g. "us"). This is also the default when no format is specified. +*{short}*: Short name of the layout (e.g. "us"). *{shortDescription}*: Short description of the layout (same as *{short}* in most cases). -*{long}*: Full name of the layout as reported by Mango (e.g. "English (US)"). +*{long}*: Full name of the layout as reported by Mango (e.g. "English (US)"). The empty positional *{}* in the default format resolves to this value, so the long name is shown when no *format* is specified. *{variant}*: Variant of the layout, if any. diff --git a/man/waybar-mango-layout.5.scd b/man/waybar-mango-layout.5.scd index 6cf3290b..fedff008 100644 --- a/man/waybar-mango-layout.5.scd +++ b/man/waybar-mango-layout.5.scd @@ -15,8 +15,8 @@ Addressed by *mango/layout* *format*: ++ typeof: string ++ - default: {symbol} ++ - The default format, how the layout symbol should be displayed. *{symbol}* is replaced by the current layout symbol. + default: {} ++ + The default format, how the layout symbol should be displayed. The positional *{}* (the default) and *{symbol}* are both replaced by the current layout symbol. *format-*: ++ typeof: string ++ @@ -42,7 +42,7 @@ For example, if your Mango compositor reports the symbol "S" for a spiral layout The layout module provides dynamic CSS classes based on the current layout symbol, allowing you to style each layout differently. -* *#mango-layout* +* *#layout* * *.* - The current layout symbol is dynamically added as a CSS class name (e.g., *.S*, *.M*). # EXAMPLES @@ -58,18 +58,18 @@ The layout module provides dynamic CSS classes based on the current layout symbo ## CSS Example ``` -#mango-layout { +#layout { color: #ffffff; padding: 0 5px; } /* Specific color for the "S" layout */ -#mango-layout.S { +#layout.S { color: #a6e3a1; } /* Specific color for the "M" layout */ -#mango-layout.M { +#layout.M { color: #f38ba8; } ``` diff --git a/man/waybar-mango-window.5.scd b/man/waybar-mango-window.5.scd index 7ee9b02c..8d026204 100644 --- a/man/waybar-mango-window.5.scd +++ b/man/waybar-mango-window.5.scd @@ -63,8 +63,11 @@ If the title matches a regular expression from the *rewrite* object, it is repla # STYLE - *#window* -- *#window.empty* – applied when no window is focused (module hidden by default) -- *#window.solo* – applied when only one window is present on the active workspace -- *#window.* – applied when a single window with the given app ID is on the workspace -The classes *.empty*, *.solo*, and the app‑ID class are set on the module’s event box. \ No newline at end of file +The following classes are set on the module's event box (the container that +wraps *#window*), not on *#window* itself. Target them directly or with a +descendant selector such as *.solo #window*: + +- *.empty* – applied when no window is focused (module hidden by default) +- *.solo* – applied when only one window is present on the active workspace +- *.* – applied when a single window with the given app ID is on the workspace \ No newline at end of file diff --git a/man/waybar-menu.5.scd b/man/waybar-menu.5.scd index 798917f0..00a5f53c 100644 --- a/man/waybar-menu.5.scd +++ b/man/waybar-menu.5.scd @@ -67,7 +67,7 @@ A module that implements a 'menu' needs 3 properties defined in its config : GtkMenu with id *menu*. *menu-actions*: ++ - typeof: array ++ + typeof: object ++ The actions corresponding to the buttons of the menu. The identifiers of each actions needs to exists as an id in the 'menu-file' for it to be linked properly. diff --git a/man/waybar-mpd.5.scd b/man/waybar-mpd.5.scd index d5ba6405..01c86e05 100644 --- a/man/waybar-mpd.5.scd +++ b/man/waybar-mpd.5.scd @@ -94,6 +94,11 @@ Addressed by *mpd* typeof: integer ++ Maximum length of the Title tag. +*ellipsis*: ++ + typeof: string ++ + default: "" ++ + The string appended to the Artist, Album, Album Artist and Title tags when they are truncated by the corresponding length option (`artist-len`, `album-len`, `album-artist-len`, `title-len`). + *rotate*: ++ typeof: integer ++ Positive value to rotate the text label (in 90 degree increments). diff --git a/man/waybar-mpris.5.scd b/man/waybar-mpris.5.scd index 9c192bd1..e03ac0eb 100644 --- a/man/waybar-mpris.5.scd +++ b/man/waybar-mpris.5.scd @@ -26,7 +26,7 @@ The *mpris* module displays currently playing media via libplayerctl. *format*: ++ typeof: string ++ - default: {player} ({status}) {dynamic} ++ + default: {player} ({status}): {dynamic} ++ The text format. *format-[status]*: ++ @@ -40,7 +40,7 @@ The *mpris* module displays currently playing media via libplayerctl. *tooltip-format*: ++ typeof: string ++ - default: {player} ({status}) {dynamic} ++ + default: {player} ({status}): {dynamic} ++ The tooltip text format. *tooltip-format-[status]*: ++ @@ -140,6 +140,21 @@ The *mpris* module displays currently playing media via libplayerctl. default: next track ++ Overwrite default action toggles. +*on-click-backward*: ++ + typeof: string ++ + default: previous track ++ + Overwrite the default action for the backward mouse button (button 8). + +*on-click-forward*: ++ + typeof: string ++ + default: next track ++ + Overwrite the default action for the forward mouse button (button 9). + +*prefer-album-artist*: ++ + typeof: bool ++ + default: false ++ + When true, use the album artist instead of the track artist for the _{artist}_ and _{dynamic}_ tags, falling back to the track artist when no album artist is available. + *player-icons*: ++ typeof: map[string]string ++ Allows setting _{player_icon}_ based on player-name property. @@ -168,6 +183,8 @@ The *mpris* module displays currently playing media via libplayerctl. *{length}*: Length of the track, formatted as HH:MM:SS +*{position}*: Current playback position of the track, formatted as HH:MM:SS + *{dynamic}*: Use _{artist}_, _{album}_, _{title}_ and _{length}_, automatically omit++ empty values diff --git a/man/waybar-network.5.scd b/man/waybar-network.5.scd index a7860e5c..f86ed717 100644 --- a/man/waybar-network.5.scd +++ b/man/waybar-network.5.scd @@ -176,6 +176,8 @@ Addressed by *network* *{signaldBm}*: Signal strength of the wireless network in dBm. +*{signalStrengthApp}*: Human-readable descriptor of the wireless connectivity derived from the signal strength (e.g. "Great Connectivity", "Streaming", "Poor Connectivity"). + *{frequency}*: Frequency of the wireless network in GHz. *{bandwidthUpBits}*: Instant up speed in bits/seconds. @@ -194,6 +196,10 @@ Addressed by *network* *{bandwidthDownBytes}*: Instant down speed in bytes/seconds. +*{bandwidthUpBytesCompact}*: Instant up speed in bytes/seconds, formatted compactly (e.g. 1.2K). + +*{bandwidthDownBytesCompact}*: Instant down speed in bytes/seconds, formatted compactly (e.g. 1.2K). + *{bandwidthTotalBytes}*: Instant total speed in bytes/seconds. *{txBitrate}*: Link transmit bitrate (e.g., 866.7 Mb/s). diff --git a/man/waybar-niri-language.5.scd b/man/waybar-niri-language.5.scd index d58408d8..ae5c7e28 100644 --- a/man/waybar-niri-language.5.scd +++ b/man/waybar-niri-language.5.scd @@ -44,11 +44,11 @@ Addressed by *niri/language* # FORMAT REPLACEMENTS -*{short}*: Short name of layout (e.g. "us"). Equals to {}. +*{short}*: Short name of layout (e.g. "us"). *{shortDescription}*: Short description of layout (e.g. "en"). -*{long}*: Long name of layout (e.g. "English (Dvorak)"). +*{long}*: Long name of layout (e.g. "English (Dvorak)"). Equals to {}. *{variant}*: Variant of layout (e.g. "dvorak"). diff --git a/man/waybar-niri-workspaces.5.scd b/man/waybar-niri-workspaces.5.scd index d10691e8..636081a0 100644 --- a/man/waybar-niri-workspaces.5.scd +++ b/man/waybar-niri-workspaces.5.scd @@ -103,7 +103,7 @@ If none of the sorting options are enabled, workspaces keep their output/index o *icon-size*: ++ typeof: int ++ - default: 18 ++ + default: 16 ++ Size of the icons in the workspace taskbar. *ignore-workspaces*: ++ @@ -203,3 +203,5 @@ Additional to workspace name matching, the following *format-icons* can be set. for unnamed workspaces. - *#workspaces button.niri-workspace*: The main container for the workspace. - *#workspaces button .niri-taskbar-btn*: The icon buttons within the taskbar. +- *#workspaces button .niri-taskbar-btn.focused*: The taskbar icon button of the + currently focused window. diff --git a/man/waybar-power-profiles-daemon.5.scd b/man/waybar-power-profiles-daemon.5.scd index da331795..a5489444 100644 --- a/man/waybar-power-profiles-daemon.5.scd +++ b/man/waybar-power-profiles-daemon.5.scd @@ -77,3 +77,12 @@ Display the full profile name: } } ``` + +# STYLE + +- *#power-profiles-daemon* +- *#power-profiles-daemon.performance* Applied when the *performance* profile is active. +- *#power-profiles-daemon.balanced* Applied when the *balanced* profile is active. +- *#power-profiles-daemon.power-saver* Applied when the *power-saver* profile is active. + +*Note*: the module applies a CSS class equal to the name of the active profile, so any additional profile exposed by power-profiles-daemon can be styled by its name. diff --git a/man/waybar-pulseaudio-slider.5.scd b/man/waybar-pulseaudio-slider.5.scd index 08a39018..381ab867 100644 --- a/man/waybar-pulseaudio-slider.5.scd +++ b/man/waybar-pulseaudio-slider.5.scd @@ -59,6 +59,10 @@ The volume can be controlled by dragging the slider across the bar or clicking o default: empty ++ A list of sink descriptions to ignore when tracking the default sink, so switching to those sinks does not update the slider. +*sink-mapping*: ++ + typeof: object ++ + Sinks named by the values of this mapping will be considered to be the current sink instead of the sinks named by the respective keys. + # EXAMPLES ``` diff --git a/man/waybar-pulseaudio.5.scd b/man/waybar-pulseaudio.5.scd index 553069c5..71b618f7 100644 --- a/man/waybar-pulseaudio.5.scd +++ b/man/waybar-pulseaudio.5.scd @@ -150,6 +150,10 @@ Additionally, you can control the volume by scrolling *up* or *down* while the c *{volume}*: Volume in percentage. +*{source_volume}*: Source (input/microphone) volume in percentage. + +*{source_desc}*: Source's description, for bluetooth it'll be the device name. + *{icon}*: Icon, as defined in *format-icons*. *{format_source}*: Source format, *format-source*, *format-source-muted*. @@ -205,3 +209,5 @@ to be selected when the corresponding audio device is muted. This applies to *de - *#pulseaudio* - *#pulseaudio.bluetooth* - *#pulseaudio.muted* +- *#pulseaudio.sink-muted* +- *#pulseaudio.source-muted* diff --git a/man/waybar-river-layout.5.scd b/man/waybar-river-layout.5.scd index e3540217..a81bf63c 100644 --- a/man/waybar-river-layout.5.scd +++ b/man/waybar-river-layout.5.scd @@ -16,7 +16,7 @@ Addressed by *river/layout* *format*: ++ typeof: string ++ - default: {layout} ++ + default: {} ++ The format, how information should be displayed. On {} data gets inserted. *format-icons*: ++ diff --git a/man/waybar-sway-language.5.scd b/man/waybar-sway-language.5.scd index 5710e69d..8515dbaf 100644 --- a/man/waybar-sway-language.5.scd +++ b/man/waybar-sway-language.5.scd @@ -77,3 +77,4 @@ Addressed by *sway/language* # STYLE - *#language* +- *#language.* Where *layout-short-name* is the short name of the active layout (e.g. *#language.us* or *#language.de*). diff --git a/man/waybar-sway-window.5.scd b/man/waybar-sway-window.5.scd index 6fa9170b..ad5195c7 100644 --- a/man/waybar-sway-window.5.scd +++ b/man/waybar-sway-window.5.scd @@ -14,7 +14,7 @@ Addressed by *sway/window* *format*: ++ typeof: string ++ - default: {title} ++ + default: {} ++ The format, how information should be displayed. *rotate*: ++ @@ -101,13 +101,23 @@ Addressed by *sway/window* *icon*: ++ typeof: bool ++ default: false ++ - Option to hide the application icon. + Option to display the application icon. *icon-size*: ++ typeof: integer ++ default: 24 ++ Option to change the size of the application icon. +*icon-spacing*: ++ + typeof: integer ++ + default: 8 ++ + Spacing between the application icon and the label. + +*swap-icon-label*: ++ + typeof: bool ++ + default: false ++ + Option to swap the order of the application icon and the label. + *expand*: ++ typeof: bool ++ default: false ++ diff --git a/man/waybar-systemd-failed-units.5.scd b/man/waybar-systemd-failed-units.5.scd index aaeee2d1..044dbc9a 100644 --- a/man/waybar-systemd-failed-units.5.scd +++ b/man/waybar-systemd-failed-units.5.scd @@ -84,7 +84,9 @@ Addressed by *systemd-failed-units* *{overall_state}:* Overall state of the systemd and user session. ("ok" or "degraded") *{failed_units_list}:* Bulleted list of failed units using *tooltip-unit-format*. Empty when -there are no failed units. +there are no failed units. This replacement is only available in *tooltip-format* and +*tooltip-format-ok*; it is not supplied to *format*/*format-ok* and using it there breaks +label rendering. The *tooltip-unit-format* string supports the following replacements: diff --git a/man/waybar-tray.5.scd b/man/waybar-tray.5.scd index 975ba1f2..3037ecb0 100644 --- a/man/waybar-tray.5.scd +++ b/man/waybar-tray.5.scd @@ -55,6 +55,10 @@ Addressed by *tray* Key: name of item. ++ Value: integer, higher value means to place this item to the right. +*ignore-list*: ++ + typeof: array ++ + List of strings used to hide matching tray items. An item is hidden when any string in the list is found (as a substring) in the item's bus name, category, icon name, id or title. + # EXAMPLES ``` diff --git a/man/waybar-upower.5.scd b/man/waybar-upower.5.scd index 303ee65e..68c2d3ed 100644 --- a/man/waybar-upower.5.scd +++ b/man/waybar-upower.5.scd @@ -59,6 +59,12 @@ compatible devices in the tooltip. default: 4 ++ Defines the spacing between the tooltip window edge and the tooltip content. +*tooltip-format*: ++ + typeof: string ++ + default: ++ + The format used for each device line shown in the tooltip. Accepts the ++ + same replacements as *format*. + *on-click*: ++ typeof: string ++ Command to execute when clicked on the module. @@ -88,6 +94,12 @@ compatible devices in the tooltip. *{time}*: An estimated time either until empty or until fully charged ++ depending on the charging state. +*{temperature}*: The battery temperature in degrees Celsius. + +*{model}*: The model name of the device. + +*{native-path}*: The native path of the device. + # EXAMPLES ``` diff --git a/man/waybar-user.5.scd b/man/waybar-user.5.scd new file mode 100644 index 00000000..b1603336 --- /dev/null +++ b/man/waybar-user.5.scd @@ -0,0 +1,94 @@ +waybar-user(5) "waybar-user" "User Manual" + +# NAME + +waybar - user module + +# DESCRIPTION + +The *user* module displays the currently logged in user, the system uptime and, +optionally, the user's avatar image. + +# CONFIGURATION + +Addressed by *user* + +[- *Option* +:- *Typeof* +:- *Default* +:- *Description* +|[ *interval* +:[ integer +:[ 60 +:[ The interval in which the information gets polled +|[ *format* +:[ string +:[ *{user} {work_H}:{work_M}* +:[ The format, how the information should be displayed. See *FORMAT REPLACEMENTS* below +|[ *icon* +:[ bool +:[ false +:[ When enabled, displays the user's avatar image next to the label +|[ *avatar* +:[ string +:[ *$HOME/.face* +:[ Path to the avatar image to display. Only used when *icon* is enabled. When unset, the default path *$HOME/.face* is used +|[ *height* +:[ integer +:[ 20 +:[ The height of the avatar image in pixels +|[ *width* +:[ integer +:[ 20 +:[ The width of the avatar image in pixels +|[ *open-on-click* +:[ bool +:[ false +:[ When enabled, left-clicking the module opens the user's home directory (or *open-path*) with the default file manager +|[ *open-path* +:[ string +:[ +:[ Overrides the path that is opened when *open-on-click* is enabled. When empty, the user's home directory is used +|[ *rotate* +:[ integer +:[ +:[ Positive value to rotate the text label (in 90 degree increments) +|[ *tooltip* +:[ bool +:[ true +:[ Option to enable tooltip on hover + +# FORMAT REPLACEMENTS + +- *{user}*: The login name of the currently logged in user, in uppercase +- *{work_d}*: Whole days the system has been up +- *{work_H}*: Hours part of the system uptime (00-23) +- *{work_M}*: Minutes part of the system uptime (00-59) +- *{work_S}*: Seconds part of the system uptime (00-59) +- *{up_H}*: Hour the system was booted (00-23) +- *{up_M}*: Minute the system was booted (00-59) +- *{up_d}*: Day of the month the system was booted (01-31) +- *{up_m}*: Month the system was booted (01-12) +- *{up_Y}*: Year the system was booted + +# EXAMPLES + +``` +"user": { + "format": "{user} up {work_H}:{work_M}:{work_S}", + "interval": 60, + "icon": true, + "avatar": "/home/alice/.face", + "height": 24, + "width": 24, + "open-on-click": true +} +``` + +# STYLE + +- *#user* + +# AUTHOR + +Alexis Rouillard diff --git a/man/waybar-wayfire-workspaces.5.scd b/man/waybar-wayfire-workspaces.5.scd index 04f3be52..89d67f9c 100644 --- a/man/waybar-wayfire-workspaces.5.scd +++ b/man/waybar-wayfire-workspaces.5.scd @@ -14,11 +14,11 @@ Addressed by *wayfire/workspaces* *format*: ++ typeof: string ++ - default: {value} ++ + default: {index} ++ The format, how information should be displayed. *format-icons*: ++ - typeof: array ++ + typeof: object ++ Based on the workspace name, index and state, the corresponding icon gets selected. See *icons*. *disable-click*: ++ diff --git a/man/waybar-wireplumber.5.scd b/man/waybar-wireplumber.5.scd index c1a69e18..9d6517db 100644 --- a/man/waybar-wireplumber.5.scd +++ b/man/waybar-wireplumber.5.scd @@ -19,11 +19,33 @@ The *wireplumber* module displays the current volume reported by WirePlumber. typeof: string ++ This format is used when the sound is muted. +*format-bluetooth*: ++ + typeof: string ++ + This format is used when the active sink is a Bluetooth device (its node name contains *bluez* or *a2dp-sink*). + +*format-bluetooth-muted*: ++ + typeof: string ++ + This format is used when the active sink is a Bluetooth device and the sound is muted. + +*format-source*: ++ + typeof: string ++ + default: *{volume}%* ++ + The format used to render the source (microphone) volume sub-string that is exposed through the *{format_source}* replacement. + +*format-source-muted*: ++ + typeof: string ++ + The format used for the *{format_source}* sub-string when the source (microphone) is muted. + *node-type*: ++ typeof: string ++ default: *Audio/Sink* ++ The WirePlumber node type to attach to. Use *Audio/Source* to manage microphones etc. +*only-physical*: ++ + typeof: bool ++ + default: *false* ++ + When enabled, resolve through virtual/filter-chain sinks to the underlying physical sink and report its volume instead. + *tooltip*: ++ typeof: bool ++ default: *true* ++ @@ -122,6 +144,18 @@ The *wireplumber* module displays the current volume reported by WirePlumber. *{node_name}*: The node's nickname as reported by WirePlumber (*node.nick* property) +*{source_volume}*: Source (microphone) volume in percentage, cubic scale as integer. + +*{source_volume_linear}*: Source (microphone) volume in linear scale as float. + +*{source_volume_cubic}*: Source (microphone) volume in cubic scale as float. + +*{source_volume_db}*: Source (microphone) volume in decibel scale as float. + +*{source_desc}*: The source node's nickname/description as reported by WirePlumber. + +*{format_source}*: The pre-rendered source (microphone) volume sub-string, formatted with *format-source*/*format-source-muted*. + # EXAMPLES ## Basic: @@ -168,3 +202,6 @@ The *wireplumber* module displays the current volume reported by WirePlumber. - *#wireplumber* - *#wireplumber.muted* +- *#wireplumber.sink-muted* +- *#wireplumber.source-muted* +- *#wireplumber.bluetooth* diff --git a/man/waybar-wlr-taskbar.5.scd b/man/waybar-wlr-taskbar.5.scd index ae30316b..b8c661ff 100644 --- a/man/waybar-wlr-taskbar.5.scd +++ b/man/waybar-wlr-taskbar.5.scd @@ -109,6 +109,10 @@ Addressed by *wlr/taskbar* typeof: array ++ List of app_id/titles to be invisible. +*squash-list*: ++ + typeof: array ++ + List of app_id/titles whose multiple instances are collapsed into a single button. When more than one instance of a listed app is open, only one button is shown; when one instance closes, the next hidden instance reappears. The special value '\*' matches all applications. + *app_ids-mapping*: ++ typeof: object ++ Dictionary of app_id to be replaced with @@ -183,6 +187,7 @@ Invalid expressions (e.g., mismatched parentheses) are skipped. # Style - *#taskbar* +- *#taskbar.empty* - *#taskbar button* - *#taskbar button.maximized* - *#taskbar button.minimized* diff --git a/man/waybar-wwan.5.scd b/man/waybar-wwan.5.scd index 0169de07..5d931cc8 100644 --- a/man/waybar-wwan.5.scd +++ b/man/waybar-wwan.5.scd @@ -131,6 +131,12 @@ libmm-glib lives in: *{operator_name}*: Name of the network operator. +*{icon}*: Icon selected from *format-icons* according to the signal quality. + +*{power_state}*: Modem power state (On/Off/Low/Unknown). + +*{imei}*: Modem equipment identifier (IMEI). + # EXAMPLES ``` @@ -139,7 +145,7 @@ libmm-glib lives in: "format-disabled": "", // an empty format will hide the module "format-locked": "SIM Locked", "format-connected": "{operator_name} {preferred_mode} | {signal_quality}%" - "tooltip-format": "{mode}", + "tooltip-format": "{preferred_mode}", "tooltip-format-connected": "{current_modes}", "hide-disconnected": false } diff --git a/man/waybar.5.scd.in b/man/waybar.5.scd.in index e52dadee..78dc433e 100644 --- a/man/waybar.5.scd.in +++ b/man/waybar.5.scd.in @@ -360,9 +360,19 @@ A group may hide all but one element, showing them only on mouse hover. In order *children-class*: ++ typeof: string ++ - default: "hidden" ++ + default: "drawer-child" ++ Defines the CSS class to be applied to the hidden elements. +*always-visible-class*: ++ + typeof: string ++ + default: "" ++ + Defines the CSS class that marks a child module as always visible. The module carrying this class remains shown while the drawer is collapsed and drives the drawer's visibility management. When empty, the leader (first) module is used. + +*reveal-delay*: ++ + typeof: integer ++ + default: 0 ++ + Delay in milliseconds to wait after the mouse enters the group before revealing the drawer. When 0, the drawer is revealed immediately. + *click-to-reveal*: ++ typeof: bool ++ default: false ++ diff --git a/meson.build b/meson.build index 7d9cf5c1..f96139a0 100644 --- a/meson.build +++ b/meson.build @@ -207,6 +207,7 @@ man_files = files( 'man/waybar-states.5.scd', 'man/waybar-menu.5.scd', 'man/waybar-temperature.5.scd', + 'man/waybar-user.5.scd', ) inc_dirs = ['include'] diff --git a/src/modules/bluetooth.cpp b/src/modules/bluetooth.cpp index b092c29c..8adfff26 100644 --- a/src/modules/bluetooth.cpp +++ b/src/modules/bluetooth.cpp @@ -87,6 +87,18 @@ auto isChildPath(const std::string& child, const std::string& parent) -> bool { return child.starts_with(parent); } +// Returns the configured controller alias, accepting either the documented "controller" key or +// its "controller-alias" synonym ("controller-alias" takes precedence when both are set). +auto getConfiguredControllerAlias(const Json::Value& config) -> std::optional { + if (config["controller-alias"].isString()) { + return config["controller-alias"].asString(); + } + if (config["controller"].isString()) { + return config["controller"].asString(); + } + return std::nullopt; +} + // Returns true only if some configured format/tooltip string actually references the peripheral // battery placeholder. The GATT battery scan issues over-the-air BLE reads, so it must stay // opt-in: users who don't display {device_battery_percentage_peripheral} pay zero cost. @@ -176,9 +188,8 @@ waybar::modules::Bluetooth::Bluetooth(const std::string& id, const Json::Value& } if (cur_controller_ = findCurController(); !cur_controller_) { - if (config_["controller-alias"].isString()) { - spdlog::warn("no bluetooth controller found with alias '{}'", - config_["controller-alias"].asString()); + if (auto controller_alias = getConfiguredControllerAlias(config_)) { + spdlog::warn("no bluetooth controller found with alias '{}'", *controller_alias); } else { spdlog::warn("no bluetooth controller found"); } @@ -372,9 +383,9 @@ auto waybar::modules::Bluetooth::onObjectAdded(GDBusObjectManager* manager, GDBu ControllerInfo info; Bluetooth* bt = static_cast(user_data); + auto controller_alias = getConfiguredControllerAlias(bt->config_); if (!bt->cur_controller_.has_value() && bt->getControllerProperties(object, info) && - (!bt->config_["controller-alias"].isString() || - bt->config_["controller-alias"].asString() == info.alias)) { + (!controller_alias.has_value() || controller_alias.value() == info.alias)) { bt->cur_controller_ = std::move(info); bt->dp.emit(); } @@ -634,9 +645,9 @@ auto waybar::modules::Bluetooth::findCurController() -> std::optionalnext) { GDBusObject* object = G_DBUS_OBJECT(l->data); ControllerInfo info; + auto controller_alias = getConfiguredControllerAlias(config_); if (getControllerProperties(object, info) && - (!config_["controller-alias"].isString() || - config_["controller-alias"].asString() == info.alias)) { + (!controller_alias.has_value() || controller_alias.value() == info.alias)) { controller_info = std::move(info); break; } diff --git a/src/modules/mango/workspaces.cpp b/src/modules/mango/workspaces.cpp index f8849228..7424a352 100644 --- a/src/modules/mango/workspaces.cpp +++ b/src/modules/mango/workspaces.cpp @@ -175,7 +175,8 @@ void Workspaces::updateButtonState(Gtk::Button& button, const Json::Value& tag, if (config_["format"].isString()) { name = fmt::format(fmt::runtime(config_["format"].asString()), fmt::arg("icon", getIcon(name, tag)), fmt::arg("value", name), - fmt::arg("index", idx), fmt::arg("output", monitor["name"].asString())); + fmt::arg("name", name), fmt::arg("index", idx), + fmt::arg("output", monitor["name"].asString())); } if (!config_["disable-markup"].asBool()) { diff --git a/src/modules/privacy/privacy_item.cpp b/src/modules/privacy/privacy_item.cpp index 880d026e..aa650bf8 100644 --- a/src/modules/privacy/privacy_item.cpp +++ b/src/modules/privacy/privacy_item.cpp @@ -75,7 +75,7 @@ PrivacyItem::PrivacyItem(const Json::Value& config_, enum PrivacyNodeType privac tooltipIconSize = config_["tooltip-icon-size"].asUInt(); } // Tooltip - if (config_["tooltip"].isString()) { + if (config_["tooltip"].isBool()) { tooltip = config_["tooltip"].asBool(); } set_has_tooltip(tooltip);