Merge branch 'dev' into omarchy-shell

This commit is contained in:
David Heinemeier Hansson
2026-05-19 10:50:47 +02:00
3 changed files with 9 additions and 0 deletions
+5
View File
@@ -11,6 +11,11 @@ action="${1-}"
# events, and also avoids false negatives from per-port USB-C devices
# that are present-but-empty (online=0) while another port supplies power.
if [[ -z $action || $action == "autodetect" ]]; then
# On plug/unplug, udev fires the rule before sysfs `online` is updated
# on some laptops (notably Lenovo Yoga Pro 7 with USB-C charging). A
# short settle delay lets the kernel update before we read state.
sleep 0.3
action=battery
for ps in /sys/class/power_supply/*; do
[[ -r $ps/online && -r $ps/type ]] || continue