Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request : Hydra window under selected window option #319

Open
aagon opened this issue Mar 29, 2019 · 1 comment
Open

Feature Request : Hydra window under selected window option #319

aagon opened this issue Mar 29, 2019 · 1 comment

Comments

@aagon
Copy link

aagon commented Mar 29, 2019

First of all, thank you for this fantastic package.

As you know, when you call an hydra, its own window is called by the function lv-window (Assuming that the variable hydra-hint-display-type is set to lv, and leaving aside other options). This function splits the frame root window of the selected window below, and displays the hydra in this newly created window :

(split-window
                     (frame-root-window) -1 'below)

Which forces the user to have a very large hydra window at the bottom, even when one of its "halves" are free.

2019-03-29-212448_1912x1054_scrot

It would be nice to have the hydra window below the window it was called from, and not the frame root window, thus leaving the space below other windows free.

Doing so merely requires to change the snippet above to the following:

(split-window
                     (selected-window) -1 'below)

2019-03-29-212621_1918x1056_scrot

Now, I am aware that the former behaviour was probably explicitly chosen, and for very good reasons :

  • With the changes I put, there is funny behaviour when windows are already stacked on top of another. If you call an hydra from one of them that is not the bottommost, the hydra window "eats" at the one below it. Leaving the hydra does not revert this. (FYI, not specific to hydra, transient has the same problem)
  • Because the hydra window is put below the calling window, and its modeline format is reduced to nil, there is no substantial separation between the text of the hydra and the text of the buffer in the window below. (This can be somewhat alleviated by setting up a separator with (setq lv-use-separator t), like I did on the image, but it is still insufficient)

2019-03-29-213042_1912x1054_scrot

Whereas it is perfectly understandable to have the former behaviour as a default, it would be nice to have the option to have the latter, like transient and magit-pop-buffer have.

If you're fine with the presence of this option, I could work on a PR right away. Just adding the option and leaving the funny behaviours as is would be almost as trivial as the snippet change I made. It would also be below the 15 lines mark.

However, getting rid of these two quirks would take me more time, and I would probably need to fill the form you mentioned in PR #136. Tell me what you prefer, and I'll set myself to it.

Thanks in advance for your time !

@abo-abo
Copy link
Owner

abo-abo commented Apr 3, 2019

If you're fine with the presence of this option, I could work on a PR right away. Just adding the option and leaving the funny behaviours as is would be almost as trivial as the snippet change I made. It would also be below the 15 lines mark.

Please PR with this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants