summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-10-22 12:40:35 -0500
committerCraig Jennings <c@cjennings.net>2025-10-22 12:40:35 -0500
commit786f81fbfebb949c3ef61e9c79c3fbf3dc7ec9b8 (patch)
treef88af226322a7eda6a469fda63b10880b8da47dd /modules
parentc4e9232f297ffda4443477c589f29052178d2c87 (diff)
feat: modules: Add popper-config for popup window management
Introduce popper-config.el to manage secondary buffers as popup windows using popper.el. This configuration includes keybindings for toggling, cycling, and promoting popups, and sets up popper with specific buffer references and display settings. This enhances the user experience by managing secondary buffers efficiently.
Diffstat (limited to 'modules')
-rw-r--r--modules/popper-config.el41
1 files changed, 41 insertions, 0 deletions
diff --git a/modules/popper-config.el b/modules/popper-config.el
new file mode 100644
index 00000000..b0f503e8
--- /dev/null
+++ b/modules/popper-config.el
@@ -0,0 +1,41 @@
+;;; popper-config.el --- secondary buffers to popup -*- lexical-binding: t; coding: utf-8; -*-
+;; author: Craig Jennings <c@cjennings.net>
+;;
+;;; Commentary:
+;;
+;; Configuration for popper.el, which manages secondary buffers as popup windows.
+;; Popup buffers (like *Messages*, help, and compilation output) are displayed in
+;; a dedicated bottom window and can be easily toggled, cycled, or promoted to
+;; regular windows.
+;;
+;; Keybindings:
+;; C-` - Toggle popup window visibility
+;; M-` - Cycle through open popup buffers
+;; C-M-` - Promote popup to regular window or demote back to popup
+;;
+;;; Code:
+
+(use-package popper
+ :bind (("C-`" . popper-toggle)
+ ("M-`" . popper-cycle)
+ ("C-M-`" . popper-toggle-type))
+ :custom
+ (popper-display-control-nil)
+ :init
+ (setq popper-reference-buffers
+ '("\\*Messages\\*"
+ "Output\\*$"
+ "\\*Async Shell Command\\*"
+ help-mode
+ compilation-mode))
+ (add-to-list 'display-buffer-alist
+ '(popper-display-control-p ; Predicate to match popper buffers
+ (display-buffer-in-side-window)
+ (side . bottom)
+ (slot . 0)
+ (window-height . 0.5))) ; Half the frame height
+ (popper-mode +1)
+ (popper-echo-mode +1))
+
+(provide 'popper-config)
+;;; popper-config.el ends here.