Hi all I've started coding on a 30 inch monitor and am wondering if it's possible to move the minibuffer to the top of the screen in emacs? google searches aren't showing up anything.
Cheers Nimai Etheridge
Hi all I've started coding on a 30 inch monitor and am wondering if it's possible to move the minibuffer to the top of the screen in emacs? google searches aren't showing up anything.
Cheers Nimai Etheridge
I'm pretty sure you can't move the minibuffer itself, but you can sort-of-ish make the mode line be on top:
(setq-default header-line-format mode-line-format) ; Copy mode-line
(setq-default mode-line-format nil) ; Remove mode-line
This will override things like Info that use the header line, but it's probably as close as you'll get without hacking C source.
Have a look at the documentation for the default-minibuffer-frame
and initial-frame-alist
vars. It sounds like you may be able to have a separate frame for your minibuffer (which you could position at the top of the screen), and then generate minibufferless frames which utilise it.
Note that in initial-frame-alist
it states that "If the value calls for a frame without a minibuffer, and you have not created a minibuffer frame on your own, a minibuffer frame is created according to minibuffer-frame-alist
", which sounds like exactly what would be needed.
There are ways of saving and restoring frame configurations, so if this worked you could probably recreate the layout automatically when emacs starts.
Edit:
Very basic example/proof-of-concept below for using this frame arrangement. The minibuffer frame can't be deleted until the frames utilising it have been deleted. You'll run into trouble when you do things like maximising the editor frame, of course, so there would certainly be some work to do to try to make this system work in a more seamless fashion.
(setq default-minibuffer-frame
(make-frame
'((name . "minibuffer")
(width . 80)
(height . 1)
(minibuffer . only)
(top . 0)
(left . 0)
)))
(setq new-frame
(make-frame
'((name . "editor")
(width . 80)
(height . 30)
(minibuffer . nil)
(top . 50)
(left . 0)
)))
Naturally, you can also combine this with scottfrazer's method of moving the modeline to the top.
This could possibly be handled in the window-setup-hook
?
You should also look at the built-in frame.el and dframe.el libraries. Functions like dframe-reposition-frame
may provide a convenient way of keeping the minibuffer frame 'attached' to the top of the active editing frame.
The variable minibuffer-auto-raise
can also be configured to raise the minibuffer frame whenever the minibuffer is activated, which may mitigate the need to have it visible the rest of the time.