minad / org-modern

:unicorn: Modern Org Style
GNU General Public License v3.0
1.56k stars 48 forks source link

Transparency in Fringes for Blocks #177

Closed adimit closed 9 months ago

adimit commented 9 months ago

Given the following minimal config:

(package-initialize)
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(load-theme 'modus-vivendi)
(add-to-list 'default-frame-alist '(alpha-background . 10))
(use-package org-modern
  :ensure t
  :config
  (global-org-modern-mode))

and a recent Emacs compiled for transparency (That'd be Emacs 29—on Wayland, you'll need PGTK enabled), org blocks have a fringe with a solid background:

screenshot_2024-02-28T22:27+01:00

Note how the rest of the fringe does have a slightly different background, but it's still transparent.

Transparent fringes are possible, though I'm not sure if that works with custom bitmaps. Here's an example of an edebug session with a transparent breakpoint indicator:

screenshot_2024-02-28T22:32+01:00

I tried solving the issue on my own, but I'm stuck. I tried defining a different face for the fringe than org-block-begin-line, but even when I left out the :background completely, it still showed.

The only workaround I found is to redefine the custom fringe-bitmaps to have width 1. Then only the actual line is shown and the rest of the fringe remains transparent. Of course, we miss out on the pretty corners.

Thanks for org-modern, I really love it :)