diff options
Diffstat (limited to '.emacs.d/init.el')
-rw-r--r-- | .emacs.d/init.el | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 9aae99c..150ed9b 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -606,52 +606,6 @@ (("M-'" . jinx-correct))) :hook ((org-mode . jinx-mode))) -(defun dired-watch-video () - "Watch play file with mpv." - (interactive) - (call-process-shell-command - (format "mpv \"%s\"" (dired-get-filename)) nil 0)) - -(defun dired-set-wallpaper () - "Set NAME as wallpaper using feh." - (interactive) - (call-process-shell-command - (format "feh --bg-scale %s" (dired-get-filename)) nil 0)) - -(defun dired-delete-files-except () - "Delete all files inside directory except match." - (interactive) - (let* ((directory (read-directory-name "Select directory: ")) - (files (directory-files directory t)) - (except-match (read-string "Except the ones that have: "))) - (dolist (file files) - (unless (or (string= "." (substring file -1)) - (string= ".." (substring file -2)) - (string-match except-match file)) - (dired-delete-file file t))))) - -(defun dired-delete-file-match () - "Delete all files inside directory except match." - (interactive) - (let* ((directory (read-directory-name "Select directory: ")) - (files (directory-files directory t)) - (match (read-string "Delete files that match: "))) - (dolist (file files) - (when (string-match-p match file) - (dired-delete-file file t))))) - -(defun dired-rename-capitalize-file () - "Capitalize the base name of the file at point in a Dired buffer." - (interactive) - (let* ((file (dired-get-file-for-visit)) - (new-file (capitalize (file-name-nondirectory file)))) - (if (string-prefix-p "." file) - (message "Skipping file starting with '.'") - (progn - (rename-file file (concat (file-name-directory file) new-file)) - (revert-buffer) - (message "Renamed %s to %s" file new-file))))) - (use-package term :bind (("C-c t" . term) :map term-mode-map |