I am using S-<up>
and S-<down>
to run (enlarge-window) and (shrink-window), respectively.
I would like these keys to be sensitive to the position of the current window relative to others. If my frame is split horizontally into two windows, and the current window is the top one, then I would like S-<up>
to run (shrink-window) instead of (enlarge-window).
How do I check the position of the current window relative to the others?
See the function (window-edges)
. It returns a list of the window's coordinates. Just compare the y-axis value with the other visible windows.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With