From d174be33ebccb55ac9368998b10ed0c8257c9cc0 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Mon, 11 Oct 2021 10:01:22 +0200 Subject: [PATCH] config/doom: little additions & reorderings --- .config/doom/config.el | 54 ++++++++++++++++++++++------------------ .config/doom/packages.el | 3 ++- 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/.config/doom/config.el b/.config/doom/config.el index 9bc39a1..3b10760 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -151,7 +151,7 @@ Version 2019-11-04 2021-02-16" ;; Data dirs -(defvar user-data-dir "~/data" "Location of the main user data") +(defvar user-data-dir "~/data/" "Location of the main user data") (load! "./local.el" nil t) @@ -171,9 +171,13 @@ Version 2019-11-04 2021-02-16" (add-to-list 'recentf-exclude "\\.\\(sync\\|stversions\\|stfolder\\)") ) -(after! ivy - (ivy-define-key ivy-minibuffer-map (kbd "") 'ivy-immediate-done) +(after! projectile + (push user-data-dir projectile-ignored-projects) + (let ((default-directory user-data-dir)) + (add-to-list 'projectile-known-projects (expand-file-name "music") t) + ) ) + ;;;; ORG (after! org @@ -356,10 +360,6 @@ Version 2019-11-04 2021-02-16" ;;;; PACKAGES -(push "~/data" projectile-ignored-projects) - -(setq eww-search-prefix "https://safe.duckduckgo.com/html/?q=") - (map! :map special-mode-map "" 'other-window "q" 'kill-this-buffer @@ -371,19 +371,25 @@ Version 2019-11-04 2021-02-16" :n "+" 'image-increase-size :n "-" 'image-decrease-size) +(setq eww-search-prefix "https://safe.duckduckgo.com/html/?q=") + +(after! ivy + (ivy-define-key ivy-minibuffer-map (kbd "") 'ivy-immediate-done) + ) + (after! dired ;; Make dired open certain file types externally when pressing RET on a file https://pastebin.com/8QWYpCA2 ;; Alternative: https://www.emacswiki.org/emacs/OpenWith (defvar unsupported-mime-types '("image/x-xcf")) ; "application/zip")) - (load "subr-x") - (defun get-mimetype (filepath) (string-trim (shell-command-to-string (concat "file -b --mime-type '" filepath "'")))) + (setq image-dired-external-viewer "gimp") + ;;(let ((mime "image/x-xcf")) (msg mime)) (defun dired-find-file-dwim () @@ -399,11 +405,12 @@ Version 2019-11-04 2021-02-16" :leader :desc "Dragon" "d" (lambda () (interactive) (dragon (s-join " " (dired-get-marked-files)))) :localleader + :desc "Compress/Extract" "c" 'dired-do-compress :desc "Size information" "s" (lambda () (interactive) (dired-smart-shell-command "s")) :desc "Symlink to this" "l" 'dired-do-symlink - :desc "Open dir in image-dired" "i" - (lambda () (interactive) (image-dired buffer-file-name)) - :desc "Compress/Extract" "c" 'dired-do-compress + :desc "Open image-dired" "i" 'image-dired + ;(lambda () (interactive) (image-dired buffer-file-name)) + :desc "Open image externally" "I" 'image-dired-dired-display-external ) (map! :map wdired-mode-map :n "RET" (lambda () (interactive) (progn @@ -423,18 +430,17 @@ Version 2019-11-04 2021-02-16" (global-activity-watch-mode) -(use-package! tramp - :defer t - :config - (add-to-list 'tramp-methods - '("yadm" - (tramp-login-program "yadm") - (tramp-login-args (("enter"))) - (tramp-login-env (("SHELL") ("/bin/sh"))) - (tramp-remote-shell "/bin/sh") - (tramp-remote-shell-args ("-c")))) - (map! :leader - :desc "Yadm status" "gT" (lambda () (interactive) (magit-status "/yadm::"))) +(after! tramp + (setq tramp-default-method "scpx") + (add-to-list 'tramp-methods + '("yadm" + (tramp-login-program "yadm") + (tramp-login-args (("enter"))) + (tramp-login-env (("SHELL") ("/bin/sh"))) + (tramp-remote-shell "/bin/sh") + (tramp-remote-shell-args ("-c")))) + (map! :leader + :desc "Yadm status" "gT" (lambda () (interactive) (magit-status "/yadm::"))) ) (use-package! evil-replace-with-register ; gr diff --git a/.config/doom/packages.el b/.config/doom/packages.el index 615a1a0..1b3c1c6 100644 --- a/.config/doom/packages.el +++ b/.config/doom/packages.el @@ -64,7 +64,8 @@ (package! plantuml-mode) ; Diagrams (package! adoc-mode) ; Asciidoc, a md alternative (package! nov) ; epub reader -(package! pkgbuild-mode) +(package! pkgbuild-mode) ; AUR PKGBUILDs +(package! picpocket) ; image viewer - https://github.com/johanclaesson/picpocket (package! chordpro-mode :recipe (:host github :repo "toemacs/chordpro-mode")) ; chord sheets