From 093ffa5fbf7143f4668bb0a3dc9659a5cc836e12 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Sat, 17 Jun 2023 17:20:29 +1000 Subject: Moving things one level deeper To ease gnu stow usage. Now we can do stow -t ~ emacs --- .emacs.d/init/ycp-dired.el | 118 --------------------------------------------- 1 file changed, 118 deletions(-) delete mode 100644 .emacs.d/init/ycp-dired.el (limited to '.emacs.d/init/ycp-dired.el') diff --git a/.emacs.d/init/ycp-dired.el b/.emacs.d/init/ycp-dired.el deleted file mode 100644 index e8a10ae..0000000 --- a/.emacs.d/init/ycp-dired.el +++ /dev/null @@ -1,118 +0,0 @@ -;;; ycp-dired.el -- My config for dired and friends -*- lexical-binding: t -*- - -;; Copyright (C) 2023 Free Software Foundation. - -;; Author: Yuchen Pei -;; Protesilaos Stavrou -;; Maintainer: Yuchen Pei -;; Package-Requires: ((emacs "28.2")) - -;; This file is part of dotfiles. - -;; dotfiles is free software: you can redistribute it and/or modify it under -;; the terms of the GNU Affero General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; dotfiles 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 Affero General -;; Public License for more details. - -;; You should have received a copy of the GNU Affero General Public -;; License along with dotfiles. If not, see . - -;;; Commentary: - -;; My config for dired and friends. - -;;; Code: - - -(setq delete-by-moving-to-trash 'always) - -(my-package dired - (:delay 5) - (put 'dired-find-alternate-file 'disabled nil) - (setq dired-dwim-target t) - (setq dired-recursive-copies 'always) - (setq dired-recursive-deletes 'always) - (setq dired-listing-switches "-alh") - (add-hook 'dired-mode-hook (lambda () (interactive) - (auto-revert-mode t))) - (add-hook 'dired-mode-hook #'hl-line-mode) - (setq dired-listing-switches "-al --block-size='1") - (my-keybind dired-mode-map - "^" (lambda () (interactive) (find-alternate-file ".."))) - (my-keybind global-map - "C-x C-j" #'dired-jump - ;; to open a dir in dired, find-file is more than sufficient - "C-x d" #'dired-jump) - ) - -(my-package my-dired - (:delay 5) - (my-keybind dired-mode-map - "a" #'my-dired-find-or-alternate - "" #'my-dired-find-or-alternate - "r" #'my-dired-do-rename-and-symlink-back - "s" #'my-dired-toggle-sorting) - ) - -;;; dired-aux -(my-package dired-aux - (:delay 5) - (setq dired-isearch-filenames 'dwim) - (setq dired-create-destination-dirs 'ask) ; Emacs 27 - (setq dired-vc-rename-file t) ; Emacs 27 - (setq dired-do-revert-buffer (lambda (dir) (not (file-remote-p dir)))) - (my-keybind dired-mode-map - "C-+" #'dired-create-empty-file - ;; "M-s f" #'nil - "C-x v v" #'dired-vc-next-action) - ) ; Emacs 28 - - -;;; dired-x -(my-package dired-x - (:delay 5) - (add-hook 'dired-mode-hook #'dired-omit-mode) - (setq dired-omit-files "\\`[.]?#") - (setq dired-clean-up-buffers-too t) - (setq dired-clean-confirm-killing-deleted-buffers t) - (setq dired-x-hands-off-my-keys t) ; easier to show the keys I use - (setq dired-bind-man nil) - (setq dired-bind-info nil) - (my-keybind dired-mode-map "I" #'dired-info)) - -;;; required by dired-subtree -(my-package dash - (:delay 5) - (:install t)) - -(my-package dired-subtree - (:delay 5) - (setq dired-subtree-use-backgrounds nil) - (my-keybind dired-mode-map - "" #'dired-subtree-toggle - "" #'dired-subtree-remove)) - -;;; image-dired -(my-package image-dired - (:delay 10) - (setq image-dired-thumbnail-storage 'standard) - (setq image-dired-external-viewer "xdg-open") - (setq image-dired-thumb-size 80) - (setq image-dired-thumb-margin 2) - (setq image-dired-thumb-relief 0) - (setq image-dired-thumbs-per-row 4) - (my-keybind image-dired-thumbnail-mode-map - "" #'image-dired-thumbnail-display-external)) - - -;;; dired-du -(my-package dired-du - (require 'dired-du) - (setq dired-du-size-format 'comma)) - -(provide 'ycp-dired) -- cgit v1.2.3