JakeStanger / ironbar

Customisable Wayland gtk bar written in Rust.
https://crates.io/crates/ironbar
MIT License
544 stars 44 forks source link

on_scroll_[up/down] dont work in Hyprland #652

Open ralencode opened 2 months ago

ralencode commented 2 months ago

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
  5. See nothing changes

Expected behavior

Volume changes on scroll up and down

System information:

Configuration

Config ```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": "", "on_click": "!shutdown now" }, { "type": "button", "class": "power-btn", "label": "", "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 ```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": "", "on_click": "!shutdown now" }, { "type": "button", "class": "power-btn", "label": "", "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 onclick[right/middle] properties work as expected, left doesn't seem to work too

LoneWolf4713 commented 1 month ago

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.

ralencode commented 1 month ago

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