diff --git a/conf.org b/conf.org index ef0adda..4c330d2 100644 --- a/conf.org +++ b/conf.org @@ -531,6 +531,23 @@ according to mime types as listed in all available desktop files." :candidates mime-alist :action '(("Open" . (lambda (f) (nd/execute-desktop-command f file-list))))) :buffer "*helm open with*")))))) + +(defun nd/dired-sort-by () + "Sort current dired buffer by a list of choices presented in helm menu. +Note this assumes there are no sorting switches on `dired-ls'" + (interactive) + (let ((sort-alist '(("Name" . "") + ("Date" . "-t") + ("Size" . "-S") + ("Extension" . "-X") + ("Dirs First" . "--group-directories-first")))) + (helm + :sources + (helm-build-sync-source "Switches" + :candidates sort-alist + :action + '(("Sort" . (lambda (s) (dired-sort-other (concat dired-listing-switches " " s)))))) + :buffer "*helm sort buffer*"))) #+END_SRC ** compression Only supports tar.gz, tar.bz2, tar.xz, and .zip by default. Add support for more fun algos such as lzo and zpaq