Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Change ivy height to function of Emacs frame height #1722
Hi, thanks for your great work on this Emacs package.
I would like to set ivy-height to some variable that depends on my monitor situation. Since I use monitors in portrait configuration when my laptop is docked, I like to have ivy-height set to about 30 or 40. When I'm plugged into a landscape monitor or undocked, 30 is too much, I have been manually lowering ivy-height to about 15.
Any tips on how to set ivy-height to about 1/3 of Emacs frame height so that I don't have to manually fiddle with this variable?
Thanks, this config should work now:
(add-to-list 'ivy-height-alist (cons 'counsel-find-file (lambda (_caller) (/ (frame-height) 2))))
If you want it for all callers, use
(setq ivy-height-alist '((t lambda (_caller) (/ (frame-height) 2))))
Let me know if it works as expected.