You are not logged in.
a. Picky clicky color and set that as wallpaper.
https://raw.githubusercontent.com/bront … in/wallcol
Needs: gpick, imagemagick convert, nitrogen
b. Clicky twice to get gradient
https://raw.githubusercontent.com/bront … olGradient
Note: I'am assuming RGB colorspace is not the best for gradients, (read on HCL), but analogous colors works fine.
edit1: clean up.
edit2: will now automagically overlay ~/.noise.png, if there is one
c. Clicky 4 times to get gradient (a bit on the slow side)
https://raw.githubusercontent.com/bront … 2DGradient
~/.noise.png i'am using.
Last edited by brontosaurusrex (2022-02-02 15:53:12)
Offline
Offline
a. Picky clicky color and set that as wallpaper.
https://raw.githubusercontent.com/bront … in/wallcol
Needs: gpick, imagemagick convert, nitrogenb. Clicky twice to get gradient
https://raw.githubusercontent.com/bront … olGradient
https://i.imgur.com/xS6QyEZb.pngedit: clean up.
This is great! thanks!
naik --greetz
"Kaum macht [Mensch]* es richtig, funktioniert es sofort!"
BL-Kitchen Codeberg
Offline
^As usual, 3 minutes to script the thing and 2 hours to find imagemagick's cli (thats gives close to desired results).
Offline
Nice work bronto. Very nice indeed.
I have yet to try it, other things on the go.
Can you post the last one - clean - for download, That really caught my eye.
Thanks
The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster
Offline
@Sector: There are 3 scripts and one noise.png, latest versions always 5 posts up ^.
Last edited by brontosaurusrex (2022-02-02 15:40:27)
Offline
Got em TY
The sun will never set if you keep walking towards it. - my son
Being positive doesn't understand physics.
_______________________________
Debian 10 Buster
Offline
Since this friendly user has so far failed to return here and present the further development of @bronto's script/idea to the users in bunsenlabs as well, I want to do so
wallcolor-Script
#!/bin/bash
#
# wallcolor
# pick color and set that as wallpaper
# original 'wallcol' scripts by brontosaurusrex / mod by ceeslans feb'22
#
# requires: gpick, imagemagick convert, nitrogen or feh
#
### usage :
# < path-to-wallcolor -f > # ( <-- single color )
# < path-to-wallcolor -g2 > # ( <-- two-color gradient )
# < path-to-wallcolor -g4 > # ( <-- four-color gradient )
#======================#
#### START SCRIPT ####
###---------------------
source $HOME/.config/wallcolor.conf
# prepare working folder for wallcolor
mkdir -p "$walldir" || echo "$walldir not found, warning..."
if [[ $1 = "-f" ]]; then
one="$(gpick -p -s -o)"
doit () {
echo "$one"
# set 1-color
convert -size $res xc:"$one" ${walldir}/bg-1color.$ext
# optionally add noise to the gradient (make sure that ".noise.png" is present in ${walldir}/
if [[ $noise = "true" ]];then
if [[ -f ${walldir}/.noise.png ]]; then
composite -alpha off -compose overlay ${walldir}/.noise.png ${walldir}/bg-1color.$ext /tmp/tmpout.$ext
mv /tmp/tmpout.$ext ${walldir}/bg-1color.$ext
fi
fi
# set wallpaper
if [[ $appl = "nitrogen" ]];then
nitrogen --save --set-zoom-fill ${walldir}/bg-1color.$ext
elif [[ $appl = "feh" ]];then
feh --bg-fill ${walldir}/bg-1color.$ext
fi
}
[[ "$one" ]] && doit
elif [[ $1 = "-g2" ]]; then
one="$(gpick -p -s -o)"
two="$(gpick -p -s -o)"
doit () {
echo "$one > $two @ $res"
# make 2-gradient
convert -size "$res" gradient:"$one-$two" -channel RGB -separate -dither FloydSteinberg -colors 256 -combine -depth 8 ${walldir}/bg-2gradient.$ext || exit
# optionally add noise to the gradient (make sure that ".noise.png" is present in ${walldir}/
if [[ $noise = "true" ]];then
if [[ -f ${walldir}/.noise.png ]]; then
composite -alpha off -compose overlay ${walldir}/.noise.png ${walldir}/bg-2gradient.$ext /tmp/tmpout.$ext
mv /tmp/tmpout.$ext ${walldir}/bg-2gradient.$ext
fi
fi
# set wallpaper
if [[ $appl = "nitrogen" ]];then
nitrogen --save --set-centered ${walldir}/bg-2gradient.$ext
elif [[ $appl = "feh" ]];then
feh --bg-fill ${walldir}/bg-2gradient.$ext
fi
}
[[ "$one" && "$two" && "$res" ]] && doit
elif [[ $1 = "-g4" ]]; then
one="$(gpick -p -s -o)"
two="$(gpick -p -s -o)"
three="$(gpick -p -s -o)"
four="$(gpick -p -s -o)"
doit () {
echo "$one > $two > $three > $four @ $res"
# make 4-gradient
convert \( xc:"$one" xc:"$two" +append \) \
\( xc:"$three" xc:"$four" +append \) -append \
-size "$res" xc: +swap -fx 'v.p{i/(w-1),j/(h-1)}' \
-channel RGB -separate -dither FloydSteinberg -colors 256 -combine -depth 8 ${walldir}/bg-4gradient.$ext || exit
# optionally add noise to the gradient (make sure that ".noise.png" is present in ${walldir}/
if [[ $noise = "true" ]];then
if [[ -f ${walldir}/.noise.png ]]; then
composite -alpha off -compose overlay ${walldir}/.noise.png ${walldir}/bg-4gradient.$ext /tmp/tmpout.$ext
mv /tmp/tmpout.$ext ${walldir}/bg-4gradient.$ext
fi
fi
# set wallpaper
if [[ $appl = "nitrogen" ]];then
nitrogen --save --set-centered ${walldir}/bg-4gradient.$ext
elif [[ $appl = "feh" ]];then
feh --bg-fill ${walldir}/bg-4gradient.$ext
fi
}
[[ "$one" && "$two" && "$three" && "$four" && "$res" ]] && doit
else
echo "Failed to execute command, as NO option [-f or -g2 or -g4] was set..."
exit
fi
wallcolor.conf -file
####################################
# configuration for 'wallcolor' #
####################################
### set wallcolor working directory:
walldir="$HOME/wallcolor"
#walldir="$HOME/Pictures/wallcolor"
### set desired resolution:
res="$(xdpyinfo | awk '/dimensions/{print $2}')"
#res="1920x1200"
#res="1600x900"
#res="1280x800"
### set file type [png] or [jpg]:
ext="png"
#ext="jpg"
### add noise to generated wall
### (make sure that ".noise.png" is in 'walldir' directory)
noise="true"
#noise="false"
### select your wallpaper application; --> [feh] or [nitrogen]:
#appl="nitrogen"
appl="feh"
The script is here in [beryllium] under /bin and the .conf - file I have under ~/.config
Works fine.
Offline
b2. One more, ver b. extended to be a 4 clicker, twice for colors, twice for points to define gradient angle
https://raw.githubusercontent.com/bront … dientAngle
Needs: xdotool, gpick, imagemagick convert, nitrogen, bc
Last edited by brontosaurusrex (2022-03-01 10:56:18)
Offline
b2. One more, ver b. extended to be a 4 clicker, twice for colors, twice for points to define gradient angle
https://raw.githubusercontent.com/bront … dientAngle
Needs: xdotool, gpick, imagemagick convert, nitrogen, bc
https://i.imgur.com/uAQqmMOb.png
Nicely done:)
Really enjoying these.
Offline
@bronto this wallpaper script has evolved way beyond a quick hint, so maybe could be split off into its own thread?
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )
Online
^Sure.
Offline
Done - please edit the topic title to taste
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )
Online
This script is cool...going to play with it to make some nice dark backgrounds that use gradients. This should be perhaps packaged in say with bl utilities.
Real Men Use Linux
Offline