Skip to content

Fix IPDisplay: bnep0 check, configurable position, cleanup#7

Open
CoderFX wants to merge 1 commit intoNeonLightning:mainfrom
CoderFX:fix/ipdisplay-bugs
Open

Fix IPDisplay: bnep0 check, configurable position, cleanup#7
CoderFX wants to merge 1 commit intoNeonLightning:mainfrom
CoderFX:fix/ipdisplay-bugs

Conversation

@CoderFX
Copy link
Copy Markdown

@CoderFX CoderFX commented Mar 12, 2026

Summary

  • Fix is "bnep0" identity check — iface format is bnep0:x.x.x.x, used .startswith("bnep0:") instead
  • Add subprocess timeout to hcitool con call to prevent hangs
  • Check for ACL in hcitool output instead of empty check
  • Add configurable position via options['position'] with string parsing for TOML config
  • Use .get() defaults instead of manual key checks in on_loaded
  • Remove unused import ipaddress

Config

[main.plugins.IPDisplay]
position = "0, 82"
delay_time = 2
skip_devices = ["lo", "usb0"]

- Fix `is "bnep0"` identity check to `.startswith("bnep0:")` (iface
  format is "bnep0:x.x.x.x", never bare "bnep0")
- Add subprocess timeout to hcitool call to prevent hangs
- Check for ACL connections instead of empty output
- Add configurable position via options
- Parse position string from config (TOML gives strings)
- Use .get() defaults instead of manual key checks
- Remove unused `import ipaddress`
- Remove redundant modulo (already bounds-checked above)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant