From 2a4acc646379e5614af15d006b9ff23abc936cf8 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Wed, 10 Jul 2024 13:38:51 +0300 Subject: emacs: init: Add thanos/dired-gnosis-rename --- .config/emacs/init.el | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) (limited to '.config/emacs/init.el') diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 9fe89de..90439f4 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -93,24 +93,23 @@ (setf straight-use-package-by-default t) (setf straight-recipe-overrides - '((transmission :type git :host nil :repo "git@thanosapollo.org:/var/git/transmission.git") - (gnosis :type git :host nil :repo "git@thanosapollo.org:/var/git/gnosis.git") - (pcmpl-emerge :type git :host nil :repo "git@thanosapollo.org:/var/git/pcmpl-emerge.git") - (pcmpl-rc :type git :host nil :repo "git@thanosapollo.org:/var/git/pcmpl-rc.git"))) + '((transmission :type git :host nil :repo "git@thanosapollo.org:/var/git/transmission.git"))) + +(setf browse-url-browser-function 'browse-url-generic + browse-url-generic-program "librewolf" + backup-directory-alist '((".*" . "~/.Trash")) + sentence-end-double-space t + default-input-method "bulgarian-phonetic" + gc-cons-threshold 5000000 + disabled-command-function nil ;; Enable all commands + url-privacy-level 'high) + +(setq calendar-date-style 'european) (use-package emacs :ensure t :config - (setf browse-url-browser-function 'browse-url-generic - browse-url-generic-program "librewolf" - backup-directory-alist '((".*" . "~/.Trash")) - sentence-end-double-space t - default-input-method "bulgarian-phonetic" - gc-cons-threshold 5000000 - disabled-command-function nil ;; Enable all commands - url-privacy-level 'high - calendar-date-style 'european) (if is-zeus (display-battery-mode 0) (display-battery-mode 1)) @@ -118,6 +117,12 @@ ;; use ssh for tramp, faster for small files (setf tramp-default-method "ssh") + (defun thanos/dired-gnosis-rename (&optional file) + (interactive) + (let ((file (or file (dired-get-filename))) + (name (read-string "File name: "))) + (dired-rename-file file (expand-file-name name gnosis-images-dir) nil))) + (savehist-mode) (save-place-mode 1) (recentf-mode 1) -- cgit v1.2.3