Commit Graph
195 Commits
Author SHA1 Message Date
Alex 86b8dd6b1b refactor: migrate backlight/battery/bluetooth/gps to updateLabelAndTooltip 2026-07-04 00:01:17 +02:00
Alexis Rouillard da91ca2457 Merge branch 'master' into smooth-power 2026-07-03 22:11:06 +02:00
Alex 31a3d7e1bb fix(battery): gate Full-as-Plugged behind full-at-plugged option, drop debug output
Reporting a full battery on AC as 'Plugged' is now opt-in via the
'full-at-plugged' config option (default false), so existing format-full /
tooltip-format-full setups keep working. Also documents the option.
2026-07-03 21:40:41 +02:00
Alex eff483de1f Merge remote-tracking branch 'origin/master' into fix/format-plugged-gt-format-full 2026-07-03 21:39:32 +02:00
Alex 16c2ee7041 Merge remote-tracking branch 'origin/master' into charon77/battery_fix
# Conflicts:
#	src/modules/battery.cpp
2026-07-03 21:05:56 +02:00
InetAddress 61178f7b0e Change error handling to warning
Fixes a bug where removing a hot-plugged device mid-loop causes a filesystem error that turns into a fatal runtime error that crashes waybar entirely, changed to warning instead of runtime error.
2026-06-12 04:38:10 +00:00
Evans 255f17d13c battery: guard _exists = true assignment inside if condition 2026-04-28 04:53:19 +00:00
Nico Schlömer 59d09c2c12 fix various toctou bugs in battery.cpp 2026-04-27 11:29:03 +02:00
yubo ac62754b28 fix the lint problem 2026-04-11 13:26:50 +08:00
yubo 906a589715 fix the io failure for hotplug-in device 2026-04-09 21:20:45 +08:00
Alex e18939210b fix: lint 2026-02-24 00:00:57 +01:00
copilot-swe-agent[bot]andAlexays 49d4049ea3 Fix SIGABRT on USB unplug race condition in battery module
Co-authored-by: Alexays <13947260+Alexays@users.noreply.github.com>
2026-02-23 22:55:05 +00:00
Alexey Vladimirov 3bcadfdf5a battery: power switch events 2026-02-12 01:42:30 +03:00
Prakhar Chhalotre bd222984bb fix: remove unnecessary console log for battery status 2026-02-11 01:12:21 +05:30
Prakhar Chhalotre e67b230dbe fix: prioritize plugged status over default when battery is full 2026-02-10 01:52:59 +05:30
Benji-clm 7f63a905a1 feat(battery): add option to smooth power for more stable time_remaining estimates 2026-01-09 13:02:28 +00:00
Alexis Rouillard c3d29b1185 Merge branch 'master' into battery-plugging-instant-updates 2025-12-18 19:04:31 +01:00
schmop ce1da5a178 Make udev_deleter not linux-only and fix freebsd build 2025-11-01 10:57:18 +01:00
schmop 4e25871655 Reapply "Make battery module update on plugging/unplugging again (refs #2519)"
This reverts commit bb2c67ebad.
2025-10-31 13:43:36 +01:00
arne ca62481dc9 fix: default weighted average to true 2025-10-26 06:44:53 +01:00
Alexis Rouillard 477f30705c Merge pull request #4208 from markx86/feat/battery-events
battery: Add support for battery level related events
2025-08-08 08:54:32 +02:00
hritix 310a473e65 enabled markup support for tooltip of battery and pulseaudio modules 2025-07-09 22:50:03 +05:30
tpaau-17DB 10c116e54a Change default tooltip for the battery module. 2025-07-04 19:02:10 +02:00
markx86 53d8d3cd2a fix: Code formatting for clang-format/lint CI 2025-06-22 18:55:07 +02:00
markx86 08da7b5282 feat: Add support for battery related events 2025-06-22 17:45:12 +02:00
Anthony Ruhier 4be1f3bf42 fix: battery runtime estimation with negative sysfs values
Some drivers (example: qualcomm-battmgr, present on Snapdragon X1
laptops) expose the current_now and power_now values in sysfs as
negative int when the device is discharging, positive when charging.

This breaks the battery runtime estimation in Waybar, as it expects a
uint32 for power_now.

Change the battery module to use the absolute values of current_now and
power_now.
2025-02-16 18:33:03 +01:00
Alexis Rouillard bb2c67ebad Revert "Make battery module update on plugging/unplugging again (refs #2519)" 2025-01-25 09:24:48 +01:00
schmop f4608b3e31 Fix battery status changes not being detected
Historically we listened to /sys/class/poewr_supply inotify events,
which does not seem to work anymore.
We switched now to udev netlink kernel events.
2024-07-27 01:15:42 +02:00
OpenSauce04 d68bcbd292 modules/battery: Deprioritize capacity /sys value 2024-06-23 14:39:41 +01:00
Kiri a2c5a8215b style(battery): Capitalize float 'F' suffix 2024-04-24 15:07:26 +02:00
Kiri 57197b8e01 feat(battery): Also support energy_full (instead of charge_full) 2024-04-24 14:57:11 +02:00
Kiri 5c4e368819 style(battery): Indent level
It's now *inconsistent* in the file, but clang-tidy should be happy, sooo...
2024-04-24 09:05:11 +00:00
Kiri 8d962430dd fix(battery): Remove duplicate line
This is what happens when you copy-paste from GitHub actions
2024-04-24 09:02:03 +00:00
Kiri 54a85ea15f style: Apply clang-format change
At least I hope I copy-pased it correctly
2024-04-24 08:56:24 +00:00
Kiri efa7dc7ba4 fix(battery): Register health replacement for main format 2024-04-24 10:34:35 +02:00
Alex 8ef4ddd7ef fix: lint 2024-04-18 08:34:02 +02:00
Kiri 67bf98a93e style: Change more var names to camelCase 2024-04-17 14:46:35 +02:00
Kiri 3d54a6002d style: Remove superfluous 'const' on getInfo()
was here before, but is an easy fix for a clang-tidy warning
2024-04-13 13:19:54 +02:00
Kiri da47c94480 fix: Also use camelCase for usages of new vars 2024-04-13 13:18:50 +02:00
Kiri 986b348bc7 style: Change new variables to camelCase 2024-04-13 13:11:14 +02:00
Kiri 421ba6e31a fix: Add dummy information for battery cycles,health on FreeBSD 2024-04-12 18:48:54 +02:00
Kiri 24690248db fix: Calculate battery health the right way around
I even did this originally, then got confused when my battery in particular showed 102% and, instead of checking the values I calculate with, just decided to do the stupid thing and do maths the wrong around
2024-04-11 02:40:04 +02:00
Kiri 805faa47e6 style: Remove debug output
Oops
2024-04-10 18:48:03 +02:00
Kiri a59593fde1 feat(battery): Add {health} format replacement 2024-04-10 18:19:55 +02:00
Kiri 7f1e623f77 style: Refactor battery cycle count choosing 2024-04-10 17:30:47 +02:00
Kiri 43511992d9 feat(battery): Add {cycles} format replacement 2024-04-10 17:00:50 +02:00
Alex fb6658e8fd chore: lint 2024-01-30 09:07:37 +01:00
ArneshRC d14a4a2b1a fixed early dereference error 2024-01-19 16:00:13 +05:30
ArneshRC dacffdb095 removed duplicate code 2024-01-19 15:27:11 +05:30
ArneshRC 3390c16f52 added support for battery state-based classes on the entire waybar 2024-01-07 17:22:34 +05:30