roman / golden-ratio.el

Automatic resizing of Emacs windows to the golden ratio
MIT License
589 stars 38 forks source link

Only activate `golden-ratio-mode` when number of windows > 2 #79

Closed kir0ul closed 4 years ago

kir0ul commented 6 years ago

Hi, Usually, when I have only two windows open, I would like to have them at the same size. Is there a way to only activate golden-ratio-mode when the number of windows is strictly superior to two, and deactivate it otherwise? Thanks anyway for this great package :)

wictory commented 4 years ago

You can create functions which inhibits golden-ratio-mode based on their return value. The config snippet you're looking for is the following:

(add-to-list 'golden-ratio-inhibit-functions
             (lambda () (<= (length (window-list)) 2)))
kir0ul commented 4 years ago

Thanks 👍