diff options
| author | BardofSprites <[email protected]> | 2025-09-07 16:57:31 -0400 |
|---|---|---|
| committer | BardofSprites <[email protected]> | 2025-09-07 16:57:31 -0400 |
| commit | 4dc37c750bd2de0c83e12a90f028bca3929afce4 (patch) | |
| tree | fd69c3257dfff850d848a3980e3e816b97c51a4d /bard-emacs-modules/bard-emacs-window.el | |
| parent | f8ee1ceaf39dd6235b7294575c60608ed74602f2 (diff) | |
frame settings and popup term
Diffstat (limited to 'bard-emacs-modules/bard-emacs-window.el')
| -rw-r--r-- | bard-emacs-modules/bard-emacs-window.el | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/bard-emacs-modules/bard-emacs-window.el b/bard-emacs-modules/bard-emacs-window.el index 0b47deb..4d6a8ed 100644 --- a/bard-emacs-modules/bard-emacs-window.el +++ b/bard-emacs-modules/bard-emacs-window.el @@ -50,6 +50,11 @@ (window-height . 0.3) (dedicated . t) (preserve-size . (t . t))) + ;; terminal popups + (prot-window-shell-or-term-p + (display-buffer-reuse-mode-window display-buffer-at-bottom) + (mode . (shell-mode eshell-mode comint-mode)) + (body-function . prot-window-select-fit-size)) ("\\magit: .*" (display-buffer-same-window) (inhibit-same-window . nil) @@ -141,5 +146,65 @@ :bind ("C-x w w" . bard/toggle-window-split)) +(use-package beframe + :ensure t + :config + (setq beframe-functions-in-frames '(project-prompt-project-dir + notmuch)) + (setq beframe-create-frame-scratch-buffer nil) + (setq beframe-global-buffers '("*scratch*" "*Messages*" "*Backtrace*")) + (beframe-mode 1) + + (define-key global-map (kbd "C-x f") #'other-frame-prefix) + (define-key global-map (kbd "C-c b") beframe-prefix-map) + (define-key global-map (kbd "C-x C-b") #'beframe-buffer-menu) + (define-key global-map (kbd "C-x B") #'select-frame-by-name) + + ;; Consult integration + (defvar consult-buffer-sources) + (declare-function consult--buffer-state "consult") + + (with-eval-after-load 'consult + (defface beframe-buffer + '((t :inherit font-lock-string-face)) + "Face for `consult' framed buffers.") + + (defun my-beframe-buffer-names-sorted (&optional frame) + "Return the list of buffers from `beframe-buffer-names' sorted by visibility. + With optional argument FRAME, return the list of buffers of FRAME." + (beframe-buffer-names frame :sort #'beframe-buffer-sort-visibility)) + + (defvar beframe-consult-source + `( :name "Frame-specific buffers (current frame)" + :narrow ?F + :category buffer + :face beframe-buffer + :history beframe-history + :items ,#'my-beframe-buffer-names-sorted + :action ,#'switch-to-buffer + :state ,#'consult--buffer-state)) + + (add-to-list 'consult-buffer-sources 'beframe-consult-source))) + +(defun bard/academic-frame () + "Create a new academic frame with key folders opened and beframed." + (interactive) + (let ((frame (make-frame))) + (select-frame-set-input-focus frame) + ;; Set frame title explicitly + (modify-frame-parameters frame '((name . "Academic"))) + + (dired "~/Documents/Uni") + (goto-char (point-min)) + (split-window-right) + + (bard/default-agenda) + (split-root-window-below) + + (dired "~/Notes/denote") + (goto-char (point-min)))) + +(global-set-key (kbd "<f2>") #'bard/academic-frame) + (provide 'bard-emacs-window) ;;; bard-emacs-window.el ends here |
