Using Cleandesk for Emacs

This is handy: GitHub - rtrppl/cleandesk: rapid renaming and sorting for dired

It’s an Emacs package which adds some convenience functions to dired-mode that help keep one’s ~/Desktop folder clean.

Here’s my config (mostly just copy/pasted from the README):

(load "~/.config/emacs/lisp/cleandesk/cleandesk.el") ;
(setq date-string "%Y%m%d-")
(global-set-key (kbd "M-s-u") 'cleandesk-open-inbox)
(with-eval-after-load 'dired
  (define-key dired-mode-map (kbd "J") 'cleandesk-jump-to-folder)
  (define-key dired-mode-map (kbd "M") 'cleandesk-move-files)
  (define-key dired-mode-map (kbd "z") 'cleandesk-prepend-date)
  (define-key dired-mode-map (kbd "r") 'cleandesk-rename))

I do M-x cleandesk-open-inbox to get a dired buffer of my ~/Desktop folder. Then I rename and/or prepend a YYYYMMDD to files I’m going to keep (“r” or z”). Then I move them to a target folder using M-x cleandesk-move-files (or M”). Target folders are pre-defined and I can use fd with completion, so they’re super fast to get to. This is the part that normally slows me down.

Maybe now I’ll keep my ~/Desktop cleaner. OK, probably not, but at least I have a better way to tidy things up.