ironbar
ironbar copied to clipboard
on_scroll_[up/down] dont work in Hyprland
Describe the bug
on_scroll module properties dont work in latest Hyprland
To Reproduce
- Archlinux, aur/hyprland-git
- Use my config.json
- Have amixer and pipewire installed
- Scroll down or up on the volume widgets
- See nothing changes
Expected behavior
Volume changes on scroll up and down
System information:
- Distro: Archlinux
- Compositor: Hyprland git v0.41.2-13-g4d6f96f7
- Ironbar version: 0.16.0-pre
Configuration
Config
{
"$schema": "https://f.jstanger.dev/github/ironbar/schema.json",
"anchor_to_edges": true,
"position": "top",
"height": 16,
"icon_theme": "Fluent-teal-dark",
"start": [
{
"type": "workspaces",
"all_monitors": false,
"name_map": {
"special:magic": "S"
}
},
{
"type": "launcher",
"favorites": [
"thunar",
"firefox",
"mgba",
"PPSSPPSDL",
"lutris"
],
"show_names": false,
"show_icons": true
}
],
"center": [
{
"type": "clock"
}
],
"end": [
{
"type": "volume",
"format": "{icon} {percentage}%",
"max_volume": 100,
"on_click_right": "amixer -D pipewire sset Master toggle",
"on_scroll_up": "amixer -D pipewire sset Master playback 5%-",
"on_scroll_down": "amixer -D pipewire sset Master playback 5%+",
"icons": {
"volume_high": "",
"volume_medium": "",
"volume_low": "",
"muted": ""
}
},
{
"type": "clipboard",
"max_items": 3,
"truncate": {
"mode": "end",
"length": 50
}
},
{
"type": "custom",
"class": "power-menu",
"bar": [
{
"type": "button",
"name": "power-btn",
"label": "",
"on_click": "popup:toggle"
}
],
"popup": [
{
"type": "box",
"orientation": "vertical",
"widgets": [
{
"type": "label",
"name": "header",
"label": "Power menu"
},
{
"type": "box",
"widgets": [
{
"type": "button",
"class": "power-btn",
"label": "<span font-size='40pt'> </span>",
"on_click": "!shutdown now"
},
{
"type": "button",
"class": "power-btn",
"label": "<span font-size='40pt'> </span>",
"on_click": "!reboot"
}
]
},
{
"type": "label",
"name": "uptime",
"label": "Uptime: {{30000:uptime -p | cut -d ' ' -f2-}}"
}
]
}
],
"tooltip": "Up: {{30000:uptime -p | cut -d ' ' -f2-}}"
},
{
"type": "upower",
"format": "{percentage}% {state}"
},
{
"type": "notifications",
"show_count": true,
"icons": {
"closed_none": "",
"closed_some": "",
"closed_dnd": "",
"open_none": "",
"open_some": "",
"open_dnd": ""
}
}
]
}
Styles
{
"$schema": "https://f.jstanger.dev/github/ironbar/schema.json",
"anchor_to_edges": true,
"position": "top",
"height": 16,
"icon_theme": "Fluent-teal-dark",
"start": [
{
"type": "workspaces",
"all_monitors": false,
"name_map": {
"special:magic": "S"
}
},
{
"type": "launcher",
"favorites": [
"thunar",
"firefox",
"mgba",
"PPSSPPSDL",
"lutris"
],
"show_names": false,
"show_icons": true
}
],
"center": [
{
"type": "clock"
}
],
"end": [
{
"type": "volume",
"format": "{icon} {percentage}%",
"max_volume": 100,
"on_click_right": "amixer -D pipewire sset Master toggle",
"on_scroll_up": "amixer -D pipewire sset Master playback 5%-",
"on_scroll_down": "amixer -D pipewire sset Master playback 5%+",
"icons": {
"volume_high": "",
"volume_medium": "",
"volume_low": "",
"muted": ""
}
},
{
"type": "clipboard",
"max_items": 3,
"truncate": {
"mode": "end",
"length": 50
}
},
{
"type": "custom",
"class": "power-menu",
"bar": [
{
"type": "button",
"name": "power-btn",
"label": "",
"on_click": "popup:toggle"
}
],
"popup": [
{
"type": "box",
"orientation": "vertical",
"widgets": [
{
"type": "label",
"name": "header",
"label": "Power menu"
},
{
"type": "box",
"widgets": [
{
"type": "button",
"class": "power-btn",
"label": "<span font-size='40pt'> </span>",
"on_click": "!shutdown now"
},
{
"type": "button",
"class": "power-btn",
"label": "<span font-size='40pt'> </span>",
"on_click": "!reboot"
}
]
},
{
"type": "label",
"name": "uptime",
"label": "Uptime: {{30000:uptime -p | cut -d ' ' -f2-}}"
}
]
}
],
"tooltip": "Up: {{30000:uptime -p | cut -d ' ' -f2-}}"
},
{
"type": "upower",
"format": "{percentage}% {state}"
},
{
"type": "notifications",
"show_count": true,
"icons": {
"closed_none": "",
"closed_some": "",
"closed_dnd": "",
"open_none": "",
"open_some": "",
"open_dnd": ""
}
}
]
}
Additional context on_click_[right/middle] properties work as expected, left doesn't seem to work too
the weird thing for me is, scroll works on using a physical mouse, but not when using laptop's touchpad scrolling. which is a real issue as i'm a laptop user.
i didnt test with a mouse, but touchpad doesnt work. i should have specified it maybe
Apologies this took so long! Finally grabbed my laptop so I could test.
it definitely doesn't work with touchpad. it worked with mouse wheel (ps4 gamepad mapping with antimicrox) at first, but now that doesnt work either (after some restarts). both aur ironbar-git package and binary built from git sources.
libinput debug tells me that touchpad is POINTER_SCROLL_FINGER event and gamepad stick is POINTER_SCROLL_WHEEL, if its helpful
Looks like my fix also ended up breaking it in unintended ways. I've just pushed another fix that may help your issue, but should at least get it working on mouse/trackpad.
finally, it works!
Cool thanks for confirming, in that case I'll re-close.