picom icon indicating copy to clipboard operation
picom copied to clipboard

Picom makes text transparent?

Open rouron opened this issue 2 years ago • 1 comments

Platform

Ubuntu Desktop 21.04 64-bit

GPU, drivers, and screen setup

NVIDIA GeForce RTX 3070, GeForce Game Ready Driver Version 465.89 (on host)

name of display: :0 display: :0 screen: 0 direct rendering: Yes Extended renderer info (GLX_MESA_query_renderer): Vendor: Mesa/X.org (0xffffffff) Device: llvmpipe (LLVM 12.0.0, 256 bits) (0xffffffff) Version: 21.0.3 Accelerated: no Video memory: 9956MB Unified memory: no Preferred profile: core (0x1) Max core profile version: 4.5 Max compat profile version: 3.1 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 3.2 OpenGL vendor string: Mesa/X.org OpenGL renderer string: llvmpipe (LLVM 12.0.0, 256 bits) OpenGL core profile version string: 4.5 (Core Profile) Mesa 21.0.3 OpenGL core profile shading language version string: 4.50 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile

OpenGL version string: 3.1 Mesa 21.0.3 OpenGL shading language version string: 1.40 OpenGL context flags: (none)

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 21.0.3 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Environment

Oracle VM VirtualBox awesome wm

picom version

vgit-a8445

Diagnostics

Version: vgit-a8445

Extensions:

  • Shape: Yes
  • XRandR: Yes
  • Present: Present

Misc:

  • Use Overlay: No (Another compositor is already running)
  • Config file used: $HOME/.config/picom/picom.conf

Drivers (inaccurate):

Configuration:

Configuration file
active-opacity = 1;
inactive-opacity = 1;

opacity-rule = [
    "10:class_g = 'Alacritty'",
    "50:class_g = 'Emacs'",
    "100:class_g = 'Firefox'"
];

Steps of reproduction

  1. Run picom & with the above configuration file.

Expected behavior

Only the background of the application (alacritty, emacs, etc.) is made transparent, not the text.

Current Behavior

Both the background and text are made transparent.

Stack trace

Other details

rouron avatar Jan 01 '22 00:01 rouron

That's not a picom bug. The compositor can't tell what's background and what's text - it's up to the application to choose what parts of the image are opaque/transparent and express that as an alpha value for each pixel.

For Alacritty, you could use background_opacity: 0.75 on ~/.config/alacritty.yml and remove the opacity rule for picom. You would get something like this: image

For Emacs, maybe follow this guide.

Ultimately, if you want that kind of transparency, you'll have to watch out for each case and see if your application supports it.

Mark42XLII avatar Jan 08 '22 20:01 Mark42XLII