transient-posframe

Using posframe to show transient


Keywords
convenience, bindings, tooltip
License
GPL-3.0

Documentation

Transient-posframe

https://img.shields.io/badge/License-GPLv3-blue.svg

Introduction

This package is a transient extension, which use posframe to show transient popups. This package is inspired by ivy-posframe. I mainly use this package for displaying magit transient popups.

./screenshots/transient-posframe.gif

Table of Contents

Install

Use package

(use-package
  :load-path "path/to/transient-posframe.el"
  :config
  (transient-posframe-mode))

Customization

You can customize the appearance of the posframe, the options are derived directly from posframe.

Customization options

transient-posframe-font (default nil)

  • Font used in the transient posframe. When nil, Using current frame’s font as fallback.

transient-posframe-poshandler (default posframe-poshandler-frame-center)

  • Customize this option to change the position of the transient popups. Refer posframe for more predefined positions.

transient-posframe-min-width (default 80)

  • Minimum width of the posframe.
  • Note that at this moment transient-posframe cannot adjust the posframe’s size automagically, therefore, we use transient-posframe-min-width and transient-posframe-min-height to adjust the size of the posframe manually.

transient-posframe-min-height (default 30)

  • Minimum height of the posframe.
  • Note that at this moment transient-posframe cannot adjust the posframe’s size automagically, therefore, we use transient-posframe-min-width and transient-posframe-min-height to adjust the size of the posframe manually.

transient-posframe-border-width (default 1)

  • The border of the posframe.

transient-posframe-parameters (default nil)

  • The parameters passed to posframe, refer posframe for more information.

Notes

Function transient-posframe--show-buffer is not compatible with transient-display-buffer-action

  • We set function transient-display-buffer-action to transient-posframe--show-buffer. According to the document of transient-display-buffer-action:

    … The value of this option has the form (FUNCTION . ALIST), where FUNCTION is a function or a list of functions. Each such function should accept two arguments: a buffer to display and an alist of the same form as ALIST. See `display-buffer’ for details.

    However, function transient-posframe--show-buffer does not deal with the second argument ALIST. I have not figured out how to tackle with this yet.

License

Transient-posframe is licensed under the GPLv3 License.