This commit is contained in:
Your Name
2026-05-10 01:05:57 +02:00
commit f3cb5a6e26
19 changed files with 2741 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
;;; ../../lyfi/configs/apps/doom/custom/unifiedlist.el -*- lexical-binding: t; -*-
(defun my/get-unified-list ()
"Combine buffers and recentf into a list for tabulated-list-mode."
(let ((items '()))
;; Add Live Buffers
(dolist (buf (buffer-list))
(with-current-buffer buf
(push (list buf (vector (buffer-name) "Live" (format-mode-line mode-name) (or (buffer-file-name) ""))) items)))
;; Add Recent Files (if not already open)
(dolist (file recentf-list)
(unless (get-file-buffer file)
(push (list file (vector (file-name-nondirectory file) "Recent" "File" file)) items)))
(nreverse items)))
(define-derived-mode my-unified-list-mode tabulated-list-mode "Unified-List"
(setq tabulated-list-format [("Name" 30 t)
("Status" 10 t)
("Mode" 15 t)
("Path" 0 t)])
(setq tabulated-list-entries #'my/get-unified-list)
(tabulated-list-init-header))
(defun my/open-unified-list ()
(interactive)
(pop-to-buffer "*Unified Switcher*")
(my-unified-list-mode)
(tabulated-list-print))