acpi "ac_adapter" events
Thank you for the suggestion. I should have specified, I'm using Manjaro with i3 so I don't have the KDE settings.
I did find a way to listen for AC adapter events, using udev, something like this as a rule in /usr/lib/udev/rules.d/:

ACTION=="change", SUBSYSTEM=="power_supply", RUN+="the_command"

Then I ran sudo udevadm control --reload to reload the udev rules.

In my script, I check whether the AC adapter is plugged in with:


case $(cat /sys/devices/platform/dc-charger/power_supply/dc-charger/online) in
      # do something when unplugged
      # do something when plugged in

Messages In This Thread
acpi "ac_adapter" events - by elijahr - 09-24-2020, 07:23 PM
RE: acpi "ac_adapter" events - by MtnSk8 - 09-24-2020, 08:42 PM
RE: acpi "ac_adapter" events - by elijahr - 09-24-2020, 09:28 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  X events getting clogged up? ab1jx 21 13,947 01-21-2021, 01:05 AM
Last Post: KC9UDX

Forum Jump:

Users browsing this thread: 1 Guest(s)