From b8ef731a8a6fbe399cd15a73d0e8f813fa366430 Mon Sep 17 00:00:00 2001 From: Daneel Date: Fri, 27 Feb 2026 14:01:46 +0100 Subject: [PATCH] config: minimal dirvish attributes for VoiceOver Remove file-time and file-size from default dirvish-attributes so screen reader reads only filenames. Add D keybinding to toggle full details on/off in dirvish buffers. --- config.el | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/config.el b/config.el index 907ccca..cd3b6dc 100644 --- a/config.el +++ b/config.el @@ -884,9 +884,23 @@ Skip for beamer exports — beamer uses adjustbox on plain tabular." :init (dirvish-override-dired-mode) :config (setq dirvish-mode-line-format '(:left (sort symlink) :right (omit yank index)) - dirvish-attributes '(vc-state subtree-state nerd-icons collapse git-msg file-time file-size) + ;; Minimal attributes for VoiceOver: no file-time/file-size by + ;; default so screen reader reads only filenames. Toggle full + ;; details with "D" in dirvish buffers. + dirvish-attributes '(vc-state subtree-state nerd-icons collapse git-msg) dirvish-side-width 35) + (defun my/dirvish-toggle-details () + "Toggle file-time and file-size dirvish attributes." + (interactive) + (if (memq 'file-size dirvish-attributes) + (setq-local dirvish-attributes + (seq-remove (lambda (a) (memq a '(file-time file-size))) + dirvish-attributes)) + (setq-local dirvish-attributes + (append dirvish-attributes '(file-time file-size)))) + (revert-buffer)) (map! :map dirvish-mode-map + :n "D" #'my/dirvish-toggle-details :n "q" #'dirvish-quit :n "h" #'dired-up-directory :n "l" #'dired-find-file