justinhj / battery.nvim

Neovim plugin to detect and view battery information
MIT License
59 stars 9 forks source link

feat: checkhealth should check what method is being used for battery information #24

Closed Agent-E11 closed 3 months ago

Agent-E11 commented 3 months ago

(lua/battery/health/health.lua line 8)

Possible implementation:

In the select_job function, set M.method to a string representing the method used to collect information (nil if none of them work), so that in the health module, you could do something like

local method = require("battery.battery").method
if method then
    ok("Battery info retrieval method: " .. method)
else
    error("No battery info retrieval method")
end