How To Get Battery Notifications on Arch Linux
Eric Murphy
Do you miss getting low battery notifications on your laptop from the sad old days when you used Windows or Ubuntu? Do you wish you could get alerted before your computer dies inside your shiny new 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: https://www.youtube.com/watch?v=XWlbaERuDP4 Battery notify script: https://github.com/ericmurphyxyz/dotfiles/blob/master/.local/bin/batterynotify Charging/discharging notify script: https://github.com/ericmurphyxyz/dotfiles/blob/master/.local/bin/chargingnotify udev rules: https://wiki.archlinux.org/title/udev#Triggering_desktop_notifications_from_a_udev_rule Battery icons: https://materialdesignicons.com/
Watch my videos on Odysee: https://odysee.com/@ericnmurphy My website: https://ericmurphy.xyz My GitHub: https://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 ... https://www.youtube.com/watch?v=3wTt6fStYCI
46893462 Bytes