You are not logged in.

#1 2022-02-01 15:21:01

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,464
Website

wallcolor: Picky clicky color and set that as wallpaper

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
xS6QyEZb.png

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
tqgHJTSb.png

c. Clicky 4 times to get gradient (a bit on the slow side)
https://raw.githubusercontent.com/bront … 2DGradient
Mcu1GULb.png


~/.noise.png i'am using.

Last edited by brontosaurusrex (2022-02-02 15:53:12)

Offline

#2 2022-02-01 18:55:59

sleekmason
zoom
Registered: 2018-05-22
Posts: 871
Website

Re: wallcolor: Picky clicky color and set that as wallpaper

^ Oh this is gold! @brontosaurusrex

Grabbed both of them!  For those that use feh, you can replace:

nitrogen --save --set-zoom-fill

with:

feh --bg-scale

Just, really really neat:)

Offline

#3 2022-02-02 09:18:34

Naik
Member
From: the edge of insanity
Registered: 2015-10-03
Posts: 323

Re: wallcolor: Picky clicky color and set that as wallpaper

brontosaurusrex wrote:

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
https://i.imgur.com/xS6QyEZb.png

edit: clean up.

This is great! thanks!

naik --greetz


"Kaum macht [Mensch]* es richtig, funktioniert es sofort!"
BL-Kitchen Codeberg

Offline

#4 2022-02-02 09:19:27

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,464
Website

Re: wallcolor: Picky clicky color and set that as wallpaper

^As usual, 3 minutes to script the thing and 2 hours to find imagemagick's cli (thats gives close to desired results).

Offline

#5 2022-02-02 14:36:27

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,942

Re: wallcolor: Picky clicky color and set that as wallpaper

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

#6 2022-02-02 14:58:30

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,464
Website

Re: wallcolor: Picky clicky color and set that as wallpaper

@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

#7 2022-02-02 19:31:43

Sector11
Conky 1.9er Mod Squid
From: Upstairs
Registered: 2015-08-20
Posts: 6,942

Re: wallcolor: Picky clicky color and set that as wallpaper

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

#8 2022-02-27 14:32:08

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 1,762

Re: wallcolor: Picky clicky color and set that as wallpaper

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   glasses

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

#9 2022-02-27 16:37:42

sleekmason
zoom
Registered: 2018-05-22
Posts: 871
Website

Re: wallcolor: Picky clicky color and set that as wallpaper

^ This is awesome!  I made a couple of scripts that would work on my box, but nothing this neat:)

Offline

#10 2022-02-28 15:29:13

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,464
Website

Re: wallcolor: Picky clicky color and set that as wallpaper

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
uAQqmMOb.pngBPRPXvSb.png

Last edited by brontosaurusrex (2022-03-01 10:56:18)

Offline

#11 2022-03-01 00:53:18

sleekmason
zoom
Registered: 2018-05-22
Posts: 871
Website

Re: wallcolor: Picky clicky color and set that as wallpaper

brontosaurusrex wrote:

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

#12 2022-03-02 04:54:58

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 8,959
Website

Re: wallcolor: Picky clicky color and set that as wallpaper

@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 )

Introduction to the Bunsenlabs Lithium Desktop

Online

#13 2022-03-02 08:48:22

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,464
Website

Re: wallcolor: Picky clicky color and set that as wallpaper

^Sure.

Offline

#14 2022-03-03 11:08:56

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 8,959
Website

Re: wallcolor: Picky clicky color and set that as wallpaper

Done - please edit the topic title to taste smile


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Online

#15 2022-03-03 15:06:15

DeepDayze
Like sands through an hourglass...
From: In Linux Land
Registered: 2017-05-28
Posts: 1,543

Re: wallcolor: Picky clicky color and set that as wallpaper

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

Board footer

Powered by FluxBB