dired-delight
dired-delight copied to clipboard
Tag files with colors in Dired
#+title: dired-delight: Colorful, persistent tags for files
Dired Delight lets you tag files in Dired, Emacs' file manager, with colors.
[[https://github.com/karthink/dired-delight/assets/8607532/317649f7-6e0c-40df-b74e-3dc381119ed8]]
[[https://github-production-user-asset-6210df.s3.amazonaws.com/8607532/248907131-b1a91441-580c-439a-841b-328c45eea170.png]]
This affords a visual way -- besides the filesystem tree -- to group files, or persistently mark files needing action, find a specific file at a glance, etc... I think? (Honestly I'm not sure.)
*** Features
- There are two supported styles for marking:
[[https://github-production-user-asset-6210df.s3.amazonaws.com/8607532/248907455-e871a653-efe2-484d-82bc-95cddebdf437.png]]
[[https://github.com/karthink/dired-delight/assets/8607532/9523c17c-8c80-41aa-8585-38c4b8f94e78]]
A block next to the file name (left), or highlighting (right). Both styles work with and without =dired-hide-details-mode=.
- Select colors with preview for marking:
[[https://github-production-user-asset-6210df.s3.amazonaws.com/8607532/248907735-1ba63f8f-6cc5-40e1-8f29-51665fc80843.png]]
[[https://github.com/karthink/dired-delight/assets/8607532/c0df5600-d0d2-495f-901f-5d44a063caeb]]
- Works fine with [[https://github.com/alexluigit/dirvish/][Dirvish]]
*** Installation
**** Manual
Clone this repo or download its files and run =M-x package-install-file= on the directory.
**** Straight
#+begin_src emacs-lisp (use-package dired-delight :straight (:host github :repo "karthink/dired-delight") :hook (dired-mode . dired-delight-mode) :bind (:map dired-mode-map ("@" . dired-delight) ("*c" . dired-delight-mark-color))) #+end_src
**** Quelpa
#+BEGIN_SRC elisp (package-install 'quelpa-use-package) (require 'quelpa-use-package)
(use-package dired-delight :quelpa (dired-delight :fetcher github :repo "karthink/dired-delight") :hook (dired-mode . dired-delight-mode) :bind (:map dired-mode-map ("@" . dired-delight) ("*c" . dired-delight-mark-color))) #+END_SRC
*** Usage
- Turn on =dired-delight-mode= in a Dired buffer.
- Mark files (or not for a single file) and call =dired-delight= to tag marked files. To remove a tag don't supply any color, i.e. leave it blank.
- Call =dired-delight-mark-color= to mark all files that have a given color. You can then narrow the buffer to these files, or act on them in any of the usual ways.
The following keybindings may help: #+begin_src emacs-lisp (define-key dired-mode-map (kbd "@") 'dired-delight) (define-key dired-mode-map (kbd "*c") 'dired-delight-mark-color) #+end_src
*** Customization
| Option | Description | Default | |----------------------------------+----------------------------------------------------+-------------------------| | =dired-delight-display= | Set color display style (block or background) | Block | | =dired-delight-use-relative-names= | Match files by relative names, not absolute paths. | Absolute paths | | =dired-delight-file= | File used to persist Delight data across sessions | =XDG_CACHE_DIR= or =user-emacs-directory= |