enhance use of popwin to include quick reference as a keycombo to open in a popwin

This commit is contained in:
KemoNine 2022-09-03 16:08:49 -04:00
parent 4a1e66cd2c
commit 671149706b
1 changed files with 26 additions and 3 deletions

View File

@ -414,9 +414,32 @@ position between last non-whitespace and `end-of-line'."
;;(setq golden-ratio-auto-scale t)
(golden-ratio-mode t)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; quick reference notes as a pop up window
(defun kmn/popwin-quick-ref ()
(interactive)
(when (eq system-type 'windows-nt)
(popwin:find-file "~/org/_quick_reference.org"))
(when kmn/is-termux
(popwin:find-file "~/storage/shared/org/_quick_reference.org")))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; scratch buffer as a pop up window
(defun kmn/popwin-scratch ()
(interactive)
(popwin:display-buffer "*scratch*")
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; popup windows
(require 'popwin)
(use-package popwin
:bind ( :map popwin:keymap
("h" . popwin:close-popup-window)
("q" . kmn/popwin-quick-ref)
("r" . kmn/popwin-scratch))
:config
(global-set-key (kbd "C-w") popwin:keymap)
(push "*scratch*" popwin:special-display-config)
(push "_quick_reference.org" popwin:special-display-config))
(popwin-mode 1)
(global-set-key (kbd "C-w") popwin:keymap)
(push "*scratch*" popwin:special-display-config)