From 5e5d32cfddbf4a312c246eb7e81b617db5adb252 Mon Sep 17 00:00:00 2001 From: JSDurand Date: Sat, 18 Dec 2021 16:09:41 +0800 Subject: dired-conf: clean up the formats --- dired-conf.el | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) (limited to 'dired-conf.el') diff --git a/dired-conf.el b/dired-conf.el index e4aa4b8..c29c937 100644 --- a/dired-conf.el +++ b/dired-conf.el @@ -1,11 +1,42 @@ -;;; -*- lexical-binding: t; -*- +;;; dired-conf.el --- Configurations related to dired -*- lexical-binding: t; -*- + +;; Copyright (C) 2021 李俊緯 + +;; Author: 李俊緯 +;; Keywords: data, files, hardware, unix + +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation, either version 3 of the +;; License, or (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; . + +;;; Commentary: + +;; This file configures dired and related packages, including +;; trashed.el. + +;;; Code: + +;;; normal settings (require 'dired) (require 'dired-x) (require 'files) + (set 'insert-directory-program "gls") + (set 'dired-listing-switches "-alh --dired --group-directories-first --time-style=long-iso") + (setq dired-dwim-target t) (add-hook 'dired-mode-hook #'hl-line-mode) @@ -24,3 +55,14 @@ (require 'image-dired) (setq image-dired-external-viewer "open") + +;;; trash settings + +;; I tried the package trashed, but it does not support the trash can +;; on macOS. + +(set 'delete-by-moving-to-trash nil) +(set 'trash-directory "/Users/durand/.Trash/") + +(provide 'dired-conf) +;;; dired-conf.el ends here -- cgit v1.2.3-18-g5258