joostkremers / writeroom-mode

Writeroom-mode: distraction-free writing for Emacs.
BSD 3-Clause "New" or "Revised" License
607 stars 28 forks source link

New global property alpha-background #78

Open omidmnz opened 1 year ago

omidmnz commented 1 year ago

Emacs 29 has introduced alpha-background frame parameter, which I am currently using for transparency. As a result, writeroom-mode no longer toggles transparency for me. I have added the following lines to my configuration to restore the previous toggle behavior

(define-writeroom-global-effect alpha-background 100)
(add-to-list 'writeroom-global-effects 'writeroom-set-alpha-background)

I don't know if it is backwards compatible to add these to the mainwriteroom-modesource, but I think this is the correct behavior in the newer Emacs versions.

joostkremers commented 1 year ago

I think it should be safe to add this, because Emacs should ignore frame parameters that it doesn't know about. I'll have to test it, though.

Thanks for the suggestion.