-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwallgrad
executable file
·31 lines (23 loc) · 1.09 KB
/
wallgrad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#! /bin/sh
#-- wallgrad --#
# Generates a beautiful gradient wallpaper.
# Inspired by adi1090x's `canvas` script.
# Additionally adds a pastel flair to it,
# making it look much nicer.
# Dependencies:
# - convert (imagemagick)
# - switch-theme (my other theming script)
# ~ ADIGEN
output_file=~/Pictures/Wallpapers/DO-NOT-SELECT-THIS-gradient.jpg
wal_cached_scheme_file=~/.cache/wal/schemes/_home_${USER}_Pictures_Wallpapers_gradient_jpg_dark_None_None_1.1.0.json
#wal_cached_scheme_file=~/.cache/wal/schemes/_home_adigen_Pictures_Wallpapers_random_jpg_dark_None_1.0_1.1.0.json
# Generate a random noise map
convert -size "100x56" xc: +noise Random /tmp/noise.png
# Blur the map
convert /tmp/noise.png -virtual-pixel tile -blur 0x14 -auto-level -resize 1920x1080 /tmp/noise.png
# Make it look pastel
convert /tmp/noise.png -fill White -colorize 50 ${output_file}
rm /tmp/noise.png
# Instead of removing that file, I have a scheme there which works well universally, therefore it matches most gradient wallpapers generated here.
rm ${wal_cached_scheme_file}
switch-theme DO-NOT-SELECT-THIS-gradient '#101622'