Skip to content

volume

Output volume control with a dropdown for device and app volumes.

Add it to your layout with volume:

toml
[[bar.layout]]
monitor = "*"
right = ["volume"]

General

FieldTypeDefaultDescription
level-iconsarray of string[...]Icons for volume levels from low to maximum.
icon-mutedstring"ld-volume-x-symbolic"Icon shown when audio output is muted.
border-showboolfalseDisplay border around button.
icon-showbooltrueDisplay module icon.
label-showbooltrueDisplay percentage label.
formatstring"{{ percent }}%"Format string for the label.
label-max-lengthu320Max label characters before truncation with ellipsis. Set to 0 to disable.
thresholdsarray of ThresholdEntry[]Dynamic color thresholds based on volume percentage.
More about level-icons

The percentage is divided evenly among icons. With 3 icons: 1-33% uses icons[0], 34-66% uses icons[1], 67-100% uses icons[2].

More about format

Placeholders

  • {{ percent }} - Volume (0-100)

Examples

  • "{{ percent }}%" - "45%"
More about thresholds

Entries are checked in order; the last matching entry wins for each color slot. Use above for high-value warnings (e.g., boosted volume).

Example

toml
[[modules.volume.thresholds]]
above = 100
icon-color = "status-warning"
label-color = "status-warning"

[[modules.volume.thresholds]]
above = 130
icon-color = "status-error"
label-color = "status-error"

Colors

FieldTypeDefaultDescription
border-colorColorValue"red"Border color token.
icon-colorColorValue"auto"Icon foreground color. Auto selects based on variant for contrast.
icon-bg-colorColorValue"red"Icon container background color token.
label-colorColorValue"red"Label text color token.
button-bg-colorColorValue"bg-surface-elevated"Button background color token.

Click actions

FieldTypeDefaultDescription
left-clickClickAction"dropdown:audio"Action on left click. Default opens the audio dropdown.
right-clickClickAction""Action on right click.
middle-clickClickAction"wayle audio output-mute"Action on middle click. Default toggles mute.
scroll-upClickAction""Action on scroll up.
scroll-downClickAction""Action on scroll down.
FieldTypeDefaultDescription
dropdown-app-iconsAppIconSource"mapped"Icon source for app volume entries in the audio dropdown.

Default configuration

toml
[modules.volume]
level-icons = [
    "ld-volume-symbolic",
    "ld-volume-1-symbolic",
    "ld-volume-2-symbolic",
]
icon-muted = "ld-volume-x-symbolic"
border-show = false
border-color = "red"
icon-show = true
icon-color = "auto"
icon-bg-color = "red"
label-show = true
label-color = "red"
format = "{{ percent }}%"
label-max-length = 0
button-bg-color = "bg-surface-elevated"
left-click = "dropdown:audio"
right-click = ""
middle-click = "wayle audio output-mute"
scroll-up = ""
scroll-down = ""
dropdown-app-icons = "mapped"
thresholds = []

Released under the MIT License.