-
Notifications
You must be signed in to change notification settings - Fork 536
feat(bongocat): support multiple input devices (specific paths, globs, and UI management) #2979
Description
Submission checklist
- I have searched existing issues and confirmed this is not a duplicate.
- I am using the latest available version of Noctalia.
Bug description
The BongoCat widget is currently restricted to a single input_device in the configuration. Because modern Linux systems split physical peripherals into multiple independent evdev nodes (e.g., separate event files for keyboards, mice, and gamepads), the widget cannot function properly for users who want it to react to their full setup.
If configured to a keyboard, it completely ignores mouse clicks and gamepad inputs, breaking the expected behavior of a responsive input widget.
Steps to Reproduce
- Configure BongoCat using a single path (e.g.,
input_device = "/dev/input/event3"for the keyboard). - Interact with the system using a mouse or gamepad.
- Observe that BongoCat fails to animate or register any inputs outside of that specific single device.
Expected Behavior
The widget should be able to listen to the user's entire input environment simultaneously (typing, clicking, or playing with a joystick/arcade stick).
Suggested Fix / Requirements
To fix this limitation, the input system needs to be refactored to support multiple inputs through a list/array that allows:
- Specific paths: Explicitly tracking devices (e.g.,
/dev/input/event3or persistent/dev/input/by-id/paths). - Globbing / Wildcards: Supporting catch-all patterns (e.g.,
/dev/input/event*) to capture all inputs globally without manual tracking. - UI Extensibility: The configuration structure should allow adding input boxes one by one in a user interface to append devices dynamically.
Proposed Configuration Syntax (Backward Compatible)
# Current broken/limited approach # input_device = "/dev/input/event3" # Proposed fix: Array handling specific paths and glob patterns input_devices = [ "/dev/input/event3", # Specific legacy path "/dev/input/by-id/usb-Gamepad-event-joystick", # Specific persistent path "/dev/input/event*" # Global/Catch-all pattern ] ### Steps to reproduce 1. Open the configuration file for the BongoCat widget. 2. Set the `input_device` parameter to point to a single device node (e.g., `input_device = "/dev/input/event3"` for the keyboard). 3. Save and reload the Noctalia configuration. 4. Type on the keyboard and observe that BongoCat animates correctly. 5. Move the mouse, click its buttons, or press buttons on a connected gamepad/fightstick. 6. Observe that the widget completely ignores these actions and fails to animate, because it is restricted to listening to only one event device at a time. ### Expected behavior The BongoCat widget should be able to listen to and process events from multiple input devices simultaneously. Instead of freezing or ignoring inputs when the user switches between typing on a keyboard, clicking a mouse, or using a gamepad/fightstick, the widget should dynamically animate and reflect all active inputs across the user's entire setup. ### Actual behavior The widget is strictly limited to listening to a single hardware event file. Because modern Linux systems split a single physical setup into multiple `/dev/input/eventX` nodes (separating keyboards, mice, macro keys, and gamepads), BongoCat can only animate for one specific device. All other inputs from the mouse, gamepad, or secondary devices are completely ignored. ### Logs / error output ```text
Noctalia version
noctalia v5
Compositor
Niri
Distribution
NixOS
Environment information
Nixos flake
AMD rx6600
Additional context
No response