[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-posframe d6fc7c6 001/195: Init commit
From: |
Feng Shu |
Subject: |
[elpa] externals/ivy-posframe d6fc7c6 001/195: Init commit |
Date: |
Sat, 3 Oct 2020 07:11:33 -0400 (EDT) |
branch: externals/ivy-posframe
commit d6fc7c6184a943ec40cdf64138d1f25aeb3152fe
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>
Init commit
---
ivy-posframe.el | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 92 insertions(+)
diff --git a/ivy-posframe.el b/ivy-posframe.el
new file mode 100644
index 0000000..e7fcf2a
--- /dev/null
+++ b/ivy-posframe.el
@@ -0,0 +1,92 @@
+;;; ivy-posframe.el --- Using posframe to show Ivy -*- lexical-binding: t -*-
+
+;; Copyright (C) 2017-2018 Free Software Foundation, Inc.
+
+;; Author: Feng Shu
+;; Maintainer: Feng Shu <tumashu@163.com>
+;; URL: https://github.com/tumashu/ivy-posframe
+;; Version: 0.1.0
+;; Keywords: abbrev, convenience, matching, ivy
+;; Package-Requires: ((emacs "26.0")(posframe "0.1.0"))
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+
+
+;;; Commentary:
+
+;; * ivy-posframe README :README:
+
+;;; Code:
+;; * ivy-posframe's code
+(require 'cl-lib)
+(require 'posframe)
+
+(defgroup ivy-posframe nil
+ "Using posframe to show ivy"
+ :group 'ivy
+ :prefix "ivy-posframe")
+
+(defcustom ivy-posframe-font nil
+ "The font used by ivy-posframe's frame.
+Using current frame's font if it it nil."
+ :group 'ivy-posframe)
+
+(defface ivy-posframe
+ '((t (:inherit default :background "#333333" :foreground "#dcdccc")))
+ "Face used for the ivy-posframe."
+ :group 'ivy-posframe)
+
+(defvar ivy-posframe-buffer " *ivy-posframe-buffer*"
+ "The buffer which used by ivy-posframe.")
+
+(defun ivy-posframe-display (str)
+ "Show ivy's posframe."
+ (with-selected-window (ivy--get-window ivy-last)
+ (posframe-show
+ ivy-posframe-buffer
+ :string (concat ivy--prompt ivy-text str)
+ :poshandler #'posframe-poshandler-window-bottom-left-corner
+ :background-color (face-attribute 'ivy-posframe :background)
+ :foreground-color (face-attribute 'ivy-posframe :foreground)
+ :height ivy-height
+ :min-height 10
+ :min-width 50)))
+
+(defun ivy-posframe-cleanup ()
+ "Clean ivy's posframe."
+ (posframe-hide ivy-posframe-buffer))
+
+;;;###autoload
+(defun ivy-posframe-enable ()
+ (interactive)
+ (require 'ivy)
+ (setq ivy-display-function #'ivy-posframe-display)
+ (push '(t . ivy-posframe-display)
+ ivy-display-functions-alist)
+ (push '(ivy-posframe
+ :display ivy-posframe-display
+ :cleanup ivy-posframe-cleanup)
+ ivy-display-schemes)
+ (message "Ivy-posframe is enabled, disable it need restart emacs."))
+
+
+(provide 'ivy-posframe)
+
+;; Local Variables:
+;; coding: utf-8-unix
+;; End:
+
+;;; ivy-posframe.el ends here
- [elpa] branch externals/ivy-posframe created (now d539ac2), Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe d6fc7c6 001/195: Init commit,
Feng Shu <=
- [elpa] externals/ivy-posframe 8861e54 002/195: Use ivy-display-functions-props, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 229caae 003/195: update, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 3bc6301 004/195: Add ivy-posframe-workable-p, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 2733fe1 010/195: Set :position to (point)., Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe f287da7 006/195: Add ivy-posframe-mode, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 990b9b4 007/195: Update, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 8d0b0ae 008/195: Update, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe fc0820a 009/195: Update, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 1651770 012/195: Update, Feng Shu, 2020/10/03
- [elpa] externals/ivy-posframe 6494b38 005/195: Add ivy-posframe-mode, Feng Shu, 2020/10/03