reddit / emacs

How to configure the mini-buffer to show at top of screen

krikaya · 2022-07-19 09:29
Hi there, I've seen emacs screenshots with the mini-buffer at the top of screen (see the screenshot below), which is awesome to me. But I cannot find any one sharing their config about this (I'm new to emacs-lisp). Can anybody give me some hint? https://preview.redd.it/muak98ymuhc91.png?width=2248&format=png&auto=webp&s=262a5aa27b408e2a1da01f8007693a0fbf3b6078
krikaya · 2022-07-19 09:29
Maybe not the whole mini-buffer, perhaps M-x only?
whudwl · 2022-07-19 09:44
try https://github.com/muffinmad/emacs-mini-frame
unixbhaskar · 2022-07-19 10:13
It is posframe ..check that out.
helm05 · 2022-07-19 11:59
This is helm-M-x displayed in frame, the minibuffer is displayed on top or bottom depending on the cursor position in current-buffer. To have this enabled use: (add-to-list 'helm-commands-using-frame #'helm-M-x)
helm05 · 2022-07-19 12:01
No, it is not posframe, Helm use normal frames.
00-11 · 2022-07-19 14:46
From your screenshot, I guess you're not really asking about having/keeping the minibuffer "at the top of the screen". Others are answering how to get the effect your screenshot shows. But if someone is really interested in having the minibuffer at the top of the screen (or in any other position), [this](https://www.emacswiki.org/emacs/Dedicated_Minibuffer_Frame) might help. Option `1on1-minibuffer-frame-top/bottom`: > Position of top (or bottom) of minibuffer frame, in pixels. > > If `nil`, function `1on1-set-minibuffer-frame-top/bottom` positions the minibuffer at the bottom of the display. > > An integer. If negative, then the position is that of the frame bottom relative to the screen bottom. If that option is `nil` you can alternatively use (non-option) variable `1on1-minibuffer-frame-bottom-offset` to position the minibuffer frame relative to the bottom of the screen: > Offset for bottom of minibuffer frame, from monitor bottom. > > The value is negative, and measured in pixels.
Think-Description222 · 2022-07-19 15:24
i had that as a helm frame, then using my window manager to put it in a floating mode in such position. but the problem with this UI is let's say when you searching the buffer, then the frame gets in the way of seeing the search results in the buffer
Hamilton950B · 2022-07-19 15:57
It's unclear what you're asking for. You said you want the minibuf at the "top of the screen" but your screenshot shows a detached minibuf. Someone else suggested 1on1 and that might be the easiest way. To get a detached minibuf you can use something like this (setq minibuffer-frame-alist '((minibuffer . only))) To adjust its size and position, add top, left, width, and height to the alist. To remove the minibuf from the rest of the frames, add '(minibuffer . nil) to 'default-frame-alist.
mauguro_ · 2022-07-19 16:13
if I use Ivy should it be different?
helm05 · 2022-07-19 17:39
Yes, but I can't help you for Ivy, I don't know how it works for it.
helm05 · 2022-07-19 17:47
Here how to have the minibuffer always on top with Helm (with or without frame display): (setq helm-echo-input-in-header-line t) ;; Facultative: (add-hook 'helm-minibuffer-set-up-hook #'helm-hide-minibuffer-maybe)
Bonsai-Haiku · 2022-07-19 18:00
But why? Does your eyes have difficulty looking down on the screen often?
helm05 · 2022-07-20 18:20
You can use your window manager command for this, I use here mosaic commands of xfce WM.