From b5e9fe3dc4370b8584c31d7c94f1f7915044b02e Mon Sep 17 00:00:00 2001 From: petrucci4prez Date: Sun, 26 Aug 2018 20:35:00 -0400 Subject: [PATCH] added more compression algos --- conf.org | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/conf.org b/conf.org index 602b8a4..67cd5d5 100644 --- a/conf.org +++ b/conf.org @@ -518,6 +518,33 @@ according to mime types as listed in all available desktop files." :action '(("Open" . (lambda (f) (nd/execute-desktop-command f file-list))))) :buffer "*helm open with*"))))) #+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 +#+BEGIN_SRC emacs-lisp +(if (file-exists-p "/usr/bin/7z") + (add-to-list 'dired-compress-files-alist + '("\\.7z\\'" . "7z a %o %i"))) + +(if (file-exists-p "/usr/bin/lrzip") + (progn + (add-to-list 'dired-compress-files-alist + '("\\.lrz\\'" . "lrzip -L 9 -o %o %i &")) + (add-to-list 'dired-compress-files-alist + '("\\.lzo\\'" . "lrzip -l -L 9 -o %o %i &")) + (add-to-list 'dired-compress-files-alist + '("\\.zpaq\\'" . "lrzip -z -L 9 -o %o %i &")))) + +;; NOTE: this must be after the shorter lrz algos otherwise it will +;; always default to .lrz and not .tar.lrz +(if (file-exists-p "/usr/bin/lrztar") + (progn + (add-to-list 'dired-compress-files-alist + '("\\.tar\\.lrz\\'" . "lrztar -L 9 -o %o %i &")) + (add-to-list 'dired-compress-files-alist + '("\\.tar\\.lzo\\'" . "lrztar -l -L 9 -o %o %i &")) + (add-to-list 'dired-compress-files-alist + '("\\.tar\\.zpaq\\'" . "lrztar -z -L 9 -o %o %i &")))) +#+END_SRC * org-mode ** major mode *** general config