         image-dired-temp-image-file (concat image-dired-dir "temp-image")
         image-dired-temp-rotate-image-file (concat image-dired-dir "temp-rotate-image"))
   :config
-  ;; Use GNU ls as `gls' from `coreutils' if available.  Add `(setq
-  ;; dired-use-ls-dired nil)' to your config to suppress the Dired warning when
-  ;; not using GNU ls.  We must look for `gls' after `exec-path-from-shell' was
-  ;; initialized to make sure that `gls' is in `exec-path'
+  (setq dired-listing-switches "-aBhl --group-directories-first")
+
   (when IS-MAC
-    (let ((gls (executable-find "gls")))
-      (if gls
-          (setq insert-directory-program gls)
-        (message "Please install `gls` using `brew instal coreutils`..."))))
-  (setq dired-listing-switches "-aBhl --group-directories-first")
+    ;; Use GNU ls as `gls' from `coreutils' if available. Add `(setq
+    ;; dired-use-ls-dired nil)' to your config to suppress the Dired warning
+    ;; when not using GNU ls. We must look for `gls' after
+    ;; `exec-path-from-shell' was initialized to make sure that `gls' is in
+    ;; `exec-path'
+    (if-let* ((gls (executable-find "gls")))
+        (setq insert-directory-program gls)
+      (message "Cannot find `gls`. Install it using `brew install coreutils`")))
 
   (defun +dired|sort-directories-first ()
     "List directories first in dired buffers."

      :n "<" #'dired-prev-dirline
      :n ">" #'dired-next-dirline
      :n "^" #'dired-up-directory
      :n [?\S-\ ] 'dired-previous-line
      :n [remap next-line] 'dired-next-line
      :n [remap previous-line] 'dired-previous-line
      ;; hiding
      :n "g$" #'dired-hide-subdir ;; FIXME: This can probably live on a better binding.
      :n "M-$" #'dired-hide-all
      :n "(" #'dired-hide-details-mode
      ;; isearch
      :n "M-s a C-s"   'dired-do-isearch
      :n "M-s a M-C-s" #'dired-do-isearch-regexp
      :n "M-s f C-s"   'dired-isearch-filenames
      :n "M-s f M-C-s" #'dired-isearch-filenames-regexp
      ;; misc
      :n [remap read-only-mode] 'dired-toggle-read-only
      ;; `toggle-read-only' is an obsolete alias for `read-only-mode'
      :n [remap toggle-read-only] 'dired-toggle-read-only
      :n "g?" #'dired-summary
      :n "<delete>" #'dired-unmark-backward
      :n [remap undo] 'dired-undo
      :n [remap advertised-undo] 'dired-undo
      ;; thumbnail manipulation (image-dired)
      :n "C-t d" #'image-dired-display-thumbs
      :n "C-t t" #'image-dired-tag-files

      :n "q" #'quit-window
      :m "j" #'dired-next-line
      :m "k" #'dired-previous-line
      :n [mouse-2] #'dired-mouse-find-file-other-window
      :n [follow-link] #'mouse-face
      ;; Commands to mark or flag certain categories of files
      :n "#" #'dired-flag-auto-save-files
      :n "." #'dired-clean-directory
