[GH-ISSUE #1112] Not possible to override on_click_left of the volume module #3158

Closed
opened 2026-05-22 23:54:19 +01:00 by JakeStanger · 0 comments
Owner

Originally created by @randoragon on GitHub (Aug 10, 2025).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/1112

Describe the bug
The volume module toggles a popup GUI by default when it is left clicked. I wanted to override this behavior with something else, and was expecting to be able to do so by defining a custom on_click_left event. However, the default behavior takes precedence over the configuration and the event is just ignored.

To reproduce
Steps to reproduce the behavior:

  1. Add module volume with the following configuration:
    {
        type = "volume"
        on_click_left = "notify-send hello"
    }
    
  2. Left-click the module
  3. Observe that the regular pop-up is toggled, instead of the custom command.
    Expected behavior
    The notify-send command runs, sending a desktop notification.

System information:

  • Distro: NixOS 25.11
  • Compositor: Niri 25.05.1
  • Ironbar version: 0.16.1
Config
let {
	$volume = {
		type = "volume"
		format = "{icon} {percentage}"
		max_volume = 100
		icons.volume_high = ">"
		icons.volume_medium = ">"
		icons.volume_low = ">"
		icons.muted = "X"
		on_click_left = "notify-send hello"
		on_click_right = "qpwgraph"
	}
} in {
	name = "mybar"
	layer = "top"
	position = "top"
	anchor_to_edges = true
	height = 20

	start = [ ]
	center = [ ]
	end = [ $volume ]
}
Styles
* {
	font-family: Liberation Sans;
	font-size: 13px;
	border: none;
	margin: 0px;
	padding: 0px;
}

Notes
It's possible that other modules like clock also suffer from this. I did not test it.

Originally created by @randoragon on GitHub (Aug 10, 2025). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/1112 **Describe the bug** The volume module toggles a popup GUI by default when it is left clicked. I wanted to override this behavior with something else, and was expecting to be able to do so by defining a custom `on_click_left` event. However, the default behavior takes precedence over the configuration and the event is just ignored. **To reproduce** Steps to reproduce the behavior: 1. Add module `volume` with the following configuration: ```corn { type = "volume" on_click_left = "notify-send hello" } ``` 3. Left-click the module 4. Observe that the regular pop-up is toggled, instead of the custom command. **Expected behavior** The `notify-send` command runs, sending a desktop notification. **System information:** - Distro: NixOS 25.11 - Compositor: Niri 25.05.1 - Ironbar version: 0.16.1 <details><summary>Config</summary> ```corn let { $volume = { type = "volume" format = "{icon} {percentage}" max_volume = 100 icons.volume_high = ">" icons.volume_medium = ">" icons.volume_low = ">" icons.muted = "X" on_click_left = "notify-send hello" on_click_right = "qpwgraph" } } in { name = "mybar" layer = "top" position = "top" anchor_to_edges = true height = 20 start = [ ] center = [ ] end = [ $volume ] } ``` </details> <details><summary>Styles</summary> ```css * { font-family: Liberation Sans; font-size: 13px; border: none; margin: 0px; padding: 0px; } ``` </details> **Notes** It's possible that other modules like clock also suffer from this. I did not test it.
JakeStanger 2026-05-22 23:54:19 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#3158
No description provided.