diff --git a/common/_global.el b/common/_global.el index f2567f5..6c479c7 100644 --- a/common/_global.el +++ b/common/_global.el @@ -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)