config/doom: little additions & reorderings

This commit is contained in:
xeruf 2021-10-11 10:01:22 +02:00
parent 2e33ec0efb
commit d174be33eb
2 changed files with 32 additions and 25 deletions

View File

@ -151,7 +151,7 @@ Version 2019-11-04 2021-02-16"
;; Data dirs ;; 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) (load! "./local.el" nil t)
@ -171,9 +171,13 @@ Version 2019-11-04 2021-02-16"
(add-to-list 'recentf-exclude "\\.\\(sync\\|stversions\\|stfolder\\)") (add-to-list 'recentf-exclude "\\.\\(sync\\|stversions\\|stfolder\\)")
) )
(after! ivy (after! projectile
(ivy-define-key ivy-minibuffer-map (kbd "<S-return>") 'ivy-immediate-done) (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 ;;;; ORG
(after! org (after! org
@ -356,10 +360,6 @@ Version 2019-11-04 2021-02-16"
;;;; PACKAGES ;;;; PACKAGES
(push "~/data" projectile-ignored-projects)
(setq eww-search-prefix "https://safe.duckduckgo.com/html/?q=")
(map! :map special-mode-map (map! :map special-mode-map
"<tab>" 'other-window "<tab>" 'other-window
"q" 'kill-this-buffer "q" 'kill-this-buffer
@ -371,19 +371,25 @@ Version 2019-11-04 2021-02-16"
:n "+" 'image-increase-size :n "+" 'image-increase-size
:n "-" 'image-decrease-size) :n "-" 'image-decrease-size)
(setq eww-search-prefix "https://safe.duckduckgo.com/html/?q=")
(after! ivy
(ivy-define-key ivy-minibuffer-map (kbd "<S-return>") 'ivy-immediate-done)
)
(after! dired (after! dired
;; Make dired open certain file types externally when pressing RET on a file https://pastebin.com/8QWYpCA2 ;; Make dired open certain file types externally when pressing RET on a file https://pastebin.com/8QWYpCA2
;; Alternative: https://www.emacswiki.org/emacs/OpenWith ;; Alternative: https://www.emacswiki.org/emacs/OpenWith
(defvar unsupported-mime-types (defvar unsupported-mime-types
'("image/x-xcf")) ; "application/zip")) '("image/x-xcf")) ; "application/zip"))
(load "subr-x") (load "subr-x")
(defun get-mimetype (filepath) (defun get-mimetype (filepath)
(string-trim (string-trim
(shell-command-to-string (concat "file -b --mime-type '" filepath "'")))) (shell-command-to-string (concat "file -b --mime-type '" filepath "'"))))
(setq image-dired-external-viewer "gimp")
;;(let ((mime "image/x-xcf")) (msg mime)) ;;(let ((mime "image/x-xcf")) (msg mime))
(defun dired-find-file-dwim () (defun dired-find-file-dwim ()
@ -399,11 +405,12 @@ Version 2019-11-04 2021-02-16"
:leader :leader
:desc "Dragon" "d" (lambda () (interactive) (dragon (s-join " " (dired-get-marked-files)))) :desc "Dragon" "d" (lambda () (interactive) (dragon (s-join " " (dired-get-marked-files))))
:localleader :localleader
:desc "Compress/Extract" "c" 'dired-do-compress
:desc "Size information" "s" (lambda () (interactive) (dired-smart-shell-command "s")) :desc "Size information" "s" (lambda () (interactive) (dired-smart-shell-command "s"))
:desc "Symlink to this" "l" 'dired-do-symlink :desc "Symlink to this" "l" 'dired-do-symlink
:desc "Open dir in image-dired" "i" :desc "Open image-dired" "i" 'image-dired
(lambda () (interactive) (image-dired buffer-file-name)) ;(lambda () (interactive) (image-dired buffer-file-name))
:desc "Compress/Extract" "c" 'dired-do-compress :desc "Open image externally" "I" 'image-dired-dired-display-external
) )
(map! :map wdired-mode-map (map! :map wdired-mode-map
:n "RET" (lambda () (interactive) (progn :n "RET" (lambda () (interactive) (progn
@ -423,18 +430,17 @@ Version 2019-11-04 2021-02-16"
(global-activity-watch-mode) (global-activity-watch-mode)
(use-package! tramp (after! tramp
:defer t (setq tramp-default-method "scpx")
:config (add-to-list 'tramp-methods
(add-to-list 'tramp-methods '("yadm"
'("yadm" (tramp-login-program "yadm")
(tramp-login-program "yadm") (tramp-login-args (("enter")))
(tramp-login-args (("enter"))) (tramp-login-env (("SHELL") ("/bin/sh")))
(tramp-login-env (("SHELL") ("/bin/sh"))) (tramp-remote-shell "/bin/sh")
(tramp-remote-shell "/bin/sh") (tramp-remote-shell-args ("-c"))))
(tramp-remote-shell-args ("-c")))) (map! :leader
(map! :leader :desc "Yadm status" "gT" (lambda () (interactive) (magit-status "/yadm::")))
:desc "Yadm status" "gT" (lambda () (interactive) (magit-status "/yadm::")))
) )
(use-package! evil-replace-with-register ; gr (use-package! evil-replace-with-register ; gr

View File

@ -64,7 +64,8 @@
(package! plantuml-mode) ; Diagrams (package! plantuml-mode) ; Diagrams
(package! adoc-mode) ; Asciidoc, a md alternative (package! adoc-mode) ; Asciidoc, a md alternative
(package! nov) ; epub reader (package! nov) ; epub reader
(package! pkgbuild-mode) (package! pkgbuild-mode) ; AUR PKGBUILDs
(package! picpocket) ; image viewer - https://github.com/johanclaesson/picpocket
(package! chordpro-mode (package! chordpro-mode
:recipe (:host github :repo "toemacs/chordpro-mode")) ; chord sheets :recipe (:host github :repo "toemacs/chordpro-mode")) ; chord sheets