Sitelet https://web.archive.org/web/20201025194308/https://github.com/adi1090x/battery-wallpaper
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.

README.md

battery-wallpaper

undefined

Buy Me A Coffee Support me on ko-fi

Simple bash script to set an animated battery as desktop wallpaper. It's shows charging animation and changes according to battery percentage.

gif

How to install

Follow the steps below (You can run test.sh to test it before installing it on your system) -

  • Install acpi, xrandr(for xfce), feh or wallpaper
# On Archlinux
sudo pacman -Sy acpi xorg-xrandr feh

# On Ubuntu or Debian
sudo apt-get install acpi x11-xserver-utils feh

# On MacOS
brew install wallpaper
  • For swaywm support users must install oguri. The oguri daemon must be started for the script to work. Oguri can be installed on Arch linux via AUR.

  • Clone this repository and...

cd $HOME
git clone https://github.com/adi1090x/battery-wallpaper.git
cd battery-wallpaper
chmod +x install.sh
./install.sh
  • Run the program and choose an option
$ bwall

Battery Wallpaper V2.0
Set desktop background according to battery percentage, with charging animation.
Developed By - Aditya Shakya (@adi1090x)

usage: bwall [-s] style [-d] delay [-h]

-s  style     name of icon/bg style.
-d  delay     set charging animation delay (default 0.8s).
-h  help      show this usage/help message.

Styles Dir: /usr/share/battery-wallpaper/images

Available styles:  bonsai  cartoon  city  city_alt  colours  cup_black  cup_dark  egg
faded  industrial  mechanical  paper  pixel_city  slash  space  

Features

  • 21 different types of battery wallpapers/icons.
  • Shows battery charging animation.
  • Stop animation when battery is fully charged.
  • When not charging, icon changes according to battery percentage.
  • Support dual or more batteries.
  • User can add their own icons/styles/wallpapers.
  • Tested on - WM: Openbox, i3wm, bspwm, awesomewm, Fluxbox, Fvwm, Swaywm & DE: KDE(neon), Pantheon, Gnome(ubuntu, pop_os), Deepin, Cinnamon, XFCE, LXDE, MATE.

Previews

Click To View

Bonsai

Charging Full
gif gif

Bar

Charging Full
gif gif

Cartoon

Charging Full
gif gif

Charge

Charging Full
gif gif

Colours

Charging Full
gif gif

Cup Black

Charging Full
gif gif

Cup Dark

Charging Full
gif gif

Egg

Charging Full
gif gif

Faded

Charging Full
gif gif

Frame

Charging Full
gif gif

Industrial

Charging Full
gif gif

Leaves

Charging Full
gif gif

Mechanical

Charging Full
gif gif

Panel

Charging Full
gif gif

Paper

Charging Full
gif gif

Slash

Charging Full
gif gif

Sweet

Charging Full
gif gif

Space

Charging Full
gif gif

Pixel City

Charging Full
gif gif

City

Charging Full
gif gif

City Alt

Charging Full
gif gif

Common Issues

  1. Wallpaper not changing : If your wallpaper is not changing, then open an issue and show me the output of echo $DESKTOP_SESSION.

  2. Not working on XFCE : If this script is not working on xfce, then open the terminal and run xfconf-query -c xfce4-desktop -m and change the wallpaper (any) via xfce4-settings-manager.
    In terminal, xfconf-query will print lines starting with set:, which show which properties have been changed, check screen & monitor values and modify the script accordingly.

73   ## For XFCE
74   if [[ "$OSTYPE" == "linux"* ]]; then
75   	 SCREEN="0"
76       MONITOR="1"
77   fi
  1. Autostart : If you want to autostart the script with desktop, you can add it to your WM autostart file & if doesn't work for you, you can create a desktop file in $HOME/.config/autostart dir.
$ cd $HOME/.config/autostart && touch bwall.desktop

# Add this to dwall.desktop file

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

Support This Project

undefined undefined undefined

FYI

  • If you can improve it, you're welcome.
  • You can add bwall -s style & to your wm autostart file to set it as wallpaper after login.
  • Have Fun!
You can’t perform that action at this time.