Skip to content

Commit

Permalink
Use display-buffer-alist instead of the fullframe package
Browse files Browse the repository at this point in the history
  • Loading branch information
purcell committed Feb 1, 2024
1 parent af51a95 commit 6c1962a
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
10 changes: 5 additions & 5 deletions lisp/init-docker.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
;;; Code:

(when (maybe-require-package 'docker)
(fullframe docker-images tablist-quit)
(fullframe docker-machines tablist-quit)
(fullframe docker-volumes tablist-quit)
(fullframe docker-networks tablist-quit)
(fullframe docker-containers tablist-quit))
(sanityinc/fullframe-mode 'docker-image-mode)
(sanityinc/fullframe-mode 'docker-machine-mode)
(sanityinc/fullframe-mode 'docker-volume-mode)
(sanityinc/fullframe-mode 'docker-network-mode)
(sanityinc/fullframe-mode 'docker-container-mode))
(maybe-require-package 'dockerfile-mode)
(maybe-require-package 'docker-compose-mode)

Expand Down
4 changes: 0 additions & 4 deletions lisp/init-elpa.el
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,6 @@ advice for `require-package', to which ARGS are passed."
(package--save-selected-packages
(seq-uniq (append sanityinc/required-packages package-selected-packages))))))


(require-package 'fullframe)
(fullframe list-packages quit-window)


(let ((package-check-signature nil))
(require-package 'gnu-elpa-keyring-update))
Expand Down
7 changes: 3 additions & 4 deletions lisp/init-git.el
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
(when (maybe-require-package 'magit)
(setq-default magit-diff-refine-hunk 'all)

(sanityinc/fullframe-mode 'magit-status-mode)
(setq-default magit-bury-buffer-function 'magit-restore-window-configuration)

;; Hint: customize `magit-repository-directories' so that you can use C-u M-F12 to
;; quickly open magit on any one of your projects.
(global-set-key [(meta f12)] 'magit-status)
Expand All @@ -41,10 +44,6 @@

(maybe-require-package 'magit-todos)

(require-package 'fullframe)
(with-eval-after-load 'magit
(fullframe magit-status magit-mode-quit-window))

(when (maybe-require-package 'git-commit)
(add-hook 'git-commit-mode-hook 'goto-address-mode))

Expand Down
2 changes: 2 additions & 0 deletions lisp/init-ibuffer.el
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

(setq-default ibuffer-show-empty-filter-groups nil)

(sanityinc/fullframe-mode 'ibuffer-mode)


(with-eval-after-load 'ibuffer
;; Use human readable Size column instead of original one
Expand Down
8 changes: 8 additions & 0 deletions lisp/init-utils.el
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
;;; Commentary:
;;; Code:

(defmacro sanityinc/fullframe-mode (mode)
"Configure buffers that open in MODE to start out full-frame."
`(add-to-list 'display-buffer-alist
(cons (cons 'major-mode ,mode)
(list 'display-buffer-full-frame))))

(sanityinc/fullframe-mode 'package-menu-mode)


;; Handier way to add modes to auto-mode-alist
(defun add-auto-mode (mode &rest patterns)
Expand Down

0 comments on commit 6c1962a

Please sign in to comment.