Fix battery indicator crash on linux

A pre-processor flag was misspelled and is now corrected.
pull/1736/head
Simon Plakolb 2022-10-19 13:15:21 +02:00
parent 6b221133c2
commit 662a250705
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@
#include <iostream> #include <iostream>
waybar::modules::Battery::Battery(const std::string& id, const Json::Value& config) waybar::modules::Battery::Battery(const std::string& id, const Json::Value& config)
: AButton(config, "battery", id, "{capacity}%", 60) { : AButton(config, "battery", id, "{capacity}%", 60) {
#if defined(__Linux__) #if defined(__linux__)
battery_watch_fd_ = inotify_init1(IN_CLOEXEC); battery_watch_fd_ = inotify_init1(IN_CLOEXEC);
if (battery_watch_fd_ == -1) { if (battery_watch_fd_ == -1) {
throw std::runtime_error("Unable to listen batteries."); throw std::runtime_error("Unable to listen batteries.");