terminator icon indicating copy to clipboard operation
terminator copied to clipboard

How to add a transparent blur to the background

Open arshbot opened this issue 4 years ago • 8 comments

Transparency blurs are really cool, how can I get my terminator client to add a variable blur so I can't quite make out the background?

arshbot avatar Jun 03 '20 23:06 arshbot

The closest thing I can think of is in the preferences window there's an option to shade the transparent background. I don't know whether GTK or VTE supports a blurring effect. If you have any ideas on how to do that I'd love to hear that.

mattrose avatar Jun 03 '20 23:06 mattrose

Transparency blurs are really cool, how can I get my terminator client to add a variable blur so I can't quite make out the background?

being more specific is good - are you requesting individual terminal blur, independent off global one? otherwise workaround would be 2 profiles with different global transparency levels and switching between them...

br0kenbuild avatar Jul 20 '20 13:07 br0kenbuild

This would really be an interesting feature, KDE Konsole implements this natively

mayconritzmann avatar Apr 08 '21 00:04 mayconritzmann

theoretically it would be just adding another blur layer to the background. PRs are welcome

mattrose avatar Apr 08 '21 12:04 mattrose

pycairo blur effect example code https://www.cairographics.org/cookbook/pythoncairopil/

mattrose avatar Dec 10 '21 00:12 mattrose

Any update to this?

CodingWithAnxiety avatar Apr 27 '23 05:04 CodingWithAnxiety

I would like to implement this but don't really know where to start:

I found draw_background() in terminal.py but this seems only to be for the background image. Debug messages also aren't printed inside this function and breakpoints don't work which makes it really hard to debug. Help is appreciated :)

haasal avatar Sep 22 '23 16:09 haasal

The background image is actually some good code to draw from. The normal background is just a GTK RGBA object, so most of the work is done for us, including transparency. The code for that is around here: https://github.com/gnome-terminator/terminator/blob/6d225c7aee3d42e37acac67629f7b321b7a4889b/terminatorlib/terminal.py#L747C1-L750C35

The background_draw() code draws the background image on top of the background RGBA object. To blur, you would add another layer similar to draw_background that would just add the blur layer on top of the image, or the transparent background.

On debugging, I assure you, debug messages work, hit me up on matrix and I'll talk you through it.

mattrose avatar Oct 02 '23 01:10 mattrose