diff options
author | Franck Cuny <franck@fcuny.net> | 2024-04-08 08:03:52 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2024-04-08 08:03:52 -0700 |
commit | 50eba1370e35b537adad88ec849f1fe9206d90ca (patch) | |
tree | db27e5f0e28ffe71eaf49419d3f7dd160afdd5cd | |
parent | no need for nerd icons (diff) | |
download | emacs.d-50eba1370e35b537adad88ec849f1fe9206d90ca.tar.gz |
clean up buffers configurations
Diffstat (limited to '')
-rw-r--r-- | config/init-buffer.el | 81 |
1 files changed, 15 insertions, 66 deletions
diff --git a/config/init-buffer.el b/config/init-buffer.el index c8688c6..b884edf 100644 --- a/config/init-buffer.el +++ b/config/init-buffer.el @@ -7,72 +7,21 @@ ;;; Code: -(require 'ibuffer) -(require 'ibuf-ext) - -(setq ibuffer-expert t) -(setq ibuffer-show-empty-filter-groups nil) -(setq ibuffer-jump-offer-only-visible-buffers t) -(setq ibuffer-maybe-show-predicates '("^\\*.*\\*$")) -(setq ibuffer-never-show-predicates '("^ ")) -(setq ibuffer-use-other-window t) - -(setq ibuffer-saved-filter-groups - '(("default" - ("Config" (or - (filename . "world/") - (filename . ".emacs/"))) - - ("Programming" (or - (mode . c++-mode) - (mode . c-mode) - (mode . cargo-mode) - (mode . emacs-lisp-mode) - (mode . go-mode) - (mode . java-mode) - (mode . lisp-mode) - (mode . nix-mode) - (mode . python-mode) - (mode . rust-mode) - (mode . sh-mode) - (name . "\\*Cargo") - (name . "\\*Python.*\\*"))) - - ("Writing" (or - (mode . plain-tex-mode) - (mode . rst-mode) - (mode . markdown-mode) - (mode . html-mode) - (mode . nxhtml-mode) - (mode . css-mode))) - - ("Org" (or - (mode . org-agenda-mode) - (mode . org-mode))) - - ("Dired" (mode . dired-mode)) - - ("Terminals" (mode . term-mode)) - - ("Shells" (or - (mode . eshell-mode) - (mode . shell-mode))) - - ("Magit" (or - (mode . magit-mode) - (name . "\\*magit-.*\\*"))) - - ("VC" (name . "\\*vc.*\\*")) - - ("Emacs" (name . "^\\*.*\\*$"))))) - -(add-hook 'ibuffer-mode-hook - (lambda () - (ibuffer-auto-mode 1) - (ibuffer-switch-to-saved-filter-groups "default"))) - -(require 'midnight) -(setq midnight-period (* 3600 6)) ; every 6 hours +(use-package ibuffer + :defer t + :custom + (ibuffer-expert t) + (ibuffer-show-empty-filter-groups nil) + (ibuffer-jump-offer-only-visible-buffers t) + (ibuffer-maybe-show-predicates '("^\\*.*\\*$")) + (ibuffer-never-show-predicates '("^ ")) + (ibuffer-use-other-window t)) + +(use-package midnight + :defer t + :custom + ;; every 6 hours + (midnight-period (* 3600 6))) (setq clean-buffer-list-delay-general 2 ; every 2 day clean-buffer-list-delay-special (* 3600 3)) ; every 3 hours |