Home

Awesome

<!-- Battery Wallpaper --> <p align="center"> <img src="https://raw.githubusercontent.com/adi1090x/battery-wallpaper/master/preview/logo.png"> </p> <p align="center"> <img src="https://img.shields.io/badge/Maintained%3F-Yes-green?style=for-the-badge"> <img src="https://img.shields.io/github/license/adi1090x/battery-wallpaper?style=for-the-badge"> <img src="https://img.shields.io/github/stars/adi1090x/battery-wallpaper?style=for-the-badge"> <img src="https://img.shields.io/github/issues/adi1090x/battery-wallpaper?color=violet&style=for-the-badge"> <img src="https://img.shields.io/github/forks/adi1090x/battery-wallpaper?color=teal&style=for-the-badge"> </p> <p align="center">A simple <code>bash</code> script to set an <b>animated battery</b> as desktop wallpaper. It shows charging animation and changes according to <b>battery percentage</b>.</p>

gif <br />

Overview

Dependencies

Install Following programs on your system before using bwall -

Install acpi, feh and xrandr -

# On Archlinux
$ sudo pacman -Sy acpi feh xorg-xrandr

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

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.

Installation

Follow the step below to install bwall on your system -

You can run test.sh to test it before installing it on your system.

$ git clone https://github.com/adi1090x/battery-wallpaper.git
$ cd battery-wallpaper
$ chmod +x install.sh
$ ./install.sh

Run the program

$ bwall

┏┓ ┏━┓╺┳╸╺┳╸┏━╸┏━┓╻ ╻   ╻ ╻┏━┓╻  ╻  ┏━┓┏━┓┏━┓┏━╸┏━┓
┣┻┓┣━┫ ┃  ┃ ┣╸ ┣┳┛┗┳┛   ┃╻┃┣━┫┃  ┃  ┣━┛┣━┫┣━┛┣╸ ┣┳┛
┗━┛╹ ╹ ╹  ╹ ┗━╸╹┗╸ ╹    ┗┻┛╹ ╹┗━╸┗━╸╹  ╹ ╹╹  ┗━╸╹┗╸

Bwall V3.0   : Set desktop wallpaper according to battery percentage.
Developed By : Aditya Shakya (@adi1090x)

Usage : bwall.sh [-h] [-d] delay [-s style]

Options:
   -h          Show this help message
   -d  num     Set charging animation delay (default 0.8s)
   -s  style   Name of the wallpaper style to apply
   
Available styles:  bar  bonsai  cartoon  charge  city  city_alt  colours  cup_black  cup_dark  egg
faded  frame  industrial  leaves  mechanical  panel  paper  pixel_city  slash  space  sweet  

Examples: 
bwall.sh -s bonsai      Set wallpaper from 'bonsai' style
bwall.sh -d 1 -s bar    Set wallpaper from 'bar' style with 1sec delay
$ bwall -s bonsai
[*] Using style : bonsai

Previews

<details><summary>Click To View</summary>

Bonsai

ChargingFull
gifgif

Bar

ChargingFull
gifgif

Cartoon

ChargingFull
gifgif

Charge

ChargingFull
gifgif

Colours

ChargingFull
gifgif

Cup Black

ChargingFull
gifgif

Cup Dark

ChargingFull
gifgif

Egg

ChargingFull
gifgif

Faded

ChargingFull
gifgif

Frame

ChargingFull
gifgif

Industrial

ChargingFull
gifgif

Leaves

ChargingFull
gifgif

Mechanical

ChargingFull
gifgif

Panel

ChargingFull
gifgif

Paper

ChargingFull
gifgif

Slash

ChargingFull
gifgif

Sweet

ChargingFull
gifgif

Space

ChargingFull
gifgif

Pixel City

ChargingFull
gifgif

City

ChargingFull
gifgif

City Alt

ChargingFull
gifgif
</details>

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. <br /> In the 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.

110   ## For XFCE
111   if [[ "$OSTYPE" == "linux"* ]]; then
112      SCREEN="0"
113      MONITOR="1"
114   fi

  1. Autostart : If you want to autostart the script with desktop, you can add it to your WM autostart file & if it 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 bwall.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;

Quick FYI