mini-posframe mirrors the active minibuffer inside a child frame (posframe). It was built on top of posframe, with the intent of providing a consistent, session-scoped minibuffer experience in Spacemacs.
mini-posframe.mov
- Displays minibuffer input inside a posframe instead of the echo area.
- Tracks the cursor visually with a fake cursor overlay.
- Automatically hides the real minibuffer for a distraction-free look.
- Session-scoped: posframe appears only during minibuffer usage and is cleaned up afterwards.
- Includes optional compatibility fixes for
helm-posframeto keep behavior consistent.
All user options can be customized via:
M-x customize-group RET mini-posframe RET
(defcustom mini-posframe-position 'top-center
"Where to display the mini-posframe."
:type '(choice
(const :tag "Top center" top-center)
(const :tag "Center" center)
(const :tag "Bottom center" bottom-center)
(const :tag "Top left" top-left)
(const :tag "Left" left)
(const :tag "Bottom left" bottom-left)
(const :tag "Top right" top-right)
(const :tag "Right" right)
(const :tag "Bottom right" bottom-right)))You can choose any of the above symbols. The top/bottom positions respect vertical fringes, and left/right positions respect horizontal fringes.
positioning.mov
See Hotkeys for positioning helpers.
mini-posframe-vertical-fringe(default0.10) – fraction of parent frame height to offset vertically.mini-posframe-horizontal-fringe(default0.05) – fraction of parent frame width to offset horizontally.
mini-posframe-width(default60) – width in characters.mini-posframe-height(default1) – fixed height in lines. When set to1, height is determined dynamically from content.- There’s an interactive resize helper function,
mini-posframe-resizethat allows you to set it dynamically.
mini-posframe-font-size– relative scale factor for font height.mini-posframe-border-width– internal border width (pixels).mini-posframe-parameters(alist) – extra frame parameters passed toposframe-show. By default only(undecorated . nil)is set.
mini-posframe-face– controls text appearance.mini-posframe-border-face– controls border appearance.
mini-posframe-mode– global minor mode to enable minibuffer mirroring.mini-posframe-reset– forcibly reset and restart the mode.
Cleanup hooks ensure state resets when minibuffer exits.
Optional integration keeps behavior consistent with helm-posframe:
- Defensive advice around
helm-ff-delete-char-backward-with-subkeysto prevent nil-command execution. - Advice loaded only if
helm-posframeis present. - Lifecycle hooks ensure it applies only when
helm-posframeis enabled.
- Position:
top-center(10% from top, centered horizontally). - Width:
60characters. - Height: dynamic (
1→ auto-fit). - Font scale:
1.4relative todefault. - Border width:
3. - Parameters:
(undecorated . nil)- Set in order to get the rounded borders on MacOS. Set to
(undecorated . t)for undecorated on other OS’s.
- Set in order to get the rounded borders on MacOS. Set to
Here is an example of configuring mini-posframe to display in the top-right, with mini-posframe-font-size=1 and width=100 characters:
(setq mini-posframe-position 'top-right
mini-posframe-font-size 1
mini-posframe-width 100)
(mini-posframe-mode 1)(use-package mini-posframe
:load-path "~/path/to/mini-posframe"
:custom
(mini-posframe-position 'top-right)
(mini-posframe-font-size 1)
(mini-posframe-width 100)
:config
(mini-posframe-mode 1))Add it as a recipe in dotspacemacs-additional-packages:
(mini-posframe :location (recipe :fetcher github :repo "JoshTRN/mini-posframe"))Or place it in a private layer and require it manually.
I set up some personal hotkeys that map directionally onto the left hand for quick positioning:
Layout (on qwerty):
| ⬆️ e | ← Top row — top-left, top-center, top-right | ||
|---|---|---|---|
| ⬅️ a | ⬤ d | ➡️ g | ← Middle row — center-left, center, center-right |
| ⬇️ c | ← Bottom row — bottom-left, bottom-center, bottom-right |
Here’s how the bindings map under SPC o m:
(spacemacs/declare-prefix "om" "mini-posframe")
(spacemacs/set-leader-keys
"omr" #'mini-posframe-resize
;; Top row
"omq" #'mini-posframe-top-left
"ome" #'mini-posframe-top-center
"omt" #'mini-posframe-top-right
;; Middle row
"oma" #'mini-posframe-center-left
"omd" #'mini-posframe-center
"omg" #'mini-posframe-center-right
;; Bottom row
"omz" #'mini-posframe-bottom-left
"omc" #'mini-posframe-bottom-center
"omb" #'mini-posframe-bottom-right)This layout allows for positional muscle memory. The left-hand keys directly mirror the posframe’s on-screen placement, making quick repositioning natural and fluid.
Clone into your load-path and enable:
(use-package mini-posframe
:load-path "~/path/to/mini-posframe"
:config
(mini-posframe-mode 1))This project is licensed under the GNU General Public License v3.0.
See the LICENSE file for full text.

