A bash script intended to be run from a conky config to create a blurred conky background image based on the underlying desktop wallpaper.
The script is currently limited to the following desktop environments.
-
Cinnamon & MATE
-
Developed and tested on Cinnamon 5.2.7 - Linux Mint 20.3 with conky version 1.10.8
-
Further development and testing with Cinnamon 5.2.7 on Manjaro with conky version 1.12.2
-
Tested on MATE 1.26 - Linux Mint 20.3
It is intended to add support for additional Desktop Environments in future.
The script is shipped with a basic conky config for demonstration purposes. It can also be used with any conky config that has the following characteristics.
The conky.config section must include :
own_window = true,
own_window_type = 'desktop',
orown_window_type = 'dock',
own_window_title = '<unique-name>',
this should be an unique name for every conky config if you use more than one. Do not use spaces.own_window_class = 'Conkyblurred',
own_window_transparent = true,
own_window_argb_visual = false,
To ensure the conky blurred background updates in a timely manner following a wallpaper change a short update_interval
is also recommended
The text section of the conky must include:
In the first line :
${image ~/.conky/conky_blurred_background/<unique-name>.png -n -p -1,-1}
(<unique-name>
is the same name you use for own_window_title
above)
Anywhere in the body of the conky text:
${exec conky-blur-background.sh}
conky-blur-background.sh
can also be executed from your conky with optional arguments. These are
-
-blurradius=
(Integer between 0 and 10) -
-blursigma=
(Integer between 0 and 40) -
-brightness=
(Integer between -100 and +100. The - or + sign must be included) -
-contrast=
(Integer between -100 and +100. The - or + sign must be included) -
-curviness=
(Integer between 0 and 40. Sets the roundness of the conky background corners) -
-help
(This argument is only valid if the script is executed from a terminal)
For more information about the image characteristic arguments see see https://imagemagick.org/script/command-line-options.php#blur and https://imagemagick.org/script/command-line-options.php#brightness-contrast
Example of a command within the conky text using arguments:
${exec conky-blur-background.sh -blurradius=0 -blursigma=8 -brightness=-15 -contrast=+0 -curviness=30}
The script requires the packages conky-all, wmctrl, imagemagick & dconf-cli to be installed.
The commands xrandr and xwininfo must also be available on the system. The packages that provide these commands varies by distro.
Create directories for install if they don't already exist.
mkdir -p ~/.local/bin
If ~/.local/bin/ didn't exist prior to this installation a log off and back on will be required to ensure the system adds this directory to your $PATH
before you use the script from a conky config.
Download the current release
wget https://github.com/smurphos/conky-blur-background/raw/main/releases/current/conky-blur-background.zip
Extract files from the zip
unzip -o conky-blur-background.zip
Copy the script to ~/.local/bin
cp -r ./conky-blur-background/script/conky-blur-background.sh ~/.local/bin/
If you want to test with the sample conky config that is included:
Create directories for install if they don't already exist.
mkdir -p ~/.conky
mkdir -p ~/.config/autostart
Copy the conky files to ~/.conky
cp -r ./conky-blur-background/conky-blur-sample/ ~/.conky/
Copy the desktop file to ~/.config/autostart
cp -r ./conky-blur-background/autostart/conky-blur-sample.desktop ~/.config/autostart/
Log off and back in
If you need to raise a issue reporting a problem with the script please attach the following information in your bug report.
- A screenshot!
- Output of terminal command
cat ~/.xsession-errors
run during the session the bug occurred. - Output of terminal command
ls -a ~/.conky/conky_blurred_background
run during the session the bug occurred. - If using your own conky config a copy of that config.