mirror of
https://github.com/rad4day/Waybar.git
synced 2025-07-14 07:02:30 +02:00
FreeBSD: Add support to battery
This commit aims to propose a FreeBSD to gain battery support using sysctl on hw.acpi.battery.*
This commit is contained in:
@ -7,7 +7,7 @@ waybar::AModule* waybar::Factory::makeModule(const std::string& name) const {
|
||||
auto hash_pos = name.find('#');
|
||||
auto ref = name.substr(0, hash_pos);
|
||||
auto id = hash_pos != std::string::npos ? name.substr(hash_pos + 1) : "";
|
||||
#if defined(__linux__) && !defined(NO_FILESYSTEM)
|
||||
#if defined(__FreeBSD__) || (defined(__linux__) && !defined(NO_FILESYSTEM))
|
||||
if (ref == "battery") {
|
||||
return new waybar::modules::Battery(id, config_[name]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user