A bash script to generate and apply different types of gradient & blured wallpapers.
- Generate a
solid colorwallpaper - Generate a
random bluredwallpaper - Generate linear, radial, bilinear(4 colored) & twisted
gradientwallpapers - Generate random, twisted or colored
plasmawallpapers - Allows you to pick colors or fetch colors from
.Xresourcesfile for wallpaper generation
imagemagickfehxcolorxrandr(only if you use it on xfce)
- Clone this repository...
cd $HOME git clone https://github.com/adi1090x/canvas.git cd canvas chmod +x canvas # you can copy this script in bin dir for easy use sudo cp canvas /usr/local/bin- Run the program and choose an option
$ ./canvas -h βββΈββββββ»β» β»ββββββ β β£ββ«βββ«ββββ£ββ«βββ βββΈβΉ βΉβΉ βΉββ βΉ βΉβββ Canvas V3.0 : The Wallpaper Generator. Developed By : Aditya Shakya (@adi1090x) Usage : canvas [-h] [-S wxh] [-B] [-s] [-l] [-r] [-t] [-b] [-p] [-n] [-a] [-R] Options: -h --help Show this help message & exit -S --size Size of the wallpaper (default is 1366x768) -B --blurred Generate a random blurred wallpaper -s --solid Generate a solid color wallpaper -l --linear Generate a linear gradient wallpaper -r --radial Generate a radial gradient wallpaper -t --twisted Generate a twisted gradient wallpaper -b --bilinear Generate a bilinear(4point) gradient wallpaper -p --plasma Generate a plasma wallpaper -n --no-preview Do not show preview when image is generated -a --autobg Automatically set as wallpaper (implies -n) -R --randomize Generate a random wallpaper Though you can pick colors, Here's a list of all supported color names.
1. Generate random blured wallpaper...
$ canvas -B Enter the blur strength (maximum 30): 12 Set as desktop background? (y/n): y | Blured 1 | Blured 2 |
|---|---|
![]() | ![]() |
2. Generate a solid color wallpaper...
$ canvas -s Pick Colors or Enter Colors or fetch from .Xresources file? (p/e/x): p Pick a color... Generating wallpaper with color: #BA68C8 Set as desktop background? (y/n): y $ canvas -s Pick Colors or Enter Colors or fetch from .Xresources file? (p/e/x): e Enter the color name or hex (eg: teal, #EBCB8B): #A3BE8C Set as desktop background? (y/n): y $ canvas -s Pick Colors or Enter Colors or fetch from .Xresources file? (p/e/x): x ββββββ ββββββ ββββββ ββββββ ββββββ ββββββ ββ01ββ ββ02ββ ββ03ββ ββ04ββ ββ05ββ ββ06ββ ββββββ ββββββ ββββββ ββββββ ββββββ ββββββ ββββββ ββββββ ββββββ ββββββ ββββββ ββββββ ββ07ββ ββ08ββ ββ09ββ ββ10ββ ββ11ββ ββ12ββ ββββββ ββββββ ββββββ ββββββ ββββββ ββββββ Enter the color number (without zero): 1 Generating wallpaper with color: #BF616A Set as desktop background? (y/n): y | Solid - #BA68C8 | Solid - #A3BE8C |
|---|---|
![]() | ![]() |
3. Generate a linear gradient wallpaper...
$ canvas -l Pick Colors or Enter Colors or fetch from .Xresources file? (p/e/x): p Pick first color... Pick second color... Generating wallpaper with colors: #FB8784, #70D675 Enter the rotation angle (default is 0): 60 Set as desktop background? (y/n): y $ canvas -l Pick Colors or Enter Colors or fetch from .Xresources file? (p/e/x): e Enter the colors name or hex (format: color1-color2): orange-purple Enter the rotation angle (default is 0): 90 Set as desktop background? (y/n): y | Linear Gradient 1 | Linear Gradient 2 |
|---|---|
![]() | ![]() |
4. Generate a radial gradient wallpaper...
$ canvas -r Pick Colors or Enter Colors or fetch from .Xresources file? (p/e/x): p Pick first color... Pick second color... Generating wallpaper with colors: #DA0B86, #200D74 Shape? [ 1.diagonal | 2.ellipse | 3.maximum | 4.minimum ] (1/2/3/4): 3 Enter the rotation angle (default is 0): 0 Set as desktop background? (y/n): y $ canvas -r Pick Colors or Enter Colors or fetch from .Xresources file? (p/e/x): e Enter the colors name or hex (format: color1-color2): red-black Shape? [ 1.diagonal | 2.ellipse | 3.maximum | 4.minimum ] (1/2/3/4): 2 Enter the rotation angle (default is 0): 20 Set as desktop background? (y/n): y | Radial Gradient Max | Radial Gradient Ellipse |
|---|---|
![]() | ![]() |
5. Generate a twisted gradient wallpaper...
$ canvas -t Pick Colors or Enter Colors or fetch from .Xresources file? (p/e/x): p Pick first color... Pick second color... Generating wallpaper with colors: #EC7875, #61C766 Enter the twisting amount (maximum 500): 200 Set as desktop background? (y/n): y $ canvas -t Pick Colors or Enter Colors or fetch from .Xresources file? (p/e/x): e Enter the colors name or hex (format: color1-color2): blue-pink Enter the twisting amount (maximum 500): 180 Set as desktop background? (y/n): y | Twisted Gradient 1 | Twisted Gradient 2 |
|---|---|
![]() | ![]() |
6. Generate a bilinear gradient wallpaper...
$ canvas -b Pick Colors or Enter Colors or fetch from .Xresources file? (p/e/x): p Pick first color... Pick second color... Pick third color... Pick fourth color... Generating wallpaper with colors: #FB8784, #70D675, #FFE744 & #51B4FF Smooth or Regular? (s/r): r Set as desktop background? (y/n): y $ canvas -b Pick Colors or Enter Colors or fetch from .Xresources file? (p/e/x): e Enter first color (eg: red, #EC7875): teal Enter second color (eg: green, #61C766): pink Enter third color (eg: yellow, #FDD835): purple Enter fourth color (eg: blue, #42A5F5): khaki Smooth or Regular? (s/r): s Please wait... Set as desktop background? (y/n): y | Bilinear 1 | Bilinear 2 |
|---|---|
![]() | ![]() |
7. Generate a plasma wallpaper...
$ canvas -p Random, Twisted or Custom colors? (r/t/c): r Set as desktop background? (y/n): n $ canvas -p Random, Twisted or Custom colors? (r/t/c): t Set as desktop background? (y/n): n | Plasma Normal | Plasma Twisted |
|---|---|
![]() | ![]() |
-
Wallpaper not changing : If your wallpaper is not changing, then open an issue and show me the output of
echo $DESKTOP_SESSION. -
Not working on XFCE : If this script is not working on xfce, then open the terminal and run
xfconf-query -c xfce4-desktop -mand change the wallpaper (any) via xfce4-settings-manager.
In terminal, xfconf-query will print lines starting withset:, which show which properties have been changed, checkscreen&monitorvalues and modify the script accordingly.
105 ## For XFCE 106 if [[ "$OSTYPE" == "linux"* ]]; then 107 SCREEN="0" 108 MONITOR="1" 109 fi - In KDE, it changes the wallpaper in all the Activities.
- If you can improve it, you're welcome.
- Have Fun!














