Skip to content

jeetelongname/dired-dragon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 

Repository files navigation

dragon bindings for dired

Have you every needed to drag and drop something but then realised that you have to open a shudders non-Emacs file manger? Well not anymore! This package adds bindings for dragon so that you can live in Emacs a little more!

Do note that dired already acts like a sink in normal use so I won’t add dragon functionality for that. It’s a “why add an extra step” sort of thing.

Table of Contents

In-File Commands

These commands are the original work of @ymarco. Thanks! This set of commands allow you to drag the current buffers file or if your in an org / latex buffer to drag the corresponding pdf file by applying the universal argument or adding a bang to the end of the ex command. This can also be toggled to drag the pdf by default if dired-dragon-drag-pdf-by-default is non nil

CommandUseFlagRequires
:dragan evil ex command to drag the current buffer and quit-xevil
:drag!the bang equivelent of :drag-xevil
dired-dragon-current-filea vanilla version of the :drag command-xNothing

In-Dired Commands

These commands are meant to be used in dired.

CommandsUseFlag(s)
dired-dragonThe Default, drags all and closes after one drop-x -a
dired-dragon-individualwindow stays open and you can drag all the files
dired-dragon-stayAll files will be dropped into the same place but the window will stick around-a

Installation

Straight

(use-package dired-dragon
  :straight (:host github
             :repo "jeetelongname/dired-dragon")
  :after dired)

Doom

;; packages.el
(package! dired-dragon :recipe (:host github
                                :repo "jeetelongname/dired-dragon"))
;; config.el
(use-package! dired-dragon
  :after dired)

Configuring

Variables

if you are on a distro that names dragon differently cough arch then you can change the variable dired-dragon-location to the name and or location of your choice

(setq dired-dragon-location (executable-find "the name of the executable"))
;; using executable find is a little better as it does not hard code the location
;; but this is optional, just provide it with a full path (eg /usr/bin/dragon)

Some pre-made configurations

Doom Emacs

If you are a doom emacs user (like me) then this snippet will help

;; config.el
(use-package! dired-dragon
  :after dired
  :config
  (map! :map dired-mode-map
        (:prefix "C-s"
         :n "d" #'dired-dragon
         :n "s" #'dired-dragon-stay
         :n "i" #'dired-dragon-individual)))

Vanilla

This should be a copy and paste affair but I don’t use vanilla extensively

(use-package dired-dragon
  :straight (:host github
             :repo "jeetelongname/dired-dragon")
  :after dired

  ;; if you use use-package for bindings
  :bind (:map dired-mode-map
         ("C-d d" . dired-dragon)
         ("C-d s" . dired-dragon-stay)
         ("C-d i" . dired-dragon-individual))

  ;; if you don't
  (define-key dired-mode-map (kbd "C-d d") 'dired-dragon)
  (define-key dired-mode-map (kbd "C-d s") 'dired-dragon-stay)
  (define-key dired-mode-map (kbd "C-d i") 'dired-dragon-individual))

Contributing

Issue’s are welcome! Pull requests as well. This is my first “formal” package so any pointers would be appreciated

About

dragon bindings for our favorite file manager

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published