How omriharel/deej works
deej is a Go desktop client paired with Arduino slider hardware. Slider readings arrive over serial, are normalized into move events, and are applied according to reloadable configuration to matching audio sessions. The session map discovers and refreshes sessions, then adjusts their volume; platform-specific code supplies audio-session discovery and controls. The tray offers configuration editing, manual session refresh, and quit, while notifications report configuration or connection problems. README-documented capabilities include master, microphone, system sounds, named devices, focused apps, and unmapped apps. Some wiring is documented only at product level because excerpts are partial.
Main entry points: session_map.go Session mapping · deej.go Client lifecycle · config.go Configuration · tray.go System tray
Components 17
Runtime orchestration
- Client entry
pkg/deej/cmd/main.go - Client lifecycle
pkg/deej/deej.go
Slider input and config
- Configuration
pkg/deej/config.go - Slider mapping
pkg/deej/slider_map.go - Serial reader
pkg/deej/serial.go
Audio session control
- Session mapping
pkg/deej/session_map.go - Session discovery
pkg/deej/session_finder.go - Windows discovery
pkg/deej/session_finder_windows.go - Linux discovery
pkg/deej/session_finder_linux.go - Windows controls
pkg/deej/session_windows.go - Linux controls
pkg/deej/session_linux.go
Desktop experience
- System tray
pkg/deej/tray.go - Notifications
pkg/deej/notify.go
Hardware input
- Arduino firmware
arduino/deej-5-sliders-vanilla/deej-5-sliders-vanilla.ino
Other components
- User
- Operating system audio
- Config editor
Connections 23
- User → Arduino firmware: moves sliders
README.md - Arduino firmware → Serial reader: streams readings
README.md - Client entry → Client lifecycle: creates and initializes
pkg/deej/cmd/main.go - Client lifecycle → Configuration: loads and watches
pkg/deej/deej.go - Client lifecycle → Session mapping: initializes and releases
pkg/deej/deej.go - Client lifecycle → Serial reader: starts and stops
pkg/deej/deej.go - Client lifecycle → System tray: starts tray
pkg/deej/deej.go - Configuration → Slider mapping: builds mapping
pkg/deej/config.go - Serial reader → Session mapping: delivers slider changes
README.md - Configuration → Session mapping: provides target rules
pkg/deej/session_map.go - Session mapping → Session discovery: requests sessions
pkg/deej/session_map.go - Session discovery → Windows discovery: platform implementation
- Session discovery → Linux discovery: platform implementation
- Windows discovery → Windows controls: creates audio sessions
pkg/deej/session_finder_windows.go - Session mapping → Windows controls: sets session volume
pkg/deej/session_map.go - Session mapping → Linux controls: sets session volume
- Windows controls → Operating system audio: controls audio
pkg/deej/session_windows.go - Linux controls → Operating system audio: controls audio
- System tray → Session mapping: refreshes sessions
pkg/deej/tray.go - User → System tray: uses menu
pkg/deej/tray.go - System tray → Config editor: opens config in
pkg/deej/tray.go - Configuration → Notifications: reports reload status
pkg/deej/config.go - Client lifecycle → Notifications: reports connection errors
pkg/deej/deej.go