Description
The battery.2s.lua plugin returns empty output when run, while battery.2s.sh works correctly.
Steps to Reproduce
- Import battery plugin in Lua variant
- Run the plugin
- Output is empty/blank
Expected Behavior
Should output battery level with emoji and iconName attribute, e.g.:
🔋 100% | iconName=battery-level-100-charged-symbolic color=#8be9fd
---
State: charging
Level: 100%
---
Refresh | refresh=true
Actual Behavior
Empty or blank output.
Code Reference
- Plugin:
plugins/battery/battery.2s.lua
- Uses
crossbarBridge.batterySync() API
Possible Causes
crossbarBridge global may not be available in Lua runner
batterySync() may return nil instead of table on some systems
- Error handling may be silently failing
Environment
- OS: Linux
- Lua Runner: embedded lua5x
Related Commits
Description
The battery.2s.lua plugin returns empty output when run, while battery.2s.sh works correctly.
Steps to Reproduce
Expected Behavior
Should output battery level with emoji and iconName attribute, e.g.:
Actual Behavior
Empty or blank output.
Code Reference
plugins/battery/battery.2s.luacrossbarBridge.batterySync()APIPossible Causes
crossbarBridgeglobal may not be available in Lua runnerbatterySync()may return nil instead of table on some systemsEnvironment
Related Commits