Skip to content

Volume

Displays the current volume level. Clicking on the widget opens a volume mixer, which allows you to change the device output level, the default playback device, and control application volume levels individually. Use truncate or marquee options to control the display of application titles in the volume mixer.

The volume widget, with its popup open. A single stream is playing audio.

Example

{
end = [
{
type = "volume"
format = "{icon} {percentage}%"
max_volume = 100
truncate = "end"
icons.volume_high = "󰕾"
icons.volume_medium = "󰖀"
icons.volume_low = "󰕿"
icons.muted = "󰝟"
}
]
}

Configuration

Type: volume

The format string to use for the widget button label. For available tokens, see below.

Type: string
Default: {icon} {percentage}%

Volume state icons.

See icons.

Default: None

Object keys

Icon to show for muted outputs.

Type: string
Default: 󰝟

Icon to show for high volume levels.

Type: string
Default: 󰕾

Icon to show for low volume levels.

Type: string
Default: 󰕿

Icon to show for medium volume levels.

Type: string
Default: 󰖀

The justification (alignment) of the widget text shown on the bar.

Type: 'left' | 'right' | 'center' | 'fill'
Default: 'left'

See marquee options.

Default: None

Object keys

Whether to enable scrolling on long lines of text. This may not be supported by all modules.

Type: boolean
Default: None

The maximum length of text (roughly, in characters) before it gets truncated and starts scrolling.

Type: integer
Default: None

Controls marquee behavior on hover.

Options:

  • "none": Always scroll (default)
  • "pause": Pause scrolling on hover
  • "play": Only scroll on hover

Default: None

Scrolling is always active, hover has no effect.

Scrolling pauses when the widget is hovered.

Scrolling only occurs when the widget is hovered.

Duration in milliseconds to pause at each loop point.

Type: integer
Default: 5000

Scroll speed in pixels per frame. Higher values scroll faster.

Type: number
Default: 0.5

String displayed between the end and beginning of text as it loops.

Type: string
Default:

Maximum value to allow volume sliders to reach. Pulse supports values > 100 but this may result in distortion.

Type: number
Default: 100

The orientation to display the widget contents. Setting to vertical will rotate text 90 degrees.

Type: 'horizontal' | 'vertical'
Default: 'horizontal'

See truncate options.

Default: None

Do not truncate content.

Setting this option may cause excessively long content to overflow other widgets, shifting them off-screen.

{ truncate = "off" }

Auto mode lets GTK decide when to ellipsize.

To use this mode, set the truncate option to a string declaring the location to truncate text from and place the ellipsis.

{ truncate = "start" }

Length mode defines a fixed point at which to ellipsize.

Generally you will want to set only one of length or max_length, but you can set both if required.

{
truncate.mode = "start"
truncate.length = 50
truncate.max_length = 70
}
Object keys

The fixed width (in characters) of the widget.

The widget will be expanded to this width if it would have otherwise been smaller.

Leave unset to let GTK automatically handle.

Type: integer
Default: None

The maximum number of characters to show before truncating.

Leave unset to let GTK automatically handle.

Type: integer
Default: None

The location to truncate text from and place the ellipsis.

Type: 'none' | 'start' | 'middle' | 'end'
Default: None

Styling

SelectorDescription
.volumeVolume widget button.
.popup-volumeVolume popup box.
.popup-volume .device-boxBox for the device volume controls.
.popup-volume .device-box .device-selectorDefault device dropdown selector.
.popup-volume .device-box .sliderDevice volume slider.
.popup-volume .device-box .btn-muteDevice volume mute toggle button.
.popup-volume .apps-boxParent box for the application volume controls.
.popup-volume .apps-box .app-boxBox for an individual application volume controls.
.popup-volume .apps-box .app-box .titleName of the application playback stream.
.popup-volume .apps-box .app-box .sliderApplication volume slider.
.popup-volume .apps-box .app-box .btn-muteApplication volume mute toggle button.

For more information on styling, please see the styling guide.