How to Show Your Battery Percentage as a Wallpaper on Linux


Running out of power can ruin your day—especially if you’re using your Linux laptop for critical projects or are in the middle of a long-distance video call to friends and relations on the other side of the world.

It’s difficult to keep an eye on your battery life when you’re busy, but with battery-wallpaper, you can keep an eye on your charge level just by glancing at your wallpaper.

battery-wallpaper Is the Easiest Way to Monitor Battery Life

ubuntu with a wallpaper showing a charging battery

While your status bar or Conky probably shows your laptop’s remaining charge, it’s likely small, out of the way, and nested among dozens of other system indicators and notifications. When you’re absorbed in a task or flipping between apps, it’s easy to overlook the battery glyph as the numbers steadily drop toward zero and a blank screen.

Your desktop or window manager wallpaper is there to be looked at. It’s an expression of your individuality that you can gaze upon for relaxation, inspiration, or as a break from your digital chores.

It can also double as a stylish way to monitor your battery’s remaining charge thanks to battery-wallpaper, a simple Bash script to set an animated battery as desktop wallpaper. It shows a charging animation that changes according to battery percentage.

battery-wallpaper works on most Linux desktop environments, including KDE, Pantheon, GNOME, Deepin, Cinnamon, XFCE, LXDE, and MATE, as well as window managers including Openbox, i3wm, bspwm, awesomewm, Fluxbox, FVWM, and Sway.

You’re not stuck with just one wallpaper, either. battery-wallpaper comes with 21 different battery wallpapers, and if none of them strike your fancy, you can create your own.

Install battery-wallpaper to Monitor Your Battery Charge on Linux

battery-wallpaper has a few dependencies you will need to install to ensure it works properly on any system. To install these on Ubuntu and Debian, open a terminal and enter:

 sudo apt-get install acpi feh x11-xserver-utils 

Or if you use Arch or related systems, enter:

 sudo pacman -Sy acpi feh xorg-xrandr 

Now clone the battery-wallpaper GitHub repository with:

 git clone https: 

Move into the new directory using the cd command and modify permissions for the script:

 cd battery-wallpaper
sudo chmod +x

Now you can run the install script with:


The install script will first delete any previous installations of battery-wallpaper, then copy its desktop backgrounds to a new location on your filesystem. It will then make the script executable, and create a symbolic link to it in /usr/bin/.

Use battery-wallpaper to Keep an Eye on Your Battery Life

ubuntu with a wallpaper showing a bonsai tree

You can open the battery-wallpaper help file by entering:


The help file will list all available styles and give usage examples. You can set a wallpaper using the -s switch.

 bwall -s paper 

The aforementioned command will set the “paper” style wallpaper, and you will note that your wallpaper now features a large image of a battery. As your charge drops, the wallpaper will show the battery with a decreasing charge level.

Other great visual indicators include “space”, which shows a representation of the planet Earth against a starfield, and “bonsai”, which shows a beautifully drawn miniature tree, which loses its leaves over time.

You can also set a delay by using the -d switch: -d 1 -s bonsai 

…will set the charging wallpaper to the “bonsai” style with a one-second delay.

If you want battery-wallpaper to start when you turn your system on, create a new desktop file with:

 nano ~/.config/autostart/bwall.desktop 

Enter the following into the file:

 [Desktop Entry]
Name=Battery Wallpaper
Comment=Set desktop background according to battery percentage, with charging animation.
Exec=/usr/bin/bwall -s leaves &

Save and exit nano with Ctrl + O, then Ctrl + X.

Make Sure Your Linux Laptop Battery Is Healthy

If you’re worried that your battery charge is dropping more rapidly than you’d expect, there could be an underlying issue, or your battery may be about to die.

Use specialized battery health monitoring tools to make sure your battery stays in tip-top condition.


Source link

Leave a Reply

%d bloggers like this: