aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2021-07-12 21:53:01 -0700
committerGravatar Tom Willemse2021-07-12 21:53:01 -0700
commit4b978ffb75af2a4cd7859ccc829ccb4f86d8f3ff (patch)
tree8a5f12fbe4ef16ec85cd29a4bd2063e333ff5d9d
parent8bdb2d96ba85b22c2bc029b5557f6f64da980155 (diff)
downloademacs-config-4b978ffb75af2a4cd7859ccc829ccb4f86d8f3ff.tar.gz
emacs-config-4b978ffb75af2a4cd7859ccc829ccb4f86d8f3ff.zip
[oni-ivy] Display posframe in the center of the frame, not window
-rw-r--r--oni-ivy.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/oni-ivy.el b/oni-ivy.el
index c5600de..0022e96 100644
--- a/oni-ivy.el
+++ b/oni-ivy.el
@@ -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 ivy’s 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)