Config: Fix Apple crap
Emulate the Unix ls
command in Emacs Lisp because the one in MacOS:
- cannot even output directories first and
- cannot be patched easily.
(with-eval-after-load 'dired
(require 'ls-lisp))
(with-eval-after-load 'ls-lisp
(setq ls-lisp-use-insert-directory-program nil
ls-lisp-verbosity '(modes)
dired-listing-switches
(string-join '("--all"
"--group-directories-first"
"--human-readable"
"--no-group"))))
Use ISO 8601 date-time format.
- Always use the ISO 8601 date-time format, regardless of locale.
- Always include the time, regardless of the last modification year.
(setopt ls-lisp-use-localized-time-format t ; always use the below
ls-lisp-format-time-list (make-list 2 "%Y-%m-%d %H:%M"))
Hide MacOS garbage files quietly.
(with-eval-after-load 'dired
(setq dired-omit-files "^\\.DS_Store\\|\\.localized$"
dired-omit-verbose nil)
(add-hook 'dired-mode-hook #'dired-omit-mode))