Skip to content

audio ​

Speaker volume and mute, the microphone's state, and a capture indicator.

The button shows the default output's volume and mute state and the default input's mute state. While an app records the microphone the microphone icon takes the capture color; while an app holds a camera open or shares the screen, an icon for each shows in the capture color. Its dropdown holds the output and input devices, the app volumes, and every app capturing, each with a button that stops it.

Add it to your layout with audio:

yaml
bar:
  layout:
    - monitor: "*"
      right: [audio]

General ​

FieldTypeDefaultDescription
border-showboolfalseDisplay border around button.
icon-showbooltrueDisplay the speaker icon.
tooltipbooltrueShow the module's state in a tooltip on hover.
labelLabelMode"hover"When the label beside the icon shows the volume; hover grows it out while the pointer is on the module.
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 the speaker volume percentage.
More about format

Placeholders ​

  • {{ percent }} - Speaker volume (0-100)
  • {{ mic_percent }} - Microphone volume (0-100), empty without a microphone

Examples ​

  • "{{ percent }}%" - "45%"
  • "{{ percent }}% · {{ mic_percent }}%" - "45% · 80%"
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 ​

yaml
modules:
  audio:
    thresholds:
      - above: 100
        icon-color: status-warning
        label-color: status-warning
      - above: 130
        icon-color: status-error
        label-color: status-error

Speaker ​

FieldTypeDefaultDescription
speaker-iconsarray of string[...]Speaker icons for volume levels from low to maximum.
speaker-icon-mutedstring"ld-volume-animated-symbolic"Speaker icon shown while the output is muted.
More about speaker-icons

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

Every speaker icon is also put in the state of the level (low, medium, high) or muted; the default is one animated icon that declares them, and an icon without states ignores them.

Microphone ​

FieldTypeDefaultDescription
mic-iconstring"ld-mic-animated-symbolic"Microphone icon shown while the input is live (unmuted); it is put in the state on, and an icon without states ignores it.
mic-icon-mutedstring"ld-mic-animated-symbolic"Microphone icon shown while the input is muted, put in the state off.
mic-hide-when-idleboolfalseShow the microphone icon only while an app records the microphone.

Capture indicator ​

FieldTypeDefaultDescription
capture-camera-iconstring"ld-webcam-symbolic"Icon shown while an app holds a camera open.
capture-screen-iconstring"ld-monitor-symbolic"Icon shown while an app shares the screen.
capture-colorColorValue"status-warning"Color of the capture indicator: the microphone icon while an app records it, and the camera and screen icons.

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"fg-default"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"lys-shell audio output-mute"Action on middle click. Default toggles the speaker's mute.
scroll-upClickAction"lys-shell audio output-volume +5"Action on scroll up. Default raises the speaker volume by 5.
scroll-downClickAction"lys-shell audio output-volume -5"Action on scroll down. Default lowers the speaker volume by 5.
More about left-click

The lys-shell audio commands name their device: output-mute and output-volume <level> act on the speaker, input-mute and input-volume <level> on the microphone. A level is 0-100, or +N and -N to move it.

FieldTypeDefaultDescription
dropdown-app-iconsAppIconSource"mapped"Icon source for app volume entries in the audio dropdown.

Default configuration ​

yaml
modules:
  audio:
    speaker-icons:
      - ld-volume-animated-symbolic
    speaker-icon-muted: ld-volume-animated-symbolic
    mic-icon: ld-mic-animated-symbolic
    mic-icon-muted: ld-mic-animated-symbolic
    mic-hide-when-idle: false
    capture-camera-icon: ld-webcam-symbolic
    capture-screen-icon: ld-monitor-symbolic
    capture-color: status-warning
    border-show: false
    border-color: red
    icon-show: true
    tooltip: true
    icon-color: auto
    icon-bg-color: red
    label: hover
    label-color: fg-default
    format: '{{ percent }}%'
    label-max-length: 0
    button-bg-color: bg-surface-elevated
    left-click: dropdown:audio
    right-click: ""
    middle-click: lys-shell audio output-mute
    scroll-up: lys-shell audio output-volume +5
    scroll-down: lys-shell audio output-volume -5
    dropdown-app-icons: mapped
    thresholds: []

Released under the MIT License.