Uploaded October 2022 | Updated November 2026, 3 hours ago
Do you miss getting low battery alerts on your laptop from the sad old days when you used Windows or Ubuntu? Do you wish you could get notified before your computer dies in a window manager? It's actually very easy to set up, as I'll show you in this video. It involves a couple of bash scripts, a cron job, some udev rules, and let me show you how it's done...
My video about notifications with dunst: youtube.com/watch?v=XWlbaERuDP4
Battery notify script: github.com/ericmurphyxyz/dotfiles/blob/master/.local/bin/batterynotify
Charging/discharging notify script: github.com/ericmurphyxyz/dotfiles/blob/master/.local/bin/chargingnotify
udev rules: wiki.archlinux.org/title/udev#Triggering_desktop_notifications_from_a_udev_rule
Battery icons: materialdesignicons.com
Watch my videos on Odysee: odysee.com/@ericnmurphy
My website: https://ericmurphy.xyz
My GitHub: github.com/ericmurphyxyz
0:00 Intro
1:20 Installing dependencies
1:53 Creating the low battery/full battery script
4:01 Getting icons for the notifications
4:38 Finishing the low battery/full battery script
5:19 Setting the script as a cron job
5:59 Giving the script executable permissions
6:13 Setting display variables
7:07 Checking to see if the notification has been displayed already
8:51 Notifications when power is plugged in or unglugged
9:40 Setting udev rules
12:34 Notification sounds
13:05 Conclusion
Do you miss getting low battery alerts on your laptop from the sad old days when you used Windows or Ubuntu? Do you wish you could get notified before your computer dies in a window manager? It's actually very easy to set up, as I'll show you in this video. It involves a couple of bash scripts, a cron job, some udev rules, and let me show you how it's done...
My video about notifications with dunst: youtube.com/watch?v=XWlbaERuDP4
Battery notify script: github.com/ericmurphyxyz/dotfiles/blob/master/.local/bin/batterynotify
Charging/discharging notify script: github.com/ericmurphyxyz/dotfiles/blob/master/.local/bin/chargingnotify
udev rules: wiki.archlinux.org/title/udev#Triggering_desktop_notifications_from_a_udev_rule
Battery icons: materialdesignicons.com
Watch my videos on Odysee: odysee.com/@ericnmurphy
My website: https://ericmurphy.xyz
My GitHub: github.com/ericmurphyxyz
0:00 Intro
1:20 Installing dependencies
1:53 Creating the low battery/full battery script
4:01 Getting icons for the notifications
4:38 Finishing the low battery/full battery script
5:19 Setting the script as a cron job
5:59 Giving the script executable permissions
6:13 Setting display variables
7:07 Checking to see if the notification has been displayed already
8:51 Notifications when power is plugged in or unglugged
9:40 Setting udev rules
12:34 Notification sounds
13:05 Conclusion










