Charger connect/disconnect sound effect

I want some sound feedback when my laptop gets connected/disconnected from charger.
How can I do that?

I am using xfce DE.

You can do this with a udev rule. Here is the relevant ArchWiki article: See also Writing udev rules, which has some examples you can get some inspiration from down near the bottom.

This thread is related to writing a udev rule for plugging/unplugging a laptop if you’d like to check that out: They have a different action they wanted to do, but it might be a good source for ideas.

1 Like