aboutsummaryrefslogtreecommitdiff
path: root/.emacs.d/rul-lisp/packages/rul-wm.el
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/rul-lisp/packages/rul-wm.el')
-rw-r--r--.emacs.d/rul-lisp/packages/rul-wm.el36
1 files changed, 33 insertions, 3 deletions
diff --git a/.emacs.d/rul-lisp/packages/rul-wm.el b/.emacs.d/rul-lisp/packages/rul-wm.el
index 59fc2f4..0af3eef 100644
--- a/.emacs.d/rul-lisp/packages/rul-wm.el
+++ b/.emacs.d/rul-lisp/packages/rul-wm.el
@@ -59,8 +59,38 @@ Also see `prot-window-delete-popup-frame'." command)
:ensure t
:defer t
:config
- (setq
- olivetti-body-width 100
- ))
+ (setq olivetti-body-width 100))
+
+(use-package beframe
+ :ensure t
+ :hook (after-init . beframe-mode)
+ :config
+ (define-key global-map (kbd "C-c b") beframe-prefix-map)
+
+ ;;Integration with Consult
+ (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)))
(provide 'rul-wm)
nihil fit ex nihilo