feat(desktop): remove ivy-posframe

This commit is contained in:
Pavel Korytov 2022-04-14 12:32:54 +03:00
parent a1eef2a025
commit efe1aadaa1
2 changed files with 32 additions and 27 deletions

View file

@ -253,6 +253,7 @@ DIR is either 'left or 'right."
(use-package ivy-posframe (use-package ivy-posframe
:straight t :straight t
:disabled
:config :config
(setq ivy-posframe-parameters '((left-fringe . 10) (setq ivy-posframe-parameters '((left-fringe . 10)
(right-fringe . 10) (right-fringe . 10)
@ -275,8 +276,8 @@ DIR is either 'left or 'right."
(apply fn args) (apply fn args)
(x-set-mouse-absolute-pixel-position (car pos) (x-set-mouse-absolute-pixel-position (car pos)
(cdr pos))))) (cdr pos)))))
(with-eval-after-load 'ivy-posframe
(advice-add #'ivy-posframe--read :around #'my/advise-fn-suspend-follow-mouse) (advice-add #'ivy-posframe--read :around #'my/advise-fn-suspend-follow-mouse))
(defun my/setup-posframe (&rest args) (defun my/setup-posframe (&rest args)
(mapc (mapc
@ -290,7 +291,6 @@ DIR is either 'left or 'right."
(defun my/restore-posframe (&rest args) (defun my/restore-posframe (&rest args)
(run-with-timer (run-with-timer
0.25 0.25
nil
(lambda () (lambda ()
(mapc (mapc
(lambda (var) (lambda (var)
@ -300,8 +300,9 @@ DIR is either 'left or 'right."
mouse-autoselect-window mouse-autoselect-window
focus-follows-mouse))))) focus-follows-mouse)))))
(advice-add #'posframe--create-posframe :after #'my/setup-posframe) (with-eval-after-load 'ivy-posframe
(advice-add #'ivy-posframe-cleanup :after #'my/restore-posframe) (advice-add #'posframe--create-posframe :after #'my/setup-posframe)
(advice-add #'ivy-posframe-cleanup :after #'my/restore-posframe))
(defun my/counsel-linux-app-format-function (name comment _exec) (defun my/counsel-linux-app-format-function (name comment _exec)
(format "% -45s%s" (format "% -45s%s"

View file

@ -746,9 +746,12 @@ Setting up some completion interfaces that fit particularly well to use with EXW
Take a look at [[https://github.com/ch11ng/exwm/issues/550][this issue]] in the EXWM repo about setting it up. Take a look at [[https://github.com/ch11ng/exwm/issues/550][this issue]] in the EXWM repo about setting it up.
Edit <2022-04-09 Sat>: This looks nice, but unfortunately too unstable. Disabling it.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package ivy-posframe (use-package ivy-posframe
:straight t :straight t
:disabled
:config :config
(setq ivy-posframe-parameters '((left-fringe . 10) (setq ivy-posframe-parameters '((left-fringe . 10)
(right-fringe . 10) (right-fringe . 10)
@ -775,8 +778,8 @@ Take a look at [[https://github.com/ch11ng/exwm/issues/550][this issue]] in the
(apply fn args) (apply fn args)
(x-set-mouse-absolute-pixel-position (car pos) (x-set-mouse-absolute-pixel-position (car pos)
(cdr pos))))) (cdr pos)))))
(with-eval-after-load 'ivy-posframe
(advice-add #'ivy-posframe--read :around #'my/advise-fn-suspend-follow-mouse) (advice-add #'ivy-posframe--read :around #'my/advise-fn-suspend-follow-mouse))
#+end_src #+end_src
**** Disable changing focus **** Disable changing focus
Not sure about that. The cursor occasionally changes focus when I'm exiting posframe, and this doesn't catch all the cases. Not sure about that. The cursor occasionally changes focus when I'm exiting posframe, and this doesn't catch all the cases.
@ -803,8 +806,9 @@ Not sure about that. The cursor occasionally changes focus when I'm exiting posf
mouse-autoselect-window mouse-autoselect-window
focus-follows-mouse))))) focus-follows-mouse)))))
(advice-add #'posframe--create-posframe :after #'my/setup-posframe) (with-eval-after-load 'ivy-posframe
(advice-add #'ivy-posframe-cleanup :after #'my/restore-posframe) (advice-add #'posframe--create-posframe :after #'my/setup-posframe)
(advice-add #'ivy-posframe-cleanup :after #'my/restore-posframe))
#+end_src #+end_src
*** Linux app *** Linux app
=counsel-linux-app= is a counsel interface to select a Linux desktop application. =counsel-linux-app= is a counsel interface to select a Linux desktop application.