[GH-ISSUE #652] on_scroll_[up/down] dont work in Hyprland with touchpad #1628

Closed
opened 2026-05-22 22:53:39 +01:00 by JakeStanger · 8 comments
Owner

Originally created by @ralencode on GitHub (Jun 30, 2024).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/652

Describe the bug

on_scroll module properties dont work in latest Hyprland

To Reproduce

  1. Archlinux, aur/hyprland-git
  2. Use my config.json
  3. Have amixer and pipewire installed
  4. Scroll down or up on the volume widgets with your touchpad
  5. 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

Originally created by @ralencode on GitHub (Jun 30, 2024). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/652 **Describe the bug** on_scroll module properties dont work in latest Hyprland **To Reproduce** 1. Archlinux, aur/hyprland-git 2. Use my config.json 3. Have amixer and pipewire installed 4. Scroll down or up on the volume widgets with your touchpad 5. 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** <details><summary>Config</summary> ```json { "$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": "󱅮" } } ] } ``` </details> <details><summary>Styles</summary> ```css { "$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": "󱅮" } } ] } ``` </details> **Additional context** on_click_[right/middle] properties work as expected, left doesn't seem to work too
Author
Owner

@LoneWolf4713 commented on GitHub (Aug 11, 2024):

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.

<!-- gh-comment-id:2282362258 --> @LoneWolf4713 commented on GitHub (Aug 11, 2024): 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.
Author
Owner

@ralencode commented on GitHub (Aug 19, 2024):

i didnt test with a mouse, but touchpad doesnt work. i should have specified it maybe

<!-- gh-comment-id:2296738931 --> @ralencode commented on GitHub (Aug 19, 2024): i didnt test with a mouse, but touchpad doesnt work. i should have specified it maybe
Author
Owner

@JakeStanger commented on GitHub (Nov 4, 2024):

Apologies this took so long! Finally grabbed my laptop so I could test.

<!-- gh-comment-id:2454668534 --> @JakeStanger commented on GitHub (Nov 4, 2024): Apologies this took so long! Finally grabbed my laptop so I could test.
Author
Owner

@ralencode commented on GitHub (Nov 4, 2024):

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.
image
image

<!-- gh-comment-id:2455211501 --> @ralencode commented on GitHub (Nov 4, 2024): 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. ![image](https://github.com/user-attachments/assets/027e2a01-7ca4-4cbe-b18c-aa749de2d5a9) ![image](https://github.com/user-attachments/assets/3aa77ecc-dfb7-47e1-8787-b5d66171b522)
Author
Owner

@ralencode commented on GitHub (Nov 4, 2024):

libinput debug tells me that touchpad is POINTER_SCROLL_FINGER event and gamepad stick is POINTER_SCROLL_WHEEL, if its helpful

<!-- gh-comment-id:2455248209 --> @ralencode commented on GitHub (Nov 4, 2024): libinput debug tells me that touchpad is POINTER_SCROLL_FINGER event and gamepad stick is POINTER_SCROLL_WHEEL, if its helpful
Author
Owner

@JakeStanger commented on GitHub (Nov 10, 2024):

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.

<!-- gh-comment-id:2466820688 --> @JakeStanger commented on GitHub (Nov 10, 2024): 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.
Author
Owner

@ralencode commented on GitHub (Nov 10, 2024):

finally, it works!

<!-- gh-comment-id:2466975701 --> @ralencode commented on GitHub (Nov 10, 2024): finally, it works!
Author
Owner

@JakeStanger commented on GitHub (Nov 10, 2024):

Cool thanks for confirming, in that case I'll re-close.

<!-- gh-comment-id:2466983506 --> @JakeStanger commented on GitHub (Nov 10, 2024): Cool thanks for confirming, in that case I'll re-close.
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#1628
No description provided.