1
0
Fork 0

[oni-ivy] Display posframe in the center of the frame, not window

This commit is contained in:
Tom Willemse 2021-07-12 21:53:01 -07:00
parent 8bdb2d96ba
commit 4b978ffb75
Signed by: ryuslash
GPG key ID: 7D5C407B435025C1

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
;; Version: 2020.0408.103313
;; Version: 2021.0712.215209
;; Package-Requires: (ivy oni-prescient oni-hydra ivy-hydra diminish ivy-posframe ivy-prescient)
;; This program is free software; you can redistribute it and/or modify
@ -42,6 +42,10 @@
(when ivy-enabled
(ivy-mode 1)))))
(defun ivy-posframe-display-at-frame-bottom-center (str)
"Display STR in ivys posframe at the bottom centre of the current frame."
(ivy-posframe--display str #'posframe-poshandler-frame-bottom-center))
(when (eq system-type 'windows-nt)
(with-eval-after-load 'grep
(add-function :around (symbol-function 'grep-read-files)
@ -50,6 +54,8 @@
(global-set-key (kbd "C-<up>") 'ivy-push-view)
(global-set-key (kbd "C-<down>") 'ivy-switch-view)
(setq ivy-posframe-style 'frame-bottom-center)
;;;###autoload
(add-hook 'emacs-startup-hook 'ivy-mode)