summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--config/init-buffer.el81
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