Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(bongocat): support multiple input devices (specific paths, globs, and UI management) #2979

Open
Labels
bugSomething isn't working niri nixos

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

  1. Configure BongoCat using a single path (e.g., input_device = "/dev/input/event3" for the keyboard).
  2. Interact with the system using a mouse or gamepad.
  3. 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:

  1. Specific paths: Explicitly tracking devices (e.g., /dev/input/event3 or persistent /dev/input/by-id/ paths).
  2. Globbing / Wildcards: Supporting catch-all patterns (e.g., /dev/input/event*) to capture all inputs globally without manual tracking.
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working niri nixos

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /