summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraristocratos <gnmjpl@gmail.com>2021-10-17 22:55:36 +0200
committeraristocratos <gnmjpl@gmail.com>2021-10-17 22:55:36 +0200
commit7d89c75abb3771005ed6fbbb56aa75859cf4f00b (patch)
tree975104952f55506f4f29f3fd36b554b68b7d5de7
parent368ed273ec0dab28fdf3d1e0cefaaebf43367a82 (diff)
FIxed: Battery error if non existant battery named is entered
-rw-r--r--src/linux/btop_collect.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/linux/btop_collect.cpp b/src/linux/btop_collect.cpp
index fdaaf9a..2a5a31d 100644
--- a/src/linux/btop_collect.cpp
+++ b/src/linux/btop_collect.cpp
@@ -535,7 +535,7 @@ namespace Cpu {
auto& battery_sel = Config::getS("selected_battery");
- if ((battery_sel == "Auto" and auto_sel.empty())) {
+ if (auto_sel.empty()) {
for (auto& [name, bat] : batteries) {
if (bat.device_type == "Battery") {
auto_sel = name;