How libratbag/piper works
Piper is a GTK frontend for configuring gaming mice through the external ratbagd D-Bus daemon. The user selects a detected device, configures profile resolutions, buttons, LEDs, and advanced settings, then commits changes through the device UI. The graph follows documented and indexed calls; several device and dialog internals are only partially sampled, so no extra low-level D-Bus call edges are inferred.
Main entry points: ratbagd.py ratbagd client · mouseperspective.py Device settings · window.py Main window · buttonspage.py Button settings
Components 21
Application shell
- Application
piper/application.py - Main window
piper/window.py - Device selection
piper/welcomeperspective.py - Error display
piper/errorperspective.py
Device access
- ratbagd client
piper/ratbagd.py - Signal helper
piper/util/gobject.py
Configuration UI
- Device settings
piper/mouseperspective.py - Profile rows
piper/profilerow.py - Resolution settings
piper/resolutionspage.py - Resolution controls
piper/resolutionrow.py - Button settings
piper/buttonspage.py - Button mapping dialog
piper/buttondialog.py - LED settings
piper/ledspage.py - LED dialog
piper/leddialog.py - Advanced settings
piper/advancedpage.py - Option button
piper/optionbutton.py
Mouse visualization
- Mouse map
piper/mousemap.py - Device SVG
piper/svg.py - Device row
piper/devicerow.py
Other components
- User
- ratbagd daemon
Connections 28
- User → Application: launches
README.md - Application → Main window: opens
piper/application.py - Application → ratbagd client: initializes
piper/application.py - Main window → ratbagd client: requests client
piper/window.py - ratbagd client → ratbagd daemon: uses D-Bus
README.md - Main window → Device selection: shows devices
piper/window.py - Main window → Error display: shows failures
piper/window.py - Device selection → Device row: renders devices
piper/welcomeperspective.py - Main window → Device settings: opens selected device
piper/window.py - Device settings → Profile rows: renders profiles
piper/mouseperspective.py - Device settings → Resolution settings: creates page
piper/mouseperspective.py - Device settings → Button settings: creates page
piper/mouseperspective.py - Device settings → LED settings: creates page
piper/mouseperspective.py - Device settings → Advanced settings: creates page
piper/mouseperspective.py - Resolution settings → Resolution controls: creates rows
piper/resolutionspage.py - Resolution controls → ratbagd client: updates resolution
piper/resolutionrow.py - Button settings → Button mapping dialog: opens dialog
piper/buttonspage.py - Button mapping dialog → ratbagd client: configures mapping
piper/buttondialog.py - LED settings → LED dialog: opens dialog
piper/ledspage.py - LED dialog → ratbagd client: configures LED
piper/leddialog.py - Advanced settings → ratbagd client: updates profile
piper/advancedpage.py - Button settings → Mouse map: embeds controls
piper/buttonspage.py - Resolution settings → Mouse map: embeds map
piper/resolutionspage.py - LED settings → Mouse map: embeds controls
piper/ledspage.py - Mouse map → Device SVG: renders device
piper/mousemap.py - Button settings → Option button: uses controls
piper/buttonspage.py - LED settings → Option button: uses controls
piper/ledspage.py - Resolution controls → Signal helper: connects signals
piper/resolutionrow.py